From owner-svn-src-releng@freebsd.org Mon Nov 26 15:46:47 2018 Return-Path: Delivered-To: svn-src-releng@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41B41113A2C3; Mon, 26 Nov 2018 15:46:47 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D89927964C; Mon, 26 Nov 2018 15:46:46 +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 BAAEE5FE9; Mon, 26 Nov 2018 15:46:46 +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 wAQFkk6k060707; Mon, 26 Nov 2018 15:46:46 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAQFkkw7060706; Mon, 26 Nov 2018 15:46:46 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201811261546.wAQFkkw7060706@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 26 Nov 2018 15:46:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r340977 - releng/12.0/sys/kern X-SVN-Group: releng X-SVN-Commit-Author: markj X-SVN-Commit-Paths: releng/12.0/sys/kern X-SVN-Commit-Revision: 340977 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D89927964C X-Spamd-Result: default: False [1.12 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_MEDIUM(0.56)[0.562,0]; NEURAL_HAM_SHORT(-0.08)[-0.084,0]; NEURAL_SPAM_LONG(0.64)[0.643,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 15:46:47 -0000 Author: markj Date: Mon Nov 26 15:46:46 2018 New Revision: 340977 URL: https://svnweb.freebsd.org/changeset/base/340977 Log: MFstable/12 r340903: Avoid unsynchronized updates to kn_status. Approved by: re (gjb) Modified: releng/12.0/sys/kern/kern_event.c Directory Properties: releng/12.0/ (props changed) Modified: releng/12.0/sys/kern/kern_event.c ============================================================================== --- releng/12.0/sys/kern/kern_event.c Mon Nov 26 15:33:55 2018 (r340976) +++ releng/12.0/sys/kern/kern_event.c Mon Nov 26 15:46:46 2018 (r340977) @@ -1535,6 +1535,8 @@ findkn: kn->kn_kevent.flags &= ~(EV_ADD | EV_DELETE | EV_ENABLE | EV_DISABLE | EV_FORCEONESHOT); kn->kn_status = KN_DETACHED; + if ((kev->flags & EV_DISABLE) != 0) + kn->kn_status |= KN_DISABLED; kn_enter_flux(kn); error = knote_attach(kn, kq); @@ -1570,6 +1572,11 @@ findkn: KNOTE_ACTIVATE(kn, 1); } + if ((kev->flags & EV_ENABLE) != 0) + kn->kn_status &= ~KN_DISABLED; + else if ((kev->flags & EV_DISABLE) != 0) + kn->kn_status |= KN_DISABLED; + /* * The user may change some filter values after the initial EV_ADD, * but doing so will not reset any filter which has already been @@ -1587,19 +1594,17 @@ findkn: kn->kn_sdata = kev->data; } +done_ev_add: /* * We can get here with kn->kn_knlist == NULL. This can happen when * the initial attach event decides that the event is "completed" - * already. i.e. filt_procattach is called on a zombie process. It - * will call filt_proc which will remove it from the list, and NULL + * already, e.g., filt_procattach() is called on a zombie process. It + * will call filt_proc() which will remove it from the list, and NULL * kn_knlist. + * + * KN_DISABLED will be stable while the knote is in flux, so the + * unlocked read will not race with an update. */ -done_ev_add: - if ((kev->flags & EV_ENABLE) != 0) - kn->kn_status &= ~KN_DISABLED; - else if ((kev->flags & EV_DISABLE) != 0) - kn->kn_status |= KN_DISABLED; - if ((kn->kn_status & KN_DISABLED) == 0) event = kn->kn_fop->f_event(kn, 0); else From owner-svn-src-releng@freebsd.org Mon Nov 26 16:36:41 2018 Return-Path: Delivered-To: svn-src-releng@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B2A3113BEF9; Mon, 26 Nov 2018 16:36:41 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E1D597BDCC; Mon, 26 Nov 2018 16:36:40 +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 C2D076849; Mon, 26 Nov 2018 16:36:40 +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 wAQGaeCO086302; Mon, 26 Nov 2018 16:36:40 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAQGacQD086292; Mon, 26 Nov 2018 16:36:38 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201811261636.wAQGacQD086292@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 26 Nov 2018 16:36:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r340980 - in releng/12.0/sys: kern netinet netinet6 ofed/drivers/infiniband/ulp/sdp X-SVN-Group: releng X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in releng/12.0/sys: kern netinet netinet6 ofed/drivers/infiniband/ulp/sdp X-SVN-Commit-Revision: 340980 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E1D597BDCC X-Spamd-Result: default: False [1.84 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_SHORT(0.57)[0.569,0]; NEURAL_SPAM_MEDIUM(0.61)[0.607,0]; NEURAL_SPAM_LONG(0.66)[0.661,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 16:36:41 -0000 Author: markj Date: Mon Nov 26 16:36:38 2018 New Revision: 340980 URL: https://svnweb.freebsd.org/changeset/base/340980 Log: MFstable/12 r340921: Plug some networking sysctl leaks. Approved by: re (gjb) Modified: releng/12.0/sys/kern/uipc_socket.c releng/12.0/sys/kern/uipc_usrreq.c releng/12.0/sys/netinet/in_pcb.c releng/12.0/sys/netinet/ip_divert.c releng/12.0/sys/netinet/raw_ip.c releng/12.0/sys/netinet/sctp_sysctl.c releng/12.0/sys/netinet/tcp_subr.c releng/12.0/sys/netinet/udp_usrreq.c releng/12.0/sys/netinet6/ip6_mroute.c releng/12.0/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c Directory Properties: releng/12.0/ (props changed) Modified: releng/12.0/sys/kern/uipc_socket.c ============================================================================== --- releng/12.0/sys/kern/uipc_socket.c Mon Nov 26 16:10:20 2018 (r340979) +++ releng/12.0/sys/kern/uipc_socket.c Mon Nov 26 16:36:38 2018 (r340980) @@ -4007,6 +4007,7 @@ void sotoxsocket(struct socket *so, struct xsocket *xso) { + bzero(xso, sizeof(*xso)); xso->xso_len = sizeof *xso; xso->xso_so = (uintptr_t)so; xso->so_type = so->so_type; @@ -4025,8 +4026,6 @@ sotoxsocket(struct socket *so, struct xsocket *xso) xso->so_incqlen = so->sol_incqlen; xso->so_qlimit = so->sol_qlimit; xso->so_oobmark = 0; - bzero(&xso->so_snd, sizeof(xso->so_snd)); - bzero(&xso->so_rcv, sizeof(xso->so_rcv)); } else { xso->so_state |= so->so_qstate; xso->so_qlen = xso->so_incqlen = xso->so_qlimit = 0; Modified: releng/12.0/sys/kern/uipc_usrreq.c ============================================================================== --- releng/12.0/sys/kern/uipc_usrreq.c Mon Nov 26 16:10:20 2018 (r340979) +++ releng/12.0/sys/kern/uipc_usrreq.c Mon Nov 26 16:36:38 2018 (r340980) @@ -1812,7 +1812,7 @@ unp_pcblist(SYSCTL_HANDLER_ARGS) /* * OK, now we're committed to doing something. */ - xug = malloc(sizeof(*xug), M_TEMP, M_WAITOK); + xug = malloc(sizeof(*xug), M_TEMP, M_WAITOK | M_ZERO); UNP_LINK_RLOCK(); gencnt = unp_gencnt; n = unp_count; Modified: releng/12.0/sys/netinet/in_pcb.c ============================================================================== --- releng/12.0/sys/netinet/in_pcb.c Mon Nov 26 16:10:20 2018 (r340979) +++ releng/12.0/sys/netinet/in_pcb.c Mon Nov 26 16:36:38 2018 (r340980) @@ -2904,11 +2904,10 @@ void in_pcbtoxinpcb(const struct inpcb *inp, struct xinpcb *xi) { + bzero(xi, sizeof(*xi)); xi->xi_len = sizeof(struct xinpcb); if (inp->inp_socket) sotoxsocket(inp->inp_socket, &xi->xi_socket); - else - bzero(&xi->xi_socket, sizeof(struct xsocket)); bcopy(&inp->inp_inc, &xi->inp_inc, sizeof(struct in_conninfo)); xi->inp_gencnt = inp->inp_gencnt; xi->inp_ppcb = (uintptr_t)inp->inp_ppcb; Modified: releng/12.0/sys/netinet/ip_divert.c ============================================================================== --- releng/12.0/sys/netinet/ip_divert.c Mon Nov 26 16:10:20 2018 (r340979) +++ releng/12.0/sys/netinet/ip_divert.c Mon Nov 26 16:36:38 2018 (r340980) @@ -664,6 +664,7 @@ div_pcblist(SYSCTL_HANDLER_ARGS) if (error != 0) return (error); + bzero(&xig, sizeof(xig)); xig.xig_len = sizeof xig; xig.xig_count = n; xig.xig_gen = gencnt; Modified: releng/12.0/sys/netinet/raw_ip.c ============================================================================== --- releng/12.0/sys/netinet/raw_ip.c Mon Nov 26 16:10:20 2018 (r340979) +++ releng/12.0/sys/netinet/raw_ip.c Mon Nov 26 16:36:38 2018 (r340980) @@ -1060,6 +1060,7 @@ rip_pcblist(SYSCTL_HANDLER_ARGS) n = V_ripcbinfo.ipi_count; INP_INFO_WUNLOCK(&V_ripcbinfo); + bzero(&xig, sizeof(xig)); xig.xig_len = sizeof xig; xig.xig_count = n; xig.xig_gen = gencnt; Modified: releng/12.0/sys/netinet/sctp_sysctl.c ============================================================================== --- releng/12.0/sys/netinet/sctp_sysctl.c Mon Nov 26 16:10:20 2018 (r340979) +++ releng/12.0/sys/netinet/sctp_sysctl.c Mon Nov 26 16:36:38 2018 (r340980) @@ -395,6 +395,9 @@ sctp_sysctl_handle_assoclist(SYSCTL_HANDLER_ARGS) SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_SYSCTL, EPERM); return (EPERM); } + memset(&xinpcb, 0, sizeof(xinpcb)); + memset(&xstcb, 0, sizeof(xstcb)); + memset(&xraddr, 0, sizeof(xraddr)); LIST_FOREACH(inp, &SCTP_BASE_INFO(listhead), sctp_list) { SCTP_INP_RLOCK(inp); if (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_ALLGONE) { Modified: releng/12.0/sys/netinet/tcp_subr.c ============================================================================== --- releng/12.0/sys/netinet/tcp_subr.c Mon Nov 26 16:10:20 2018 (r340979) +++ releng/12.0/sys/netinet/tcp_subr.c Mon Nov 26 16:36:38 2018 (r340980) @@ -556,6 +556,7 @@ sysctl_net_inet_list_func_info(SYSCTL_HANDLER_ARGS) cnt++; #endif if (req->oldptr != NULL) { + bzero(&tfi, sizeof(tfi)); tfi.tfi_refcnt = f->tf_fb->tfb_refcnt; tfi.tfi_id = f->tf_fb->tfb_id; (void)strncpy(tfi.tfi_alias, f->tf_name, @@ -2154,6 +2155,7 @@ tcp_pcblist(SYSCTL_HANDLER_ARGS) if (error != 0) return (error); + bzero(&xig, sizeof(xig)); xig.xig_len = sizeof xig; xig.xig_count = n + m; xig.xig_gen = gencnt; @@ -3215,8 +3217,8 @@ tcp_inptoxtp(const struct inpcb *inp, struct xtcpcb *x struct tcpcb *tp = intotcpcb(inp); sbintime_t now; + bzero(xt, sizeof(*xt)); if (inp->inp_flags & INP_TIMEWAIT) { - bzero(xt, sizeof(struct xtcpcb)); xt->t_state = TCPS_TIME_WAIT; } else { xt->t_state = tp->t_state; @@ -3244,7 +3246,6 @@ tcp_inptoxtp(const struct inpcb *inp, struct xtcpcb *x bcopy(tp->t_fb->tfb_tcp_block_name, xt->xt_stack, TCP_FUNCTION_NAME_LEN_MAX); - bzero(xt->xt_logid, TCP_LOG_ID_LEN); #ifdef TCP_BLACKBOX (void)tcp_log_get_id(tp, xt->xt_logid); #endif Modified: releng/12.0/sys/netinet/udp_usrreq.c ============================================================================== --- releng/12.0/sys/netinet/udp_usrreq.c Mon Nov 26 16:10:20 2018 (r340979) +++ releng/12.0/sys/netinet/udp_usrreq.c Mon Nov 26 16:36:38 2018 (r340980) @@ -887,6 +887,7 @@ udp_pcblist(SYSCTL_HANDLER_ARGS) if (error != 0) return (error); + bzero(&xig, sizeof(xig)); xig.xig_len = sizeof xig; xig.xig_count = n; xig.xig_gen = gencnt; Modified: releng/12.0/sys/netinet6/ip6_mroute.c ============================================================================== --- releng/12.0/sys/netinet6/ip6_mroute.c Mon Nov 26 16:10:20 2018 (r340979) +++ releng/12.0/sys/netinet6/ip6_mroute.c Mon Nov 26 16:36:38 2018 (r340980) @@ -203,7 +203,8 @@ sysctl_mif6table(SYSCTL_HANDLER_ARGS) struct mif6_sctl *out; int error; - out = malloc(sizeof(struct mif6_sctl) * MAXMIFS, M_TEMP, M_WAITOK); + out = malloc(sizeof(struct mif6_sctl) * MAXMIFS, M_TEMP, + M_WAITOK | M_ZERO); for (int i = 0; i < MAXMIFS; i++) { out[i].m6_flags = mif6table[i].m6_flags; out[i].m6_rate_limit = mif6table[i].m6_rate_limit; Modified: releng/12.0/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c ============================================================================== --- releng/12.0/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c Mon Nov 26 16:10:20 2018 (r340979) +++ releng/12.0/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c Mon Nov 26 16:36:38 2018 (r340980) @@ -1810,6 +1810,7 @@ sdp_pcblist(SYSCTL_HANDLER_ARGS) if (error != 0) return (error); + bzero(&xig, sizeof(xig)); xig.xig_len = sizeof xig; xig.xig_count = n; xig.xig_gen = 0; From owner-svn-src-releng@freebsd.org Tue Nov 27 17:58:30 2018 Return-Path: Delivered-To: svn-src-releng@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C811511566C9; Tue, 27 Nov 2018 17:58:30 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7980C8AFA4; Tue, 27 Nov 2018 17:58:30 +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 5AAF21EC32; Tue, 27 Nov 2018 17:58:30 +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 wARHwUj6079419; Tue, 27 Nov 2018 17:58:30 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wARHwPYk079395; Tue, 27 Nov 2018 17:58:25 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201811271758.wARHwPYk079395@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 27 Nov 2018 17:58:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r341085 - in releng/12.0/sys: cddl/contrib/opensolaris/uts/common/fs/zfs fs/autofs fs/cd9660 fs/devfs fs/ext2fs fs/fdescfs fs/fuse fs/msdosfs fs/nandfs fs/nfsclient fs/pseudofs fs/smbfs... X-SVN-Group: releng X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in releng/12.0/sys: cddl/contrib/opensolaris/uts/common/fs/zfs fs/autofs fs/cd9660 fs/devfs fs/ext2fs fs/fdescfs fs/fuse fs/msdosfs fs/nandfs fs/nfsclient fs/pseudofs fs/smbfs fs/tmpfs fs/udf kern sys... X-SVN-Commit-Revision: 341085 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7980C8AFA4 X-Spamd-Result: default: False [1.49 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_SHORT(0.14)[0.138,0]; NEURAL_SPAM_MEDIUM(0.76)[0.760,0]; NEURAL_SPAM_LONG(0.59)[0.594,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Nov 2018 17:58:31 -0000 Author: markj Date: Tue Nov 27 17:58:25 2018 New Revision: 341085 URL: https://svnweb.freebsd.org/changeset/base/341085 Log: MFstable/12 r340970: Ensure that directory entry padding bytes are zeroed. Approved by: re (gjb) Modified: releng/12.0/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c releng/12.0/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c releng/12.0/sys/fs/autofs/autofs_vnops.c releng/12.0/sys/fs/cd9660/cd9660_vnops.c releng/12.0/sys/fs/devfs/devfs_devs.c releng/12.0/sys/fs/ext2fs/ext2_lookup.c releng/12.0/sys/fs/fdescfs/fdesc_vnops.c releng/12.0/sys/fs/fuse/fuse_internal.c releng/12.0/sys/fs/msdosfs/msdosfs_vnops.c releng/12.0/sys/fs/nandfs/nandfs_vnops.c releng/12.0/sys/fs/nfsclient/nfs_clrpcops.c releng/12.0/sys/fs/pseudofs/pseudofs_vnops.c releng/12.0/sys/fs/smbfs/smbfs_io.c releng/12.0/sys/fs/tmpfs/tmpfs_subr.c releng/12.0/sys/fs/tmpfs/tmpfs_vfsops.c releng/12.0/sys/fs/tmpfs/tmpfs_vnops.c releng/12.0/sys/fs/udf/udf_vnops.c releng/12.0/sys/kern/uipc_mqueue.c releng/12.0/sys/kern/vfs_export.c releng/12.0/sys/sys/dirent.h releng/12.0/sys/ufs/ufs/ufs_vnops.c Directory Properties: releng/12.0/ (props changed) Modified: releng/12.0/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- releng/12.0/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Tue Nov 27 17:51:50 2018 (r341084) +++ releng/12.0/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Tue Nov 27 17:58:25 2018 (r341085) @@ -262,9 +262,9 @@ sfs_readdir_common(uint64_t parent_id, uint64_t id, st entry.d_fileno = id; entry.d_type = DT_DIR; entry.d_name[0] = '.'; - entry.d_name[1] = '\0'; entry.d_namlen = 1; entry.d_reclen = sizeof(entry); + dirent_terminate(&entry); error = vfs_read_dirent(ap, &entry, uio->uio_offset); if (error != 0) return (SET_ERROR(error)); @@ -277,9 +277,9 @@ sfs_readdir_common(uint64_t parent_id, uint64_t id, st entry.d_type = DT_DIR; entry.d_name[0] = '.'; entry.d_name[1] = '.'; - entry.d_name[2] = '\0'; entry.d_namlen = 2; entry.d_reclen = sizeof(entry); + dirent_terminate(&entry); error = vfs_read_dirent(ap, &entry, uio->uio_offset); if (error != 0) return (SET_ERROR(error)); @@ -694,6 +694,7 @@ zfsctl_root_readdir(ap) strcpy(entry.d_name, node->snapdir->sn_name); entry.d_namlen = strlen(entry.d_name); entry.d_reclen = sizeof(entry); + dirent_terminate(&entry); error = vfs_read_dirent(ap, &entry, uio->uio_offset); if (error != 0) { if (error == ENAMETOOLONG) @@ -1097,6 +1098,7 @@ zfsctl_snapdir_readdir(ap) strcpy(entry.d_name, snapname); entry.d_namlen = strlen(entry.d_name); entry.d_reclen = sizeof(entry); + dirent_terminate(&entry); error = vfs_read_dirent(ap, &entry, uio->uio_offset); if (error != 0) { if (error == ENAMETOOLONG) Modified: releng/12.0/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- releng/12.0/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Nov 27 17:51:50 2018 (r341084) +++ releng/12.0/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Nov 27 17:58:25 2018 (r341085) @@ -2545,6 +2545,7 @@ zfs_readdir(vnode_t *vp, uio_t *uio, cred_t *cr, int * odp->d_namlen = strlen(zap.za_name); (void) strlcpy(odp->d_name, zap.za_name, odp->d_namlen + 1); odp->d_type = type; + dirent_terminate(odp); odp = (dirent64_t *)((intptr_t)odp + reclen); } outcount += reclen; Modified: releng/12.0/sys/fs/autofs/autofs_vnops.c ============================================================================== --- releng/12.0/sys/fs/autofs/autofs_vnops.c Tue Nov 27 17:51:50 2018 (r341084) +++ releng/12.0/sys/fs/autofs/autofs_vnops.c Tue Nov 27 17:58:25 2018 (r341085) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -44,7 +45,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -354,14 +354,11 @@ autofs_readdir_one(struct uio *uio, const char *name, size_t *reclenp) { struct dirent dirent; - size_t namlen, padded_namlen, reclen; + size_t namlen, reclen; int error; namlen = strlen(name); - padded_namlen = roundup2(namlen + 1, __alignof(struct dirent)); - KASSERT(padded_namlen <= MAXNAMLEN, ("%zd > MAXNAMLEN", padded_namlen)); - reclen = offsetof(struct dirent, d_name) + padded_namlen; - + reclen = _GENERIC_DIRLEN(namlen); if (reclenp != NULL) *reclenp = reclen; @@ -376,7 +373,7 @@ autofs_readdir_one(struct uio *uio, const char *name, dirent.d_type = DT_DIR; dirent.d_namlen = namlen; memcpy(dirent.d_name, name, namlen); - memset(dirent.d_name + namlen, 0, padded_namlen - namlen); + dirent_terminate(&dirent); error = uiomove(&dirent, reclen, uio); return (error); Modified: releng/12.0/sys/fs/cd9660/cd9660_vnops.c ============================================================================== --- releng/12.0/sys/fs/cd9660/cd9660_vnops.c Tue Nov 27 17:51:50 2018 (r341084) +++ releng/12.0/sys/fs/cd9660/cd9660_vnops.c Tue Nov 27 17:58:25 2018 (r341085) @@ -380,8 +380,8 @@ iso_uiodir(idp,dp,off) { int error; - dp->d_name[dp->d_namlen] = 0; dp->d_reclen = GENERIC_DIRSIZ(dp); + dirent_terminate(dp); if (idp->uio->uio_resid < dp->d_reclen) { idp->eofflag = 0; Modified: releng/12.0/sys/fs/devfs/devfs_devs.c ============================================================================== --- releng/12.0/sys/fs/devfs/devfs_devs.c Tue Nov 27 17:51:50 2018 (r341084) +++ releng/12.0/sys/fs/devfs/devfs_devs.c Tue Nov 27 17:58:25 2018 (r341085) @@ -226,7 +226,7 @@ devfs_newdirent(char *name, int namelen) de->de_dirent->d_namlen = namelen; de->de_dirent->d_reclen = GENERIC_DIRSIZ(&d); bcopy(name, de->de_dirent->d_name, namelen); - de->de_dirent->d_name[namelen] = '\0'; + dirent_terminate(de->de_dirent); vfs_timestamp(&de->de_ctime); de->de_mtime = de->de_atime = de->de_ctime; de->de_links = 1; Modified: releng/12.0/sys/fs/ext2fs/ext2_lookup.c ============================================================================== --- releng/12.0/sys/fs/ext2fs/ext2_lookup.c Tue Nov 27 17:51:50 2018 (r341084) +++ releng/12.0/sys/fs/ext2fs/ext2_lookup.c Tue Nov 27 17:58:25 2018 (r341085) @@ -223,7 +223,7 @@ ext2_readdir(struct vop_readdir_args *ap) dstdp.d_fileno = dp->e2d_ino; dstdp.d_reclen = GENERIC_DIRSIZ(&dstdp); bcopy(dp->e2d_name, dstdp.d_name, dstdp.d_namlen); - dstdp.d_name[dstdp.d_namlen] = '\0'; + dirent_terminate(&dstdp); if (dstdp.d_reclen > uio->uio_resid) { if (uio->uio_resid == startresid) error = EINVAL; Modified: releng/12.0/sys/fs/fdescfs/fdesc_vnops.c ============================================================================== --- releng/12.0/sys/fs/fdescfs/fdesc_vnops.c Tue Nov 27 17:51:50 2018 (r341084) +++ releng/12.0/sys/fs/fdescfs/fdesc_vnops.c Tue Nov 27 17:58:25 2018 (r341085) @@ -561,8 +561,8 @@ fdesc_readdir(struct vop_readdir_args *ap) dp->d_namlen = i + 1; dp->d_reclen = UIO_MX; bcopy("..", dp->d_name, dp->d_namlen); - dp->d_name[i + 1] = '\0'; dp->d_type = DT_DIR; + dirent_terminate(dp); break; default: if (fdp->fd_ofiles[fcnt].fde_file == NULL) @@ -572,6 +572,7 @@ fdesc_readdir(struct vop_readdir_args *ap) dp->d_type = (fmp->flags & FMNT_LINRDLNKF) == 0 ? DT_CHR : DT_LNK; dp->d_fileno = i + FD_DESC; + dirent_terminate(dp); break; } if (dp->d_namlen != 0) { Modified: releng/12.0/sys/fs/fuse/fuse_internal.c ============================================================================== --- releng/12.0/sys/fs/fuse/fuse_internal.c Tue Nov 27 17:51:50 2018 (r341084) +++ releng/12.0/sys/fs/fuse/fuse_internal.c Tue Nov 27 17:58:25 2018 (r341085) @@ -357,7 +357,7 @@ fuse_internal_readdir_processdata(struct uio *uio, memcpy((char *)cookediov->base + sizeof(struct dirent) - MAXNAMLEN - 1, (char *)buf + FUSE_NAME_OFFSET, fudge->namelen); - ((char *)cookediov->base)[bytesavail - 1] = '\0'; + dirent_terminate(de); err = uiomove(cookediov->base, cookediov->len, uio); if (err) { Modified: releng/12.0/sys/fs/msdosfs/msdosfs_vnops.c ============================================================================== --- releng/12.0/sys/fs/msdosfs/msdosfs_vnops.c Tue Nov 27 17:51:50 2018 (r341084) +++ releng/12.0/sys/fs/msdosfs/msdosfs_vnops.c Tue Nov 27 17:58:25 2018 (r341085) @@ -1550,14 +1550,16 @@ msdosfs_readdir(struct vop_readdir_args *ap) switch (n) { case 0: dirbuf.d_namlen = 1; - strcpy(dirbuf.d_name, "."); + dirbuf.d_name[0] = '.'; break; case 1: dirbuf.d_namlen = 2; - strcpy(dirbuf.d_name, ".."); + dirbuf.d_name[0] = '.'; + dirbuf.d_name[1] = '.'; break; } dirbuf.d_reclen = GENERIC_DIRSIZ(&dirbuf); + dirent_terminate(&dirbuf); if (uio->uio_resid < dirbuf.d_reclen) goto out; error = uiomove(&dirbuf, dirbuf.d_reclen, uio); Modified: releng/12.0/sys/fs/nandfs/nandfs_vnops.c ============================================================================== --- releng/12.0/sys/fs/nandfs/nandfs_vnops.c Tue Nov 27 17:51:50 2018 (r341084) +++ releng/12.0/sys/fs/nandfs/nandfs_vnops.c Tue Nov 27 17:58:25 2018 (r341085) @@ -1226,13 +1226,14 @@ nandfs_readdir(struct vop_readdir_args *ap) ndirent = (struct nandfs_dir_entry *)pos; name_len = ndirent->name_len; - memset(&dirent, 0, sizeof(struct dirent)); + memset(&dirent, 0, sizeof(dirent)); dirent.d_fileno = ndirent->inode; if (dirent.d_fileno) { dirent.d_type = ndirent->file_type; dirent.d_namlen = name_len; strncpy(dirent.d_name, ndirent->name, name_len); dirent.d_reclen = GENERIC_DIRSIZ(&dirent); + dirent_terminate(&dirent); DPRINTF(READDIR, ("copying `%*.*s`\n", name_len, name_len, dirent.d_name)); } @@ -1246,7 +1247,7 @@ nandfs_readdir(struct vop_readdir_args *ap) /* Transfer */ if (dirent.d_fileno) - uiomove(&dirent, GENERIC_DIRSIZ(&dirent), uio); + uiomove(&dirent, dirent.d_reclen, uio); /* Advance */ diroffset += ndirent->rec_len; Modified: releng/12.0/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- releng/12.0/sys/fs/nfsclient/nfs_clrpcops.c Tue Nov 27 17:51:50 2018 (r341084) +++ releng/12.0/sys/fs/nfsclient/nfs_clrpcops.c Tue Nov 27 17:58:25 2018 (r341085) @@ -2959,6 +2959,7 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, nfsuint64 return (error); nd->nd_mrep = NULL; dp = (struct dirent *)uio_iov_base(uiop); + dp->d_pad0 = dp->d_pad1 = 0; dp->d_off = 0; dp->d_type = DT_DIR; dp->d_fileno = dotfileid; @@ -2978,6 +2979,7 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, nfsuint64 uio_iov_base_add(uiop, dp->d_reclen); uio_iov_len_add(uiop, -(dp->d_reclen)); dp = (struct dirent *)uio_iov_base(uiop); + dp->d_pad0 = dp->d_pad1 = 0; dp->d_off = 0; dp->d_type = DT_DIR; dp->d_fileno = dotdotfileid; @@ -3091,6 +3093,7 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, nfsuint64 tlen += 8; /* To ensure null termination. */ left = DIRBLKSIZ - blksiz; if (_GENERIC_DIRLEN(len) + NFSX_HYPER > left) { + NFSBZERO(uio_iov_base(uiop), left); dp->d_reclen += left; uio_iov_base_add(uiop, left); uio_iov_len_add(uiop, -(left)); @@ -3103,6 +3106,7 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, nfsuint64 bigenough = 0; if (bigenough) { dp = (struct dirent *)uio_iov_base(uiop); + dp->d_pad0 = dp->d_pad1 = 0; dp->d_off = 0; dp->d_namlen = len; dp->d_reclen = _GENERIC_DIRLEN(len) + @@ -3120,7 +3124,7 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, nfsuint64 goto nfsmout; cp = uio_iov_base(uiop); tlen -= len; - *cp = '\0'; /* null terminate */ + NFSBZERO(cp, tlen); cp += tlen; /* points to cookie storage */ tl2 = (u_int32_t *)cp; uio_iov_base_add(uiop, (tlen + NFSX_HYPER)); @@ -3208,6 +3212,7 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, nfsuint64 */ if (blksiz > 0) { left = DIRBLKSIZ - blksiz; + NFSBZERO(uio_iov_base(uiop), left); dp->d_reclen += left; uio_iov_base_add(uiop, left); uio_iov_len_add(uiop, -(left)); @@ -3235,10 +3240,8 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, nfsuint64 */ while (uio_uio_resid(uiop) > 0 && uio_uio_resid(uiop) != tresid) { dp = (struct dirent *)uio_iov_base(uiop); + NFSBZERO(dp, DIRBLKSIZ); dp->d_type = DT_UNKNOWN; - dp->d_fileno = 0; - dp->d_namlen = 0; - dp->d_name[0] = '\0'; tl = (u_int32_t *)&dp->d_name[4]; *tl++ = cookie.lval[0]; *tl = cookie.lval[1]; @@ -3393,6 +3396,7 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsui return (error); nd->nd_mrep = NULL; dp = (struct dirent *)uio_iov_base(uiop); + dp->d_pad0 = dp->d_pad1 = 0; dp->d_off = 0; dp->d_type = DT_DIR; dp->d_fileno = dotfileid; @@ -3412,6 +3416,7 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsui uio_iov_base_add(uiop, dp->d_reclen); uio_iov_len_add(uiop, -(dp->d_reclen)); dp = (struct dirent *)uio_iov_base(uiop); + dp->d_pad0 = dp->d_pad1 = 0; dp->d_off = 0; dp->d_type = DT_DIR; dp->d_fileno = dotdotfileid; @@ -3506,6 +3511,7 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsui tlen += 8; /* To ensure null termination. */ left = DIRBLKSIZ - blksiz; if (_GENERIC_DIRLEN(len) + NFSX_HYPER > left) { + NFSBZERO(uio_iov_base(uiop), left); dp->d_reclen += left; uio_iov_base_add(uiop, left); uio_iov_len_add(uiop, -(left)); @@ -3518,6 +3524,7 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsui bigenough = 0; if (bigenough) { dp = (struct dirent *)uio_iov_base(uiop); + dp->d_pad0 = dp->d_pad1 = 0; dp->d_off = 0; dp->d_namlen = len; dp->d_reclen = _GENERIC_DIRLEN(len) + @@ -3538,7 +3545,7 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsui goto nfsmout; cp = uio_iov_base(uiop); tlen -= len; - *cp = '\0'; + NFSBZERO(cp, tlen); cp += tlen; /* points to cookie storage */ tl2 = (u_int32_t *)cp; if (len == 2 && cnp->cn_nameptr[0] == '.' && @@ -3708,6 +3715,7 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsui */ if (blksiz > 0) { left = DIRBLKSIZ - blksiz; + NFSBZERO(uio_iov_base(uiop), left); dp->d_reclen += left; uio_iov_base_add(uiop, left); uio_iov_len_add(uiop, -(left)); @@ -3735,10 +3743,8 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsui */ while (uio_uio_resid(uiop) > 0 && uio_uio_resid(uiop) != tresid) { dp = (struct dirent *)uio_iov_base(uiop); + NFSBZERO(dp, DIRBLKSIZ); dp->d_type = DT_UNKNOWN; - dp->d_fileno = 0; - dp->d_namlen = 0; - dp->d_name[0] = '\0'; tl = (u_int32_t *)&dp->d_name[4]; *tl++ = cookie.lval[0]; *tl = cookie.lval[1]; Modified: releng/12.0/sys/fs/pseudofs/pseudofs_vnops.c ============================================================================== --- releng/12.0/sys/fs/pseudofs/pseudofs_vnops.c Tue Nov 27 17:51:50 2018 (r341084) +++ releng/12.0/sys/fs/pseudofs/pseudofs_vnops.c Tue Nov 27 17:58:25 2018 (r341085) @@ -828,7 +828,6 @@ pfs_readdir(struct vop_readdir_args *va) /* PFS_DELEN was picked to fit PFS_NAMLEN */ for (i = 0; i < PFS_NAMELEN - 1 && pn->pn_name[i] != '\0'; ++i) pfsent->entry.d_name[i] = pn->pn_name[i]; - pfsent->entry.d_name[i] = 0; pfsent->entry.d_namlen = i; switch (pn->pn_type) { case pfstype_procdir: @@ -853,6 +852,7 @@ pfs_readdir(struct vop_readdir_args *va) panic("%s has unexpected node type: %d", pn->pn_name, pn->pn_type); } PFS_TRACE(("%s", pfsent->entry.d_name)); + dirent_terminate(&pfsent->entry); STAILQ_INSERT_TAIL(&lst, pfsent, link); offset += PFS_DELEN; resid -= PFS_DELEN; Modified: releng/12.0/sys/fs/smbfs/smbfs_io.c ============================================================================== --- releng/12.0/sys/fs/smbfs/smbfs_io.c Tue Nov 27 17:51:50 2018 (r341084) +++ releng/12.0/sys/fs/smbfs/smbfs_io.c Tue Nov 27 17:58:25 2018 (r341085) @@ -106,8 +106,8 @@ smbfs_readvdir(struct vnode *vp, struct uio *uio, stru de.d_namlen = offset + 1; de.d_name[0] = '.'; de.d_name[1] = '.'; - de.d_name[offset + 1] = '\0'; de.d_type = DT_DIR; + dirent_terminate(&de); error = uiomove(&de, DE_SIZE, uio); if (error) goto out; @@ -156,7 +156,7 @@ smbfs_readvdir(struct vnode *vp, struct uio *uio, stru de.d_type = (ctx->f_attr.fa_attr & SMB_FA_DIR) ? DT_DIR : DT_REG; de.d_namlen = ctx->f_nmlen; bcopy(ctx->f_name, de.d_name, de.d_namlen); - de.d_name[de.d_namlen] = '\0'; + dirent_terminate(&de); if (smbfs_fastlookup) { error = smbfs_nget(vp->v_mount, vp, ctx->f_name, ctx->f_nmlen, &ctx->f_attr, &newvp); Modified: releng/12.0/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- releng/12.0/sys/fs/tmpfs/tmpfs_subr.c Tue Nov 27 17:51:50 2018 (r341084) +++ releng/12.0/sys/fs/tmpfs/tmpfs_subr.c Tue Nov 27 17:58:25 2018 (r341085) @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -50,7 +51,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -1127,8 +1127,8 @@ tmpfs_dir_getdotdent(struct tmpfs_node *node, struct u dent.d_type = DT_DIR; dent.d_namlen = 1; dent.d_name[0] = '.'; - dent.d_name[1] = '\0'; dent.d_reclen = GENERIC_DIRSIZ(&dent); + dirent_terminate(&dent); if (dent.d_reclen > uio->uio_resid) error = EJUSTRETURN; @@ -1171,8 +1171,8 @@ tmpfs_dir_getdotdotdent(struct tmpfs_node *node, struc dent.d_namlen = 2; dent.d_name[0] = '.'; dent.d_name[1] = '.'; - dent.d_name[2] = '\0'; dent.d_reclen = GENERIC_DIRSIZ(&dent); + dirent_terminate(&dent); if (dent.d_reclen > uio->uio_resid) error = EJUSTRETURN; @@ -1292,8 +1292,8 @@ tmpfs_dir_getdents(struct tmpfs_node *node, struct uio d.d_namlen = de->td_namelen; MPASS(de->td_namelen < sizeof(d.d_name)); (void)memcpy(d.d_name, de->ud.td_name, de->td_namelen); - d.d_name[de->td_namelen] = '\0'; d.d_reclen = GENERIC_DIRSIZ(&d); + dirent_terminate(&d); /* Stop reading if the directory entry we are treating is * bigger than the amount of data that can be returned. */ Modified: releng/12.0/sys/fs/tmpfs/tmpfs_vfsops.c ============================================================================== --- releng/12.0/sys/fs/tmpfs/tmpfs_vfsops.c Tue Nov 27 17:51:50 2018 (r341084) +++ releng/12.0/sys/fs/tmpfs/tmpfs_vfsops.c Tue Nov 27 17:58:25 2018 (r341085) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -56,7 +57,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include Modified: releng/12.0/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- releng/12.0/sys/fs/tmpfs/tmpfs_vnops.c Tue Nov 27 17:51:50 2018 (r341084) +++ releng/12.0/sys/fs/tmpfs/tmpfs_vnops.c Tue Nov 27 17:58:25 2018 (r341085) @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -51,7 +52,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: releng/12.0/sys/fs/udf/udf_vnops.c ============================================================================== --- releng/12.0/sys/fs/udf/udf_vnops.c Tue Nov 27 17:51:50 2018 (r341084) +++ releng/12.0/sys/fs/udf/udf_vnops.c Tue Nov 27 17:58:25 2018 (r341085) @@ -843,9 +843,9 @@ udf_readdir(struct vop_readdir_args *a) dir.d_fileno = node->hash_id; dir.d_type = DT_DIR; dir.d_name[0] = '.'; - dir.d_name[1] = '\0'; dir.d_namlen = 1; dir.d_reclen = GENERIC_DIRSIZ(&dir); + dirent_terminate(&dir); uiodir.dirent = &dir; error = udf_uiodir(&uiodir, dir.d_reclen, uio, 1); if (error) @@ -855,9 +855,9 @@ udf_readdir(struct vop_readdir_args *a) dir.d_type = DT_DIR; dir.d_name[0] = '.'; dir.d_name[1] = '.'; - dir.d_name[2] = '\0'; dir.d_namlen = 2; dir.d_reclen = GENERIC_DIRSIZ(&dir); + dirent_terminate(&dir); uiodir.dirent = &dir; error = udf_uiodir(&uiodir, dir.d_reclen, uio, 2); } else { @@ -867,6 +867,7 @@ udf_readdir(struct vop_readdir_args *a) dir.d_type = (fid->file_char & UDF_FILE_CHAR_DIR) ? DT_DIR : DT_UNKNOWN; dir.d_reclen = GENERIC_DIRSIZ(&dir); + dirent_terminate(&dir); uiodir.dirent = &dir; error = udf_uiodir(&uiodir, dir.d_reclen, uio, ds->this_off); Modified: releng/12.0/sys/kern/uipc_mqueue.c ============================================================================== --- releng/12.0/sys/kern/uipc_mqueue.c Tue Nov 27 17:51:50 2018 (r341084) +++ releng/12.0/sys/kern/uipc_mqueue.c Tue Nov 27 17:58:25 2018 (r341085) @@ -1428,7 +1428,6 @@ mqfs_readdir(struct vop_readdir_args *ap) entry.d_fileno = pn->mn_fileno; for (i = 0; i < MQFS_NAMELEN - 1 && pn->mn_name[i] != '\0'; ++i) entry.d_name[i] = pn->mn_name[i]; - entry.d_name[i] = 0; entry.d_namlen = i; switch (pn->mn_type) { case mqfstype_root: @@ -1447,6 +1446,7 @@ mqfs_readdir(struct vop_readdir_args *ap) panic("%s has unexpected node type: %d", pn->mn_name, pn->mn_type); } + dirent_terminate(&entry); if (entry.d_reclen > uio->uio_resid) break; if (offset >= uio->uio_offset) { Modified: releng/12.0/sys/kern/vfs_export.c ============================================================================== --- releng/12.0/sys/kern/vfs_export.c Tue Nov 27 17:51:50 2018 (r341084) +++ releng/12.0/sys/kern/vfs_export.c Tue Nov 27 17:58:25 2018 (r341085) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include "opt_inet6.h" #include +#include #include #include #include @@ -55,7 +56,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include Modified: releng/12.0/sys/sys/dirent.h ============================================================================== --- releng/12.0/sys/sys/dirent.h Tue Nov 27 17:51:50 2018 (r341084) +++ releng/12.0/sys/sys/dirent.h Tue Nov 27 17:58:25 2018 (r341085) @@ -126,6 +126,19 @@ struct freebsd11_dirent { #ifdef _KERNEL #define GENERIC_DIRSIZ(dp) _GENERIC_DIRSIZ(dp) + +/* + * Ensure that padding bytes are zeroed and that the name is NUL-terminated. + */ +static inline void +dirent_terminate(struct dirent *dp) +{ + + dp->d_pad0 = 0; + dp->d_pad1 = 0; + memset(dp->d_name + dp->d_namlen, 0, + dp->d_reclen - (__offsetof(struct dirent, d_name) + dp->d_namlen)); +} #endif #endif /* !_SYS_DIRENT_H_ */ Modified: releng/12.0/sys/ufs/ufs/ufs_vnops.c ============================================================================== --- releng/12.0/sys/ufs/ufs/ufs_vnops.c Tue Nov 27 17:51:50 2018 (r341084) +++ releng/12.0/sys/ufs/ufs/ufs_vnops.c Tue Nov 27 17:58:25 2018 (r341085) @@ -2217,7 +2217,7 @@ ufs_readdir(ap) dstdp.d_fileno = dp->d_ino; dstdp.d_reclen = GENERIC_DIRSIZ(&dstdp); bcopy(dp->d_name, dstdp.d_name, dstdp.d_namlen); - dstdp.d_name[dstdp.d_namlen] = '\0'; + dirent_terminate(&dstdp); if (dstdp.d_reclen > uio->uio_resid) { if (uio->uio_resid == startresid) error = EINVAL; From owner-svn-src-releng@freebsd.org Tue Nov 27 19:42:18 2018 Return-Path: Delivered-To: svn-src-releng@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0EBBD11598E7; Tue, 27 Nov 2018 19:42:18 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A789E8F996; Tue, 27 Nov 2018 19:42:17 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 86E0F1FE58; Tue, 27 Nov 2018 19:42:17 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wARJgHwt037508; Tue, 27 Nov 2018 19:42:17 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wARJgG1X037500; Tue, 27 Nov 2018 19:42:16 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <201811271942.wARJgG1X037500@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Tue, 27 Nov 2018 19:42:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r341088 - in releng/11.2: . sys/conf sys/fs/nfs sys/fs/nfsserver X-SVN-Group: releng X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: in releng/11.2: . sys/conf sys/fs/nfs sys/fs/nfsserver X-SVN-Commit-Revision: 341088 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A789E8F996 X-Spamd-Result: default: False [1.42 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_LONG(0.51)[0.511,0]; NEURAL_SPAM_MEDIUM(0.69)[0.687,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_SPAM_SHORT(0.22)[0.223,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Nov 2018 19:42:18 -0000 Author: gordon Date: Tue Nov 27 19:42:16 2018 New Revision: 341088 URL: https://svnweb.freebsd.org/changeset/base/341088 Log: Fix multiple vulnerabilities in NFS server code. [SA-18:13.nfs] Reported by: Jakub Jirasek, Secunia Research at Flexera Approved by: so Security: FreeBSD-SA-18:13.nfs Security: CVE-2018-17157 Security: CVE-2018-17158 Security: CVE-2018-17159 Modified: releng/11.2/UPDATING releng/11.2/sys/conf/newvers.sh releng/11.2/sys/fs/nfs/nfs_commonsubs.c releng/11.2/sys/fs/nfsserver/nfs_nfsdport.c releng/11.2/sys/fs/nfsserver/nfs_nfsdsocket.c Modified: releng/11.2/UPDATING ============================================================================== --- releng/11.2/UPDATING Tue Nov 27 19:40:18 2018 (r341087) +++ releng/11.2/UPDATING Tue Nov 27 19:42:16 2018 (r341088) @@ -16,6 +16,19 @@ from older versions of FreeBSD, try WITHOUT_CLANG and the tip of head, and then rebuild without this option. The bootstrap process from older version of current across the gcc/clang cutover is a bit fragile. +20181127 p5 FreeBSD-SA-18:13.nfs + FreeBSD-EN-18:13.icmp + FreeBSD-EN-18:14.tzdata + FreeBSD-EN-18:15.loader + + Fix multiple vulnerabilities in NFS server code. [SA-18:13.nfs] + + Fix ICMP buffer underwrite. [EN-18:13.icmp] + + Timezone database information update. [EN-18:14.tzdata] + + Fix deferred kernel loading breaks loader password. [EN-18:15.loader] + 20180927 p4 FreeBSD-EN-18:09.ip FreeBSD-EN-18:10.syscall FreeBSD-EN-18:11.listen Modified: releng/11.2/sys/conf/newvers.sh ============================================================================== --- releng/11.2/sys/conf/newvers.sh Tue Nov 27 19:40:18 2018 (r341087) +++ releng/11.2/sys/conf/newvers.sh Tue Nov 27 19:42:16 2018 (r341088) @@ -44,7 +44,7 @@ TYPE="FreeBSD" REVISION="11.2" -BRANCH="RELEASE-p4" +BRANCH="RELEASE-p5" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/11.2/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- releng/11.2/sys/fs/nfs/nfs_commonsubs.c Tue Nov 27 19:40:18 2018 (r341087) +++ releng/11.2/sys/fs/nfs/nfs_commonsubs.c Tue Nov 27 19:42:16 2018 (r341088) @@ -360,10 +360,14 @@ nfsm_advance(struct nfsrv_descript *nd, int offs, int if (offs == 0) goto out; /* - * A negative offs should be considered a serious problem. + * A negative offs might indicate a corrupted mbuf chain and, + * as such, a printf is logged. */ - if (offs < 0) - panic("nfsrv_advance"); + if (offs < 0) { + printf("nfsrv_advance: negative offs\n"); + error = EBADRPC; + goto out; + } /* * If left == -1, calculate it here. Modified: releng/11.2/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- releng/11.2/sys/fs/nfsserver/nfs_nfsdport.c Tue Nov 27 19:40:18 2018 (r341087) +++ releng/11.2/sys/fs/nfsserver/nfs_nfsdport.c Tue Nov 27 19:42:16 2018 (r341088) @@ -1858,9 +1858,15 @@ nfsrvd_readdirplus(struct nfsrv_descript *nd, int isdg * cookie) should be in the reply. At least one client "hints" 0, * so I set it to cnt for that case. I also round it up to the * next multiple of DIRBLKSIZ. + * Since the size of a Readdirplus directory entry reply will always + * be greater than a directory entry returned by VOP_READDIR(), it + * does not make sense to read more than NFS_SRVMAXDATA() via + * VOP_READDIR(). */ if (siz <= 0) siz = cnt; + else if (siz > NFS_SRVMAXDATA(nd)) + siz = NFS_SRVMAXDATA(nd); siz = ((siz + DIRBLKSIZ - 1) & ~(DIRBLKSIZ - 1)); if (nd->nd_flag & ND_NFSV4) { Modified: releng/11.2/sys/fs/nfsserver/nfs_nfsdsocket.c ============================================================================== --- releng/11.2/sys/fs/nfsserver/nfs_nfsdsocket.c Tue Nov 27 19:40:18 2018 (r341087) +++ releng/11.2/sys/fs/nfsserver/nfs_nfsdsocket.c Tue Nov 27 19:42:16 2018 (r341088) @@ -758,11 +758,6 @@ nfsrvd_compound(struct nfsrv_descript *nd, int isdgram *repp = *tl; op = fxdr_unsigned(int, *tl); NFSD_DEBUG(4, "op=%d\n", op); - - binuptime(&start_time); - nfsrvd_statstart(op, &start_time); - statsinprog = 1; - if (op < NFSV4OP_ACCESS || (op >= NFSV4OP_NOPS && (nd->nd_flag & ND_NFSV41) == 0) || (op >= NFSV41_NOPS && (nd->nd_flag & ND_NFSV41) != 0)) { @@ -774,6 +769,11 @@ nfsrvd_compound(struct nfsrv_descript *nd, int isdgram } else { repp++; } + + binuptime(&start_time); + nfsrvd_statstart(op, &start_time); + statsinprog = 1; + if (i == 0) op0 = op; if (i == numops - 1) From owner-svn-src-releng@freebsd.org Tue Nov 27 19:43:16 2018 Return-Path: Delivered-To: svn-src-releng@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C803D11599B1; Tue, 27 Nov 2018 19:43:16 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 91E8E8FB42; Tue, 27 Nov 2018 19:43:16 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 739DC1FE69; Tue, 27 Nov 2018 19:43:16 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wARJhG8n037619; Tue, 27 Nov 2018 19:43:16 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wARJhGH5037618; Tue, 27 Nov 2018 19:43:16 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <201811271943.wARJhGH5037618@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Tue, 27 Nov 2018 19:43:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r341089 - releng/11.2/sys/netinet X-SVN-Group: releng X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: releng/11.2/sys/netinet X-SVN-Commit-Revision: 341089 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 91E8E8FB42 X-Spamd-Result: default: False [1.32 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_SHORT(0.21)[0.213,0]; NEURAL_SPAM_MEDIUM(0.64)[0.643,0]; NEURAL_SPAM_LONG(0.47)[0.465,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Nov 2018 19:43:17 -0000 Author: gordon Date: Tue Nov 27 19:43:16 2018 New Revision: 341089 URL: https://svnweb.freebsd.org/changeset/base/341089 Log: Fix ICMP buffer underwrite. [EN-18:13.icmp] Approved by: so Security: FreeBSD-EN-18:13.icmp Security: CVE-2018-17156 Modified: releng/11.2/sys/netinet/ip_icmp.c Modified: releng/11.2/sys/netinet/ip_icmp.c ============================================================================== --- releng/11.2/sys/netinet/ip_icmp.c Tue Nov 27 19:42:16 2018 (r341088) +++ releng/11.2/sys/netinet/ip_icmp.c Tue Nov 27 19:43:16 2018 (r341089) @@ -310,7 +310,8 @@ stdreply: icmpelen = max(8, min(V_icmp_quotelen, ntohs #endif icmplen = min(icmplen, M_TRAILINGSPACE(m) - sizeof(struct ip) - ICMP_MINLEN); - m_align(m, ICMP_MINLEN + icmplen); + m_align(m, sizeof(struct ip) + ICMP_MINLEN + icmplen); + m->m_data += sizeof(struct ip); m->m_len = ICMP_MINLEN + icmplen; /* XXX MRT make the outgoing packet use the same FIB @@ -352,6 +353,8 @@ stdreply: icmpelen = max(8, min(V_icmp_quotelen, ntohs * reply should bypass as well. */ m->m_flags |= n->m_flags & M_SKIP_FIREWALL; + KASSERT(M_LEADINGSPACE(m) >= sizeof(struct ip), + ("insufficient space for ip header")); m->m_data -= sizeof(struct ip); m->m_len += sizeof(struct ip); m->m_pkthdr.len = m->m_len; From owner-svn-src-releng@freebsd.org Tue Nov 27 19:44:41 2018 Return-Path: Delivered-To: svn-src-releng@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 144401159AFF; Tue, 27 Nov 2018 19:44:41 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B89CA8FE4A; Tue, 27 Nov 2018 19:44:40 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 98FE41FE72; Tue, 27 Nov 2018 19:44:40 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wARJie1Y037834; Tue, 27 Nov 2018 19:44:40 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wARJieiw037830; Tue, 27 Nov 2018 19:44:40 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <201811271944.wARJieiw037830@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Tue, 27 Nov 2018 19:44:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r341091 - releng/11.2/contrib/tzdata X-SVN-Group: releng X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: releng/11.2/contrib/tzdata X-SVN-Commit-Revision: 341091 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B89CA8FE4A X-Spamd-Result: default: False [1.68 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_LONG(0.63)[0.632,0]; NEURAL_SPAM_MEDIUM(0.79)[0.790,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_SPAM_SHORT(0.25)[0.254,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Nov 2018 19:44:41 -0000 Author: gordon Date: Tue Nov 27 19:44:39 2018 New Revision: 341091 URL: https://svnweb.freebsd.org/changeset/base/341091 Log: Timezone database information update. [EN-18:14.tzdata] Approved by: so Security: FreeBSD-EN-18:14.tzdata Modified: releng/11.2/contrib/tzdata/CONTRIBUTING releng/11.2/contrib/tzdata/Makefile releng/11.2/contrib/tzdata/NEWS releng/11.2/contrib/tzdata/README releng/11.2/contrib/tzdata/africa releng/11.2/contrib/tzdata/antarctica releng/11.2/contrib/tzdata/asia releng/11.2/contrib/tzdata/australasia releng/11.2/contrib/tzdata/backward releng/11.2/contrib/tzdata/backzone releng/11.2/contrib/tzdata/etcetera releng/11.2/contrib/tzdata/europe releng/11.2/contrib/tzdata/factory releng/11.2/contrib/tzdata/leap-seconds.list releng/11.2/contrib/tzdata/leapseconds releng/11.2/contrib/tzdata/leapseconds.awk releng/11.2/contrib/tzdata/northamerica releng/11.2/contrib/tzdata/pacificnew releng/11.2/contrib/tzdata/southamerica releng/11.2/contrib/tzdata/systemv releng/11.2/contrib/tzdata/theory.html releng/11.2/contrib/tzdata/version releng/11.2/contrib/tzdata/yearistype.sh releng/11.2/contrib/tzdata/ziguard.awk releng/11.2/contrib/tzdata/zishrink.awk releng/11.2/contrib/tzdata/zone.tab releng/11.2/contrib/tzdata/zone1970.tab releng/11.2/contrib/tzdata/zoneinfo2tdf.pl Modified: releng/11.2/contrib/tzdata/CONTRIBUTING ============================================================================== --- releng/11.2/contrib/tzdata/CONTRIBUTING Tue Nov 27 19:44:04 2018 (r341090) +++ releng/11.2/contrib/tzdata/CONTRIBUTING Tue Nov 27 19:44:39 2018 (r341091) @@ -17,11 +17,14 @@ To email small changes, please run a POSIX shell comma 'diff -u old/europe new/europe >myfix.patch', and attach myfix.patch to the email. -For more-elaborate changes, please read the theory.html file and browse -the mailing list archives for -examples of patches that tend to work well. Additions to -data should contain commentary citing reliable sources as -justification. Citations should use https: URLs if available. +For more-elaborate or possibly-controversial changes, +such as renaming, adding or removing zones, please read + or the file +theory.html. It is also good to browse the mailing list archives + for examples of patches that tend +to work well. Additions to data should contain commentary citing +reliable sources as justification. Citations should use https: URLs +if available. Please submit changes against either the latest release in or the master branch of the development Modified: releng/11.2/contrib/tzdata/Makefile ============================================================================== --- releng/11.2/contrib/tzdata/Makefile Tue Nov 27 19:44:04 2018 (r341090) +++ releng/11.2/contrib/tzdata/Makefile Tue Nov 27 19:44:39 2018 (r341091) @@ -1,3 +1,5 @@ +# Make and install tzdb code and data. + # This file is in the public domain, so clarified as of # 2009-05-17 by Arthur David Olson. @@ -19,9 +21,9 @@ BUGEMAIL= tz@iana.org # DATAFORM= rearguard DATAFORM= main -# Change the line below for your time zone (after finding the zone you want in -# the time zone files, or adding it to a time zone file). -# Alternatively, if you discover you've got the wrong time zone, you can just +# Change the line below for your timezone (after finding the one you want in +# one of the $(TDATA) source files, or adding it to a source file). +# Alternatively, if you discover you've got the wrong timezone, you can just # zic -l rightzone # to correct things. # Use the command @@ -31,14 +33,14 @@ DATAFORM= main LOCALTIME= GMT # If you want something other than Eastern United States time as a template -# for handling POSIX-style time zone environment variables, -# change the line below (after finding the zone you want in the -# time zone files, or adding it to a time zone file). +# for handling POSIX-style timezone environment variables, +# change the line below (after finding the timezone you want in the +# one of the $(TDATA) source files, or adding it to a source file). # When a POSIX-style environment variable is handled, the rules in the # template file are used to determine "spring forward" and "fall back" days and # times; the environment variable itself specifies UT offsets of standard and # daylight saving time. -# Alternatively, if you discover you've got the wrong time zone, you can just +# Alternatively, if you discover you've got the wrong timezone, you can just # zic -p rightzone # to correct things. # Use the command @@ -75,7 +77,7 @@ DESTDIR = # TOPDIR should be empty or an absolute name unless you're just testing. TOPDIR = -# The default local time zone is taken from the file TZDEFAULT. +# The default local timezone is taken from the file TZDEFAULT. TZDEFAULT = $(TOPDIR)/etc/localtime # The subdirectory containing installed program and data files, and @@ -84,7 +86,7 @@ TZDEFAULT = $(TOPDIR)/etc/localtime USRDIR = usr USRSHAREDIR = $(USRDIR)/share -# "Compiled" time zone information is placed in the "TZDIR" directory +# "Compiled" timezone information is placed in the "TZDIR" directory # (and subdirectories). # TZDIR_BASENAME should not contain "/" and should not be ".", ".." or empty. TZDIR_BASENAME= zoneinfo @@ -106,9 +108,13 @@ MANDIR = $(TOPDIR)/$(USRSHAREDIR)/man LIBDIR = $(TOPDIR)/$(USRDIR)/lib -# Types to try, as an alternative to time_t. int64_t should be first. -TIME_T_ALTERNATIVES = int64_t int32_t uint32_t uint64_t +# Types to try, as an alternative to time_t. +TIME_T_ALTERNATIVES = $(TIME_T_ALTERNATIVES_HEAD) $(TIME_T_ALTERNATIVES_TAIL) +TIME_T_ALTERNATIVES_HEAD = int64_t +TIME_T_ALTERNATIVES_TAIL = int32_t uint32_t uint64_t +# What kind of TZif data files to generate. +# (TZif is the binary time zone data format that zic generates.) # If you want only POSIX time, with time values interpreted as # seconds since the epoch (not counting leap seconds), use # REDO= posix_only @@ -129,7 +135,7 @@ TIME_T_ALTERNATIVES = int64_t int32_t uint32_t uint64_ REDO= posix_right -# To install data in text form that has all the information of the binary data, +# To install data in text form that has all the information of the TZif data, # (optionally incorporating leap second information), use # TZDATA_TEXT= tzdata.zi leapseconds # To install text data without leap second information (e.g., because @@ -171,7 +177,6 @@ LDLIBS= # Add the following to the end of the "CFLAGS=" line as needed to override # defaults specified in the source code. "-DFOO" is equivalent to "-DFOO=1". -# -DBIG_BANG=-9999999LL if the Big Bang occurred at time -9999999 (see zic.c) # -DDEPRECATE_TWO_DIGIT_YEARS for optional runtime warnings about strftime # formats that generate only the last two digits of year numbers # -DEPOCH_LOCAL if the 'time' function returns local time not UT @@ -295,7 +300,7 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \ # "tzsetwall", "offtime", "timelocal", "timegm", "timeoff", # "posix2time", and "time2posix" to be added to the time conversion library. # "tzsetwall" is like "tzset" except that it arranges for local wall clock -# time (rather than the time specified in the TZ environment variable) +# time (rather than the timezone specified in the TZ environment variable) # to be used. # "offtime" is like "gmtime" except that it accepts a second (long) argument # that gives an offset to add to the time_t when converting it. @@ -318,7 +323,7 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \ # "posix2time_z" and "time2posix_z" are added as well. # The functions ending in "_z" (or "_rz") are like their unsuffixed # (or suffixed-by-"_r") counterparts, except with an extra first -# argument of opaque type timezone_t that specifies the time zone. +# argument of opaque type timezone_t that specifies the timezone. # "tzalloc" allocates a timezone_t value, and "tzfree" frees it. # # If you want to allocate state structures in localtime, add @@ -357,11 +362,14 @@ ZIC= $(zic) $(ZFLAGS) ZFLAGS= -# How to use zic to install tz binary files. +# How to use zic to install TZif files. ZIC_INSTALL= $(ZIC) -d '$(DESTDIR)$(TZDIR)' $(LEAPSECONDS) # The name of a Posix-compliant 'awk' on your system. +# Older 'mawk' versions, such as the 'mawk' in Ubuntu 16.04, might dump core; +# on Ubuntu you can work around this with +# AWK= gawk AWK= awk # The full path name of a Posix-compliant shell, preferably one that supports @@ -410,10 +418,16 @@ SAFE_CHARSET3= 'abcdefghijklmnopqrstuvwxyz{|}~' SAFE_CHARSET= $(SAFE_CHARSET1)$(SAFE_CHARSET2)$(SAFE_CHARSET3) SAFE_CHAR= '[]'$(SAFE_CHARSET)'-]' +# These characters are Latin-1, and so are likely to be displayable +# even in editors with limited character sets. +UNUSUAL_OK_LATIN_1 = «°±»½¾× +# This IPA symbol is represented in Unicode as the composition of +# U+0075 and U+032F, and U+032F is not considered alphabetic by some +# grep implementations that do not grok composition. +UNUSUAL_OK_IPA = u̯ # Non-ASCII non-letters that OK_CHAR allows, as these characters are -# useful in commentary. XEmacs 21.5.34 displays them correctly, -# presumably because they are Latin-1. -UNUSUAL_OK_CHARSET= °±½¾× +# useful in commentary. +UNUSUAL_OK_CHARSET= $(UNUSUAL_OK_LATIN_1)$(UNUSUAL_OK_IPA) # OK_CHAR matches any character allowed in the distributed files. # This is the same as SAFE_CHAR, except that UNUSUAL_OK_CHARSET and @@ -492,11 +506,14 @@ AWK_SCRIPTS= checklinks.awk checktab.awk leapseconds.a ziguard.awk zishrink.awk MISC= $(AWK_SCRIPTS) zoneinfo2tdf.pl TZS_YEAR= 2050 +TZS_CUTOFF_FLAG= -c $(TZS_YEAR) TZS= to$(TZS_YEAR).tzs TZS_NEW= to$(TZS_YEAR)new.tzs TZS_DEPS= $(PRIMARY_YDATA) asctime.c localtime.c \ private.h tzfile.h zdump.c zic.c -ENCHILADA= $(COMMON) $(DOCS) $(SOURCES) $(DATA) $(MISC) $(TZS) tzdata.zi +# EIGHT_YARDS is just a yard short of the whole ENCHILADA. +EIGHT_YARDS = $(COMMON) $(DOCS) $(SOURCES) $(DATA) $(MISC) tzdata.zi +ENCHILADA = $(EIGHT_YARDS) $(TZS) # Consult these files when deciding whether to rebuild the 'version' file. # This list is not the same as the output of 'git ls-files', since @@ -560,14 +577,21 @@ version: $(VERSION_DEPS) printf '%s\n' "$$V" >$@.out mv $@.out $@ -# These files can be tailored by setting BACKWARD, PACKRATDATA, etc. +# These files can be tailored by setting BACKWARD and PACKRATDATA. vanguard.zi main.zi rearguard.zi: $(DSTDATA_ZI_DEPS) $(AWK) -v DATAFORM=`expr $@ : '\(.*\).zi'` -f ziguard.awk \ $(TDATA) $(PACKRATDATA) >$@.out mv $@.out $@ -tzdata.zi: $(DATAFORM).zi version +# This file has a version comment that attempts to capture any tailoring +# via BACKWARD, DATAFORM, PACKRATDATA, and REDO. +tzdata.zi: $(DATAFORM).zi version zishrink.awk version=`sed 1q version` && \ - LC_ALL=C $(AWK) -v version="$$version" -f zishrink.awk \ + LC_ALL=C $(AWK) \ + -v dataform='$(DATAFORM)' \ + -v deps='$(DSTDATA_ZI_DEPS) zishrink.awk' \ + -v redo='$(REDO)' \ + -v version="$$version" \ + -f zishrink.awk \ $(DATAFORM).zi >$@.out mv $@.out $@ @@ -605,14 +629,16 @@ INSTALLARGS = \ YEARISTYPE='$(YEARISTYPE)' \ ZIC='$(ZIC)' -# 'make install_data' installs one set of tz binary files. -install_data: zic leapseconds yearistype tzdata.zi +INSTALL_DATA_DEPS = zic leapseconds yearistype tzdata.zi + +# 'make install_data' installs one set of TZif files. +install_data: $(INSTALL_DATA_DEPS) $(ZIC_INSTALL) tzdata.zi -posix_only: +posix_only: $(INSTALL_DATA_DEPS) $(MAKE) $(INSTALLARGS) LEAPSECONDS= install_data -right_only: +right_only: $(INSTALL_DATA_DEPS) $(MAKE) $(INSTALLARGS) LEAPSECONDS='-L leapseconds' \ install_data @@ -639,7 +665,7 @@ posix_right: posix_only # This obsolescent rule is present for backwards compatibility with # tz releases 2014g through 2015g. It should go away eventually. -posix_packrat: +posix_packrat: $(INSTALL_DATA_DEPS) $(MAKE) $(INSTALLARGS) PACKRATDATA=backzone posix_only zones: $(REDO) @@ -650,29 +676,33 @@ ZDS = dummy.zd # Rule used only by submakes invoked by the $(TZS_NEW) rule. # It is separate so that GNU 'make -j' can run instances in parallel. $(ZDS): zdump - ./zdump -i -c $(TZS_YEAR) '$(wd)/'$$(expr $@ : '\(.*\).zd') >$@ + ./zdump -i $(TZS_CUTOFF_FLAG) '$(wd)/'$$(expr $@ : '\(.*\).zd') \ + >$@ -$(TZS_NEW): tzdata.zi zdump zic - rm -fr tzs.dir - mkdir tzs.dir - $(zic) -d tzs.dir tzdata.zi +TZS_NEW_DEPS = tzdata.zi zdump zic +$(TZS_NEW): $(TZS_NEW_DEPS) + rm -fr tzs$(TZS_YEAR).dir + mkdir tzs$(TZS_YEAR).dir + $(zic) -d tzs$(TZS_YEAR).dir tzdata.zi $(AWK) '/^L/{print "Link\t" $$2 "\t" $$3}' \ tzdata.zi | LC_ALL=C sort >$@.out wd=`pwd` && \ - set x `$(AWK) '/^Z/{print "tzs.dir/" $$2 ".zd"}' tzdata.zi \ + x=`$(AWK) '/^Z/{print "tzs$(TZS_YEAR).dir/" $$2 ".zd"}' \ + tzdata.zi \ | LC_ALL=C sort -t . -k 2,2` && \ + set x $$x && \ shift && \ ZDS=$$* && \ - $(MAKE) wd="$$wd" TZS_YEAR=$(TZS_YEAR) ZDS="$$ZDS" $$ZDS && \ - sed 's,^TZ=".*tzs\.dir/,TZ=",' $$ZDS >>$@.out - rm -fr tzs.dir + $(MAKE) wd="$$wd" TZS_CUTOFF_FLAG="$(TZS_CUTOFF_FLAG)" \ + ZDS="$$ZDS" $$ZDS && \ + sed 's,^TZ=".*\.dir/,TZ=",' $$ZDS >>$@.out + rm -fr tzs$(TZS_YEAR).dir mv $@.out $@ -# If $(TZS) does not already exist (e.g., old-format tarballs), create it. -# If it exists but 'make check_tzs' fails, a maintainer should inspect the +# If $(TZS) exists but 'make check_tzs' fails, a maintainer should inspect the # failed output and fix the inconsistency, perhaps by running 'make force_tzs'. $(TZS): - $(MAKE) force_tzs + touch $@ force_tzs: $(TZS_NEW) cp $(TZS_NEW) $(TZS) @@ -711,18 +741,21 @@ check_character_set: $(ENCHILADA) $(MISC) $(SOURCES) $(WEB_PAGES) \ CONTRIBUTING LICENSE README \ version tzdata.zi && \ - ! grep -Env $(SAFE_LINE)'|^UNUSUAL_OK_CHARSET='$(OK_CHAR)'*$$' \ + ! grep -Env $(SAFE_LINE)'|^UNUSUAL_OK_'$(OK_CHAR)'*$$' \ Makefile && \ ! grep -Env $(SAFE_SHARP_LINE) $(TDATA_TO_CHECK) backzone \ leapseconds yearistype.sh zone.tab && \ ! grep -Env $(OK_LINE) $(ENCHILADA); \ } + touch $@ check_white_space: $(ENCHILADA) patfmt=' \t|[\f\r\v]' && pat=`printf "$$patfmt\\n"` && \ - ! grep -En "$$pat" $(ENCHILADA) + ! grep -En "$$pat" \ + $$(ls $(ENCHILADA) | grep -Fvx leap-seconds.list) ! grep -n '[[:space:]]$$' \ $$(ls $(ENCHILADA) | grep -Fvx leap-seconds.list) + touch $@ PRECEDES_FILE_NAME = ^(Zone|Link[[:space:]]+[^[:space:]]+)[[:space:]]+ FILE_NAME_COMPONENT_TOO_LONG = \ @@ -731,6 +764,7 @@ FILE_NAME_COMPONENT_TOO_LONG = \ check_name_lengths: $(TDATA_TO_CHECK) backzone ! grep -En '$(FILE_NAME_COMPONENT_TOO_LONG)' \ $(TDATA_TO_CHECK) backzone + touch $@ CHECK_CC_LIST = { n = split($$1,a,/,/); for (i=2; i<=n; i++) print a[1], a[i]; } @@ -743,52 +777,61 @@ check_sorted: backward backzone iso3166.tab zone.tab z LC_ALL=C sort -c $(AWK) '/^[^#]/ $(CHECK_CC_LIST)' zone1970.tab | \ LC_ALL=C sort -cu + touch $@ check_links: checklinks.awk $(TDATA_TO_CHECK) tzdata.zi $(AWK) -f checklinks.awk $(TDATA_TO_CHECK) $(AWK) -f checklinks.awk tzdata.zi + touch $@ check_tables: checktab.awk $(PRIMARY_YDATA) $(ZONETABLES) for tab in $(ZONETABLES); do \ $(AWK) -f checktab.awk -v zone_table=$$tab $(PRIMARY_YDATA) \ || exit; \ done + touch $@ check_tzs: $(TZS) $(TZS_NEW) - diff -u $(TZS) $(TZS_NEW) + if test -s $(TZS); then \ + diff -u $(TZS) $(TZS_NEW); \ + else \ + cp $(TZS_NEW) $(TZS); \ + fi + touch $@ # This checks only the HTML 4.01 strict page. # To check the the other pages, use . check_web: tz-how-to.html $(VALIDATE_ENV) $(VALIDATE) $(VALIDATE_FLAGS) tz-how-to.html + touch $@ # Check that zishrink.awk does not alter the data, and that ziguard.awk # preserves main-format data. -check_zishrink: zic leapseconds $(PACKRATDATA) $(TDATA) \ - $(DATAFORM).zi tzdata.zi - for type in posix right; do \ - mkdir -p time_t.dir/$$type time_t.dir/$$type-t \ - time_t.dir/$$type-shrunk && \ - case $$type in \ - right) leap='-L leapseconds';; \ - *) leap=;; \ - esac && \ - $(ZIC) $$leap -d time_t.dir/$$type $(DATAFORM).zi && \ +check_zishrink: check_zishrink_posix check_zishrink_right +check_zishrink_posix check_zishrink_right: \ + zic leapseconds $(PACKRATDATA) $(TDATA) $(DATAFORM).zi tzdata.zi + rm -fr $@.dir $@-t.dir $@-shrunk.dir + mkdir $@.dir $@-t.dir $@-shrunk.dir + case $@ in \ + *_right) leap='-L leapseconds';; \ + *) leap=;; \ + esac && \ + $(ZIC) $$leap -d $@.dir $(DATAFORM).zi && \ + $(ZIC) $$leap -d $@-shrunk.dir tzdata.zi && \ case $(DATAFORM) in \ main) \ - $(ZIC) $$leap -d time_t.dir/$$type-t $(TDATA) && \ + $(ZIC) $$leap -d $@-t.dir $(TDATA) && \ $(AWK) '/^Rule/' $(TDATA) | \ - $(ZIC) $$leap -d time_t.dir/$$type-t - \ - $(PACKRATDATA) && \ - diff -r time_t.dir/$$type time_t.dir/$$type-t;; \ - esac && \ - $(ZIC) $$leap -d time_t.dir/$$type-shrunk tzdata.zi && \ - diff -r time_t.dir/$$type time_t.dir/$$type-shrunk || exit; \ - done - rm -fr time_t.dir + $(ZIC) $$leap -d $@-t.dir - $(PACKRATDATA) && \ + diff -r $@.dir $@-t.dir;; \ + esac + diff -r $@.dir $@-shrunk.dir + rm -fr $@.dir $@-t.dir $@-shrunk.dir + touch $@ clean_misc: - rm -f core *.o *.out \ + rm -f *.o *.out $(TIME_T_ALTERNATIVES) \ + check_* core typecheck_* \ date tzselect version.h zdump zic yearistype libtz.a clean: clean_misc rm -fr *.dir *.zi tzdb-*/ $(TZS_NEW) @@ -818,17 +861,17 @@ $(MANTXTS): workman.sh LC_ALL=C sh workman.sh `expr $@ : '\(.*\)\.txt$$'` >$@.out mv $@.out $@ -# Set the time stamps to those of the git repository, if available, +# Set the timestamps to those of the git repository, if available, # and if the files have not changed since then. # This uses GNU 'touch' syntax 'touch -d@N FILE', # where N is the number of seconds since 1970. # If git or GNU 'touch' is absent, don't bother to sync with git timestamps. # Also, set the timestamp of each prebuilt file like 'leapseconds' # to be the maximum of the files it depends on. -set-timestamps.out: $(ENCHILADA) +set-timestamps.out: $(EIGHT_YARDS) rm -f $@ if (type git) >/dev/null 2>&1 && \ - files=`git ls-files $(ENCHILADA)` && \ + files=`git ls-files $(EIGHT_YARDS)` && \ touch -md @1 test.out; then \ rm -f test.out && \ for file in $$files; do \ @@ -846,83 +889,100 @@ set-timestamps.out: $(ENCHILADA) exit; \ done touch -cmr `ls -t $(TZDATA_ZI_DEPS) | sed 1q` tzdata.zi - touch -cmr `ls -t $(TZS_DEPS) | sed 1q` $(TZS) touch -cmr `ls -t $(VERSION_DEPS) | sed 1q` version touch $@ +set-tzs-timestamp.out: $(TZS) + touch -cmr `ls -t $(TZS_DEPS) | sed 1q` $(TZS) + touch $@ # The zics below ensure that each data file can stand on its own. # We also do an all-files run to catch links to links. -check_public: - $(MAKE) maintainer-clean - $(MAKE) CFLAGS='$(GCC_DEBUG_FLAGS)' ALL - mkdir -p public.dir - for i in $(TDATA_TO_CHECK) tzdata.zi; do \ - $(zic) -v -d public.dir $$i 2>&1 || exit; \ +check_public: $(VERSION_DEPS) + rm -fr public.dir + mkdir public.dir + ln $(VERSION_DEPS) public.dir + cd public.dir && $(MAKE) CFLAGS='$(GCC_DEBUG_FLAGS)' ALL + for i in $(TDATA_TO_CHECK) public.dir/tzdata.zi; do \ + public.dir/zic -v -d public.dir/zoneinfo $$i 2>&1 || exit; \ done - $(zic) -v -d public.dir $(TDATA_TO_CHECK) + public.dir/zic -v -d public.dir/zoneinfo-all $(TDATA_TO_CHECK) rm -fr public.dir + touch $@ # Check that the code works under various alternative # implementations of time_t. -check_time_t_alternatives: - if diff -q Makefile Makefile 2>/dev/null; then \ - quiet_option='-q'; \ - else \ - quiet_option=''; \ - fi && \ +check_time_t_alternatives: $(TIME_T_ALTERNATIVES) +$(TIME_T_ALTERNATIVES_TAIL): $(TIME_T_ALTERNATIVES_HEAD) +$(TIME_T_ALTERNATIVES): $(VERSION_DEPS) + rm -fr $@.dir + mkdir $@.dir + ln $(VERSION_DEPS) $@.dir + case $@ in \ + int32_t) range=-2147483648,2147483648;; \ + u*) range=0,4294967296;; \ + *) range=-4294967296,4294967296;; \ + esac && \ wd=`pwd` && \ zones=`$(AWK) '/^[^#]/ { print $$3 }' time_t.dir/int64_t.out && \ - time_t.dir/$$type/usr/bin/zdump -V -t $$range $$zones \ - >time_t.dir/$$type.out && \ - diff -u time_t.dir/int64_t.out time_t.dir/$$type.out \ - || exit; \ - done - rm -fr time_t.dir + D=$$wd/$@.dir \ + TZS_YEAR="$$range" TZS_CUTOFF_FLAG="-t $$range" \ + install $$range_target) && \ + test $@ = $(TIME_T_ALTERNATIVES_HEAD) || { \ + (cd $(TIME_T_ALTERNATIVES_HEAD).dir && \ + $(MAKE) TOPDIR="$$wd/$@.dir" \ + TZS_YEAR="$$range" TZS_CUTOFF_FLAG="-t $$range" \ + D=$$wd/$@.dir \ + to$$range.tzs) && \ + diff -u $(TIME_T_ALTERNATIVES_HEAD).dir/to$$range.tzs \ + $@.dir/to$$range.tzs && \ + if diff -q Makefile Makefile 2>/dev/null; then \ + quiet_option='-q'; \ + else \ + quiet_option=''; \ + fi && \ + diff $$quiet_option -r $(TIME_T_ALTERNATIVES_HEAD).dir/etc \ + $@.dir/etc && \ + diff $$quiet_option -r \ + $(TIME_T_ALTERNATIVES_HEAD).dir/usr/share \ + $@.dir/usr/share; \ + } + touch $@ TRADITIONAL_ASC = \ tzcode$(VERSION).tar.gz.asc \ tzdata$(VERSION).tar.gz.asc -ALL_ASC = $(TRADITIONAL_ASC) \ - tzdata$(VERSION)-rearguard.tar.gz.asc \ +REARGUARD_ASC = \ + tzdata$(VERSION)-rearguard.tar.gz.asc +ALL_ASC = $(TRADITIONAL_ASC) $(REARGUARD_ASC) \ tzdb-$(VERSION).tar.lz.asc -tarballs traditional_tarballs signatures traditional_signatures: version +tarballs rearguard_tarballs traditional_tarballs \ +signatures rearguard_signatures traditional_signatures: \ + version set-timestamps.out rearguard.zi VERSION=`cat version` && \ $(MAKE) VERSION="$$VERSION" $@_version # These *_version rules are intended for use if VERSION is set by some # other means. Ordinarily these rules are used only by the above # non-_version rules, which set VERSION on the 'make' command line. -tarballs_version: traditional_tarballs_version \ - tzdata$(VERSION)-rearguard.tar.gz \ +tarballs_version: traditional_tarballs_version rearguard_tarballs_version \ tzdb-$(VERSION).tar.lz +rearguard_tarballs_version: \ + tzdata$(VERSION)-rearguard.tar.gz traditional_tarballs_version: \ tzcode$(VERSION).tar.gz tzdata$(VERSION).tar.gz signatures_version: $(ALL_ASC) +rearguard_signatures_version: $(REARGUARD_ASC) traditional_signatures_version: $(TRADITIONAL_ASC) tzcode$(VERSION).tar.gz: set-timestamps.out @@ -958,7 +1018,7 @@ tzdata$(VERSION)-rearguard.tar.gz: rearguard.zi set-ti gzip $(GZIPFLAGS)) >$@.out mv $@.out $@ -tzdb-$(VERSION).tar.lz: set-timestamps.out +tzdb-$(VERSION).tar.lz: set-timestamps.out set-tzs-timestamp.out rm -fr tzdb-$(VERSION) mkdir tzdb-$(VERSION) ln $(ENCHILADA) tzdb-$(VERSION) @@ -972,16 +1032,26 @@ tzdata$(VERSION).tar.gz.asc: tzdata$(VERSION).tar.gz tzdata$(VERSION)-rearguard.tar.gz.asc: tzdata$(VERSION)-rearguard.tar.gz tzdb-$(VERSION).tar.lz.asc: tzdb-$(VERSION).tar.lz $(ALL_ASC): - gpg --armor --detach-sign $? + gpg2 --armor --detach-sign $? -typecheck: - $(MAKE) clean - for i in "long long" unsigned; \ - do \ - $(MAKE) CFLAGS="-DTYPECHECK -D__time_t_defined -D_TIME_T \"-Dtime_t=$$i\"" ; \ - ./zdump -v Europe/Rome ; \ - $(MAKE) clean ; \ - done +TYPECHECK_CFLAGS = $(CFLAGS) -DTYPECHECK -D__time_t_defined -D_TIME_T +typecheck: typecheck_long_long typecheck_unsigned +typecheck_long_long typecheck_unsigned: $(VERSION_DEPS) + rm -fr $@.dir + mkdir $@.dir + ln $(VERSION_DEPS) $@.dir + cd $@.dir && \ + case $@ in \ + *_long_long) i="long long";; \ + *_unsigned ) i="unsigned" ;; \ + esac && \ + typecheck_cflags='' && \ + $(MAKE) \ + CFLAGS="$(TYPECHECK_CFLAGS) \"-Dtime_t=$$i\"" \ + TOPDIR="`pwd`" \ + install + $@.dir/zdump -i -c 1970,1971 Europe/Rome + touch $@ zonenames: tzdata.zi @$(AWK) '/^Z/ { print $$2 } /^L/ { print $$3 }' tzdata.zi @@ -997,14 +1067,14 @@ zic.o: private.h tzfile.h version.h .KEEP_STATE: .PHONY: ALL INSTALL all -.PHONY: check check_character_set check_links check_name_lengths -.PHONY: check_public check_sorted check_tables -.PHONY: check_time_t_alternatives check_tzs check_web check_white_space +.PHONY: check check_time_t_alternatives .PHONY: check_zishrink .PHONY: clean clean_misc dummy.zd force_tzs .PHONY: install install_data maintainer-clean names -.PHONY: posix_only posix_packrat posix_right -.PHONY: public right_only right_posix signatures signatures_version +.PHONY: posix_only posix_packrat posix_right public +.PHONY: rearguard_signatures rearguard_signatures_version +.PHONY: rearguard_tarballs rearguard_tarballs_version +.PHONY: right_only right_posix signatures signatures_version .PHONY: tarballs tarballs_version .PHONY: traditional_signatures traditional_signatures_version .PHONY: traditional_tarballs traditional_tarballs_version Modified: releng/11.2/contrib/tzdata/NEWS ============================================================================== --- releng/11.2/contrib/tzdata/NEWS Tue Nov 27 19:44:04 2018 (r341090) +++ releng/11.2/contrib/tzdata/NEWS Tue Nov 27 19:44:39 2018 (r341091) @@ -1,5 +1,171 @@ News for the tz database +Release 2018g - 2018-10-26 22:22:45 -0700 + + Briefly: + Morocco switches to permanent +01 on 2018-10-27. + + Changes to future timestamps + + Morocco switches from +00/+01 to permanent +01 effective 2018-10-27, + so its clocks will not fall back on 2018-10-28 as previously scheduled. + (Thanks to Mohamed Essedik Najd and Brian Inglis.) + + Changes to code + + When generating TZif files with leap seconds, zic no longer uses a + format that trips up older 32-bit clients, fixing a bug introduced + in 2018f. (Reported by Daniel Fischer.) Also, the zic workaround + for QTBUG-53071 now also works for TZif files with leap seconds. + + The translator to rearguard format now rewrites the line + "Rule Japan 1948 1951 - Sep Sat>=8 25:00 0 S" to + "Rule Japan 1948 1951 - Sep Sun>=9 1:00 0 S". + This caters to zic before 2007 and to Oracle TZUpdater 2.2.0 + and earlier. (Reported by Christos Zoulas.) + + Changes to past time zone abbreviations + + Change HDT to HWT/HPT for WWII-era abbreviations in Hawaii. + This reverts to 2011h, as the abbreviation change in 2011i was + likely inadvertent. + + Changes to documentation + + tzfile.5 has new sections on interoperability issues. + + +Release 2018f - 2018-10-18 00:14:18 -0700 + + Briefly: + Volgograd moves from +03 to +04 on 2018-10-28. + Fiji ends DST 2019-01-13, not 2019-01-20. + Most of Chile changes DST dates, effective 2019-04-06. + + Changes to future timestamps + + Volgograd moves from +03 to +04 on 2018-10-28 at 02:00. + (Thanks to Alexander Fetisov and Stepan Golosunov.) + + Fiji ends DST 2019-01-13 instead of the 2019-01-20 previously + predicted. (Thanks to Raymond Kumar.) Adjust future predictions + accordingly. + + Most of Chile will end DST on the first Saturday in April at 24:00 mainland + time, and resume DST on the first Saturday in September at 24:00 mainland + time. The changes are effective from 2019-04-06, and do not affect the + Magallanes region modeled by America/Punta_Arenas. (Thanks to Juan Correa + and Tim Parenti.) Adjust future predictions accordingly. + + Changes to past timestamps + + The 2018-05-05 North Korea 30-minute time zone change took place + at 23:30 the previous day, not at 00:00 that day. + + China's 1988 spring-forward transition was on April 17, not + April 10. Its DST transitions in 1986/91 were at 02:00, not 00:00. + (Thanks to P Chan.) + + Fix several issues for Macau before 1992. Macau's pre-1904 LMT + was off by 10 s. Macau switched to +08 in 1904 not 1912, and + temporarily switched to +09/+10 during World War II. Macau + observed DST in 1942/79, not 1961/80, and there were several + errors for transition times and dates. (Thanks to P Chan.) + + The 1948-1951 fallback transitions in Japan were at 25:00 on + September's second Saturday, not at 24:00. (Thanks to Phake Nick.) + zic turns this into 01:00 on the day after September's second + Saturday, which is the best that POSIX or C platforms can do. + + Incorporate 1940-1949 Asia/Shanghai DST transitions from a 2014 + paper by Li Yu, replacing more-questionable data from Shanks. + + Changes to time zone abbreviations + + Use "PST" and "PDT" for Philippine time. (Thanks to Paul Goyette.) + + Changes to code + + zic now always generates TZif files where time type 0 is used for + timestamps before the first transition. This simplifies the + reading of TZif files and should not affect behavior of existing + TZif readers because the same set of time types is used; only + their internal indexes may have changed. This affects only the + legacy zones EST5EDT, CST6CDT, MST7MDT, PST8PDT, CET, MET, and + EET, which previously used nonzero types for these timestamps. + + Because of the type 0 change, zic no longer outputs a dummy + transition at time -2**59 (before the Big Bang), as clients should + no longer need this to handle historical timestamps correctly. + This reverts a change introduced in 2013d and shrinks most TZif + files by a few bytes. + + zic now supports negative time-of-day in Rule and Leap lines, e.g., + "Rule X min max - Apr lastSun -6:00 1:00 -" means the transition + occurs at 18:00 on the Saturday before the last Sunday in April. + This behavior was documented in 2018a but the code did not + entirely match the documentation. + + localtime.c no longer requires at least one time type in TZif + files that lack transitions or have a POSIX-style TZ string. This + future-proofs the code against possible future extensions to the + format that would allow TZif files with POSIX-style TZ strings and + without transitions or time types. + + A read-access subscript error in localtime.c has been fixed. + It could occur only in TZif files with timecnt == 0, something that + does not happen in practice now but could happen in future versions. + + localtime.c no longer ignores TZif POSIX-style TZ strings that + specify only standard time. Instead, these TZ strings now + override the default time type for timestamps after the last + transition (or for all time stamps if there are no transitions), + just as DST strings specifying DST have always done. + + leapseconds.awk now outputs "#updated" and "#expires" comments, + and supports leap seconds at the ends of months other than June + and December. (Inspired by suggestions from Chris Woodbury.) + + Changes to documentation + + New restrictions: A Rule name must start with a character that + is neither an ASCII digit nor "-" nor "+", and an unquoted name + should not use characters in the set "!$%&'()*,/:;<=>?@[\]^`{|}~". + The latter restriction makes room for future extensions (a + possibility noted by Tom Lane). + + tzfile.5 now documents what time types apply before the first and + after the last transition, if any. + + Documentation now uses the spelling "timezone" for a TZ setting + that determines timestamp history, and "time zone" for a + geographic region currently sharing the same standard time. + + The name "TZif" is now used for the tz binary data format. + + tz-link.htm now mentions the A0 TimeZone Migration utilities. + (Thanks to Aldrin Martoq for the link.) + + Changes to build procedure + + New 'make' target 'rearguard_tarballs' to build the rearguard + tarball only. This is a convenience on platforms that lack lzip + if you want to build the rearguard tarball. (Problem reported by + Deborah Goldsmith.) + + tzdata.zi is now more stable from release to release. (Problem + noted by Tom Lane.) It is also a bit shorter. + + tzdata.zi now can contain comment lines documenting configuration + information, such as which data format was selected, which input + files were used, and how leap seconds are treated. (Problems + noted by Lester Caine and Brian Inglis.) If the Makefile defaults + are used these comment lines are absent, for backward + compatibility. A redistributor intending to alter its copy of the + files should also append "-LABEL" to the 'version' file's first + line, where "LABEL" identifies the redistributor's change. + + Release 2018e - 2018-05-01 23:42:51 -0700 Briefly: @@ -9,7 +175,7 @@ Release 2018e - 2018-05-01 23:42:51 -0700 'make tarballs' now also builds a rearguard tarball. New 's' and 'd' suffixes in SAVE columns of Rule and Zone lines. - Changes to past and future time stamps + Changes to past and future timestamps North Korea switches back from +0830 to +09 on 2018-05-05. (Thanks to Kang Seonghoon, Arthur David Olson, Seo Sanghyeon, @@ -17,9 +183,9 @@ Release 2018e - 2018-05-01 23:42:51 -0700 Bring back the negative-DST changes of 2018a, except be more compatible with data parsers that do not support negative DST. - Also, this now affects historical time stamps in Namibia and the + Also, this now affects historical timestamps in Namibia and the former Czechoslovakia, not just Ireland. The main format now uses - negative DST to model time stamps in Europe/Dublin (from 1971 on), + negative DST to model timestamps in Europe/Dublin (from 1971 on), Europe/Prague (1946/7), and Africa/Windhoek (1994/2017). This does not affect UT offsets, only time zone abbreviations and the tm_isdst flag. Also, this does not affect rearguard or vanguard @@ -44,7 +210,7 @@ Release 2018e - 2018-05-01 23:42:51 -0700 in tzdata, it could be used to specify the legal time in Namibia 1994-2017, as opposed to the popular time (see below). - Changes to past time stamps + Changes to past timestamps From 1994 through 2017 Namibia observed DST in winter, not summer. That is, it used negative DST, as Ireland still does. This change @@ -54,12 +220,12 @@ Release 2018e - 2018-05-01 23:42:51 -0700 both simply called "standard time" in Namibian law, in common practice winter time was considered to be DST (as noted by Stephen Colebourne). The full effect of this change is only in vanguard - format; in rearguard and main format, the tm_isdst flag is still + and main format; in rearguard format, the tm_isdst flag is still zero in winter and nonzero in summer. In 1946/7 Czechoslovakia also observed negative DST in winter. - The full effect of this change is only in vanguard format; in - rearguard and main formats, it is modeled as plain GMT without + The full effect of this change is only in vanguard and main + formats; in rearguard format, it is modeled as plain GMT without daylight saving. Also, the dates of some 1944/5 DST transitions in Czechoslovakia have been changed. @@ -72,17 +238,17 @@ Release 2018d - 2018-03-22 07:05:46 -0700 Add support for vanguard and rearguard data consumers. Add subsecond precision to source data format, though not to data. - Changes to future time stamps + Changes to future timestamps In 2018, Palestine starts DST on March 24, not March 31. Adjust future predictions accordingly. (Thanks to Sharef Mustafa.) - Changes to past and future time stamps + Changes to past and future timestamps Casey Station in Antarctica changed from +11 to +08 on 2018-03-11 at 04:00. (Thanks to Steffen Thorsen.) - Changes to past time stamps + Changes to past timestamps Historical transitions for Uruguay, represented by America/Montevideo, have been updated per official legal documents, @@ -224,7 +390,7 @@ Release 2018c - 2018-01-22 23:00:44 -0800 change is reapplied. (Problems reported by Deborah Goldsmith and Stephen Colebourne.) - Changes to past time stamps + Changes to past timestamps Japanese DST transitions (1948-1951) were Sundays at 00:00, not Saturdays or Sundays at 02:00. (Thanks to Takayuki Nikai.) @@ -256,18 +422,18 @@ Release 2018a - 2018-01-12 22:29:21 -0800 Use Debian-style installation locations, instead of 4.3BSD-style. New zic option -t. - Changes to past and future time stamps + Changes to past and future timestamps São Tomé and Príncipe switched from +00 to +01 on 2018-01-01 at 01:00. (Thanks to Steffen Thorsen and Michael Deckers.) - Changes to future time stamps + Changes to future timestamps Starting in 2018 southern Brazil will begin DST on November's first Sunday instead of October's third Sunday. (Thanks to Steffen Thorsen.) - Changes to past time stamps + Changes to past timestamps A discrepancy of 4 s in timestamps before 1931 in South Sudan has been corrected. The 'backzone' and 'zone.tab' files did not agree @@ -355,7 +521,7 @@ Release 2017c - 2017-10-20 14:49:34 -0700 A new file tzdata.zi now holds a small text copy of all data. The zic input format has been regularized slightly. - Changes to future time stamps + Changes to future timestamps Northern Cyprus has decided to resume EU rules starting 2017-10-29, thus reinstituting winter time. @@ -381,7 +547,7 @@ Release 2017c - 2017-10-20 14:49:34 -0700 2018-03-11 at 03:00. This affects UT offsets starting 2018-11-04 at 02:00. (Thanks to Steffen Thorsen.) - Changes to past time stamps + Changes to past timestamps Namibia switched from +02 to +01 on 1994-03-21, not 1994-04-03. (Thanks to Arthur David Olson.) @@ -511,11 +677,11 @@ Release 2017b - 2017-03-17 07:30:38 -0700 Briefly: Haiti has resumed DST. - Changes to past and future time stamps + Changes to past and future timestamps Haiti resumed observance of DST in 2017. (Thanks to Steffen Thorsen.) - Changes to past time stamps + Changes to past timestamps Liberia changed from -004430 to +00 on 1972-01-07, not 1972-05-01. @@ -527,7 +693,7 @@ Release 2017b - 2017-03-17 07:30:38 -0700 The reference localtime implementation now falls back on the current US daylight-saving transition rules rather than the 1987-2006 rules. This fallback occurs only when (1) the TZ - environment variable's value has a name like "AST4ADT" that asks + environment variable has a value like "AST4ADT" that asks for daylight saving time but does not specify the rules, (2) there is no file by that name, and (3) the TZDEFRULES file cannot be loaded. (Thanks to Tom Lane.) @@ -538,7 +704,7 @@ Release 2017a - 2017-02-28 00:05:36 -0800 Briefly: Southern Chile moves from -04/-03 to -03, and Mongolia discontinues DST. - Changes to future time stamps + Changes to future timestamps Mongolia no longer observes DST. (Thanks to Ganbold Tsagaankhuu.) @@ -549,12 +715,12 @@ Release 2017a - 2017-02-28 00:05:36 -0800 assume it's permanent. (Thanks to Juan Correa and Deborah Goldsmith.) This also affects Antarctica/Palmer. - Changes to past time stamps + Changes to past timestamps - Fix many entries for historical time stamps for Europe/Madrid + Fix many entries for historical timestamps for Europe/Madrid before 1979, to agree with tables compiled by Pere Planesas of the National Astronomical Observatory of Spain. As a side effect, - this changes some time stamps for Africa/Ceuta before 1929, which + this changes some timestamps for Africa/Ceuta before 1929, which are probably guesswork anyway. (Thanks to Steve Allen and Pierpaolo Bernardi for the heads-ups, and to Michael Deckers for correcting the 1901 transition.) @@ -645,13 +811,13 @@ Release 2016j - 2016-11-22 23:17:13 -0800 Briefly: Saratov, Russia moves from +03 to +04 on 2016-12-04. - Changes to future time stamps + Changes to future timestamps Saratov, Russia switches from +03 to +04 on 2016-12-04 at 02:00. This hives off a new zone Europe/Saratov from Europe/Volgograd. (Thanks to Yuri Konotopov and Stepan Golosunov.) - Changes to past time stamps + Changes to past timestamps The new zone Asia/Atyrau for Atyraū Region, Kazakhstan, is like Asia/Aqtau except it switched from +05/+06 to +04/+05 in spring @@ -687,7 +853,7 @@ Release 2016i - 2016-11-01 23:19:52 -0700 Briefly: Cyprus split into two time zones on 2016-10-30, and Tonga reintroduces DST on 2016-11-06. - Changes to future time stamps + Changes to future timestamps Pacific/Tongatapu begins DST on 2016-11-06 at 02:00, ending on 2017-01-15 at 03:00. Assume future observances in Tonga will be @@ -695,7 +861,7 @@ Release 2016i - 2016-11-01 23:19:52 -0700 January, like Fiji. (Thanks to Pulu ʻAnau.) Switch to numeric time zone abbreviations for this zone. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-releng@freebsd.org Tue Nov 27 19:45:26 2018 Return-Path: Delivered-To: svn-src-releng@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D9301159BEE; Tue, 27 Nov 2018 19:45:26 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 413A5699AA; Tue, 27 Nov 2018 19:45:26 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 229021FE77; Tue, 27 Nov 2018 19:45:26 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wARJjQMd037988; Tue, 27 Nov 2018 19:45:26 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wARJjQV5037987; Tue, 27 Nov 2018 19:45:26 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <201811271945.wARJjQV5037987@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Tue, 27 Nov 2018 19:45:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r341093 - releng/11.2/stand/forth X-SVN-Group: releng X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: releng/11.2/stand/forth X-SVN-Commit-Revision: 341093 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 413A5699AA X-Spamd-Result: default: False [1.32 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_LONG(0.47)[0.465,0]; NEURAL_SPAM_MEDIUM(0.64)[0.643,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_SPAM_SHORT(0.21)[0.213,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Nov 2018 19:45:26 -0000 Author: gordon Date: Tue Nov 27 19:45:25 2018 New Revision: 341093 URL: https://svnweb.freebsd.org/changeset/base/341093 Log: Fix deferred kernel loading breaks loader password. [EN-18:15.loader] Submitted by: dteske Approved by: so Security: FreeBSD-EN-18:15.loader Modified: releng/11.2/stand/forth/check-password.4th Modified: releng/11.2/stand/forth/check-password.4th ============================================================================== --- releng/11.2/stand/forth/check-password.4th Tue Nov 27 19:45:24 2018 (r341092) +++ releng/11.2/stand/forth/check-password.4th Tue Nov 27 19:45:25 2018 (r341093) @@ -129,7 +129,7 @@ variable readlen \ input length again \ Enter was not pressed; repeat ; -only forth definitions also password-processing +only forth definitions also password-processing also support-functions : check-password ( -- ) @@ -161,6 +161,7 @@ only forth definitions also password-processing \ We should prevent the user from visiting the menu or dropping to the \ interactive loader(8) prompt, but still allow the machine to boot... + any_conf_read? if load_kernel load_modules then 0 autoboot \ Only reached if autoboot fails for any reason (including if/when From owner-svn-src-releng@freebsd.org Tue Nov 27 19:53:06 2018 Return-Path: Delivered-To: svn-src-releng@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A0635115A1D5; Tue, 27 Nov 2018 19:53:06 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F03AC6A3AF; Tue, 27 Nov 2018 19:53:02 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id wARJr16O002993; Tue, 27 Nov 2018 11:53:01 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id wARJr1r2002992; Tue, 27 Nov 2018 11:53:01 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201811271953.wARJr1r2002992@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r341091 - releng/11.2/contrib/tzdata In-Reply-To: <201811271944.wARJieiw037830@repo.freebsd.org> To: Gordon Tetlow Date: Tue, 27 Nov 2018 11:53:01 -0800 (PST) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@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: F03AC6A3AF X-Spamd-Result: default: False [-0.56 / 15.00]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[rgrimes@freebsd.org]; NEURAL_HAM_MEDIUM(-0.52)[-0.522,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[dnsmgr.net]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; AUTH_NA(1.00)[]; NEURAL_HAM_LONG(-0.66)[-0.661,0]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(-0.02)[country: US(-0.09)]; MX_GOOD(-0.01)[cached: pdx.rh.CN85.dnsmgr.net]; NEURAL_HAM_SHORT(-0.25)[-0.252,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; MID_RHS_MATCH_FROM(0.00)[] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Nov 2018 19:53:06 -0000 > Author: gordon > Date: Tue Nov 27 19:44:39 2018 > New Revision: 341091 > URL: https://svnweb.freebsd.org/changeset/base/341091 > > Log: > Timezone database information update. [EN-18:14.tzdata] > > Approved by: so > Security: FreeBSD-EN-18:14.tzdata Gordon, Could you check for me to see that we are all up to date in releng/12.0 with the tzdata leapsecond file? I am aware from any of my developement machines, and this needs to be checked before we roll 12.0RC3 Thanks, Rod -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-releng@freebsd.org Tue Nov 27 19:59:40 2018 Return-Path: Delivered-To: svn-src-releng@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3FC6F115A453 for ; Tue, 27 Nov 2018 19:59:40 +0000 (UTC) (envelope-from gordon@tetlows.org) Received: from mail-vs1-xe2c.google.com (mail-vs1-xe2c.google.com [IPv6:2607:f8b0:4864:20::e2c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9222E6A92B for ; Tue, 27 Nov 2018 19:59:39 +0000 (UTC) (envelope-from gordon@tetlows.org) Received: by mail-vs1-xe2c.google.com with SMTP id t17so14569417vsc.8 for ; Tue, 27 Nov 2018 11:59:39 -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=ErdWCz207gZAwUjk5UyeY5oXZe7h6slTZ5hyrpUh1gY=; b=jvP2lQn4M44Y4kn50Anm+020Xu096r5k22rCdhbwnLjzRoaJtwO0suTWqlXLfLmZj4 24hiI1Sm/Sl2Pi0vIdel7nxTYYgwGHcYpRxvYG7qowVhrKq8XevXzknWABkZ8odSYQjC z+xEXKFETLQSGV8LXzFfhkbiGPkuVjQMKgGbJleb/RI9U5/yDxrxppsfJ+LD6U57lFPf KHbRn/nnF05XU976wuu85/0UViOBgtZKoFt7ee646eyo9lAOAdDcvbd0HJzg8gW14vQp LBi49RcAhetBPMwXcn4aCHimYyb9yFfjfza0Z+skkmxd3uaFrAh6yHhNdoMclIwKrw/e xT/A== X-Gm-Message-State: AGRZ1gJMH0OKKoDt7vkMlQHsg07ZateLEaVikVCLswIAoZG37Df6ngcU OsNBSOmALuq/VPARdTxvAKn89gnFZ50deq/eO6FCQL00QQ== X-Google-Smtp-Source: AJdET5fb5653xjB9795f9AoV4gyq1hpBDNjjT8S6aqgZpJb/ziltL2DnBQT/A04VAzJuEv9T4kppyT+zfmMb09HBOQk= X-Received: by 2002:a67:b34b:: with SMTP id b11mr15094866vsm.28.1543348776683; Tue, 27 Nov 2018 11:59:36 -0800 (PST) MIME-Version: 1.0 References: <201811271944.wARJieiw037830@repo.freebsd.org> <201811271953.wARJr1r2002992@pdx.rh.CN85.dnsmgr.net> In-Reply-To: <201811271953.wARJr1r2002992@pdx.rh.CN85.dnsmgr.net> From: Gordon Tetlow Date: Tue, 27 Nov 2018 12:59:24 -0700 Message-ID: Subject: Re: svn commit: r341091 - releng/11.2/contrib/tzdata To: "Rodney W. Grimes" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 9222E6A92B X-Spamd-Result: default: False [-4.58 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[tetlows.org]; 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]; PREVIOUSLY_DELIVERED(0.00)[svn-src-releng@freebsd.org]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[tetlows.org:+]; DMARC_POLICY_ALLOW(-0.50)[tetlows.org,reject]; RCVD_IN_DNSWL_NONE(0.00)[c.2.e.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]; MX_GOOD(-0.01)[cached: alt1.aspmx.l.google.com]; NEURAL_HAM_SHORT(-0.92)[-0.922,0]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; IP_SCORE(-0.65)[ipnet: 2607:f8b0::/32(-1.78), asn: 15169(-1.38), country: US(-0.09)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Nov 2018 19:59:40 -0000 On Tue, Nov 27, 2018 at 12:53 PM Rodney W. Grimes wrote: > > > Author: gordon > > Date: Tue Nov 27 19:44:39 2018 > > New Revision: 341091 > > URL: https://svnweb.freebsd.org/changeset/base/341091 > > > > Log: > > Timezone database information update. [EN-18:14.tzdata] > > > > Approved by: so > > Security: FreeBSD-EN-18:14.tzdata > > Gordon, > Could you check for me to see that > we are all up to date in releng/12.0 with the > tzdata leapsecond file? I am aware from any > of my developement machines, and this needs > to be checked before we roll 12.0RC3 We should be good. Philip committed to stable/12 as r339937. Gordon From owner-svn-src-releng@freebsd.org Wed Nov 28 16:20:05 2018 Return-Path: Delivered-To: svn-src-releng@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 99181115907E; Wed, 28 Nov 2018 16:20:05 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 60BC97AD31; Wed, 28 Nov 2018 16:20:05 +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 42FB64CCF; Wed, 28 Nov 2018 16:20:05 +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 wASGK5oO073567; Wed, 28 Nov 2018 16:20:05 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wASGK4Jn073564; Wed, 28 Nov 2018 16:20:04 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201811281620.wASGK4Jn073564@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Wed, 28 Nov 2018 16:20:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r341149 - in releng/12.0/sys: amd64/ia32 mips/mips powerpc/powerpc X-SVN-Group: releng X-SVN-Commit-Author: vangyzen X-SVN-Commit-Paths: in releng/12.0/sys: amd64/ia32 mips/mips powerpc/powerpc X-SVN-Commit-Revision: 341149 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 60BC97AD31 X-Spamd-Result: default: False [1.36 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_SHORT(0.49)[0.487,0]; NEURAL_SPAM_MEDIUM(0.36)[0.364,0]; NEURAL_SPAM_LONG(0.51)[0.511,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Nov 2018 16:20:05 -0000 Author: vangyzen Date: Wed Nov 28 16:20:04 2018 New Revision: 341149 URL: https://svnweb.freebsd.org/changeset/base/341149 Log: MFS r341146 MFC r340994 Prevent kernel stack disclosure in getcontext/swapcontext Expand r338982 to cover freebsd32 interfaces on amd64, mips, and powerpc. Approved by: re (gjb) Security: FreeBSD-EN-18:12.mem Security: CVE-2018-17155 Sponsored by: Dell EMC Isilon Modified: releng/12.0/sys/amd64/ia32/ia32_signal.c releng/12.0/sys/mips/mips/freebsd32_machdep.c releng/12.0/sys/powerpc/powerpc/exec_machdep.c Directory Properties: releng/12.0/ (props changed) Modified: releng/12.0/sys/amd64/ia32/ia32_signal.c ============================================================================== --- releng/12.0/sys/amd64/ia32/ia32_signal.c Wed Nov 28 16:00:52 2018 (r341148) +++ releng/12.0/sys/amd64/ia32/ia32_signal.c Wed Nov 28 16:20:04 2018 (r341149) @@ -261,6 +261,7 @@ freebsd32_getcontext(struct thread *td, struct freebsd if (uap->ucp == NULL) ret = EINVAL; else { + bzero(&uc, sizeof(uc)); ia32_get_mcontext(td, &uc.uc_mcontext, GET_MC_CLEAR_RET); PROC_LOCK(td->td_proc); uc.uc_sigmask = td->td_sigmask; @@ -301,6 +302,7 @@ freebsd32_swapcontext(struct thread *td, struct freebs if (uap->oucp == NULL || uap->ucp == NULL) ret = EINVAL; else { + bzero(&uc, sizeof(uc)); ia32_get_mcontext(td, &uc.uc_mcontext, GET_MC_CLEAR_RET); PROC_LOCK(td->td_proc); uc.uc_sigmask = td->td_sigmask; Modified: releng/12.0/sys/mips/mips/freebsd32_machdep.c ============================================================================== --- releng/12.0/sys/mips/mips/freebsd32_machdep.c Wed Nov 28 16:00:52 2018 (r341148) +++ releng/12.0/sys/mips/mips/freebsd32_machdep.c Wed Nov 28 16:20:04 2018 (r341149) @@ -294,6 +294,7 @@ freebsd32_getcontext(struct thread *td, struct freebsd if (uap->ucp == NULL) ret = EINVAL; else { + bzero(&uc, sizeof(uc)); get_mcontext32(td, &uc.uc_mcontext, GET_MC_CLEAR_RET); PROC_LOCK(td->td_proc); uc.uc_sigmask = td->td_sigmask; @@ -333,6 +334,7 @@ freebsd32_swapcontext(struct thread *td, struct freebs if (uap->oucp == NULL || uap->ucp == NULL) ret = EINVAL; else { + bzero(&uc, sizeof(uc)); get_mcontext32(td, &uc.uc_mcontext, GET_MC_CLEAR_RET); PROC_LOCK(td->td_proc); uc.uc_sigmask = td->td_sigmask; Modified: releng/12.0/sys/powerpc/powerpc/exec_machdep.c ============================================================================== --- releng/12.0/sys/powerpc/powerpc/exec_machdep.c Wed Nov 28 16:00:52 2018 (r341148) +++ releng/12.0/sys/powerpc/powerpc/exec_machdep.c Wed Nov 28 16:20:04 2018 (r341149) @@ -783,6 +783,7 @@ freebsd32_getcontext(struct thread *td, struct freebsd if (uap->ucp == NULL) ret = EINVAL; else { + bzero(&uc, sizeof(uc)); get_mcontext32(td, &uc.uc_mcontext, GET_MC_CLEAR_RET); PROC_LOCK(td->td_proc); uc.uc_sigmask = td->td_sigmask; @@ -822,6 +823,7 @@ freebsd32_swapcontext(struct thread *td, struct freebs if (uap->oucp == NULL || uap->ucp == NULL) ret = EINVAL; else { + bzero(&uc, sizeof(uc)); get_mcontext32(td, &uc.uc_mcontext, GET_MC_CLEAR_RET); PROC_LOCK(td->td_proc); uc.uc_sigmask = td->td_sigmask; From owner-svn-src-releng@freebsd.org Wed Nov 28 16:58:37 2018 Return-Path: Delivered-To: svn-src-releng@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B04011362DE; Wed, 28 Nov 2018 16:58:37 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D33E87CD78; Wed, 28 Nov 2018 16:58:36 +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 9BCD75335; Wed, 28 Nov 2018 16:58:36 +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 wASGwahh094400; Wed, 28 Nov 2018 16:58:36 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wASGwaT7094398; Wed, 28 Nov 2018 16:58:36 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201811281658.wASGwaT7094398@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Wed, 28 Nov 2018 16:58:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r341153 - in releng/12.0/sys: arm/arm arm64/arm64 riscv/riscv X-SVN-Group: releng X-SVN-Commit-Author: vangyzen X-SVN-Commit-Paths: in releng/12.0/sys: arm/arm arm64/arm64 riscv/riscv X-SVN-Commit-Revision: 341153 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D33E87CD78 X-Spamd-Result: default: False [1.38 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_LONG(0.51)[0.511,0]; NEURAL_SPAM_MEDIUM(0.31)[0.308,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_SPAM_SHORT(0.57)[0.565,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Nov 2018 16:58:37 -0000 Author: vangyzen Date: Wed Nov 28 16:58:35 2018 New Revision: 341153 URL: https://svnweb.freebsd.org/changeset/base/341153 Log: MFS r341147 MFC r340995 Prevent kernel stack disclosure in signal delivery On arm64 and riscv platforms, sendsig() failed to zero the signal frame before copying it out to userspace. Zero it. On arm, I believe all the contents of the frame were initialized, so there was no disclosure. However, explicitly zero the whole frame because that fact could inadvertently change in the future, it's more clear to the reader, and I could be wrong in the first place. Approved by: re (gjb) Security: similar to FreeBSD-EN-18:12.mem and CVE-2018-17155 Sponsored by: Dell EMC Isilon Modified: releng/12.0/sys/arm/arm/machdep.c releng/12.0/sys/arm64/arm64/machdep.c releng/12.0/sys/riscv/riscv/machdep.c Directory Properties: releng/12.0/ (props changed) Modified: releng/12.0/sys/arm/arm/machdep.c ============================================================================== --- releng/12.0/sys/arm/arm/machdep.c Wed Nov 28 16:52:41 2018 (r341152) +++ releng/12.0/sys/arm/arm/machdep.c Wed Nov 28 16:58:35 2018 (r341153) @@ -641,6 +641,7 @@ sendsig(catcher, ksi, mask) /* make the stack aligned */ fp = (struct sigframe *)STACKALIGN(fp); /* Populate the siginfo frame. */ + bzero(&frame, sizeof(frame)); get_mcontext(td, &frame.sf_uc.uc_mcontext, 0); #ifdef VFP get_vfpcontext(td, &frame.sf_vfp); Modified: releng/12.0/sys/arm64/arm64/machdep.c ============================================================================== --- releng/12.0/sys/arm64/arm64/machdep.c Wed Nov 28 16:52:41 2018 (r341152) +++ releng/12.0/sys/arm64/arm64/machdep.c Wed Nov 28 16:58:35 2018 (r341153) @@ -656,6 +656,7 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask fp = (struct sigframe *)STACKALIGN(fp); /* Fill in the frame to copy out */ + bzero(&frame, sizeof(frame)); get_mcontext(td, &frame.sf_uc.uc_mcontext, 0); get_fpcontext(td, &frame.sf_uc.uc_mcontext); frame.sf_si = ksi->ksi_info; Modified: releng/12.0/sys/riscv/riscv/machdep.c ============================================================================== --- releng/12.0/sys/riscv/riscv/machdep.c Wed Nov 28 16:52:41 2018 (r341152) +++ releng/12.0/sys/riscv/riscv/machdep.c Wed Nov 28 16:58:35 2018 (r341153) @@ -583,6 +583,7 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask fp = (struct sigframe *)STACKALIGN(fp); /* Fill in the frame to copy out */ + bzero(&frame, sizeof(frame)); get_mcontext(td, &frame.sf_uc.uc_mcontext, 0); get_fpcontext(td, &frame.sf_uc.uc_mcontext); frame.sf_si = ksi->ksi_info; From owner-svn-src-releng@freebsd.org Wed Nov 28 17:31:35 2018 Return-Path: Delivered-To: svn-src-releng@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A45CE1137369; Wed, 28 Nov 2018 17:31:35 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B1D67E1EA; Wed, 28 Nov 2018 17:31:35 +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 2BF545993; Wed, 28 Nov 2018 17:31:35 +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 wASHVZZK013274; Wed, 28 Nov 2018 17:31:35 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wASHVY1c012914; Wed, 28 Nov 2018 17:31:34 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201811281731.wASHVY1c012914@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 28 Nov 2018 17:31:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r341155 - releng/12.0/sys/kern X-SVN-Group: releng X-SVN-Commit-Author: markj X-SVN-Commit-Paths: releng/12.0/sys/kern X-SVN-Commit-Revision: 341155 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4B1D67E1EA X-Spamd-Result: default: False [1.13 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_SHORT(0.42)[0.421,0]; NEURAL_SPAM_MEDIUM(0.25)[0.247,0]; NEURAL_SPAM_LONG(0.47)[0.465,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Nov 2018 17:31:35 -0000 Author: markj Date: Wed Nov 28 17:31:34 2018 New Revision: 341155 URL: https://svnweb.freebsd.org/changeset/base/341155 Log: MFstable/12 r341075: Plug some kernel memory disclosures via kevent(2). Approved by: re (gjb) Modified: releng/12.0/sys/kern/kern_event.c releng/12.0/sys/kern/vfs_aio.c Directory Properties: releng/12.0/ (props changed) Modified: releng/12.0/sys/kern/kern_event.c ============================================================================== --- releng/12.0/sys/kern/kern_event.c Wed Nov 28 17:00:18 2018 (r341154) +++ releng/12.0/sys/kern/kern_event.c Wed Nov 28 17:31:34 2018 (r341155) @@ -535,8 +535,9 @@ knote_fork(struct knlist *list, int pid) if (list == NULL) return; - list->kl_lock(list->kl_lockarg); + memset(&kev, 0, sizeof(kev)); + list->kl_lock(list->kl_lockarg); SLIST_FOREACH(kn, &list->kl_list, kn_selnext) { kq = kn->kn_kq; KQ_LOCK(kq); Modified: releng/12.0/sys/kern/vfs_aio.c ============================================================================== --- releng/12.0/sys/kern/vfs_aio.c Wed Nov 28 17:00:18 2018 (r341154) +++ releng/12.0/sys/kern/vfs_aio.c Wed Nov 28 17:31:34 2018 (r341155) @@ -1589,6 +1589,7 @@ aio_aqueue(struct thread *td, struct aiocb *ujob, stru goto aqueue_fail; } kqfd = job->uaiocb.aio_sigevent.sigev_notify_kqueue; + memset(&kev, 0, sizeof(kev)); kev.ident = (uintptr_t)job->ujob; kev.filter = EVFILT_AIO; kev.flags = EV_ADD | EV_ENABLE | EV_FLAG1 | evflags; @@ -2155,6 +2156,7 @@ kern_lio_listio(struct thread *td, int mode, struct ai bcopy(sig, &lj->lioj_signal, sizeof(lj->lioj_signal)); if (lj->lioj_signal.sigev_notify == SIGEV_KEVENT) { /* Assume only new style KEVENT */ + memset(&kev, 0, sizeof(kev)); kev.filter = EVFILT_LIO; kev.flags = EV_ADD | EV_ENABLE | EV_FLAG1; kev.ident = (uintptr_t)uacb_list; /* something unique */ From owner-svn-src-releng@freebsd.org Wed Nov 28 17:40:10 2018 Return-Path: Delivered-To: svn-src-releng@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F001113786C; Wed, 28 Nov 2018 17:40:10 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A9D3A7E82D; Wed, 28 Nov 2018 17:40:09 +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 85B3D59F1; Wed, 28 Nov 2018 17:40:09 +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 wASHe91l015321; Wed, 28 Nov 2018 17:40:09 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wASHe9os015320; Wed, 28 Nov 2018 17:40:09 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201811281740.wASHe9os015320@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 28 Nov 2018 17:40:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r341157 - releng/12.0/sys/kern X-SVN-Group: releng X-SVN-Commit-Author: markj X-SVN-Commit-Paths: releng/12.0/sys/kern X-SVN-Commit-Revision: 341157 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A9D3A7E82D X-Spamd-Result: default: False [1.13 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_LONG(0.47)[0.465,0]; NEURAL_SPAM_MEDIUM(0.25)[0.247,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_SPAM_SHORT(0.42)[0.421,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Nov 2018 17:40:10 -0000 Author: markj Date: Wed Nov 28 17:40:08 2018 New Revision: 341157 URL: https://svnweb.freebsd.org/changeset/base/341157 Log: MFstable/12 r341077: Lock the knlist before releasing the in-flux state in knote_fork(). PR: 228858 Approved by: re (gjb) Modified: releng/12.0/sys/kern/kern_event.c Directory Properties: releng/12.0/ (props changed) Modified: releng/12.0/sys/kern/kern_event.c ============================================================================== --- releng/12.0/sys/kern/kern_event.c Wed Nov 28 17:37:17 2018 (r341156) +++ releng/12.0/sys/kern/kern_event.c Wed Nov 28 17:40:08 2018 (r341157) @@ -603,10 +603,10 @@ knote_fork(struct knlist *list, int pid) kn->kn_fflags |= NOTE_TRACKERR; if (kn->kn_fop->f_event(kn, NOTE_FORK)) KNOTE_ACTIVATE(kn, 0); + list->kl_lock(list->kl_lockarg); KQ_LOCK(kq); kn_leave_flux(kn); KQ_UNLOCK_FLUX(kq); - list->kl_lock(list->kl_lockarg); } list->kl_unlock(list->kl_lockarg); } From owner-svn-src-releng@freebsd.org Wed Nov 28 18:06:18 2018 Return-Path: Delivered-To: svn-src-releng@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE1251138501; Wed, 28 Nov 2018 18:06:17 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 715497FFCA; Wed, 28 Nov 2018 18:06:17 +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 481DD5ECA; Wed, 28 Nov 2018 18:06:17 +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 wASI6Hpp030800; Wed, 28 Nov 2018 18:06:17 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wASI6HBw030799; Wed, 28 Nov 2018 18:06:17 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201811281806.wASI6HBw030799@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 28 Nov 2018 18:06:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r341159 - releng/12.0/sys/kern X-SVN-Group: releng X-SVN-Commit-Author: markj X-SVN-Commit-Paths: releng/12.0/sys/kern X-SVN-Commit-Revision: 341159 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 715497FFCA X-Spamd-Result: default: False [1.31 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_SPAM_SHORT(0.49)[0.495,0]; NEURAL_SPAM_MEDIUM(0.31)[0.308,0]; NEURAL_SPAM_LONG(0.51)[0.511,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Nov 2018 18:06:18 -0000 Author: markj Date: Wed Nov 28 18:06:16 2018 New Revision: 341159 URL: https://svnweb.freebsd.org/changeset/base/341159 Log: MFstable/12 r341082: Ensure that knotes do not get registered when KQ_CLOSING is set. PR: 228858 Approved by: re (gjb) Modified: releng/12.0/sys/kern/kern_event.c Directory Properties: releng/12.0/ (props changed) Modified: releng/12.0/sys/kern/kern_event.c ============================================================================== --- releng/12.0/sys/kern/kern_event.c Wed Nov 28 18:02:59 2018 (r341158) +++ releng/12.0/sys/kern/kern_event.c Wed Nov 28 18:06:16 2018 (r341159) @@ -1463,8 +1463,11 @@ findkn: break; } } else { - if ((kev->flags & EV_ADD) == EV_ADD) - kqueue_expand(kq, fops, kev->ident, waitok); + if ((kev->flags & EV_ADD) == EV_ADD) { + error = kqueue_expand(kq, fops, kev->ident, waitok); + if (error != 0) + goto done; + } KQ_LOCK(kq); @@ -1700,12 +1703,12 @@ kqueue_expand(struct kqueue *kq, struct filterops *fop { struct klist *list, *tmp_knhash, *to_free; u_long tmp_knhashmask; - int size; - int fd; + int error, fd, size; int mflag = waitok ? M_WAITOK : M_NOWAIT; KQ_NOTOWNED(kq); + error = 0; to_free = NULL; if (fops->f_isfd) { fd = ident; @@ -1717,9 +1720,11 @@ kqueue_expand(struct kqueue *kq, struct filterops *fop if (list == NULL) return ENOMEM; KQ_LOCK(kq); - if (kq->kq_knlistsize > fd) { + if ((kq->kq_state & KQ_CLOSING) != 0) { to_free = list; - list = NULL; + error = EBADF; + } else if (kq->kq_knlistsize > fd) { + to_free = list; } else { if (kq->kq_knlist != NULL) { bcopy(kq->kq_knlist, list, @@ -1740,9 +1745,12 @@ kqueue_expand(struct kqueue *kq, struct filterops *fop tmp_knhash = hashinit(KN_HASHSIZE, M_KQUEUE, &tmp_knhashmask); if (tmp_knhash == NULL) - return ENOMEM; + return (ENOMEM); KQ_LOCK(kq); - if (kq->kq_knhashmask == 0) { + if ((kq->kq_state & KQ_CLOSING) != 0) { + to_free = tmp_knhash; + error = EBADF; + } else if (kq->kq_knhashmask == 0) { kq->kq_knhash = tmp_knhash; kq->kq_knhashmask = tmp_knhashmask; } else { @@ -1754,7 +1762,7 @@ kqueue_expand(struct kqueue *kq, struct filterops *fop free(to_free, M_KQUEUE); KQ_NOTOWNED(kq); - return 0; + return (error); } static void @@ -2605,6 +2613,8 @@ knote_attach(struct knote *kn, struct kqueue *kq) KASSERT(kn_in_flux(kn), ("knote %p not marked influx", kn)); KQ_OWNED(kq); + if ((kq->kq_state & KQ_CLOSING) != 0) + return (EBADF); if (kn->kn_fop->f_isfd) { if (kn->kn_id >= kq->kq_knlistsize) return (ENOMEM); From owner-svn-src-releng@freebsd.org Thu Nov 29 01:02:53 2018 Return-Path: Delivered-To: svn-src-releng@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1DE1211436EC; Thu, 29 Nov 2018 01:02:53 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B83108FD70; Thu, 29 Nov 2018 01:02:52 +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 95163123B1; Thu, 29 Nov 2018 01:02:52 +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 wAT12qrA050392; Thu, 29 Nov 2018 01:02:52 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAT12qgq050391; Thu, 29 Nov 2018 01:02:52 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201811290102.wAT12qgq050391@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 29 Nov 2018 01:02:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r341169 - releng/12.0/release/tools X-SVN-Group: releng X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: releng/12.0/release/tools X-SVN-Commit-Revision: 341169 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B83108FD70 X-Spamd-Result: default: False [1.48 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_LONG(0.47)[0.465,0]; NEURAL_SPAM_SHORT(0.77)[0.772,0]; NEURAL_SPAM_MEDIUM(0.25)[0.247,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Nov 2018 01:02:53 -0000 Author: gjb Date: Thu Nov 29 01:02:52 2018 New Revision: 341169 URL: https://svnweb.freebsd.org/changeset/base/341169 Log: MFS12 r341167: MFC r340983: Fix NTP query on GCE due to unresolved hostname. PR: 232456 Submitted by: Lucas Kanashiro Approved by: re (delphij) Sponsored by: The FreeBSD Foundation Modified: releng/12.0/release/tools/gce.conf Directory Properties: releng/12.0/ (props changed) Modified: releng/12.0/release/tools/gce.conf ============================================================================== --- releng/12.0/release/tools/gce.conf Thu Nov 29 00:34:55 2018 (r341168) +++ releng/12.0/release/tools/gce.conf Thu Nov 29 01:02:52 2018 (r341169) @@ -49,7 +49,7 @@ aesni_load="YES" nvme_load="YES" EOF - echo '169.254.169.254 metadata.google.internal metadata' > \ + echo '169.254.169.254 metadata.google.internal metadata' >> \ ${DESTDIR}/etc/hosts # overwrite ntp.conf From owner-svn-src-releng@freebsd.org Thu Nov 29 01:31:13 2018 Return-Path: Delivered-To: svn-src-releng@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4CEF3114526E; Thu, 29 Nov 2018 01:31:13 +0000 (UTC) (envelope-from yuripv@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E415C6B36B; Thu, 29 Nov 2018 01:31:12 +0000 (UTC) (envelope-from yuripv@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C52C612929; Thu, 29 Nov 2018 01:31:12 +0000 (UTC) (envelope-from yuripv@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wAT1VCg3061777; Thu, 29 Nov 2018 01:31:12 GMT (envelope-from yuripv@FreeBSD.org) Received: (from yuripv@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAT1VCa8061776; Thu, 29 Nov 2018 01:31:12 GMT (envelope-from yuripv@FreeBSD.org) Message-Id: <201811290131.wAT1VCa8061776@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: yuripv set sender to yuripv@FreeBSD.org using -f From: Yuri Pankov Date: Thu, 29 Nov 2018 01:31:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r341175 - releng/12.0/sbin/bectl X-SVN-Group: releng X-SVN-Commit-Author: yuripv X-SVN-Commit-Paths: releng/12.0/sbin/bectl X-SVN-Commit-Revision: 341175 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E415C6B36B X-Spamd-Result: default: False [1.48 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_LONG(0.47)[0.465,0]; NEURAL_SPAM_SHORT(0.77)[0.772,0]; NEURAL_SPAM_MEDIUM(0.25)[0.247,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Nov 2018 01:31:13 -0000 Author: yuripv Date: Thu Nov 29 01:31:12 2018 New Revision: 341175 URL: https://svnweb.freebsd.org/changeset/base/341175 Log: MFS12 r341168: MFC r340974: bectl: sync usage with man page, removing stray multibyte characters in the process. PR: 233526 Submitted by: tigersharke@gmail.com (original version) Reviewed by: kevans Approved by: re (gjb) Differential revision: https://reviews.freebsd.org/D18335 Modified: releng/12.0/sbin/bectl/bectl.c Directory Properties: releng/12.0/ (props changed) Modified: releng/12.0/sbin/bectl/bectl.c ============================================================================== --- releng/12.0/sbin/bectl/bectl.c Thu Nov 29 01:28:13 2018 (r341174) +++ releng/12.0/sbin/bectl/bectl.c Thu Nov 29 01:31:12 2018 (r341175) @@ -66,22 +66,24 @@ usage(bool explicit) FILE *fp; fp = explicit ? stdout : stderr; - fprintf(fp, + fprintf(fp, "%s", "usage:\tbectl {-h | -? | subcommand [args...]}\n" +#if SOON + "\tbectl add (path)*\n" +#endif "\tbectl activate [-t] beName\n" - "\tbectl create [-e {nonActiveBe | -e beName@snapshot}] beName\n" - "\tbectl create beName@snapshot\n" + "\tbectl create [-r] [-e {nonActiveBe | beName@snapshot}] beName\n" + "\tbectl create [-r] beName@snapshot\n" "\tbectl destroy [-F] {beName | beName@snapshot}\n" "\tbectl export sourceBe\n" "\tbectl import targetBe\n" -#if SOON - "\tbectl add (path)*\n" -#endif - "\tbectl jail [{-b | -U}] [{-o key=value | -u key}]... bootenv [utility [argument ...]]\n" - "\tbectl list [-a] [-D] [-H] [-s]\n" + "\tbectl jail {-b | -U} [{-o key=value | -u key}]... " + "{jailID | jailName}\n" + "\t bootenv [utility [argument ...]]\n" + "\tbectl list [-DHas]\n" "\tbectl mount beName [mountpoint]\n" "\tbectl rename origBeName newBeName\n" - "\tbectl {ujail | unjail} ⟨jailID | jailName | bootenv)\n" + "\tbectl {ujail | unjail} {jailID | jailName} bootenv\n" "\tbectl {umount | unmount} [-f] beName\n"); return (explicit ? 0 : EX_USAGE); From owner-svn-src-releng@freebsd.org Thu Nov 29 15:26:08 2018 Return-Path: Delivered-To: svn-src-releng@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D4891140E89; Thu, 29 Nov 2018 15:26:08 +0000 (UTC) (envelope-from oleg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1460470AA8; Thu, 29 Nov 2018 15:26:08 +0000 (UTC) (envelope-from oleg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E998E1B597; Thu, 29 Nov 2018 15:26:07 +0000 (UTC) (envelope-from oleg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wATFQ7B9093291; Thu, 29 Nov 2018 15:26:07 GMT (envelope-from oleg@FreeBSD.org) Received: (from oleg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wATFQ7ck093290; Thu, 29 Nov 2018 15:26:07 GMT (envelope-from oleg@FreeBSD.org) Message-Id: <201811291526.wATFQ7ck093290@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oleg set sender to oleg@FreeBSD.org using -f From: Oleg Bulyzhin Date: Thu, 29 Nov 2018 15:26:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r341236 - releng/12.0/sys/net X-SVN-Group: releng X-SVN-Commit-Author: oleg X-SVN-Commit-Paths: releng/12.0/sys/net X-SVN-Commit-Revision: 341236 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1460470AA8 X-Spamd-Result: default: False [0.80 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_SHORT(0.25)[0.251,0]; NEURAL_SPAM_MEDIUM(0.25)[0.247,0]; NEURAL_SPAM_LONG(0.31)[0.307,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Nov 2018 15:26:08 -0000 Author: oleg Date: Thu Nov 29 15:26:07 2018 New Revision: 341236 URL: https://svnweb.freebsd.org/changeset/base/341236 Log: MFS r341139: MFC r340724: Unbreak kernel build with VLAN_ARRAY defined. Approved by: re (gjb) Modified: releng/12.0/sys/net/if_vlan.c Directory Properties: releng/12.0/ (props changed) Modified: releng/12.0/sys/net/if_vlan.c ============================================================================== --- releng/12.0/sys/net/if_vlan.c Thu Nov 29 15:07:59 2018 (r341235) +++ releng/12.0/sys/net/if_vlan.c Thu Nov 29 15:26:07 2018 (r341236) @@ -314,15 +314,15 @@ VNET_DEFINE_STATIC(struct if_clone *, vlan_cloner); #define V_vlan_cloner VNET(vlan_cloner) #endif -#ifndef VLAN_ARRAY -#define HASH(n, m) ((((n) >> 8) ^ ((n) >> 4) ^ (n)) & (m)) - static void vlan_mc_free(struct epoch_context *ctx) { struct vlan_mc_entry *mc = __containerof(ctx, struct vlan_mc_entry, mc_epoch_ctx); free(mc, M_VLAN); } + +#ifndef VLAN_ARRAY +#define HASH(n, m) ((((n) >> 8) ^ ((n) >> 4) ^ (n)) & (m)) static void vlan_inithash(struct ifvlantrunk *trunk) From owner-svn-src-releng@freebsd.org Thu Nov 29 15:58:16 2018 Return-Path: Delivered-To: svn-src-releng@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 130F81142044; Thu, 29 Nov 2018 15:58:16 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9E09172102; Thu, 29 Nov 2018 15:58:15 +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 665211BAAB; Thu, 29 Nov 2018 15:58:15 +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 wATFwFvH009073; Thu, 29 Nov 2018 15:58:15 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wATFwE54009070; Thu, 29 Nov 2018 15:58:14 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201811291558.wATFwE54009070@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 29 Nov 2018 15:58:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r341242 - releng/12.0/sys/net X-SVN-Group: releng X-SVN-Commit-Author: markj X-SVN-Commit-Paths: releng/12.0/sys/net X-SVN-Commit-Revision: 341242 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9E09172102 X-Spamd-Result: default: False [0.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_SHORT(0.29)[0.291,0]; NEURAL_SPAM_MEDIUM(0.31)[0.308,0]; NEURAL_SPAM_LONG(0.34)[0.335,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Nov 2018 15:58:16 -0000 Author: markj Date: Thu Nov 29 15:58:14 2018 New Revision: 341242 URL: https://svnweb.freebsd.org/changeset/base/341242 Log: MFstable/12 r341238: Plug routing sysctl leaks. Approved by: re (gjb) Modified: releng/12.0/sys/net/if.h releng/12.0/sys/net/route.h releng/12.0/sys/net/rtsock.c Directory Properties: releng/12.0/ (props changed) Modified: releng/12.0/sys/net/if.h ============================================================================== --- releng/12.0/sys/net/if.h Thu Nov 29 15:56:46 2018 (r341241) +++ releng/12.0/sys/net/if.h Thu Nov 29 15:58:14 2018 (r341242) @@ -271,6 +271,7 @@ struct if_msghdr { int ifm_addrs; /* like rtm_addrs */ int ifm_flags; /* value of if_flags */ u_short ifm_index; /* index for associated ifp */ + u_short _ifm_spare1; struct if_data ifm_data;/* statistics and other data about if */ }; @@ -296,6 +297,7 @@ struct if_msghdrl { u_short _ifm_spare1; /* spare space to grow if_index, see if_var.h */ u_short ifm_len; /* length of if_msghdrl incl. if_data */ u_short ifm_data_off; /* offset of if_data from beginning */ + int _ifm_spare2; struct if_data ifm_data;/* statistics and other data about if */ }; @@ -311,6 +313,7 @@ struct ifa_msghdr { int ifam_addrs; /* like rtm_addrs */ int ifam_flags; /* value of ifa_flags */ u_short ifam_index; /* index for associated ifp */ + u_short _ifam_spare1; int ifam_metric; /* value of ifa_ifp->if_metric */ }; @@ -352,6 +355,7 @@ struct ifma_msghdr { int ifmam_addrs; /* like rtm_addrs */ int ifmam_flags; /* value of ifa_flags */ u_short ifmam_index; /* index for associated ifp */ + u_short _ifmam_spare1; }; /* Modified: releng/12.0/sys/net/route.h ============================================================================== --- releng/12.0/sys/net/route.h Thu Nov 29 15:56:46 2018 (r341241) +++ releng/12.0/sys/net/route.h Thu Nov 29 15:58:14 2018 (r341242) @@ -251,6 +251,7 @@ struct rt_msghdr { u_char rtm_version; /* future binary compatibility */ u_char rtm_type; /* message type */ u_short rtm_index; /* index for associated ifp */ + u_short _rtm_spare1; int rtm_flags; /* flags, incl. kern & message, e.g. DONE */ int rtm_addrs; /* bitmask identifying sockaddrs in msg */ pid_t rtm_pid; /* identify sender */ Modified: releng/12.0/sys/net/rtsock.c ============================================================================== --- releng/12.0/sys/net/rtsock.c Thu Nov 29 15:56:46 2018 (r341241) +++ releng/12.0/sys/net/rtsock.c Thu Nov 29 15:58:14 2018 (r341242) @@ -83,6 +83,7 @@ struct if_msghdr32 { int32_t ifm_addrs; int32_t ifm_flags; uint16_t ifm_index; + uint16_t _ifm_spare1; struct if_data ifm_data; }; @@ -96,6 +97,7 @@ struct if_msghdrl32 { uint16_t _ifm_spare1; uint16_t ifm_len; uint16_t ifm_data_off; + uint32_t _ifm_spare2; struct if_data ifm_data; }; @@ -1219,8 +1221,11 @@ rtsock_msg_buffer(int type, struct rt_addrinfo *rtinfo dlen = ALIGN(len) - len; if (buflen < dlen) cp = NULL; - else + else { + bzero(cp, dlen); + cp += dlen; buflen -= dlen; + } } len = ALIGN(len); @@ -1577,6 +1582,8 @@ sysctl_dumpentry(struct radix_node *rn, void *vw) if (w->w_req && w->w_tmem) { struct rt_msghdr *rtm = (struct rt_msghdr *)w->w_tmem; + bzero(&rtm->rtm_index, + sizeof(*rtm) - offsetof(struct rt_msghdr, rtm_index)); if (rt->rt_flags & RTF_GWFLAG_COMPAT) rtm->rtm_flags = RTF_GATEWAY | (rt->rt_flags & ~RTF_GWFLAG_COMPAT); @@ -1584,7 +1591,6 @@ sysctl_dumpentry(struct radix_node *rn, void *vw) rtm->rtm_flags = rt->rt_flags; rt_getmetrics(rt, &rtm->rtm_rmx); rtm->rtm_index = rt->rt_ifp->if_index; - rtm->rtm_errno = rtm->rtm_pid = rtm->rtm_seq = 0; rtm->rtm_addrs = info.rti_addrs; error = SYSCTL_OUT(w->w_req, (caddr_t)rtm, size); return (error); @@ -1612,6 +1618,7 @@ sysctl_iflist_ifml(struct ifnet *ifp, const struct if_ ifm32->_ifm_spare1 = 0; ifm32->ifm_len = sizeof(*ifm32); ifm32->ifm_data_off = offsetof(struct if_msghdrl32, ifm_data); + ifm32->_ifm_spare2 = 0; ifd = &ifm32->ifm_data; } else #endif @@ -1622,6 +1629,7 @@ sysctl_iflist_ifml(struct ifnet *ifp, const struct if_ ifm->_ifm_spare1 = 0; ifm->ifm_len = sizeof(*ifm); ifm->ifm_data_off = offsetof(struct if_msghdrl, ifm_data); + ifm->_ifm_spare2 = 0; ifd = &ifm->ifm_data; } @@ -1647,6 +1655,7 @@ sysctl_iflist_ifm(struct ifnet *ifp, const struct if_d ifm32->ifm_addrs = info->rti_addrs; ifm32->ifm_flags = ifp->if_flags | ifp->if_drv_flags; ifm32->ifm_index = ifp->if_index; + ifm32->_ifm_spare1 = 0; ifd = &ifm32->ifm_data; } else #endif @@ -1654,6 +1663,7 @@ sysctl_iflist_ifm(struct ifnet *ifp, const struct if_d ifm->ifm_addrs = info->rti_addrs; ifm->ifm_flags = ifp->if_flags | ifp->if_drv_flags; ifm->ifm_index = ifp->if_index; + ifm->_ifm_spare1 = 0; ifd = &ifm->ifm_data; } @@ -1722,6 +1732,7 @@ sysctl_iflist_ifam(struct ifaddr *ifa, struct rt_addri ifam->ifam_addrs = info->rti_addrs; ifam->ifam_flags = ifa->ifa_flags; ifam->ifam_index = ifa->ifa_ifp->if_index; + ifam->_ifam_spare1 = 0; ifam->ifam_metric = ifa->ifa_ifp->if_metric; return (SYSCTL_OUT(w->w_req, w->w_tmem, len)); @@ -1833,6 +1844,7 @@ sysctl_ifmalist(int af, struct walkarg *w) ifmam->ifmam_index = ifma->ifma_ifp->if_index; ifmam->ifmam_flags = 0; ifmam->ifmam_addrs = info.rti_addrs; + ifmam->_ifmam_spare1 = 0; error = SYSCTL_OUT(w->w_req, w->w_tmem, len); if (error != 0) break; From owner-svn-src-releng@freebsd.org Thu Nov 29 17:54:04 2018 Return-Path: Delivered-To: svn-src-releng@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B75F1146B6D; Thu, 29 Nov 2018 17:54:04 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D3D5D796D2; Thu, 29 Nov 2018 17:54: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 B676B1CF26; Thu, 29 Nov 2018 17:54:03 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wATHs3Wq074621; Thu, 29 Nov 2018 17:54:03 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wATHs3rD074620; Thu, 29 Nov 2018 17:54:03 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201811291754.wATHs3rD074620@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 29 Nov 2018 17:54:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r341251 - releng/12.0/sys/vm X-SVN-Group: releng X-SVN-Commit-Author: markj X-SVN-Commit-Paths: releng/12.0/sys/vm X-SVN-Commit-Revision: 341251 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D3D5D796D2 X-Spamd-Result: default: False [0.16 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.40)[-0.399,0]; NEURAL_SPAM_LONG(0.31)[0.307,0]; NEURAL_SPAM_MEDIUM(0.26)[0.256,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Nov 2018 17:54:04 -0000 Author: markj Date: Thu Nov 29 17:54:03 2018 New Revision: 341251 URL: https://svnweb.freebsd.org/changeset/base/341251 Log: MFstable/12 r341249: Update the free page count when blacklisting pages. Approved by: re (gjb) Modified: releng/12.0/sys/vm/vm_page.c Directory Properties: releng/12.0/ (props changed) Modified: releng/12.0/sys/vm/vm_page.c ============================================================================== --- releng/12.0/sys/vm/vm_page.c Thu Nov 29 17:42:30 2018 (r341250) +++ releng/12.0/sys/vm/vm_page.c Thu Nov 29 17:54:03 2018 (r341251) @@ -355,7 +355,8 @@ vm_page_blacklist_add(vm_paddr_t pa, bool verbose) vm_domain_free_lock(vmd); ret = vm_phys_unfree_page(m); vm_domain_free_unlock(vmd); - if (ret) { + if (ret != 0) { + vm_domain_freecnt_inc(vmd, -1); TAILQ_INSERT_TAIL(&blacklist_head, m, listq); if (verbose) printf("Skipping page with pa 0x%jx\n", (uintmax_t)pa); From owner-svn-src-releng@freebsd.org Thu Nov 29 18:02:36 2018 Return-Path: Delivered-To: svn-src-releng@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 905881147179; Thu, 29 Nov 2018 18:02:36 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 365C87A16D; Thu, 29 Nov 2018 18:02:36 +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 056DB1D0C5; Thu, 29 Nov 2018 18:02:36 +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 wATI2Zrs080024; Thu, 29 Nov 2018 18:02:35 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wATI2Zes080023; Thu, 29 Nov 2018 18:02:35 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201811291802.wATI2Zes080023@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 29 Nov 2018 18:02:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r341252 - releng/12.0/usr.sbin/newsyslog X-SVN-Group: releng X-SVN-Commit-Author: markj X-SVN-Commit-Paths: releng/12.0/usr.sbin/newsyslog X-SVN-Commit-Revision: 341252 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 365C87A16D X-Spamd-Result: default: False [0.16 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.40)[-0.399,0]; NEURAL_SPAM_LONG(0.31)[0.307,0]; NEURAL_SPAM_MEDIUM(0.26)[0.256,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Nov 2018 18:02:36 -0000 Author: markj Date: Thu Nov 29 18:02:35 2018 New Revision: 341252 URL: https://svnweb.freebsd.org/changeset/base/341252 Log: MFstable/12 r341250: Fix age_old_log() after r337468. PR: 233633 Approved by: re (gjb) Modified: releng/12.0/usr.sbin/newsyslog/newsyslog.c Directory Properties: releng/12.0/ (props changed) Modified: releng/12.0/usr.sbin/newsyslog/newsyslog.c ============================================================================== --- releng/12.0/usr.sbin/newsyslog/newsyslog.c Thu Nov 29 17:54:03 2018 (r341251) +++ releng/12.0/usr.sbin/newsyslog/newsyslog.c Thu Nov 29 18:02:35 2018 (r341252) @@ -2426,6 +2426,7 @@ age_old_log(const char *file) const char *logfile_suffix; static unsigned int suffix_maxlen = 0; char *tmp; + size_t tmpsiz; time_t mtime; int c; @@ -2435,33 +2436,34 @@ age_old_log(const char *file) strlen(compress_type[c].suffix)); } - tmp = alloca(MAXPATHLEN + sizeof(".0") + suffix_maxlen + 1); + tmpsiz = MAXPATHLEN + sizeof(".0") + suffix_maxlen + 1; + tmp = alloca(tmpsiz); if (archtodir) { char *p; /* build name of archive directory into tmp */ if (*archdirname == '/') { /* absolute */ - strlcpy(tmp, archdirname, sizeof(tmp)); + strlcpy(tmp, archdirname, tmpsiz); } else { /* relative */ /* get directory part of logfile */ - strlcpy(tmp, file, sizeof(tmp)); + strlcpy(tmp, file, tmpsiz); if ((p = strrchr(tmp, '/')) == NULL) tmp[0] = '\0'; else *(p + 1) = '\0'; - strlcat(tmp, archdirname, sizeof(tmp)); + strlcat(tmp, archdirname, tmpsiz); } - strlcat(tmp, "/", sizeof(tmp)); + strlcat(tmp, "/", tmpsiz); /* get filename part of logfile */ if ((p = strrchr(file, '/')) == NULL) - strlcat(tmp, file, sizeof(tmp)); + strlcat(tmp, file, tmpsiz); else - strlcat(tmp, p + 1, sizeof(tmp)); + strlcat(tmp, p + 1, tmpsiz); } else { - (void) strlcpy(tmp, file, sizeof(tmp)); + (void) strlcpy(tmp, file, tmpsiz); } if (timefnamefmt != NULL) { @@ -2469,11 +2471,11 @@ age_old_log(const char *file) if (mtime == -1) return (-1); } else { - strlcat(tmp, ".0", sizeof(tmp)); + strlcat(tmp, ".0", tmpsiz); logfile_suffix = get_logfile_suffix(tmp); if (logfile_suffix == NULL) return (-1); - (void) strlcat(tmp, logfile_suffix, sizeof(tmp)); + (void) strlcat(tmp, logfile_suffix, tmpsiz); if (stat(tmp, &sb) < 0) return (-1); mtime = sb.st_mtime; From owner-svn-src-releng@freebsd.org Thu Nov 29 20:59:20 2018 Return-Path: Delivered-To: svn-src-releng@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6FA2114CB03; Thu, 29 Nov 2018 20:59:19 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 78E848278D; Thu, 29 Nov 2018 20:59:19 +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 41B051ECD0; Thu, 29 Nov 2018 20:59:19 +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 wATKxJBh068250; Thu, 29 Nov 2018 20:59:19 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wATKxIfO068249; Thu, 29 Nov 2018 20:59:18 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201811292059.wATKxIfO068249@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 29 Nov 2018 20:59:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r341262 - releng/12.0/sys/netinet X-SVN-Group: releng X-SVN-Commit-Author: markj X-SVN-Commit-Paths: releng/12.0/sys/netinet X-SVN-Commit-Revision: 341262 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 78E848278D X-Spamd-Result: default: False [0.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_LONG(0.34)[0.335,0]; NEURAL_SPAM_SHORT(0.31)[0.314,0]; NEURAL_SPAM_MEDIUM(0.31)[0.312,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Nov 2018 20:59:20 -0000 Author: markj Date: Thu Nov 29 20:59:18 2018 New Revision: 341262 URL: https://svnweb.freebsd.org/changeset/base/341262 Log: MFstable/12 r341259: Add some additional length checks to the IPv4 fragmentation code. Approved by: re (gjb) Modified: releng/12.0/sys/netinet/ip_reass.c releng/12.0/sys/netinet/ip_var.h Directory Properties: releng/12.0/ (props changed) Modified: releng/12.0/sys/netinet/ip_reass.c ============================================================================== --- releng/12.0/sys/netinet/ip_reass.c Thu Nov 29 20:48:38 2018 (r341261) +++ releng/12.0/sys/netinet/ip_reass.c Thu Nov 29 20:59:18 2018 (r341262) @@ -211,19 +211,21 @@ ip_reass(struct mbuf *m) * convert offset of this to bytes. */ ip->ip_len = htons(ntohs(ip->ip_len) - hlen); - if (ip->ip_off & htons(IP_MF)) { - /* - * Make sure that fragments have a data length - * that's a non-zero multiple of 8 bytes. - */ - if (ip->ip_len == htons(0) || (ntohs(ip->ip_len) & 0x7) != 0) { - IPSTAT_INC(ips_toosmall); /* XXX */ - IPSTAT_INC(ips_fragdropped); - m_freem(m); - return (NULL); - } + /* + * Make sure that fragments have a data length + * that's a non-zero multiple of 8 bytes, unless + * this is the last fragment. + */ + if (ip->ip_len == htons(0) || + ((ip->ip_off & htons(IP_MF)) && (ntohs(ip->ip_len) & 0x7) != 0)) { + IPSTAT_INC(ips_toosmall); /* XXX */ + IPSTAT_INC(ips_fragdropped); + m_freem(m); + return (NULL); + } + if (ip->ip_off & htons(IP_MF)) m->m_flags |= M_IP_FRAG; - } else + else m->m_flags &= ~M_IP_FRAG; ip->ip_off = htons(ntohs(ip->ip_off) << 3); @@ -301,9 +303,28 @@ ip_reass(struct mbuf *m) fp->ipq_src = ip->ip_src; fp->ipq_dst = ip->ip_dst; fp->ipq_frags = m; + if (m->m_flags & M_IP_FRAG) + fp->ipq_maxoff = -1; + else + fp->ipq_maxoff = ntohs(ip->ip_off) + ntohs(ip->ip_len); m->m_nextpkt = NULL; goto done; } else { + /* + * If we already saw the last fragment, make sure + * this fragment's offset looks sane. Otherwise, if + * this is the last fragment, record its endpoint. + */ + if (fp->ipq_maxoff > 0) { + i = ntohs(ip->ip_off) + ntohs(ip->ip_len); + if (((m->m_flags & M_IP_FRAG) && i >= fp->ipq_maxoff) || + ((m->m_flags & M_IP_FRAG) == 0 && + i != fp->ipq_maxoff)) { + fp = NULL; + goto dropfrag; + } + } else if ((m->m_flags & M_IP_FRAG) == 0) + fp->ipq_maxoff = ntohs(ip->ip_off) + ntohs(ip->ip_len); fp->ipq_nfrags++; atomic_add_int(&nfrags, 1); #ifdef MAC Modified: releng/12.0/sys/netinet/ip_var.h ============================================================================== --- releng/12.0/sys/netinet/ip_var.h Thu Nov 29 20:48:38 2018 (r341261) +++ releng/12.0/sys/netinet/ip_var.h Thu Nov 29 20:59:18 2018 (r341262) @@ -61,6 +61,7 @@ struct ipq { u_char ipq_ttl; /* time for reass q to live */ u_char ipq_p; /* protocol of this fragment */ u_short ipq_id; /* sequence id for reassembly */ + int ipq_maxoff; /* total length of packet */ struct mbuf *ipq_frags; /* to ip headers of fragments */ struct in_addr ipq_src,ipq_dst; u_char ipq_nfrags; /* # frags in this packet */ From owner-svn-src-releng@freebsd.org Thu Nov 29 21:59:11 2018 Return-Path: Delivered-To: svn-src-releng@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B697114E2A9; Thu, 29 Nov 2018 21:59:11 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AD36984B79; Thu, 29 Nov 2018 21:59:10 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6F0991F6FD; Thu, 29 Nov 2018 21:59:10 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wATLxA0N099607; Thu, 29 Nov 2018 21:59:10 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wATLx9Bb099604; Thu, 29 Nov 2018 21:59:09 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201811292159.wATLx9Bb099604@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Thu, 29 Nov 2018 21:59:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r341266 - in releng/12.0: . sys/modules/iavf X-SVN-Group: releng X-SVN-Commit-Author: marius X-SVN-Commit-Paths: in releng/12.0: . sys/modules/iavf X-SVN-Commit-Revision: 341266 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AD36984B79 X-Spamd-Result: default: False [0.44 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_MEDIUM(0.26)[0.256,0]; NEURAL_HAM_SHORT(-0.12)[-0.125,0]; NEURAL_SPAM_LONG(0.31)[0.307,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Nov 2018 21:59:11 -0000 Author: marius Date: Thu Nov 29 21:59:09 2018 New Revision: 341266 URL: https://svnweb.freebsd.org/changeset/base/341266 Log: MFC: r341016, MF12: r341261 - Add a belated UPDATING entry for the ixlv(4) -> iavf(4) rename in r339338. - Likewise, add ixlv.4.gz to OLD_FILES, - and link if_ixlv.ko to if_iavf.ko in order to aid a bit in the transition. Approved by: re (gjb) Modified: releng/12.0/ObsoleteFiles.inc releng/12.0/UPDATING releng/12.0/sys/modules/iavf/Makefile Directory Properties: releng/12.0/ (props changed) Modified: releng/12.0/ObsoleteFiles.inc ============================================================================== --- releng/12.0/ObsoleteFiles.inc Thu Nov 29 21:20:53 2018 (r341265) +++ releng/12.0/ObsoleteFiles.inc Thu Nov 29 21:59:09 2018 (r341266) @@ -58,6 +58,8 @@ OLD_LIBS+=usr/lib32/libcap_pwd.so.0 OLD_LIBS+=usr/lib32/libcap_random.so.0 OLD_LIBS+=usr/lib32/libcap_dns.so.0 OLD_LIBS+=usr/lib32/libcap_syslog.so.0 +# 20181012: rename of ixlv(4) to iavf(4) +OLD_FILES+=usr/share/man/man4/ixlv.4.gz # 20181009: OpenSSL 1.1.1 OLD_FILES+=usr/include/openssl/des_old.h OLD_FILES+=usr/include/openssl/dso.h Modified: releng/12.0/UPDATING ============================================================================== --- releng/12.0/UPDATING Thu Nov 29 21:20:53 2018 (r341265) +++ releng/12.0/UPDATING Thu Nov 29 21:59:09 2018 (r341266) @@ -52,6 +52,13 @@ from older version of current across the gcc/clang cut loading from X11 startup. These will become the defaults in 13-current shortly. +20181012: + The ixlv(4) driver has been renamed to iavf(4). As a consequence, + custom kernel and module loading configuration files must be updated + accordingly. Moreover, interfaces previous presented as ixlvN to the + system are now exposed as iavfN and network configuration files must + be adjusted as necessary. + 20181009: OpenSSL has been updated to version 1.1.1. This update included additional various API changes througout the base system. It is Modified: releng/12.0/sys/modules/iavf/Makefile ============================================================================== --- releng/12.0/sys/modules/iavf/Makefile Thu Nov 29 21:20:53 2018 (r341265) +++ releng/12.0/sys/modules/iavf/Makefile Thu Nov 29 21:59:09 2018 (r341266) @@ -15,4 +15,6 @@ SRCS += i40e_common.c i40e_nvm.c i40e_adminq.c # Enable asserts and other debugging facilities # CFLAGS += -DINVARIANTS -DINVARIANTS_SUPPORT -DWITNESS +LINKS= ${KMODDIR}/${KMOD}.ko ${KMODDIR}/if_ixlv.ko + .include From owner-svn-src-releng@freebsd.org Thu Nov 29 22:00:21 2018 Return-Path: Delivered-To: svn-src-releng@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CB786114E332; Thu, 29 Nov 2018 22:00:21 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7218F84CFF; Thu, 29 Nov 2018 22:00:21 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 50A2C1F701; Thu, 29 Nov 2018 22:00:21 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wATM0LSi099757; Thu, 29 Nov 2018 22:00:21 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wATM0LDh099756; Thu, 29 Nov 2018 22:00:21 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201811292200.wATM0LDh099756@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Thu, 29 Nov 2018 22:00:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r341267 - releng/12.0/sys/contrib/ck/include/gcc/sparcv9 X-SVN-Group: releng X-SVN-Commit-Author: marius X-SVN-Commit-Paths: releng/12.0/sys/contrib/ck/include/gcc/sparcv9 X-SVN-Commit-Revision: 341267 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7218F84CFF X-Spamd-Result: default: False [0.53 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_MEDIUM(0.31)[0.312,0]; NEURAL_HAM_SHORT(-0.12)[-0.119,0]; NEURAL_SPAM_LONG(0.34)[0.335,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Nov 2018 22:00:22 -0000 Author: marius Date: Thu Nov 29 22:00:20 2018 New Revision: 341267 URL: https://svnweb.freebsd.org/changeset/base/341267 Log: MFV: r341039, MFC: r341041, MF12: r341264 Import CK as of 21d3e319407d19dece16ee317c757ffc54a452bc, which makes its sparcv9 atomics compatible with the FreeBSD kernel by using instructions which access the appropriate address space. Atomic operations within the kernel must access the nucleus address space instead of the default primary one. Without this change but the increased use of CK in the kernel, machines started to panic after some minutes of uptime due to an unresolvable fault in ck_pr_cas_64_value(). Approved by: re (gjb) Modified: releng/12.0/sys/contrib/ck/include/gcc/sparcv9/ck_pr.h Directory Properties: releng/12.0/ (props changed) Modified: releng/12.0/sys/contrib/ck/include/gcc/sparcv9/ck_pr.h ============================================================================== --- releng/12.0/sys/contrib/ck/include/gcc/sparcv9/ck_pr.h Thu Nov 29 21:59:09 2018 (r341266) +++ releng/12.0/sys/contrib/ck/include/gcc/sparcv9/ck_pr.h Thu Nov 29 22:00:20 2018 (r341267) @@ -136,11 +136,26 @@ CK_PR_STORE_S(int, int, "stsw") #undef CK_PR_STORE_S #undef CK_PR_STORE +/* Use the appropriate address space for atomics within the FreeBSD kernel. */ +#if defined(__FreeBSD__) && defined(_KERNEL) +#include +#include +#define CK_PR_INS_CAS "casa" +#define CK_PR_INS_CASX "casxa" +#define CK_PR_INS_SWAP "swapa" +#define CK_PR_ASI_ATOMIC __XSTRING(__ASI_ATOMIC) +#else +#define CK_PR_INS_CAS "cas" +#define CK_PR_INS_CASX "casx" +#define CK_PR_INS_SWAP "swap" +#define CK_PR_ASI_ATOMIC "" +#endif + CK_CC_INLINE static bool ck_pr_cas_64_value(uint64_t *target, uint64_t compare, uint64_t set, uint64_t *value) { - __asm__ __volatile__("casx [%1], %2, %0" + __asm__ __volatile__(CK_PR_INS_CASX " [%1] " CK_PR_ASI_ATOMIC ", %2, %0" : "+&r" (set) : "r" (target), "r" (compare) @@ -154,7 +169,7 @@ CK_CC_INLINE static bool ck_pr_cas_64(uint64_t *target, uint64_t compare, uint64_t set) { - __asm__ __volatile__("casx [%1], %2, %0" + __asm__ __volatile__(CK_PR_INS_CASX " [%1] " CK_PR_ASI_ATOMIC ", %2, %0" : "+&r" (set) : "r" (target), "r" (compare) @@ -181,7 +196,7 @@ ck_pr_cas_ptr_value(void *target, void *compare, void CK_CC_INLINE static bool \ ck_pr_cas_##N##_value(T *target, T compare, T set, T *value) \ { \ - __asm__ __volatile__("cas [%1], %2, %0" \ + __asm__ __volatile__(CK_PR_INS_CAS " [%1] " CK_PR_ASI_ATOMIC ", %2, %0" \ : "+&r" (set) \ : "r" (target), \ "r" (compare) \ @@ -192,7 +207,7 @@ ck_pr_cas_ptr_value(void *target, void *compare, void CK_CC_INLINE static bool \ ck_pr_cas_##N(T *target, T compare, T set) \ { \ - __asm__ __volatile__("cas [%1], %2, %0" \ + __asm__ __volatile__(CK_PR_INS_CAS " [%1] " CK_PR_ASI_ATOMIC ", %2, %0" \ : "+&r" (set) \ : "r" (target), \ "r" (compare) \ @@ -211,7 +226,7 @@ CK_PR_CAS(int, int) ck_pr_fas_##N(T *target, T update) \ { \ \ - __asm__ __volatile__("swap [%1], %0" \ + __asm__ __volatile__(CK_PR_INS_SWAP " [%1] " CK_PR_ASI_ATOMIC ", %0" \ : "+&r" (update) \ : "r" (target) \ : "memory"); \ @@ -223,6 +238,11 @@ CK_PR_FAS(uint, unsigned int) CK_PR_FAS(32, uint32_t) #undef CK_PR_FAS + +#undef CK_PR_INS_CAS +#undef CK_PR_INS_CASX +#undef CK_PR_INS_SWAP +#undef CK_PR_ASI_ATOMIC #endif /* CK_PR_SPARCV9_H */ From owner-svn-src-releng@freebsd.org Fri Nov 30 00:00:52 2018 Return-Path: Delivered-To: svn-src-releng@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0E3A11511E2; Fri, 30 Nov 2018 00:00:51 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8A0F389369; Fri, 30 Nov 2018 00:00:51 +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 6C75720AF6; Fri, 30 Nov 2018 00:00:51 +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 wAU00pqn061405; Fri, 30 Nov 2018 00:00:51 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAU00p3u061404; Fri, 30 Nov 2018 00:00:51 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201811300000.wAU00p3u061404@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 30 Nov 2018 00:00:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r341271 - releng/12.0/sys/conf X-SVN-Group: releng X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: releng/12.0/sys/conf X-SVN-Commit-Revision: 341271 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8A0F389369 X-Spamd-Result: default: False [0.78 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_LONG(0.31)[0.307,0]; NEURAL_SPAM_MEDIUM(0.26)[0.256,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_SPAM_SHORT(0.22)[0.221,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Nov 2018 00:00:52 -0000 Author: gjb Date: Fri Nov 30 00:00:51 2018 New Revision: 341271 URL: https://svnweb.freebsd.org/changeset/base/341271 Log: Update releng/12.0 from RC2 to RC3 as part of the 12.0-RELEASE cycle. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/12.0/sys/conf/newvers.sh Modified: releng/12.0/sys/conf/newvers.sh ============================================================================== --- releng/12.0/sys/conf/newvers.sh Thu Nov 29 23:14:54 2018 (r341270) +++ releng/12.0/sys/conf/newvers.sh Fri Nov 30 00:00:51 2018 (r341271) @@ -46,7 +46,7 @@ TYPE="FreeBSD" REVISION="12.0" -BRANCH="RC2" +BRANCH="RC3" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi