From owner-svn-src-all@freebsd.org Sun Mar 24 06:28:27 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D896154C817; Sun, 24 Mar 2019 06:28:27 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C2CBB6E753; Sun, 24 Mar 2019 06:28:26 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9966F1C529; Sun, 24 Mar 2019 06:28:26 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2O6SQ6N018984; Sun, 24 Mar 2019 06:28:26 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2O6SPd0018980; Sun, 24 Mar 2019 06:28:25 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201903240628.x2O6SPd0018980@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Sun, 24 Mar 2019 06:28:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345464 - head/sys/dev/cfi X-SVN-Group: head X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: head/sys/dev/cfi X-SVN-Commit-Revision: 345464 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C2CBB6E753 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.957,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Mar 2019 06:28:27 -0000 Author: allanjude Date: Sun Mar 24 06:28:25 2019 New Revision: 345464 URL: https://svnweb.freebsd.org/changeset/base/345464 Log: Fix AMD type flash write operations, and display chip information at boot Applies to MX flash chips on AR9132 and RT3050 Submitted by: Hiroki Mori Reviewed by: imp, sbruno Differential Revision: https://reviews.freebsd.org/D14279 Modified: head/sys/dev/cfi/cfi_core.c head/sys/dev/cfi/cfi_reg.h head/sys/dev/cfi/cfi_var.h Modified: head/sys/dev/cfi/cfi_core.c ============================================================================== --- head/sys/dev/cfi/cfi_core.c Sat Mar 23 23:44:40 2019 (r345463) +++ head/sys/dev/cfi/cfi_core.c Sun Mar 24 06:28:25 2019 (r345464) @@ -421,6 +421,16 @@ cfi_attach(device_t dev) } } + if (sc->sc_cmdset == CFI_VEND_AMD_ECS || + sc->sc_cmdset == CFI_VEND_AMD_SCS) { + cfi_amd_write(sc, 0, AMD_ADDR_START, CFI_AMD_AUTO_SELECT); + sc->sc_manid = cfi_read(sc, 0); + sc->sc_devid = cfi_read(sc, 2); + device_printf(dev, "Manufacturer ID:%x Device ID:%x\n", + sc->sc_manid, sc->sc_devid); + cfi_write(sc, 0, CFI_BCS_READ_ARRAY2); + } + u = device_get_unit(dev); sc->sc_nod = make_dev(&cfi_cdevsw, u, UID_ROOT, GID_WHEEL, 0600, "%s%u", cfi_driver_name, u); @@ -500,6 +510,37 @@ cfi_detach(device_t dev) return (0); } +static bool +cfi_check_erase(struct cfi_softc *sc, u_int ofs, u_int sz) +{ + bool result; + int i; + uint32_t val; + + result = FALSE; + for (i = 0; i < sz; i += sc->sc_width) { + val = cfi_read(sc, ofs + i); + switch (sc->sc_width) { + case 1: + if (val != 0xff) + goto out; + continue; + case 2: + if (val != 0xffff) + goto out; + continue; + case 4: + if (val != 0xffffffff) + goto out; + continue; + } + } + result = TRUE; + +out: + return (result); +} + static int cfi_wait_ready(struct cfi_softc *sc, u_int ofs, sbintime_t start, enum cfi_wait_cmd cmd) @@ -581,10 +622,12 @@ cfi_write_block(struct cfi_softc *sc) uint32_t *x32; } ptr, cpyprt; register_t intr; - int error, i, neederase = 0; + int error, i, j, neederase = 0; uint32_t st; u_int wlen; sbintime_t start; + u_int minsz; + uint32_t val; /* Intel flash must be unlocked before modification */ switch (sc->sc_cmdset) { @@ -615,9 +658,27 @@ cfi_write_block(struct cfi_softc *sc) break; case CFI_VEND_AMD_SCS: case CFI_VEND_AMD_ECS: + /* find minimum sector size */ + minsz = sc->sc_region[0].r_blksz; + for (i = 1; i < sc->sc_regions; i++) { + if (sc->sc_region[i].r_blksz < minsz) + minsz = sc->sc_region[i].r_blksz; + } cfi_amd_write(sc, sc->sc_wrofs, AMD_ADDR_START, CFI_AMD_ERASE_SECTOR); - cfi_amd_write(sc, sc->sc_wrofs, 0, CFI_AMD_BLOCK_ERASE); + cfi_amd_write(sc, sc->sc_wrofs, + sc->sc_wrofs >> (ffs(minsz) - 1), + CFI_AMD_BLOCK_ERASE); + for (i = 0; i < CFI_AMD_MAXCHK; ++i) { + if (cfi_check_erase(sc, sc->sc_wrofs, + sc->sc_wrbufsz)) + break; + DELAY(10); + } + if (i == CFI_AMD_MAXCHK) { + printf("\nCFI Sector Erase time out error\n"); + return (ENODEV); + } break; default: /* Better safe than sorry... */ @@ -749,10 +810,37 @@ cfi_write_block(struct cfi_softc *sc) intr_restore(intr); - error = cfi_wait_ready(sc, sc->sc_wrofs, start, - CFI_TIMEOUT_WRITE); - if (error) - goto out; + if (sc->sc_cmdset == CFI_VEND_AMD_ECS || + sc->sc_cmdset == CFI_VEND_AMD_SCS) { + for (j = 0; j < CFI_AMD_MAXCHK; ++j) { + switch (sc->sc_width) { + case 1: + val = *(ptr.x8 + i); + break; + case 2: + val = *(ptr.x16 + i / 2); + break; + case 4: + val = *(ptr.x32 + i / 4); + break; + } + + if (cfi_read(sc, sc->sc_wrofs + i) == val) + break; + + DELAY(10); + } + if (j == CFI_AMD_MAXCHK) { + printf("\nCFI Program Verify time out error\n"); + error = ENXIO; + goto out; + } + } else { + error = cfi_wait_ready(sc, sc->sc_wrofs, start, + CFI_TIMEOUT_WRITE); + if (error) + goto out; + } } /* error is 0. */ Modified: head/sys/dev/cfi/cfi_reg.h ============================================================================== --- head/sys/dev/cfi/cfi_reg.h Sat Mar 23 23:44:40 2019 (r345463) +++ head/sys/dev/cfi/cfi_reg.h Sun Mar 24 06:28:25 2019 (r345464) @@ -146,10 +146,13 @@ struct cfi_qry { #define CFI_AMD_BLOCK_ERASE 0x30 #define CFI_AMD_UNLOCK_ACK 0x55 #define CFI_AMD_ERASE_SECTOR 0x80 +#define CFI_AMD_AUTO_SELECT 0x90 #define CFI_AMD_PROGRAM 0xa0 #define CFI_AMD_UNLOCK 0xaa #define AMD_ADDR_START 0xaaa #define AMD_ADDR_ACK 0x555 + +#define CFI_AMD_MAXCHK 0x10000 #endif /* _DEV_CFI_REG_H_ */ Modified: head/sys/dev/cfi/cfi_var.h ============================================================================== --- head/sys/dev/cfi/cfi_var.h Sat Mar 23 23:44:40 2019 (r345463) +++ head/sys/dev/cfi/cfi_var.h Sun Mar 24 06:28:25 2019 (r345464) @@ -80,6 +80,9 @@ struct cfi_softc { u_int sc_wrbufsz; u_int sc_wrofs; u_int sc_writing; + + u_int sc_manid; + u_int sc_devid; }; extern char cfi_driver_name[]; From owner-svn-src-all@freebsd.org Sun Mar 24 10:40:22 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F94D15543BA; Sun, 24 Mar 2019 10:40:22 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A57BB7679D; Sun, 24 Mar 2019 10:40:21 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 945D41F0D2; Sun, 24 Mar 2019 10:40:21 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2OAeLDc050953; Sun, 24 Mar 2019 10:40:21 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2OAeLEp050951; Sun, 24 Mar 2019 10:40:21 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201903241040.x2OAeLEp050951@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 24 Mar 2019 10:40:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345466 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 345466 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A57BB7679D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.950,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Mar 2019 10:40:22 -0000 Author: tuexen Date: Sun Mar 24 10:40:20 2019 New Revision: 345466 URL: https://svnweb.freebsd.org/changeset/base/345466 Log: Fox more signed unsigned issues. This time on the send path. This is joint work with rrs@ and was found by running syzkaller. MFC after: 1 week Modified: head/sys/netinet/sctp_output.c head/sys/netinet/sctp_structs.h Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Sun Mar 24 09:46:16 2019 (r345465) +++ head/sys/netinet/sctp_output.c Sun Mar 24 10:40:20 2019 (r345466) @@ -6889,7 +6889,7 @@ sctp_sendall(struct sctp_inpcb *inp, struct uio *uio, ca->sndrcv.sinfo_flags &= ~SCTP_SENDALL; /* get length and mbuf chain */ if (uio) { - ca->sndlen = (int)uio->uio_resid; + ca->sndlen = uio->uio_resid; ca->m = sctp_copy_out_all(uio, ca->sndlen); if (ca->m == NULL) { SCTP_FREE(ca, SCTP_M_COPYAL); @@ -12533,7 +12533,7 @@ sctp_lower_sosend(struct socket *so, struct thread *p ) { - unsigned int sndlen = 0, max_len; + size_t sndlen = 0, max_len; int error, len; struct mbuf *top = NULL; int queue_only = 0, queue_only_for_init = 0; @@ -12585,12 +12585,12 @@ sctp_lower_sosend(struct socket *so, SCTP_LTRACE_ERR_RET(inp, stcb, net, SCTP_FROM_SCTP_OUTPUT, EINVAL); return (EINVAL); } - sndlen = (unsigned int)uio->uio_resid; + sndlen = uio->uio_resid; } else { top = SCTP_HEADER_TO_CHAIN(i_pak); sndlen = SCTP_HEADER_LEN(i_pak); } - SCTPDBG(SCTP_DEBUG_OUTPUT1, "Send called addr:%p send length %d\n", + SCTPDBG(SCTP_DEBUG_OUTPUT1, "Send called addr:%p send length %zu\n", (void *)addr, sndlen); if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) && @@ -12944,7 +12944,7 @@ sctp_lower_sosend(struct socket *so, /* Are we aborting? */ if (srcv->sinfo_flags & SCTP_ABORT) { struct mbuf *mm; - int tot_demand, tot_out = 0, max_out; + size_t tot_demand, tot_out = 0, max_out; SCTP_STAT_INCR(sctps_sends_with_abort); if ((SCTP_GET_STATE(stcb) == SCTP_STATE_COOKIE_WAIT) || @@ -13000,7 +13000,7 @@ sctp_lower_sosend(struct socket *so, ph++; SCTP_BUF_LEN(mm) = tot_out + sizeof(struct sctp_paramhdr); if (top == NULL) { - error = uiomove((caddr_t)ph, (int)tot_out, uio); + error = uiomove((caddr_t)ph, tot_out, uio); if (error) { /*- * Here if we can't get his data we @@ -13229,7 +13229,7 @@ skip_preblock: if ((max_len > SCTP_BASE_SYSCTL(sctp_add_more_threshold)) || (max_len && (SCTP_SB_LIMIT_SND(so) < SCTP_BASE_SYSCTL(sctp_add_more_threshold))) || - (uio->uio_resid && (uio->uio_resid <= (int)max_len))) { + (uio->uio_resid && (uio->uio_resid <= max_len))) { sndout = 0; new_tail = NULL; if (hold_tcblock) { Modified: head/sys/netinet/sctp_structs.h ============================================================================== --- head/sys/netinet/sctp_structs.h Sun Mar 24 09:46:16 2019 (r345465) +++ head/sys/netinet/sctp_structs.h Sun Mar 24 10:40:20 2019 (r345466) @@ -166,7 +166,7 @@ struct sctp_copy_all { struct sctp_inpcb *inp; /* ep */ struct mbuf *m; struct sctp_sndrcvinfo sndrcv; - int sndlen; + size_t sndlen; int cnt_sent; int cnt_failed; }; From owner-svn-src-all@freebsd.org Sun Mar 24 12:13:06 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A07311557BE8; Sun, 24 Mar 2019 12:13:06 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 429C381F88; Sun, 24 Mar 2019 12:13:06 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1D5C4201A0; Sun, 24 Mar 2019 12:13:06 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2OCD6bi002832; Sun, 24 Mar 2019 12:13:06 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2OCD5F6002828; Sun, 24 Mar 2019 12:13:05 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201903241213.x2OCD5F6002828@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 24 Mar 2019 12:13:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345467 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 345467 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 429C381F88 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Mar 2019 12:13:06 -0000 Author: tuexen Date: Sun Mar 24 12:13:05 2019 New Revision: 345467 URL: https://svnweb.freebsd.org/changeset/base/345467 Log: Fix build issue for the userland stack. Joint work with rrs@. MFC after: 1 week Modified: head/sys/netinet/sctp_output.c head/sys/netinet/sctp_structs.h head/sys/netinet/sctputil.c head/sys/netinet/sctputil.h Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Sun Mar 24 10:40:20 2019 (r345466) +++ head/sys/netinet/sctp_output.c Sun Mar 24 12:13:05 2019 (r345467) @@ -6813,10 +6813,10 @@ sctp_sendall_completes(void *ptr, uint32_t val SCTP_UN } static struct mbuf * -sctp_copy_out_all(struct uio *uio, int len) +sctp_copy_out_all(struct uio *uio, ssize_t len) { struct mbuf *ret, *at; - int left, willcpy, cancpy, error; + ssize_t left, willcpy, cancpy, error; ret = sctp_get_mbuf_for_msg(MCLBYTES, 0, M_WAITOK, 1, MT_DATA); if (ret == NULL) { @@ -6831,17 +6831,17 @@ sctp_copy_out_all(struct uio *uio, int len) at = ret; while (left > 0) { /* Align data to the end */ - error = uiomove(mtod(at, caddr_t), willcpy, uio); + error = uiomove(mtod(at, caddr_t), (int)willcpy, uio); if (error) { err_out_now: sctp_m_freem(at); return (NULL); } - SCTP_BUF_LEN(at) = willcpy; + SCTP_BUF_LEN(at) = (int)willcpy; SCTP_BUF_NEXT_PKT(at) = SCTP_BUF_NEXT(at) = 0; left -= willcpy; if (left > 0) { - SCTP_BUF_NEXT(at) = sctp_get_mbuf_for_msg(left, 0, M_WAITOK, 1, MT_DATA); + SCTP_BUF_NEXT(at) = sctp_get_mbuf_for_msg((unsigned int)left, 0, M_WAITOK, 1, MT_DATA); if (SCTP_BUF_NEXT(at) == NULL) { goto err_out_now; } @@ -12387,7 +12387,7 @@ sctp_copy_it_in(struct sctp_tcb *stcb, struct sctp_sndrcvinfo *srcv, struct uio *uio, struct sctp_nets *net, - int max_send_len, + ssize_t max_send_len, int user_marks_eor, int *error) { @@ -12533,7 +12533,7 @@ sctp_lower_sosend(struct socket *so, struct thread *p ) { - size_t sndlen = 0, max_len; + ssize_t sndlen = 0, max_len; int error, len; struct mbuf *top = NULL; int queue_only = 0, queue_only_for_init = 0; @@ -12555,7 +12555,8 @@ sctp_lower_sosend(struct socket *so, int got_all_of_the_send = 0; int hold_tcblock = 0; int non_blocking = 0; - uint32_t local_add_more, local_soresv = 0; + uint32_t local_add_more; + ssize_t local_soresv = 0; uint16_t port; uint16_t sinfo_flags; sctp_assoc_t sinfo_assoc_id; @@ -12859,7 +12860,7 @@ sctp_lower_sosend(struct socket *so, } /* would we block? */ if (non_blocking) { - uint32_t amount; + ssize_t amount; if (hold_tcblock == 0) { SCTP_TCB_LOCK(stcb); @@ -12880,7 +12881,7 @@ sctp_lower_sosend(struct socket *so, error = EWOULDBLOCK; goto out_unlocked; } - stcb->asoc.sb_send_resv += sndlen; + stcb->asoc.sb_send_resv += (uint32_t)sndlen; SCTP_TCB_UNLOCK(stcb); hold_tcblock = 0; } else { @@ -12944,7 +12945,7 @@ sctp_lower_sosend(struct socket *so, /* Are we aborting? */ if (srcv->sinfo_flags & SCTP_ABORT) { struct mbuf *mm; - size_t tot_demand, tot_out = 0, max_out; + ssize_t tot_demand, tot_out = 0, max_out; SCTP_STAT_INCR(sctps_sends_with_abort); if ((SCTP_GET_STATE(stcb) == SCTP_STATE_COOKIE_WAIT) || @@ -12978,7 +12979,7 @@ sctp_lower_sosend(struct socket *so, error = EMSGSIZE; goto out; } - mm = sctp_get_mbuf_for_msg(tot_demand, 0, M_WAITOK, 1, MT_DATA); + mm = sctp_get_mbuf_for_msg((unsigned int)tot_demand, 0, M_WAITOK, 1, MT_DATA); } if (mm == NULL) { SCTP_LTRACE_ERR_RET(NULL, stcb, net, SCTP_FROM_SCTP_OUTPUT, ENOMEM); @@ -12998,9 +12999,9 @@ sctp_lower_sosend(struct socket *so, ph->param_type = htons(SCTP_CAUSE_USER_INITIATED_ABT); ph->param_length = htons((uint16_t)(sizeof(struct sctp_paramhdr) + tot_out)); ph++; - SCTP_BUF_LEN(mm) = tot_out + sizeof(struct sctp_paramhdr); + SCTP_BUF_LEN(mm) = (int)(tot_out + sizeof(struct sctp_paramhdr)); if (top == NULL) { - error = uiomove((caddr_t)ph, tot_out, uio); + error = uiomove((caddr_t)ph, (int)tot_out, uio); if (error) { /*- * Here if we can't get his data we @@ -13079,7 +13080,7 @@ sctp_lower_sosend(struct socket *so, * For non-eeor the whole message must fit in * the socket send buffer. */ - local_add_more = sndlen; + local_add_more = (uint32_t)sndlen; } len = 0; if (non_blocking) { @@ -13236,7 +13237,7 @@ skip_preblock: SCTP_TCB_UNLOCK(stcb); hold_tcblock = 0; } - mm = sctp_copy_resume(uio, max_len, user_marks_eor, &error, &sndout, &new_tail); + mm = sctp_copy_resume(uio, (int)max_len, user_marks_eor, &error, &sndout, &new_tail); if ((mm == NULL) || error) { if (mm) { sctp_m_freem(mm); @@ -13299,7 +13300,7 @@ skip_preblock: SCTP_TCB_LOCK(stcb); hold_tcblock = 1; } - sctp_prune_prsctp(stcb, asoc, srcv, sndlen); + sctp_prune_prsctp(stcb, asoc, srcv, (int)sndlen); inqueue_bytes = stcb->asoc.total_output_queue_size - (stcb->asoc.chunks_on_out_queue * SCTP_DATA_CHUNK_OVERHEAD(stcb)); if (SCTP_SB_LIMIT_SND(so) > inqueue_bytes) max_len = SCTP_SB_LIMIT_SND(so) - inqueue_bytes; @@ -13421,7 +13422,7 @@ skip_preblock: min(SCTP_BASE_SYSCTL(sctp_add_more_threshold), SCTP_SB_LIMIT_SND(so)))) { if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_BLK_LOGGING_ENABLE) { sctp_log_block(SCTP_BLOCK_LOG_INTO_BLK, - asoc, (size_t)uio->uio_resid); + asoc, uio->uio_resid); } be.error = 0; stcb->block_entry = &be; Modified: head/sys/netinet/sctp_structs.h ============================================================================== --- head/sys/netinet/sctp_structs.h Sun Mar 24 10:40:20 2019 (r345466) +++ head/sys/netinet/sctp_structs.h Sun Mar 24 12:13:05 2019 (r345467) @@ -166,7 +166,7 @@ struct sctp_copy_all { struct sctp_inpcb *inp; /* ep */ struct mbuf *m; struct sctp_sndrcvinfo sndrcv; - size_t sndlen; + ssize_t sndlen; int cnt_sent; int cnt_failed; }; Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Sun Mar 24 10:40:20 2019 (r345466) +++ head/sys/netinet/sctputil.c Sun Mar 24 12:13:05 2019 (r345467) @@ -546,7 +546,7 @@ sctp_wakeup_log(struct sctp_tcb *stcb, uint32_t wake_c } void -sctp_log_block(uint8_t from, struct sctp_association *asoc, size_t sendlen) +sctp_log_block(uint8_t from, struct sctp_association *asoc, ssize_t sendlen) { #if defined(SCTP_LOCAL_TRACE_BUF) struct sctp_cwnd_log sctp_clog; @@ -5219,8 +5219,8 @@ sctp_sorecvmsg(struct socket *so, * */ struct sctp_inpcb *inp = NULL; - size_t my_len = 0; - size_t cp_len = 0; + ssize_t my_len = 0; + ssize_t cp_len = 0; int error = 0; struct sctp_queued_to_read *control = NULL, *ctl = NULL, *nxt = NULL; struct mbuf *m = NULL; @@ -5230,7 +5230,7 @@ sctp_sorecvmsg(struct socket *so, int out_flags = 0, in_flags = 0; int block_allowed = 1; uint32_t freed_so_far = 0; - uint32_t copied_so_far = 0; + ssize_t copied_so_far = 0; int in_eeor_mode = 0; int no_rcv_needed = 0; uint32_t rwnd_req = 0; @@ -5574,7 +5574,7 @@ found_one: * will go to the sctp_user_rcvd() that will not * lock until it KNOWs it MUST send a WUP-SACK. */ - freed_so_far = stcb->freed_by_sorcv_sincelast; + freed_so_far = (uint32_t)stcb->freed_by_sorcv_sincelast; stcb->freed_by_sorcv_sincelast = 0; } } @@ -5740,7 +5740,7 @@ get_more_data: hold_rlock = 0; } if (cp_len > 0) - error = uiomove(mtod(m, char *), cp_len, uio); + error = uiomove(mtod(m, char *), (int)cp_len, uio); /* re-read */ if (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) { goto release; @@ -5785,7 +5785,7 @@ get_more_data: control->do_not_ref_stcb ? NULL : stcb, SCTP_LOG_SBRESULT, 0); } copied_so_far += cp_len; - freed_so_far += cp_len; + freed_so_far += (uint32_t)cp_len; freed_so_far += MSIZE; atomic_subtract_int(&control->length, cp_len); control->data = sctp_m_free(m); @@ -5825,9 +5825,9 @@ get_more_data: } if ((in_flags & MSG_PEEK) == 0) { SCTP_BUF_RESV_UF(m, cp_len); - SCTP_BUF_LEN(m) -= cp_len; + SCTP_BUF_LEN(m) -= (int)cp_len; if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_SB_LOGGING_ENABLE) { - sctp_sblog(&so->so_rcv, control->do_not_ref_stcb ? NULL : stcb, SCTP_LOG_SBFREE, cp_len); + sctp_sblog(&so->so_rcv, control->do_not_ref_stcb ? NULL : stcb, SCTP_LOG_SBFREE, (int)cp_len); } atomic_subtract_int(&so->so_rcv.sb_cc, cp_len); if ((control->do_not_ref_stcb == 0) && @@ -5835,7 +5835,7 @@ get_more_data: atomic_subtract_int(&stcb->asoc.sb_cc, cp_len); } copied_so_far += cp_len; - freed_so_far += cp_len; + freed_so_far += (uint32_t)cp_len; freed_so_far += MSIZE; if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_SB_LOGGING_ENABLE) { sctp_sblog(&so->so_rcv, control->do_not_ref_stcb ? NULL : stcb, @@ -6063,7 +6063,7 @@ wait_some_more: control->do_not_ref_stcb ? NULL : stcb, SCTP_LOG_SBFREE, SCTP_BUF_LEN(m)); } sctp_sbfree(control, stcb, &so->so_rcv, m); - freed_so_far += SCTP_BUF_LEN(m); + freed_so_far += (uint32_t)SCTP_BUF_LEN(m); freed_so_far += MSIZE; if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_SB_LOGGING_ENABLE) { sctp_sblog(&so->so_rcv, Modified: head/sys/netinet/sctputil.h ============================================================================== --- head/sys/netinet/sctputil.h Sun Mar 24 10:40:20 2019 (r345466) +++ head/sys/netinet/sctputil.h Sun Mar 24 12:13:05 2019 (r345467) @@ -367,7 +367,7 @@ void sctp_log_closing(struct sctp_inpcb *inp, struct s void sctp_log_lock(struct sctp_inpcb *inp, struct sctp_tcb *stcb, uint8_t from); void sctp_log_maxburst(struct sctp_tcb *stcb, struct sctp_nets *, int, int, uint8_t); -void sctp_log_block(uint8_t, struct sctp_association *, size_t); +void sctp_log_block(uint8_t, struct sctp_association *, ssize_t); void sctp_log_rwnd(uint8_t, uint32_t, uint32_t, uint32_t); void sctp_log_rwnd_set(uint8_t, uint32_t, uint32_t, uint32_t, uint32_t); int sctp_fill_stat_log(void *, size_t *); From owner-svn-src-all@freebsd.org Sun Mar 24 14:02:58 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1432155B573; Sun, 24 Mar 2019 14:02:57 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 97889859BD; Sun, 24 Mar 2019 14:02:57 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 679E42145A; Sun, 24 Mar 2019 14:02:57 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2OE2vPD059686; Sun, 24 Mar 2019 14:02:57 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2OE2vj0059685; Sun, 24 Mar 2019 14:02:57 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201903241402.x2OE2vj0059685@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sun, 24 Mar 2019 14:02:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345468 - head/sys/amd64/linux X-SVN-Group: head X-SVN-Commit-Author: dchagin X-SVN-Commit-Paths: head/sys/amd64/linux X-SVN-Commit-Revision: 345468 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 97889859BD X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Mar 2019 14:02:58 -0000 Author: dchagin Date: Sun Mar 24 14:02:57 2019 New Revision: 345468 URL: https://svnweb.freebsd.org/changeset/base/345468 Log: Revert r313993. AMD64_SET_**BASE expects a pointer to a pointer, we just passing in the pointer value itself. Set PCB_FULL_IRET for doreti to restore %fs, %gs and its correspondig base. PR: 225105 Reported by: trasz@ MFC after: 1 month Modified: head/sys/amd64/linux/linux_machdep.c Modified: head/sys/amd64/linux/linux_machdep.c ============================================================================== --- head/sys/amd64/linux/linux_machdep.c Sun Mar 24 12:13:05 2019 (r345467) +++ head/sys/amd64/linux/linux_machdep.c Sun Mar 24 14:02:57 2019 (r345468) @@ -228,35 +228,38 @@ linux_sigaltstack(struct thread *td, struct linux_siga int linux_arch_prctl(struct thread *td, struct linux_arch_prctl_args *args) { + struct pcb *pcb; int error; - struct sysarch_args bsd_args; + pcb = td->td_pcb; LINUX_CTR2(arch_prctl, "0x%x, %p", args->code, args->addr); switch (args->code) { case LINUX_ARCH_SET_GS: - bsd_args.op = AMD64_SET_GSBASE; - bsd_args.parms = (void *)args->addr; - error = sysarch(td, &bsd_args); - if (error == EINVAL) + if (args->addr < VM_MAXUSER_ADDRESS) { + set_pcb_flags(pcb, PCB_FULL_IRET); + pcb->pcb_gsbase = args->addr; + td->td_frame->tf_gs = _ugssel; + error = 0; + } else error = EPERM; break; case LINUX_ARCH_SET_FS: - bsd_args.op = AMD64_SET_FSBASE; - bsd_args.parms = (void *)args->addr; - error = sysarch(td, &bsd_args); - if (error == EINVAL) + if (args->addr < VM_MAXUSER_ADDRESS) { + set_pcb_flags(pcb, PCB_FULL_IRET); + pcb->pcb_fsbase = args->addr; + td->td_frame->tf_fs = _ufssel; + error = 0; + } else error = EPERM; break; case LINUX_ARCH_GET_FS: - bsd_args.op = AMD64_GET_FSBASE; - bsd_args.parms = (void *)args->addr; - error = sysarch(td, &bsd_args); + error = copyout(&pcb->pcb_fsbase, PTRIN(args->addr), + sizeof(args->addr)); break; case LINUX_ARCH_GET_GS: - bsd_args.op = AMD64_GET_GSBASE; - bsd_args.parms = (void *)args->addr; - error = sysarch(td, &bsd_args); + error = copyout(&pcb->pcb_gsbase, PTRIN(args->addr), + sizeof(args->addr)); break; default: error = EINVAL; From owner-svn-src-all@freebsd.org Sun Mar 24 14:46:09 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E419155C8D7; Sun, 24 Mar 2019 14:46:09 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E65CC8859B; Sun, 24 Mar 2019 14:46:08 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D1FB521B47; Sun, 24 Mar 2019 14:46:08 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2OEk801084122; Sun, 24 Mar 2019 14:46:08 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2OEk820084118; Sun, 24 Mar 2019 14:46:08 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201903241446.x2OEk820084118@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sun, 24 Mar 2019 14:46:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345470 - in head/sys: amd64/linux32 i386/linux X-SVN-Group: head X-SVN-Commit-Author: dchagin X-SVN-Commit-Paths: in head/sys: amd64/linux32 i386/linux X-SVN-Commit-Revision: 345470 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E65CC8859B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Mar 2019 14:46:09 -0000 Author: dchagin Date: Sun Mar 24 14:46:07 2019 New Revision: 345470 URL: https://svnweb.freebsd.org/changeset/base/345470 Log: Regen for r345469 (shmat()). MFC after: 1 month Modified: head/sys/amd64/linux32/linux32_proto.h head/sys/amd64/linux32/linux32_systrace_args.c head/sys/i386/linux/linux_proto.h head/sys/i386/linux/linux_systrace_args.c Modified: head/sys/amd64/linux32/linux32_proto.h ============================================================================== --- head/sys/amd64/linux32/linux32_proto.h Sun Mar 24 14:44:35 2019 (r345469) +++ head/sys/amd64/linux32/linux32_proto.h Sun Mar 24 14:46:07 2019 (r345470) @@ -369,9 +369,9 @@ struct linux_ipc_args { char what_l_[PADL_(l_uint)]; l_uint what; char what_r_[PADR_(l_uint)]; char arg1_l_[PADL_(l_int)]; l_int arg1; char arg1_r_[PADR_(l_int)]; char arg2_l_[PADL_(l_int)]; l_int arg2; char arg2_r_[PADR_(l_int)]; - char arg3_l_[PADL_(l_int)]; l_int arg3; char arg3_r_[PADR_(l_int)]; - char ptr_l_[PADL_(void *)]; void * ptr; char ptr_r_[PADR_(void *)]; - char arg5_l_[PADL_(l_long)]; l_long arg5; char arg5_r_[PADR_(l_long)]; + char arg3_l_[PADL_(l_uint)]; l_uint arg3; char arg3_r_[PADR_(l_uint)]; + char ptr_l_[PADL_(l_uintptr_t)]; l_uintptr_t ptr; char ptr_r_[PADR_(l_uintptr_t)]; + char arg5_l_[PADL_(l_uint)]; l_uint arg5; char arg5_r_[PADR_(l_uint)]; }; struct linux_sigreturn_args { char sfp_l_[PADL_(struct l_sigframe *)]; struct l_sigframe * sfp; char sfp_r_[PADR_(struct l_sigframe *)]; Modified: head/sys/amd64/linux32/linux32_systrace_args.c ============================================================================== --- head/sys/amd64/linux32/linux32_systrace_args.c Sun Mar 24 14:44:35 2019 (r345469) +++ head/sys/amd64/linux32/linux32_systrace_args.c Sun Mar 24 14:46:07 2019 (r345470) @@ -785,9 +785,9 @@ systrace_args(int sysnum, void *params, uint64_t *uarg iarg[0] = p->what; /* l_uint */ iarg[1] = p->arg1; /* l_int */ iarg[2] = p->arg2; /* l_int */ - iarg[3] = p->arg3; /* l_int */ - uarg[4] = (intptr_t) p->ptr; /* void * */ - iarg[5] = p->arg5; /* l_long */ + iarg[3] = p->arg3; /* l_uint */ + iarg[4] = p->ptr; /* l_uintptr_t */ + iarg[5] = p->arg5; /* l_uint */ *n_args = 6; break; } @@ -3894,13 +3894,13 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d p = "l_int"; break; case 3: - p = "l_int"; + p = "l_uint"; break; case 4: - p = "userland void *"; + p = "l_uintptr_t"; break; case 5: - p = "l_long"; + p = "l_uint"; break; default: break; Modified: head/sys/i386/linux/linux_proto.h ============================================================================== --- head/sys/i386/linux/linux_proto.h Sun Mar 24 14:44:35 2019 (r345469) +++ head/sys/i386/linux/linux_proto.h Sun Mar 24 14:46:07 2019 (r345470) @@ -372,9 +372,9 @@ struct linux_ipc_args { char what_l_[PADL_(l_uint)]; l_uint what; char what_r_[PADR_(l_uint)]; char arg1_l_[PADL_(l_int)]; l_int arg1; char arg1_r_[PADR_(l_int)]; char arg2_l_[PADL_(l_int)]; l_int arg2; char arg2_r_[PADR_(l_int)]; - char arg3_l_[PADL_(l_int)]; l_int arg3; char arg3_r_[PADR_(l_int)]; - char ptr_l_[PADL_(void *)]; void * ptr; char ptr_r_[PADR_(void *)]; - char arg5_l_[PADL_(l_long)]; l_long arg5; char arg5_r_[PADR_(l_long)]; + char arg3_l_[PADL_(l_uint)]; l_uint arg3; char arg3_r_[PADR_(l_uint)]; + char ptr_l_[PADL_(l_uintptr_t)]; l_uintptr_t ptr; char ptr_r_[PADR_(l_uintptr_t)]; + char arg5_l_[PADL_(l_uint)]; l_uint arg5; char arg5_r_[PADR_(l_uint)]; }; struct linux_sigreturn_args { char sfp_l_[PADL_(struct l_sigframe *)]; struct l_sigframe * sfp; char sfp_r_[PADR_(struct l_sigframe *)]; Modified: head/sys/i386/linux/linux_systrace_args.c ============================================================================== --- head/sys/i386/linux/linux_systrace_args.c Sun Mar 24 14:44:35 2019 (r345469) +++ head/sys/i386/linux/linux_systrace_args.c Sun Mar 24 14:46:07 2019 (r345470) @@ -814,9 +814,9 @@ systrace_args(int sysnum, void *params, uint64_t *uarg iarg[0] = p->what; /* l_uint */ iarg[1] = p->arg1; /* l_int */ iarg[2] = p->arg2; /* l_int */ - iarg[3] = p->arg3; /* l_int */ - uarg[4] = (intptr_t) p->ptr; /* void * */ - iarg[5] = p->arg5; /* l_long */ + iarg[3] = p->arg3; /* l_uint */ + iarg[4] = p->ptr; /* l_uintptr_t */ + iarg[5] = p->arg5; /* l_uint */ *n_args = 6; break; } @@ -4012,13 +4012,13 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d p = "l_int"; break; case 3: - p = "l_int"; + p = "l_uint"; break; case 4: - p = "userland void *"; + p = "l_uintptr_t"; break; case 5: - p = "l_long"; + p = "l_uint"; break; default: break; From owner-svn-src-all@freebsd.org Sun Mar 24 09:46:17 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 50E981552B9A; Sun, 24 Mar 2019 09:46:17 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E3E9174B5C; Sun, 24 Mar 2019 09:46:16 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BD3891E805; Sun, 24 Mar 2019 09:46:16 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2O9kGO5023307; Sun, 24 Mar 2019 09:46:16 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2O9kGHR023306; Sun, 24 Mar 2019 09:46:16 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201903240946.x2O9kGHR023306@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 24 Mar 2019 09:46:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345465 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 345465 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E3E9174B5C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.948,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Mar 2019 09:46:17 -0000 Author: tuexen Date: Sun Mar 24 09:46:16 2019 New Revision: 345465 URL: https://svnweb.freebsd.org/changeset/base/345465 Log: Fix a signed/unsigned bug when receiving SCTP messages. This is joint work with rrs@. Reported by: syzbot+6b8a4bc8cc828e9d9790@syzkaller.appspotmail.com MFC after: 1 week Modified: head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Sun Mar 24 06:28:25 2019 (r345464) +++ head/sys/netinet/sctputil.c Sun Mar 24 09:46:16 2019 (r345465) @@ -5219,8 +5219,9 @@ sctp_sorecvmsg(struct socket *so, * */ struct sctp_inpcb *inp = NULL; - int my_len = 0; - int cp_len = 0, error = 0; + size_t my_len = 0; + size_t cp_len = 0; + int error = 0; struct sctp_queued_to_read *control = NULL, *ctl = NULL, *nxt = NULL; struct mbuf *m = NULL; struct sctp_tcb *stcb = NULL; @@ -5728,8 +5729,8 @@ get_more_data: m = control->data; while (m) { /* Move out all we can */ - cp_len = (int)uio->uio_resid; - my_len = (int)SCTP_BUF_LEN(m); + cp_len = uio->uio_resid; + my_len = SCTP_BUF_LEN(m); if (cp_len > my_len) { /* not enough in this buf */ cp_len = my_len; From owner-svn-src-all@freebsd.org Sun Mar 24 14:50:05 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 26ABF155C980; Sun, 24 Mar 2019 14:50:05 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C94D6886B8; Sun, 24 Mar 2019 14:50:04 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A336B21B50; Sun, 24 Mar 2019 14:50:04 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2OEo4Ir084364; Sun, 24 Mar 2019 14:50:04 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2OEo3Cl084354; Sun, 24 Mar 2019 14:50:03 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201903241450.x2OEo3Cl084354@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sun, 24 Mar 2019 14:50:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345471 - in head/sys: amd64/linux amd64/linux32 compat/linux i386/linux X-SVN-Group: head X-SVN-Commit-Author: dchagin X-SVN-Commit-Paths: in head/sys: amd64/linux amd64/linux32 compat/linux i386/linux X-SVN-Commit-Revision: 345471 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C94D6886B8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Mar 2019 14:50:05 -0000 Author: dchagin Date: Sun Mar 24 14:50:02 2019 New Revision: 345471 URL: https://svnweb.freebsd.org/changeset/base/345471 Log: Update syscall.master to 5.0. For 32-bit Linuxulator, ipc() syscall was historically the entry point for the IPC API. Starting in Linux 4.18, direct syscalls are provided for the IPC. Enable it. MFC after: 1 month Modified: head/sys/amd64/linux/linux_dummy.c head/sys/amd64/linux/syscalls.master head/sys/amd64/linux32/linux32_dummy.c head/sys/amd64/linux32/syscalls.master head/sys/compat/linux/linux_ipc.h head/sys/i386/linux/linux.h head/sys/i386/linux/linux_dummy.c head/sys/i386/linux/syscalls.master Modified: head/sys/amd64/linux/linux_dummy.c ============================================================================== --- head/sys/amd64/linux/linux_dummy.c Sun Mar 24 14:46:07 2019 (r345470) +++ head/sys/amd64/linux/linux_dummy.c Sun Mar 24 14:50:02 2019 (r345471) @@ -155,6 +155,16 @@ DUMMY(pwritev2); DUMMY(pkey_mprotect); DUMMY(pkey_alloc); DUMMY(pkey_free); +/* Linux 4.11: */ +DUMMY(statx); +/* Linux 4.18: */ +DUMMY(io_pgetevents); +DUMMY(rseq); +/* Linux 5.0: */ +DUMMY(pidfd_send_signal); +DUMMY(io_uring_setup); +DUMMY(io_uring_enter); +DUMMY(io_uring_register); #define DUMMY_XATTR(s) \ int \ Modified: head/sys/amd64/linux/syscalls.master ============================================================================== --- head/sys/amd64/linux/syscalls.master Sun Mar 24 14:46:07 2019 (r345470) +++ head/sys/amd64/linux/syscalls.master Sun Mar 24 14:50:02 2019 (r345471) @@ -595,7 +595,21 @@ 330 AUE_NULL STD { int linux_pkey_alloc(l_ulong flags, \ l_ulong init_val); } 331 AUE_NULL STD { int linux_pkey_free(l_int pkey); } +; Linux 4.11: +332 AUE_NULL STD { int linux_statx(l_int dirfd, \ + const char *pathname, l_uint flags, \ + l_uint mask, void *statxbuf); } +; Linux 4.18: +333 AUE_NULL STD { int linux_io_pgetevents(void); } +334 AUE_NULL STD { int linux_rseq(void); } +; Linux 5.0: +335-423 AUE_NULL UNIMPL nosys +424 AUE_NULL STD { int linux_pidfd_send_signal(l_int pidfd, \ + l_int sig, l_siginfo_t *info, l_uint flags); } +425 AUE_NULL STD { int linux_io_uring_setup(void); } +426 AUE_NULL STD { int linux_io_uring_enter(void); } +427 AUE_NULL STD { int linux_io_uring_register(void); } ; please, keep this line at the end. -332 AUE_NULL UNIMPL nosys +428 AUE_NULL UNIMPL nosys ; vim: syntax=off Modified: head/sys/amd64/linux32/linux32_dummy.c ============================================================================== --- head/sys/amd64/linux32/linux32_dummy.c Sun Mar 24 14:46:07 2019 (r345470) +++ head/sys/amd64/linux32/linux32_dummy.c Sun Mar 24 14:50:02 2019 (r345471) @@ -161,6 +161,37 @@ DUMMY(pwritev2); DUMMY(pkey_mprotect); DUMMY(pkey_alloc); DUMMY(pkey_free); +/* Linux 4.11: */ +DUMMY(statx); +DUMMY(arch_prctl); +/* Linux 4.18: */ +DUMMY(io_pgetevents); +DUMMY(rseq); +/* Linux 5.0: */ +DUMMY(clock_gettime64); +DUMMY(clock_settime64); +DUMMY(clock_adjtime64); +DUMMY(clock_getres_time64); +DUMMY(clock_nanosleep_time64); +DUMMY(timer_gettime64); +DUMMY(timer_settime64); +DUMMY(timerfd_gettime64); +DUMMY(timerfd_settime64); +DUMMY(utimensat_time64); +DUMMY(pselect6_time64); +DUMMY(ppoll_time64); +DUMMY(io_pgetevents_time64); +DUMMY(recvmmsg_time64); +DUMMY(mq_timedsend_time64); +DUMMY(mq_timedreceive_time64); +DUMMY(semtimedop_time64); +DUMMY(rt_sigtimedwait_time64); +DUMMY(futex_time64); +DUMMY(sched_rr_get_interval_time64); +DUMMY(pidfd_send_signal); +DUMMY(io_uring_setup); +DUMMY(io_uring_enter); +DUMMY(io_uring_register); #define DUMMY_XATTR(s) \ int \ Modified: head/sys/amd64/linux32/syscalls.master ============================================================================== --- head/sys/amd64/linux32/syscalls.master Sun Mar 24 14:46:07 2019 (r345470) +++ head/sys/amd64/linux32/syscalls.master Sun Mar 24 14:50:02 2019 (r345471) @@ -686,7 +686,64 @@ 381 AUE_NULL STD { int linux_pkey_alloc(l_ulong flags, \ l_ulong init_val); } 382 AUE_NULL STD { int linux_pkey_free(l_int pkey); } +; Linux 4.11: +383 AUE_NULL STD { int linux_statx(l_int dirfd, \ + const char *pathname, l_uint flags, \ + l_uint mask, void *statxbuf); } +384 AUE_NULL STD { int linux_arch_prctl(l_int option, + l_ulong arg2); } +; Linux 4.18: +385 AUE_NULL STD { int linux_io_pgetevents(void); } +386 AUE_NULL STD { int linux_rseq(void); } +387-392 AUE_NULL UNIMPL nosys +393 AUE_NULL STD { int linux_semget(l_key_t key, l_int nsems, \ + l_int semflg); } +394 AUE_NULL STD { int linux_semctl(l_int semid, l_int semnum, \ + l_int cmd, union l_semun arg); } +395 AUE_NULL STD { int linux_shmget(l_key_t key, l_size_t size, \ + l_int shmflg); } +396 AUE_NULL STD { int linux_shmctl(l_int shmid, l_int cmd, \ + struct l_shmid_ds *buf); } +397 AUE_NULL STD { int linux_shmat(l_int shmid, char *shmaddr, \ + l_int shmflg); } +398 AUE_NULL STD { int linux_shmdt(char *shmaddr); } +399 AUE_NULL STD { int linux_msgget(l_key_t key, l_int msgflg); } +400 AUE_NULL STD { int linux_msgsnd(l_int msqid, \ + struct l_msgbuf *msgp, l_size_t msgsz, \ + l_int msgflg); } +401 AUE_NULL STD { int linux_msgrcv(l_int msqid, \ + struct l_msgbuf *msgp, l_size_t msgsz, \ + l_long msgtyp, l_int msgflg); } +402 AUE_NULL STD { int linux_msgctl(l_int msqid, l_int cmd, \ + struct l_msqid_ds *buf); } +; Linux 5.0: +403 AUE_NULL STD { int linux_clock_gettime64(void); } +404 AUE_NULL STD { int linux_clock_settime64(void); } +405 AUE_NULL STD { int linux_clock_adjtime64(void); } +406 AUE_NULL STD { int linux_clock_getres_time64(void); } +407 AUE_NULL STD { int linux_clock_nanosleep_time64(void); } +408 AUE_NULL STD { int linux_timer_gettime64(void); } +409 AUE_NULL STD { int linux_timer_settime64(void); } +410 AUE_NULL STD { int linux_timerfd_gettime64(void); } +411 AUE_NULL STD { int linux_timerfd_settime64(void); } +412 AUE_NULL STD { int linux_utimensat_time64(void); } +413 AUE_NULL STD { int linux_pselect6_time64(void); } +414 AUE_NULL STD { int linux_ppoll_time64(void); } +415 AUE_NULL UNIMPL nosys +416 AUE_NULL STD { int linux_io_pgetevents_time64(void); } +417 AUE_NULL STD { int linux_recvmmsg_time64(void); } +418 AUE_NULL STD { int linux_mq_timedsend_time64(void); } +419 AUE_NULL STD { int linux_mq_timedreceive_time64(void); } +420 AUE_NULL STD { int linux_semtimedop_time64(void); } +421 AUE_NULL STD { int linux_rt_sigtimedwait_time64(void); } +422 AUE_NULL STD { int linux_futex_time64(void); } +423 AUE_NULL STD { int linux_sched_rr_get_interval_time64(void); } +424 AUE_NULL STD { int linux_pidfd_send_signal(l_int pidfd, \ + l_int sig, l_siginfo_t *info, l_uint flags); } +425 AUE_NULL STD { int linux_io_uring_setup(void); } +426 AUE_NULL STD { int linux_io_uring_enter(void); } +427 AUE_NULL STD { int linux_io_uring_register(void); } ; please, keep this line at the end. -383 AUE_NULL UNIMPL nosys +428 AUE_NULL UNIMPL nosys ; vim: syntax=off Modified: head/sys/compat/linux/linux_ipc.h ============================================================================== --- head/sys/compat/linux/linux_ipc.h Sun Mar 24 14:46:07 2019 (r345470) +++ head/sys/compat/linux/linux_ipc.h Sun Mar 24 14:50:02 2019 (r345471) @@ -84,51 +84,6 @@ #if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32)) -struct linux_msgctl_args -{ - l_int msqid; - l_int cmd; - struct l_msqid_ds *buf; -}; - -struct linux_msgget_args -{ - l_key_t key; - l_int msgflg; -}; - -struct linux_msgrcv_args -{ - l_int msqid; - struct l_msgbuf *msgp; - l_size_t msgsz; - l_long msgtyp; - l_int msgflg; -}; - -struct linux_msgsnd_args -{ - l_int msqid; - struct l_msgbuf *msgp; - l_size_t msgsz; - l_int msgflg; -}; - -struct linux_semctl_args -{ - l_int semid; - l_int semnum; - l_int cmd; - union l_semun arg; -}; - -struct linux_semget_args -{ - l_key_t key; - l_int nsems; - l_int semflg; -}; - struct linux_semop_args { l_int semid; @@ -136,46 +91,7 @@ struct linux_semop_args l_uint nsops; }; -struct linux_shmat_args -{ - l_int shmid; - char *shmaddr; - l_int shmflg; -}; - -struct linux_shmctl_args -{ - l_int shmid; - l_int cmd; - struct l_shmid_ds *buf; -}; - -struct linux_shmdt_args -{ - char *shmaddr; -}; - -struct linux_shmget_args -{ - l_key_t key; - l_size_t size; - l_int shmflg; -}; - -int linux_msgctl(struct thread *, struct linux_msgctl_args *); -int linux_msgget(struct thread *, struct linux_msgget_args *); -int linux_msgrcv(struct thread *, struct linux_msgrcv_args *); -int linux_msgsnd(struct thread *, struct linux_msgsnd_args *); - -int linux_semctl(struct thread *, struct linux_semctl_args *); -int linux_semget(struct thread *, struct linux_semget_args *); int linux_semop(struct thread *, struct linux_semop_args *); - -int linux_shmat(struct thread *, struct linux_shmat_args *); -int linux_shmctl(struct thread *, struct linux_shmctl_args *); -int linux_shmdt(struct thread *, struct linux_shmdt_args *); -int linux_shmget(struct thread *, struct linux_shmget_args *); - #endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */ #endif /* _LINUX_IPC_H_ */ Modified: head/sys/i386/linux/linux.h ============================================================================== --- head/sys/i386/linux/linux.h Sun Mar 24 14:46:07 2019 (r345470) +++ head/sys/i386/linux/linux.h Sun Mar 24 14:50:02 2019 (r345471) @@ -448,10 +448,10 @@ extern struct sysentvec linux_sysvec; union l_semun { l_int val; - struct l_semid_ds *buf; + l_uintptr_t buf; l_ushort *array; - struct l_seminfo *__buf; - void *__pad; + l_uintptr_t __buf; + l_uintptr_t __pad; }; struct l_sockaddr { Modified: head/sys/i386/linux/linux_dummy.c ============================================================================== --- head/sys/i386/linux/linux_dummy.c Sun Mar 24 14:46:07 2019 (r345470) +++ head/sys/i386/linux/linux_dummy.c Sun Mar 24 14:50:02 2019 (r345471) @@ -157,6 +157,37 @@ DUMMY(pwritev2); DUMMY(pkey_mprotect); DUMMY(pkey_alloc); DUMMY(pkey_free); +/* Linux 4.11: */ +DUMMY(statx); +DUMMY(arch_prctl); +/* Linux 4.18: */ +DUMMY(io_pgetevents); +DUMMY(rseq); +/* Linux 5.0: */ +DUMMY(clock_gettime64); +DUMMY(clock_settime64); +DUMMY(clock_adjtime64); +DUMMY(clock_getres_time64); +DUMMY(clock_nanosleep_time64); +DUMMY(timer_gettime64); +DUMMY(timer_settime64); +DUMMY(timerfd_gettime64); +DUMMY(timerfd_settime64); +DUMMY(utimensat_time64); +DUMMY(pselect6_time64); +DUMMY(ppoll_time64); +DUMMY(io_pgetevents_time64); +DUMMY(recvmmsg_time64); +DUMMY(mq_timedsend_time64); +DUMMY(mq_timedreceive_time64); +DUMMY(semtimedop_time64); +DUMMY(rt_sigtimedwait_time64); +DUMMY(futex_time64); +DUMMY(sched_rr_get_interval_time64); +DUMMY(pidfd_send_signal); +DUMMY(io_uring_setup); +DUMMY(io_uring_enter); +DUMMY(io_uring_register); #define DUMMY_XATTR(s) \ int \ Modified: head/sys/i386/linux/syscalls.master ============================================================================== --- head/sys/i386/linux/syscalls.master Sun Mar 24 14:46:07 2019 (r345470) +++ head/sys/i386/linux/syscalls.master Sun Mar 24 14:50:02 2019 (r345471) @@ -694,7 +694,64 @@ 381 AUE_NULL STD { int linux_pkey_alloc(l_ulong flags, \ l_ulong init_val); } 382 AUE_NULL STD { int linux_pkey_free(l_int pkey); } +; Linux 4.11: +383 AUE_NULL STD { int linux_statx(l_int dirfd, \ + const char *pathname, l_uint flags, \ + l_uint mask, void *statxbuf); } +384 AUE_PRCTL STD { int linux_arch_prctl(l_int option, + l_ulong arg2); } +; Linux 4.18: +385 AUE_NULL STD { int linux_io_pgetevents(void); } +386 AUE_NULL STD { int linux_rseq(void); } +387-392 AUE_NULL UNIMPL nosys +393 AUE_NULL STD { int linux_semget(l_key_t key, l_int nsems, \ + l_int semflg); } +394 AUE_NULL STD { int linux_semctl(l_int semid, l_int semnum, \ + l_int cmd, union l_semun arg); } +395 AUE_NULL STD { int linux_shmget(l_key_t key, l_size_t size, \ + l_int shmflg); } +396 AUE_NULL STD { int linux_shmctl(l_int shmid, l_int cmd, \ + struct l_shmid_ds *buf); } +397 AUE_NULL STD { int linux_shmat(l_int shmid, char *shmaddr, \ + l_int shmflg); } +398 AUE_NULL STD { int linux_shmdt(char *shmaddr); } +399 AUE_NULL STD { int linux_msgget(l_key_t key, l_int msgflg); } +400 AUE_NULL STD { int linux_msgsnd(l_int msqid, \ + struct l_msgbuf *msgp, l_size_t msgsz, \ + l_int msgflg); } +401 AUE_NULL STD { int linux_msgrcv(l_int msqid, \ + struct l_msgbuf *msgp, l_size_t msgsz, \ + l_long msgtyp, l_int msgflg); } +402 AUE_NULL STD { int linux_msgctl(l_int msqid, l_int cmd, \ + struct l_msqid_ds *buf); } +; Linux 5.0: +403 AUE_NULL STD { int linux_clock_gettime64(void); } +404 AUE_NULL STD { int linux_clock_settime64(void); } +405 AUE_NULL STD { int linux_clock_adjtime64(void); } +406 AUE_NULL STD { int linux_clock_getres_time64(void); } +407 AUE_NULL STD { int linux_clock_nanosleep_time64(void); } +408 AUE_NULL STD { int linux_timer_gettime64(void); } +409 AUE_NULL STD { int linux_timer_settime64(void); } +410 AUE_NULL STD { int linux_timerfd_gettime64(void); } +411 AUE_NULL STD { int linux_timerfd_settime64(void); } +412 AUE_NULL STD { int linux_utimensat_time64(void); } +413 AUE_NULL STD { int linux_pselect6_time64(void); } +414 AUE_NULL STD { int linux_ppoll_time64(void); } +415 AUE_NULL UNIMPL nosys +416 AUE_NULL STD { int linux_io_pgetevents_time64(void); } +417 AUE_NULL STD { int linux_recvmmsg_time64(void); } +418 AUE_NULL STD { int linux_mq_timedsend_time64(void); } +419 AUE_NULL STD { int linux_mq_timedreceive_time64(void); } +420 AUE_NULL STD { int linux_semtimedop_time64(void); } +421 AUE_NULL STD { int linux_rt_sigtimedwait_time64(void); } +422 AUE_NULL STD { int linux_futex_time64(void); } +423 AUE_NULL STD { int linux_sched_rr_get_interval_time64(void); } +424 AUE_NULL STD { int linux_pidfd_send_signal(l_int pidfd, \ + l_int sig, l_siginfo_t *info, l_uint flags); } +425 AUE_NULL STD { int linux_io_uring_setup(void); } +426 AUE_NULL STD { int linux_io_uring_enter(void); } +427 AUE_NULL STD { int linux_io_uring_register(void); } ; please, keep this line at the end. -383 AUE_NULL UNIMPL nosys +428 AUE_NULL UNIMPL nosys ; vim: syntax=off From owner-svn-src-all@freebsd.org Sun Mar 24 14:44:38 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F566155C734; Sun, 24 Mar 2019 14:44:38 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AA127883B8; Sun, 24 Mar 2019 14:44:37 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 766D521B45; Sun, 24 Mar 2019 14:44:37 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2OEibwX084002; Sun, 24 Mar 2019 14:44:37 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2OEiaGt083996; Sun, 24 Mar 2019 14:44:36 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201903241444.x2OEiaGt083996@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sun, 24 Mar 2019 14:44:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345469 - in head/sys: amd64/linux32 compat/linux i386/linux X-SVN-Group: head X-SVN-Commit-Author: dchagin X-SVN-Commit-Paths: in head/sys: amd64/linux32 compat/linux i386/linux X-SVN-Commit-Revision: 345469 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AA127883B8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Mar 2019 14:44:38 -0000 Author: dchagin Date: Sun Mar 24 14:44:35 2019 New Revision: 345469 URL: https://svnweb.freebsd.org/changeset/base/345469 Log: Linux between 4.18 and 5.0 split IPC system calls. In preparation for doing this in the Linuxulator modify our linux_shmat() to match actual Linux shmat() system call. MFC after: 1 month Modified: head/sys/amd64/linux32/linux32_machdep.c head/sys/amd64/linux32/syscalls.master head/sys/compat/linux/linux_ipc.c head/sys/compat/linux/linux_ipc.h head/sys/i386/linux/linux_machdep.c head/sys/i386/linux/syscalls.master Modified: head/sys/amd64/linux32/linux32_machdep.c ============================================================================== --- head/sys/amd64/linux32/linux32_machdep.c Sun Mar 24 14:02:57 2019 (r345468) +++ head/sys/amd64/linux32/linux32_machdep.c Sun Mar 24 14:44:35 2019 (r345469) @@ -259,7 +259,7 @@ linux_ipc(struct thread *td, struct linux_ipc_args *ar struct linux_semop_args a; a.semid = args->arg1; - a.tsops = args->ptr; + a.tsops = PTRIN(args->ptr); a.nsops = args->arg2; return (linux_semop(td, &a)); } @@ -278,7 +278,7 @@ linux_ipc(struct thread *td, struct linux_ipc_args *ar a.semid = args->arg1; a.semnum = args->arg2; a.cmd = args->arg3; - error = copyin(args->ptr, &a.arg, sizeof(a.arg)); + error = copyin(PTRIN(args->ptr), &a.arg, sizeof(a.arg)); if (error) return (error); return (linux_semctl(td, &a)); @@ -287,7 +287,7 @@ linux_ipc(struct thread *td, struct linux_ipc_args *ar struct linux_msgsnd_args a; a.msqid = args->arg1; - a.msgp = args->ptr; + a.msgp = PTRIN(args->ptr); a.msgsz = args->arg2; a.msgflg = args->arg3; return (linux_msgsnd(td, &a)); @@ -304,13 +304,13 @@ linux_ipc(struct thread *td, struct linux_ipc_args *ar if (args->ptr == 0) return (EINVAL); - error = copyin(args->ptr, &tmp, sizeof(tmp)); + error = copyin(PTRIN(args->ptr), &tmp, sizeof(tmp)); if (error) return (error); a.msgp = PTRIN(tmp.msgp); a.msgtyp = tmp.msgtyp; } else { - a.msgp = args->ptr; + a.msgp = PTRIN(args->ptr); a.msgtyp = args->arg5; } return (linux_msgrcv(td, &a)); @@ -327,22 +327,29 @@ linux_ipc(struct thread *td, struct linux_ipc_args *ar a.msqid = args->arg1; a.cmd = args->arg2; - a.buf = args->ptr; + a.buf = PTRIN(args->ptr); return (linux_msgctl(td, &a)); } case LINUX_SHMAT: { struct linux_shmat_args a; + l_uintptr_t addr; + int error; a.shmid = args->arg1; - a.shmaddr = args->ptr; + a.shmaddr = PTRIN(args->ptr); a.shmflg = args->arg2; - a.raddr = PTRIN((l_uint)args->arg3); - return (linux_shmat(td, &a)); + error = linux_shmat(td, &a); + if (error != 0) + return (error); + addr = td->td_retval[0]; + error = copyout(&addr, PTRIN(args->arg3), sizeof(addr)); + td->td_retval[0] = 0; + return (error); } case LINUX_SHMDT: { struct linux_shmdt_args a; - a.shmaddr = args->ptr; + a.shmaddr = PTRIN(args->ptr); return (linux_shmdt(td, &a)); } case LINUX_SHMGET: { @@ -358,7 +365,7 @@ linux_ipc(struct thread *td, struct linux_ipc_args *ar a.shmid = args->arg1; a.cmd = args->arg2; - a.buf = args->ptr; + a.buf = PTRIN(args->ptr); return (linux_shmctl(td, &a)); } default: Modified: head/sys/amd64/linux32/syscalls.master ============================================================================== --- head/sys/amd64/linux32/syscalls.master Sun Mar 24 14:02:57 2019 (r345468) +++ head/sys/amd64/linux32/syscalls.master Sun Mar 24 14:44:35 2019 (r345469) @@ -212,8 +212,8 @@ 115 AUE_SWAPOFF STD { int linux_swapoff(void); } 116 AUE_NULL STD { int linux_sysinfo(struct l_sysinfo *info); } 117 AUE_NULL STD { int linux_ipc(l_uint what, l_int arg1, \ - l_int arg2, l_int arg3, void *ptr, \ - l_long arg5); } + l_int arg2, l_uint arg3, l_uintptr_t ptr, \ + l_uint arg5); } 118 AUE_FSYNC NOPROTO { int fsync(int fd); } 119 AUE_SIGRETURN STD { int linux_sigreturn( \ struct l_sigframe *sfp); } Modified: head/sys/compat/linux/linux_ipc.c ============================================================================== --- head/sys/compat/linux/linux_ipc.c Sun Mar 24 14:02:57 2019 (r345468) +++ head/sys/compat/linux/linux_ipc.c Sun Mar 24 14:44:35 2019 (r345469) @@ -785,23 +785,11 @@ linux_shmat(struct thread *td, struct linux_shmat_args void *shmaddr; int shmflg; } */ bsd_args; - int error; -#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32)) - l_uintptr_t addr; -#endif bsd_args.shmid = args->shmid; bsd_args.shmaddr = PTRIN(args->shmaddr); bsd_args.shmflg = args->shmflg; - if ((error = sys_shmat(td, &bsd_args))) - return (error); -#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32)) - addr = td->td_retval[0]; - if ((error = copyout(&addr, PTRIN(args->raddr), sizeof(addr)))) - return (error); - td->td_retval[0] = 0; -#endif - return (0); + return (sys_shmat(td, &bsd_args)); } int Modified: head/sys/compat/linux/linux_ipc.h ============================================================================== --- head/sys/compat/linux/linux_ipc.h Sun Mar 24 14:02:57 2019 (r345468) +++ head/sys/compat/linux/linux_ipc.h Sun Mar 24 14:44:35 2019 (r345469) @@ -141,7 +141,6 @@ struct linux_shmat_args l_int shmid; char *shmaddr; l_int shmflg; - l_ulong *raddr; }; struct linux_shmctl_args Modified: head/sys/i386/linux/linux_machdep.c ============================================================================== --- head/sys/i386/linux/linux_machdep.c Sun Mar 24 14:02:57 2019 (r345468) +++ head/sys/i386/linux/linux_machdep.c Sun Mar 24 14:44:35 2019 (r345469) @@ -133,7 +133,7 @@ linux_ipc(struct thread *td, struct linux_ipc_args *ar struct linux_semop_args a; a.semid = args->arg1; - a.tsops = args->ptr; + a.tsops = PTRIN(args->ptr); a.nsops = args->arg2; return (linux_semop(td, &a)); } @@ -152,7 +152,7 @@ linux_ipc(struct thread *td, struct linux_ipc_args *ar a.semid = args->arg1; a.semnum = args->arg2; a.cmd = args->arg3; - error = copyin(args->ptr, &a.arg, sizeof(a.arg)); + error = copyin(PTRIN(args->ptr), &a.arg, sizeof(a.arg)); if (error) return (error); return (linux_semctl(td, &a)); @@ -161,7 +161,7 @@ linux_ipc(struct thread *td, struct linux_ipc_args *ar struct linux_msgsnd_args a; a.msqid = args->arg1; - a.msgp = args->ptr; + a.msgp = PTRIN(args->ptr); a.msgsz = args->arg2; a.msgflg = args->arg3; return (linux_msgsnd(td, &a)); @@ -176,15 +176,15 @@ linux_ipc(struct thread *td, struct linux_ipc_args *ar struct l_ipc_kludge tmp; int error; - if (args->ptr == NULL) + if (args->ptr == 0) return (EINVAL); - error = copyin(args->ptr, &tmp, sizeof(tmp)); + error = copyin(PTRIN(args->ptr), &tmp, sizeof(tmp)); if (error) return (error); - a.msgp = tmp.msgp; + a.msgp = PTRIN(tmp.msgp); a.msgtyp = tmp.msgtyp; } else { - a.msgp = args->ptr; + a.msgp = PTRIN(args->ptr); a.msgtyp = args->arg5; } return (linux_msgrcv(td, &a)); @@ -201,22 +201,29 @@ linux_ipc(struct thread *td, struct linux_ipc_args *ar a.msqid = args->arg1; a.cmd = args->arg2; - a.buf = args->ptr; + a.buf = PTRIN(args->ptr); return (linux_msgctl(td, &a)); } case LINUX_SHMAT: { struct linux_shmat_args a; + l_uintptr_t addr; + int error; a.shmid = args->arg1; - a.shmaddr = args->ptr; + a.shmaddr = PTRIN(args->ptr); a.shmflg = args->arg2; - a.raddr = (l_ulong *)args->arg3; - return (linux_shmat(td, &a)); + error = linux_shmat(td, &a); + if (error != 0) + return (error); + addr = td->td_retval[0]; + error = copyout(&addr, PTRIN(args->arg3), sizeof(addr)); + td->td_retval[0] = 0; + return (error); } case LINUX_SHMDT: { struct linux_shmdt_args a; - a.shmaddr = args->ptr; + a.shmaddr = PTRIN(args->ptr); return (linux_shmdt(td, &a)); } case LINUX_SHMGET: { @@ -232,7 +239,7 @@ linux_ipc(struct thread *td, struct linux_ipc_args *ar a.shmid = args->arg1; a.cmd = args->arg2; - a.buf = args->ptr; + a.buf = PTRIN(args->ptr); return (linux_shmctl(td, &a)); } default: Modified: head/sys/i386/linux/syscalls.master ============================================================================== --- head/sys/i386/linux/syscalls.master Sun Mar 24 14:02:57 2019 (r345468) +++ head/sys/i386/linux/syscalls.master Sun Mar 24 14:44:35 2019 (r345469) @@ -214,8 +214,8 @@ 115 AUE_SWAPOFF STD { int linux_swapoff(void); } 116 AUE_NULL STD { int linux_sysinfo(struct l_sysinfo *info); } 117 AUE_NULL STD { int linux_ipc(l_uint what, l_int arg1, \ - l_int arg2, l_int arg3, void *ptr, \ - l_long arg5); } + l_int arg2, l_uint arg3, l_uintptr_t ptr, \ + l_uint arg5); } 118 AUE_FSYNC NOPROTO { int fsync(int fd); } 119 AUE_SIGRETURN STD { int linux_sigreturn( \ struct l_sigframe *sfp); } From owner-svn-src-all@freebsd.org Sun Mar 24 14:51:20 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B1ED155CC2E; Sun, 24 Mar 2019 14:51:20 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BA04A889EE; Sun, 24 Mar 2019 14:51:19 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 94AC521B91; Sun, 24 Mar 2019 14:51:19 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2OEpJFq085179; Sun, 24 Mar 2019 14:51:19 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2OEpHsu085168; Sun, 24 Mar 2019 14:51:17 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201903241451.x2OEpHsu085168@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sun, 24 Mar 2019 14:51:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345472 - in head/sys: amd64/linux amd64/linux32 i386/linux X-SVN-Group: head X-SVN-Commit-Author: dchagin X-SVN-Commit-Paths: in head/sys: amd64/linux amd64/linux32 i386/linux X-SVN-Commit-Revision: 345472 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BA04A889EE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Mar 2019 14:51:20 -0000 Author: dchagin Date: Sun Mar 24 14:51:17 2019 New Revision: 345472 URL: https://svnweb.freebsd.org/changeset/base/345472 Log: Regen from r345471. MFC after: 1 month Modified: head/sys/amd64/linux/linux_proto.h head/sys/amd64/linux/linux_syscall.h head/sys/amd64/linux/linux_syscalls.c head/sys/amd64/linux/linux_sysent.c head/sys/amd64/linux/linux_systrace_args.c head/sys/amd64/linux32/linux32_proto.h head/sys/amd64/linux32/linux32_syscall.h head/sys/amd64/linux32/linux32_syscalls.c head/sys/amd64/linux32/linux32_sysent.c head/sys/amd64/linux32/linux32_systrace_args.c head/sys/i386/linux/linux_proto.h head/sys/i386/linux/linux_syscall.h head/sys/i386/linux/linux_syscalls.c head/sys/i386/linux/linux_sysent.c head/sys/i386/linux/linux_systrace_args.c Modified: head/sys/amd64/linux/linux_proto.h ============================================================================== --- head/sys/amd64/linux/linux_proto.h Sun Mar 24 14:50:02 2019 (r345471) +++ head/sys/amd64/linux/linux_proto.h Sun Mar 24 14:51:17 2019 (r345472) @@ -1213,6 +1213,34 @@ struct linux_pkey_alloc_args { struct linux_pkey_free_args { char pkey_l_[PADL_(l_int)]; l_int pkey; char pkey_r_[PADR_(l_int)]; }; +struct linux_statx_args { + char dirfd_l_[PADL_(l_int)]; l_int dirfd; char dirfd_r_[PADR_(l_int)]; + char pathname_l_[PADL_(const char *)]; const char * pathname; char pathname_r_[PADR_(const char *)]; + char flags_l_[PADL_(l_uint)]; l_uint flags; char flags_r_[PADR_(l_uint)]; + char mask_l_[PADL_(l_uint)]; l_uint mask; char mask_r_[PADR_(l_uint)]; + char statxbuf_l_[PADL_(void *)]; void * statxbuf; char statxbuf_r_[PADR_(void *)]; +}; +struct linux_io_pgetevents_args { + register_t dummy; +}; +struct linux_rseq_args { + register_t dummy; +}; +struct linux_pidfd_send_signal_args { + char pidfd_l_[PADL_(l_int)]; l_int pidfd; char pidfd_r_[PADR_(l_int)]; + char sig_l_[PADL_(l_int)]; l_int sig; char sig_r_[PADR_(l_int)]; + char info_l_[PADL_(l_siginfo_t *)]; l_siginfo_t * info; char info_r_[PADR_(l_siginfo_t *)]; + char flags_l_[PADL_(l_uint)]; l_uint flags; char flags_r_[PADR_(l_uint)]; +}; +struct linux_io_uring_setup_args { + register_t dummy; +}; +struct linux_io_uring_enter_args { + register_t dummy; +}; +struct linux_io_uring_register_args { + register_t dummy; +}; #define nosys linux_nosys int linux_open(struct thread *, struct linux_open_args *); int linux_newstat(struct thread *, struct linux_newstat_args *); @@ -1479,6 +1507,13 @@ int linux_pwritev2(struct thread *, struct linux_pwrit int linux_pkey_mprotect(struct thread *, struct linux_pkey_mprotect_args *); int linux_pkey_alloc(struct thread *, struct linux_pkey_alloc_args *); int linux_pkey_free(struct thread *, struct linux_pkey_free_args *); +int linux_statx(struct thread *, struct linux_statx_args *); +int linux_io_pgetevents(struct thread *, struct linux_io_pgetevents_args *); +int linux_rseq(struct thread *, struct linux_rseq_args *); +int linux_pidfd_send_signal(struct thread *, struct linux_pidfd_send_signal_args *); +int linux_io_uring_setup(struct thread *, struct linux_io_uring_setup_args *); +int linux_io_uring_enter(struct thread *, struct linux_io_uring_enter_args *); +int linux_io_uring_register(struct thread *, struct linux_io_uring_register_args *); #ifdef COMPAT_43 @@ -1786,6 +1821,13 @@ int linux_pkey_free(struct thread *, struct linux_pkey #define LINUX_SYS_AUE_linux_pkey_mprotect AUE_NULL #define LINUX_SYS_AUE_linux_pkey_alloc AUE_NULL #define LINUX_SYS_AUE_linux_pkey_free AUE_NULL +#define LINUX_SYS_AUE_linux_statx AUE_NULL +#define LINUX_SYS_AUE_linux_io_pgetevents AUE_NULL +#define LINUX_SYS_AUE_linux_rseq AUE_NULL +#define LINUX_SYS_AUE_linux_pidfd_send_signal AUE_NULL +#define LINUX_SYS_AUE_linux_io_uring_setup AUE_NULL +#define LINUX_SYS_AUE_linux_io_uring_enter AUE_NULL +#define LINUX_SYS_AUE_linux_io_uring_register AUE_NULL #undef PAD_ #undef PADL_ Modified: head/sys/amd64/linux/linux_syscall.h ============================================================================== --- head/sys/amd64/linux/linux_syscall.h Sun Mar 24 14:50:02 2019 (r345471) +++ head/sys/amd64/linux/linux_syscall.h Sun Mar 24 14:51:17 2019 (r345472) @@ -313,4 +313,11 @@ #define LINUX_SYS_linux_pkey_mprotect 329 #define LINUX_SYS_linux_pkey_alloc 330 #define LINUX_SYS_linux_pkey_free 331 -#define LINUX_SYS_MAXSYSCALL 333 +#define LINUX_SYS_linux_statx 332 +#define LINUX_SYS_linux_io_pgetevents 333 +#define LINUX_SYS_linux_rseq 334 +#define LINUX_SYS_linux_pidfd_send_signal 424 +#define LINUX_SYS_linux_io_uring_setup 425 +#define LINUX_SYS_linux_io_uring_enter 426 +#define LINUX_SYS_linux_io_uring_register 427 +#define LINUX_SYS_MAXSYSCALL 429 Modified: head/sys/amd64/linux/linux_syscalls.c ============================================================================== --- head/sys/amd64/linux/linux_syscalls.c Sun Mar 24 14:50:02 2019 (r345471) +++ head/sys/amd64/linux/linux_syscalls.c Sun Mar 24 14:51:17 2019 (r345472) @@ -339,5 +339,101 @@ const char *linux_syscallnames[] = { "linux_pkey_mprotect", /* 329 = linux_pkey_mprotect */ "linux_pkey_alloc", /* 330 = linux_pkey_alloc */ "linux_pkey_free", /* 331 = linux_pkey_free */ - "#332", /* 332 = nosys */ + "linux_statx", /* 332 = linux_statx */ + "linux_io_pgetevents", /* 333 = linux_io_pgetevents */ + "linux_rseq", /* 334 = linux_rseq */ + "#335", /* 335 = nosys */ + "#336", /* 336 = nosys */ + "#337", /* 337 = nosys */ + "#338", /* 338 = nosys */ + "#339", /* 339 = nosys */ + "#340", /* 340 = nosys */ + "#341", /* 341 = nosys */ + "#342", /* 342 = nosys */ + "#343", /* 343 = nosys */ + "#344", /* 344 = nosys */ + "#345", /* 345 = nosys */ + "#346", /* 346 = nosys */ + "#347", /* 347 = nosys */ + "#348", /* 348 = nosys */ + "#349", /* 349 = nosys */ + "#350", /* 350 = nosys */ + "#351", /* 351 = nosys */ + "#352", /* 352 = nosys */ + "#353", /* 353 = nosys */ + "#354", /* 354 = nosys */ + "#355", /* 355 = nosys */ + "#356", /* 356 = nosys */ + "#357", /* 357 = nosys */ + "#358", /* 358 = nosys */ + "#359", /* 359 = nosys */ + "#360", /* 360 = nosys */ + "#361", /* 361 = nosys */ + "#362", /* 362 = nosys */ + "#363", /* 363 = nosys */ + "#364", /* 364 = nosys */ + "#365", /* 365 = nosys */ + "#366", /* 366 = nosys */ + "#367", /* 367 = nosys */ + "#368", /* 368 = nosys */ + "#369", /* 369 = nosys */ + "#370", /* 370 = nosys */ + "#371", /* 371 = nosys */ + "#372", /* 372 = nosys */ + "#373", /* 373 = nosys */ + "#374", /* 374 = nosys */ + "#375", /* 375 = nosys */ + "#376", /* 376 = nosys */ + "#377", /* 377 = nosys */ + "#378", /* 378 = nosys */ + "#379", /* 379 = nosys */ + "#380", /* 380 = nosys */ + "#381", /* 381 = nosys */ + "#382", /* 382 = nosys */ + "#383", /* 383 = nosys */ + "#384", /* 384 = nosys */ + "#385", /* 385 = nosys */ + "#386", /* 386 = nosys */ + "#387", /* 387 = nosys */ + "#388", /* 388 = nosys */ + "#389", /* 389 = nosys */ + "#390", /* 390 = nosys */ + "#391", /* 391 = nosys */ + "#392", /* 392 = nosys */ + "#393", /* 393 = nosys */ + "#394", /* 394 = nosys */ + "#395", /* 395 = nosys */ + "#396", /* 396 = nosys */ + "#397", /* 397 = nosys */ + "#398", /* 398 = nosys */ + "#399", /* 399 = nosys */ + "#400", /* 400 = nosys */ + "#401", /* 401 = nosys */ + "#402", /* 402 = nosys */ + "#403", /* 403 = nosys */ + "#404", /* 404 = nosys */ + "#405", /* 405 = nosys */ + "#406", /* 406 = nosys */ + "#407", /* 407 = nosys */ + "#408", /* 408 = nosys */ + "#409", /* 409 = nosys */ + "#410", /* 410 = nosys */ + "#411", /* 411 = nosys */ + "#412", /* 412 = nosys */ + "#413", /* 413 = nosys */ + "#414", /* 414 = nosys */ + "#415", /* 415 = nosys */ + "#416", /* 416 = nosys */ + "#417", /* 417 = nosys */ + "#418", /* 418 = nosys */ + "#419", /* 419 = nosys */ + "#420", /* 420 = nosys */ + "#421", /* 421 = nosys */ + "#422", /* 422 = nosys */ + "#423", /* 423 = nosys */ + "linux_pidfd_send_signal", /* 424 = linux_pidfd_send_signal */ + "linux_io_uring_setup", /* 425 = linux_io_uring_setup */ + "linux_io_uring_enter", /* 426 = linux_io_uring_enter */ + "linux_io_uring_register", /* 427 = linux_io_uring_register */ + "#428", /* 428 = nosys */ }; Modified: head/sys/amd64/linux/linux_sysent.c ============================================================================== --- head/sys/amd64/linux/linux_sysent.c Sun Mar 24 14:50:02 2019 (r345471) +++ head/sys/amd64/linux/linux_sysent.c Sun Mar 24 14:51:17 2019 (r345472) @@ -349,5 +349,101 @@ struct sysent linux_sysent[] = { { AS(linux_pkey_mprotect_args), (sy_call_t *)linux_pkey_mprotect, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 329 = linux_pkey_mprotect */ { AS(linux_pkey_alloc_args), (sy_call_t *)linux_pkey_alloc, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 330 = linux_pkey_alloc */ { AS(linux_pkey_free_args), (sy_call_t *)linux_pkey_free, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 331 = linux_pkey_free */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 332 = nosys */ + { AS(linux_statx_args), (sy_call_t *)linux_statx, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 332 = linux_statx */ + { 0, (sy_call_t *)linux_io_pgetevents, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 333 = linux_io_pgetevents */ + { 0, (sy_call_t *)linux_rseq, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 334 = linux_rseq */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 335 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 336 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 337 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 338 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 339 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 340 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 341 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 342 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 343 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 344 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 345 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 346 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 347 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 348 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 349 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 350 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 351 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 352 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 353 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 354 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 355 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 356 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 357 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 358 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 359 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 360 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 361 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 362 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 363 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 364 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 365 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 366 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 367 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 368 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 369 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 370 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 371 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 372 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 373 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 374 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 375 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 376 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 377 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 378 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 379 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 380 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 381 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 382 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 383 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 384 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 385 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 386 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 387 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 388 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 389 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 390 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 391 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 392 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 393 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 394 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 395 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 396 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 397 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 398 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 399 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 400 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 401 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 402 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 403 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 404 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 405 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 406 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 407 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 408 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 409 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 410 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 411 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 412 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 413 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 414 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 415 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 416 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 417 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 418 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 419 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 420 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 421 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 422 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 423 = nosys */ + { AS(linux_pidfd_send_signal_args), (sy_call_t *)linux_pidfd_send_signal, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 424 = linux_pidfd_send_signal */ + { 0, (sy_call_t *)linux_io_uring_setup, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 425 = linux_io_uring_setup */ + { 0, (sy_call_t *)linux_io_uring_enter, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 426 = linux_io_uring_enter */ + { 0, (sy_call_t *)linux_io_uring_register, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 427 = linux_io_uring_register */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 428 = nosys */ }; Modified: head/sys/amd64/linux/linux_systrace_args.c ============================================================================== --- head/sys/amd64/linux/linux_systrace_args.c Sun Mar 24 14:50:02 2019 (r345471) +++ head/sys/amd64/linux/linux_systrace_args.c Sun Mar 24 14:51:17 2019 (r345472) @@ -2447,6 +2447,52 @@ systrace_args(int sysnum, void *params, uint64_t *uarg *n_args = 1; break; } + /* linux_statx */ + case 332: { + struct linux_statx_args *p = params; + iarg[0] = p->dirfd; /* l_int */ + uarg[1] = (intptr_t) p->pathname; /* const char * */ + iarg[2] = p->flags; /* l_uint */ + iarg[3] = p->mask; /* l_uint */ + uarg[4] = (intptr_t) p->statxbuf; /* void * */ + *n_args = 5; + break; + } + /* linux_io_pgetevents */ + case 333: { + *n_args = 0; + break; + } + /* linux_rseq */ + case 334: { + *n_args = 0; + break; + } + /* linux_pidfd_send_signal */ + case 424: { + struct linux_pidfd_send_signal_args *p = params; + iarg[0] = p->pidfd; /* l_int */ + iarg[1] = p->sig; /* l_int */ + uarg[2] = (intptr_t) p->info; /* l_siginfo_t * */ + iarg[3] = p->flags; /* l_uint */ + *n_args = 4; + break; + } + /* linux_io_uring_setup */ + case 425: { + *n_args = 0; + break; + } + /* linux_io_uring_enter */ + case 426: { + *n_args = 0; + break; + } + /* linux_io_uring_register */ + case 427: { + *n_args = 0; + break; + } default: *n_args = 0; break; @@ -6305,6 +6351,62 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d break; }; break; + /* linux_statx */ + case 332: + switch(ndx) { + case 0: + p = "l_int"; + break; + case 1: + p = "userland const char *"; + break; + case 2: + p = "l_uint"; + break; + case 3: + p = "l_uint"; + break; + case 4: + p = "userland void *"; + break; + default: + break; + }; + break; + /* linux_io_pgetevents */ + case 333: + break; + /* linux_rseq */ + case 334: + break; + /* linux_pidfd_send_signal */ + case 424: + switch(ndx) { + case 0: + p = "l_int"; + break; + case 1: + p = "l_int"; + break; + case 2: + p = "userland l_siginfo_t *"; + break; + case 3: + p = "l_uint"; + break; + default: + break; + }; + break; + /* linux_io_uring_setup */ + case 425: + break; + /* linux_io_uring_enter */ + case 426: + break; + /* linux_io_uring_register */ + case 427: + break; default: break; }; @@ -7647,6 +7749,26 @@ systrace_return_setargdesc(int sysnum, int ndx, char * if (ndx == 0 || ndx == 1) p = "int"; break; + /* linux_statx */ + case 332: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux_io_pgetevents */ + case 333: + /* linux_rseq */ + case 334: + /* linux_pidfd_send_signal */ + case 424: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* linux_io_uring_setup */ + case 425: + /* linux_io_uring_enter */ + case 426: + /* linux_io_uring_register */ + case 427: default: break; }; Modified: head/sys/amd64/linux32/linux32_proto.h ============================================================================== --- head/sys/amd64/linux32/linux32_proto.h Sun Mar 24 14:50:02 2019 (r345471) +++ head/sys/amd64/linux32/linux32_proto.h Sun Mar 24 14:51:17 2019 (r345472) @@ -1365,6 +1365,149 @@ struct linux_pkey_alloc_args { struct linux_pkey_free_args { char pkey_l_[PADL_(l_int)]; l_int pkey; char pkey_r_[PADR_(l_int)]; }; +struct linux_statx_args { + char dirfd_l_[PADL_(l_int)]; l_int dirfd; char dirfd_r_[PADR_(l_int)]; + char pathname_l_[PADL_(const char *)]; const char * pathname; char pathname_r_[PADR_(const char *)]; + char flags_l_[PADL_(l_uint)]; l_uint flags; char flags_r_[PADR_(l_uint)]; + char mask_l_[PADL_(l_uint)]; l_uint mask; char mask_r_[PADR_(l_uint)]; + char statxbuf_l_[PADL_(void *)]; void * statxbuf; char statxbuf_r_[PADR_(void *)]; +}; +struct linux_arch_prctl_args { + char option_l_[PADL_(l_int)]; l_int option; char option_r_[PADR_(l_int)]; + char arg2_l_[PADL_(l_ulong)]; l_ulong arg2; char arg2_r_[PADR_(l_ulong)]; +}; +struct linux_io_pgetevents_args { + register_t dummy; +}; +struct linux_rseq_args { + register_t dummy; +}; +struct linux_semget_args { + char key_l_[PADL_(l_key_t)]; l_key_t key; char key_r_[PADR_(l_key_t)]; + char nsems_l_[PADL_(l_int)]; l_int nsems; char nsems_r_[PADR_(l_int)]; + char semflg_l_[PADL_(l_int)]; l_int semflg; char semflg_r_[PADR_(l_int)]; +}; +struct linux_semctl_args { + char semid_l_[PADL_(l_int)]; l_int semid; char semid_r_[PADR_(l_int)]; + char semnum_l_[PADL_(l_int)]; l_int semnum; char semnum_r_[PADR_(l_int)]; + char cmd_l_[PADL_(l_int)]; l_int cmd; char cmd_r_[PADR_(l_int)]; + char arg_l_[PADL_(union l_semun)]; union l_semun arg; char arg_r_[PADR_(union l_semun)]; +}; +struct linux_shmget_args { + char key_l_[PADL_(l_key_t)]; l_key_t key; char key_r_[PADR_(l_key_t)]; + char size_l_[PADL_(l_size_t)]; l_size_t size; char size_r_[PADR_(l_size_t)]; + char shmflg_l_[PADL_(l_int)]; l_int shmflg; char shmflg_r_[PADR_(l_int)]; +}; +struct linux_shmctl_args { + char shmid_l_[PADL_(l_int)]; l_int shmid; char shmid_r_[PADR_(l_int)]; + char cmd_l_[PADL_(l_int)]; l_int cmd; char cmd_r_[PADR_(l_int)]; + char buf_l_[PADL_(struct l_shmid_ds *)]; struct l_shmid_ds * buf; char buf_r_[PADR_(struct l_shmid_ds *)]; +}; +struct linux_shmat_args { + char shmid_l_[PADL_(l_int)]; l_int shmid; char shmid_r_[PADR_(l_int)]; + char shmaddr_l_[PADL_(char *)]; char * shmaddr; char shmaddr_r_[PADR_(char *)]; + char shmflg_l_[PADL_(l_int)]; l_int shmflg; char shmflg_r_[PADR_(l_int)]; +}; +struct linux_shmdt_args { + char shmaddr_l_[PADL_(char *)]; char * shmaddr; char shmaddr_r_[PADR_(char *)]; +}; +struct linux_msgget_args { + char key_l_[PADL_(l_key_t)]; l_key_t key; char key_r_[PADR_(l_key_t)]; + char msgflg_l_[PADL_(l_int)]; l_int msgflg; char msgflg_r_[PADR_(l_int)]; +}; +struct linux_msgsnd_args { + char msqid_l_[PADL_(l_int)]; l_int msqid; char msqid_r_[PADR_(l_int)]; + char msgp_l_[PADL_(struct l_msgbuf *)]; struct l_msgbuf * msgp; char msgp_r_[PADR_(struct l_msgbuf *)]; + char msgsz_l_[PADL_(l_size_t)]; l_size_t msgsz; char msgsz_r_[PADR_(l_size_t)]; + char msgflg_l_[PADL_(l_int)]; l_int msgflg; char msgflg_r_[PADR_(l_int)]; +}; +struct linux_msgrcv_args { + char msqid_l_[PADL_(l_int)]; l_int msqid; char msqid_r_[PADR_(l_int)]; + char msgp_l_[PADL_(struct l_msgbuf *)]; struct l_msgbuf * msgp; char msgp_r_[PADR_(struct l_msgbuf *)]; + char msgsz_l_[PADL_(l_size_t)]; l_size_t msgsz; char msgsz_r_[PADR_(l_size_t)]; + char msgtyp_l_[PADL_(l_long)]; l_long msgtyp; char msgtyp_r_[PADR_(l_long)]; + char msgflg_l_[PADL_(l_int)]; l_int msgflg; char msgflg_r_[PADR_(l_int)]; +}; +struct linux_msgctl_args { + char msqid_l_[PADL_(l_int)]; l_int msqid; char msqid_r_[PADR_(l_int)]; + char cmd_l_[PADL_(l_int)]; l_int cmd; char cmd_r_[PADR_(l_int)]; + char buf_l_[PADL_(struct l_msqid_ds *)]; struct l_msqid_ds * buf; char buf_r_[PADR_(struct l_msqid_ds *)]; +}; +struct linux_clock_gettime64_args { + register_t dummy; +}; +struct linux_clock_settime64_args { + register_t dummy; +}; +struct linux_clock_adjtime64_args { + register_t dummy; +}; +struct linux_clock_getres_time64_args { + register_t dummy; +}; +struct linux_clock_nanosleep_time64_args { + register_t dummy; +}; +struct linux_timer_gettime64_args { + register_t dummy; +}; +struct linux_timer_settime64_args { + register_t dummy; +}; +struct linux_timerfd_gettime64_args { + register_t dummy; +}; +struct linux_timerfd_settime64_args { + register_t dummy; +}; +struct linux_utimensat_time64_args { + register_t dummy; +}; +struct linux_pselect6_time64_args { + register_t dummy; +}; +struct linux_ppoll_time64_args { + register_t dummy; +}; +struct linux_io_pgetevents_time64_args { + register_t dummy; +}; +struct linux_recvmmsg_time64_args { + register_t dummy; +}; +struct linux_mq_timedsend_time64_args { + register_t dummy; +}; +struct linux_mq_timedreceive_time64_args { + register_t dummy; +}; +struct linux_semtimedop_time64_args { + register_t dummy; +}; +struct linux_rt_sigtimedwait_time64_args { + register_t dummy; +}; +struct linux_futex_time64_args { + register_t dummy; +}; +struct linux_sched_rr_get_interval_time64_args { + register_t dummy; +}; +struct linux_pidfd_send_signal_args { + char pidfd_l_[PADL_(l_int)]; l_int pidfd; char pidfd_r_[PADR_(l_int)]; + char sig_l_[PADL_(l_int)]; l_int sig; char sig_r_[PADR_(l_int)]; + char info_l_[PADL_(l_siginfo_t *)]; l_siginfo_t * info; char info_r_[PADR_(l_siginfo_t *)]; + char flags_l_[PADL_(l_uint)]; l_uint flags; char flags_r_[PADR_(l_uint)]; +}; +struct linux_io_uring_setup_args { + register_t dummy; +}; +struct linux_io_uring_enter_args { + register_t dummy; +}; +struct linux_io_uring_register_args { + register_t dummy; +}; #define nosys linux_nosys int linux_exit(struct thread *, struct linux_exit_args *); int linux_fork(struct thread *, struct linux_fork_args *); @@ -1673,6 +1816,44 @@ int linux_pwritev2(struct thread *, struct linux_pwrit int linux_pkey_mprotect(struct thread *, struct linux_pkey_mprotect_args *); int linux_pkey_alloc(struct thread *, struct linux_pkey_alloc_args *); int linux_pkey_free(struct thread *, struct linux_pkey_free_args *); +int linux_statx(struct thread *, struct linux_statx_args *); +int linux_arch_prctl(struct thread *, struct linux_arch_prctl_args *); +int linux_io_pgetevents(struct thread *, struct linux_io_pgetevents_args *); +int linux_rseq(struct thread *, struct linux_rseq_args *); +int linux_semget(struct thread *, struct linux_semget_args *); +int linux_semctl(struct thread *, struct linux_semctl_args *); +int linux_shmget(struct thread *, struct linux_shmget_args *); +int linux_shmctl(struct thread *, struct linux_shmctl_args *); +int linux_shmat(struct thread *, struct linux_shmat_args *); +int linux_shmdt(struct thread *, struct linux_shmdt_args *); +int linux_msgget(struct thread *, struct linux_msgget_args *); +int linux_msgsnd(struct thread *, struct linux_msgsnd_args *); +int linux_msgrcv(struct thread *, struct linux_msgrcv_args *); +int linux_msgctl(struct thread *, struct linux_msgctl_args *); +int linux_clock_gettime64(struct thread *, struct linux_clock_gettime64_args *); +int linux_clock_settime64(struct thread *, struct linux_clock_settime64_args *); +int linux_clock_adjtime64(struct thread *, struct linux_clock_adjtime64_args *); +int linux_clock_getres_time64(struct thread *, struct linux_clock_getres_time64_args *); +int linux_clock_nanosleep_time64(struct thread *, struct linux_clock_nanosleep_time64_args *); +int linux_timer_gettime64(struct thread *, struct linux_timer_gettime64_args *); +int linux_timer_settime64(struct thread *, struct linux_timer_settime64_args *); +int linux_timerfd_gettime64(struct thread *, struct linux_timerfd_gettime64_args *); +int linux_timerfd_settime64(struct thread *, struct linux_timerfd_settime64_args *); +int linux_utimensat_time64(struct thread *, struct linux_utimensat_time64_args *); +int linux_pselect6_time64(struct thread *, struct linux_pselect6_time64_args *); +int linux_ppoll_time64(struct thread *, struct linux_ppoll_time64_args *); +int linux_io_pgetevents_time64(struct thread *, struct linux_io_pgetevents_time64_args *); +int linux_recvmmsg_time64(struct thread *, struct linux_recvmmsg_time64_args *); +int linux_mq_timedsend_time64(struct thread *, struct linux_mq_timedsend_time64_args *); +int linux_mq_timedreceive_time64(struct thread *, struct linux_mq_timedreceive_time64_args *); +int linux_semtimedop_time64(struct thread *, struct linux_semtimedop_time64_args *); +int linux_rt_sigtimedwait_time64(struct thread *, struct linux_rt_sigtimedwait_time64_args *); +int linux_futex_time64(struct thread *, struct linux_futex_time64_args *); +int linux_sched_rr_get_interval_time64(struct thread *, struct linux_sched_rr_get_interval_time64_args *); +int linux_pidfd_send_signal(struct thread *, struct linux_pidfd_send_signal_args *); +int linux_io_uring_setup(struct thread *, struct linux_io_uring_setup_args *); +int linux_io_uring_enter(struct thread *, struct linux_io_uring_enter_args *); +int linux_io_uring_register(struct thread *, struct linux_io_uring_register_args *); #ifdef COMPAT_43 @@ -2022,6 +2203,44 @@ int linux_pkey_free(struct thread *, struct linux_pkey #define LINUX32_SYS_AUE_linux_pkey_mprotect AUE_NULL #define LINUX32_SYS_AUE_linux_pkey_alloc AUE_NULL #define LINUX32_SYS_AUE_linux_pkey_free AUE_NULL +#define LINUX32_SYS_AUE_linux_statx AUE_NULL +#define LINUX32_SYS_AUE_linux_arch_prctl AUE_NULL +#define LINUX32_SYS_AUE_linux_io_pgetevents AUE_NULL +#define LINUX32_SYS_AUE_linux_rseq AUE_NULL +#define LINUX32_SYS_AUE_linux_semget AUE_NULL +#define LINUX32_SYS_AUE_linux_semctl AUE_NULL +#define LINUX32_SYS_AUE_linux_shmget AUE_NULL +#define LINUX32_SYS_AUE_linux_shmctl AUE_NULL +#define LINUX32_SYS_AUE_linux_shmat AUE_NULL +#define LINUX32_SYS_AUE_linux_shmdt AUE_NULL +#define LINUX32_SYS_AUE_linux_msgget AUE_NULL +#define LINUX32_SYS_AUE_linux_msgsnd AUE_NULL +#define LINUX32_SYS_AUE_linux_msgrcv AUE_NULL +#define LINUX32_SYS_AUE_linux_msgctl AUE_NULL +#define LINUX32_SYS_AUE_linux_clock_gettime64 AUE_NULL +#define LINUX32_SYS_AUE_linux_clock_settime64 AUE_NULL +#define LINUX32_SYS_AUE_linux_clock_adjtime64 AUE_NULL +#define LINUX32_SYS_AUE_linux_clock_getres_time64 AUE_NULL +#define LINUX32_SYS_AUE_linux_clock_nanosleep_time64 AUE_NULL +#define LINUX32_SYS_AUE_linux_timer_gettime64 AUE_NULL +#define LINUX32_SYS_AUE_linux_timer_settime64 AUE_NULL +#define LINUX32_SYS_AUE_linux_timerfd_gettime64 AUE_NULL +#define LINUX32_SYS_AUE_linux_timerfd_settime64 AUE_NULL +#define LINUX32_SYS_AUE_linux_utimensat_time64 AUE_NULL +#define LINUX32_SYS_AUE_linux_pselect6_time64 AUE_NULL +#define LINUX32_SYS_AUE_linux_ppoll_time64 AUE_NULL +#define LINUX32_SYS_AUE_linux_io_pgetevents_time64 AUE_NULL +#define LINUX32_SYS_AUE_linux_recvmmsg_time64 AUE_NULL +#define LINUX32_SYS_AUE_linux_mq_timedsend_time64 AUE_NULL +#define LINUX32_SYS_AUE_linux_mq_timedreceive_time64 AUE_NULL +#define LINUX32_SYS_AUE_linux_semtimedop_time64 AUE_NULL +#define LINUX32_SYS_AUE_linux_rt_sigtimedwait_time64 AUE_NULL +#define LINUX32_SYS_AUE_linux_futex_time64 AUE_NULL +#define LINUX32_SYS_AUE_linux_sched_rr_get_interval_time64 AUE_NULL +#define LINUX32_SYS_AUE_linux_pidfd_send_signal AUE_NULL +#define LINUX32_SYS_AUE_linux_io_uring_setup AUE_NULL +#define LINUX32_SYS_AUE_linux_io_uring_enter AUE_NULL +#define LINUX32_SYS_AUE_linux_io_uring_register AUE_NULL #undef PAD_ #undef PADL_ Modified: head/sys/amd64/linux32/linux32_syscall.h ============================================================================== --- head/sys/amd64/linux32/linux32_syscall.h Sun Mar 24 14:50:02 2019 (r345471) +++ head/sys/amd64/linux32/linux32_syscall.h Sun Mar 24 14:51:17 2019 (r345472) @@ -350,4 +350,42 @@ #define LINUX32_SYS_linux_pkey_mprotect 380 #define LINUX32_SYS_linux_pkey_alloc 381 #define LINUX32_SYS_linux_pkey_free 382 -#define LINUX32_SYS_MAXSYSCALL 384 +#define LINUX32_SYS_linux_statx 383 +#define LINUX32_SYS_linux_arch_prctl 384 +#define LINUX32_SYS_linux_io_pgetevents 385 +#define LINUX32_SYS_linux_rseq 386 +#define LINUX32_SYS_linux_semget 393 +#define LINUX32_SYS_linux_semctl 394 +#define LINUX32_SYS_linux_shmget 395 +#define LINUX32_SYS_linux_shmctl 396 +#define LINUX32_SYS_linux_shmat 397 +#define LINUX32_SYS_linux_shmdt 398 +#define LINUX32_SYS_linux_msgget 399 +#define LINUX32_SYS_linux_msgsnd 400 +#define LINUX32_SYS_linux_msgrcv 401 +#define LINUX32_SYS_linux_msgctl 402 +#define LINUX32_SYS_linux_clock_gettime64 403 +#define LINUX32_SYS_linux_clock_settime64 404 +#define LINUX32_SYS_linux_clock_adjtime64 405 +#define LINUX32_SYS_linux_clock_getres_time64 406 +#define LINUX32_SYS_linux_clock_nanosleep_time64 407 +#define LINUX32_SYS_linux_timer_gettime64 408 +#define LINUX32_SYS_linux_timer_settime64 409 +#define LINUX32_SYS_linux_timerfd_gettime64 410 +#define LINUX32_SYS_linux_timerfd_settime64 411 +#define LINUX32_SYS_linux_utimensat_time64 412 +#define LINUX32_SYS_linux_pselect6_time64 413 +#define LINUX32_SYS_linux_ppoll_time64 414 +#define LINUX32_SYS_linux_io_pgetevents_time64 416 +#define LINUX32_SYS_linux_recvmmsg_time64 417 +#define LINUX32_SYS_linux_mq_timedsend_time64 418 +#define LINUX32_SYS_linux_mq_timedreceive_time64 419 +#define LINUX32_SYS_linux_semtimedop_time64 420 +#define LINUX32_SYS_linux_rt_sigtimedwait_time64 421 +#define LINUX32_SYS_linux_futex_time64 422 +#define LINUX32_SYS_linux_sched_rr_get_interval_time64 423 +#define LINUX32_SYS_linux_pidfd_send_signal 424 +#define LINUX32_SYS_linux_io_uring_setup 425 +#define LINUX32_SYS_linux_io_uring_enter 426 +#define LINUX32_SYS_linux_io_uring_register 427 +#define LINUX32_SYS_MAXSYSCALL 429 Modified: head/sys/amd64/linux32/linux32_syscalls.c ============================================================================== --- head/sys/amd64/linux32/linux32_syscalls.c Sun Mar 24 14:50:02 2019 (r345471) +++ head/sys/amd64/linux32/linux32_syscalls.c Sun Mar 24 14:51:17 2019 (r345472) @@ -390,5 +390,50 @@ const char *linux32_syscallnames[] = { "linux_pkey_mprotect", /* 380 = linux_pkey_mprotect */ "linux_pkey_alloc", /* 381 = linux_pkey_alloc */ "linux_pkey_free", /* 382 = linux_pkey_free */ - "#383", /* 383 = nosys */ + "linux_statx", /* 383 = linux_statx */ + "linux_arch_prctl", /* 384 = linux_arch_prctl */ + "linux_io_pgetevents", /* 385 = linux_io_pgetevents */ + "linux_rseq", /* 386 = linux_rseq */ + "#387", /* 387 = nosys */ + "#388", /* 388 = nosys */ + "#389", /* 389 = nosys */ + "#390", /* 390 = nosys */ + "#391", /* 391 = nosys */ + "#392", /* 392 = nosys */ + "linux_semget", /* 393 = linux_semget */ + "linux_semctl", /* 394 = linux_semctl */ + "linux_shmget", /* 395 = linux_shmget */ + "linux_shmctl", /* 396 = linux_shmctl */ + "linux_shmat", /* 397 = linux_shmat */ + "linux_shmdt", /* 398 = linux_shmdt */ + "linux_msgget", /* 399 = linux_msgget */ + "linux_msgsnd", /* 400 = linux_msgsnd */ + "linux_msgrcv", /* 401 = linux_msgrcv */ + "linux_msgctl", /* 402 = linux_msgctl */ + "linux_clock_gettime64", /* 403 = linux_clock_gettime64 */ + "linux_clock_settime64", /* 404 = linux_clock_settime64 */ + "linux_clock_adjtime64", /* 405 = linux_clock_adjtime64 */ + "linux_clock_getres_time64", /* 406 = linux_clock_getres_time64 */ + "linux_clock_nanosleep_time64", /* 407 = linux_clock_nanosleep_time64 */ + "linux_timer_gettime64", /* 408 = linux_timer_gettime64 */ + "linux_timer_settime64", /* 409 = linux_timer_settime64 */ + "linux_timerfd_gettime64", /* 410 = linux_timerfd_gettime64 */ + "linux_timerfd_settime64", /* 411 = linux_timerfd_settime64 */ + "linux_utimensat_time64", /* 412 = linux_utimensat_time64 */ + "linux_pselect6_time64", /* 413 = linux_pselect6_time64 */ + "linux_ppoll_time64", /* 414 = linux_ppoll_time64 */ + "#415", /* 415 = nosys */ + "linux_io_pgetevents_time64", /* 416 = linux_io_pgetevents_time64 */ + "linux_recvmmsg_time64", /* 417 = linux_recvmmsg_time64 */ + "linux_mq_timedsend_time64", /* 418 = linux_mq_timedsend_time64 */ + "linux_mq_timedreceive_time64", /* 419 = linux_mq_timedreceive_time64 */ + "linux_semtimedop_time64", /* 420 = linux_semtimedop_time64 */ + "linux_rt_sigtimedwait_time64", /* 421 = linux_rt_sigtimedwait_time64 */ + "linux_futex_time64", /* 422 = linux_futex_time64 */ + "linux_sched_rr_get_interval_time64", /* 423 = linux_sched_rr_get_interval_time64 */ + "linux_pidfd_send_signal", /* 424 = linux_pidfd_send_signal */ + "linux_io_uring_setup", /* 425 = linux_io_uring_setup */ + "linux_io_uring_enter", /* 426 = linux_io_uring_enter */ + "linux_io_uring_register", /* 427 = linux_io_uring_register */ + "#428", /* 428 = nosys */ }; Modified: head/sys/amd64/linux32/linux32_sysent.c ============================================================================== --- head/sys/amd64/linux32/linux32_sysent.c Sun Mar 24 14:50:02 2019 (r345471) +++ head/sys/amd64/linux32/linux32_sysent.c Sun Mar 24 14:51:17 2019 (r345472) @@ -400,5 +400,50 @@ struct sysent linux32_sysent[] = { { AS(linux_pkey_mprotect_args), (sy_call_t *)linux_pkey_mprotect, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 380 = linux_pkey_mprotect */ { AS(linux_pkey_alloc_args), (sy_call_t *)linux_pkey_alloc, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 381 = linux_pkey_alloc */ { AS(linux_pkey_free_args), (sy_call_t *)linux_pkey_free, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 382 = linux_pkey_free */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 383 = nosys */ + { AS(linux_statx_args), (sy_call_t *)linux_statx, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 383 = linux_statx */ + { AS(linux_arch_prctl_args), (sy_call_t *)linux_arch_prctl, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 384 = linux_arch_prctl */ + { 0, (sy_call_t *)linux_io_pgetevents, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 385 = linux_io_pgetevents */ + { 0, (sy_call_t *)linux_rseq, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 386 = linux_rseq */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 387 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 388 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 389 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 390 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 391 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 392 = nosys */ + { AS(linux_semget_args), (sy_call_t *)linux_semget, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 393 = linux_semget */ + { AS(linux_semctl_args), (sy_call_t *)linux_semctl, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 394 = linux_semctl */ + { AS(linux_shmget_args), (sy_call_t *)linux_shmget, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 395 = linux_shmget */ + { AS(linux_shmctl_args), (sy_call_t *)linux_shmctl, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 396 = linux_shmctl */ + { AS(linux_shmat_args), (sy_call_t *)linux_shmat, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 397 = linux_shmat */ + { AS(linux_shmdt_args), (sy_call_t *)linux_shmdt, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 398 = linux_shmdt */ + { AS(linux_msgget_args), (sy_call_t *)linux_msgget, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 399 = linux_msgget */ + { AS(linux_msgsnd_args), (sy_call_t *)linux_msgsnd, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 400 = linux_msgsnd */ + { AS(linux_msgrcv_args), (sy_call_t *)linux_msgrcv, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 401 = linux_msgrcv */ + { AS(linux_msgctl_args), (sy_call_t *)linux_msgctl, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 402 = linux_msgctl */ + { 0, (sy_call_t *)linux_clock_gettime64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 403 = linux_clock_gettime64 */ + { 0, (sy_call_t *)linux_clock_settime64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 404 = linux_clock_settime64 */ + { 0, (sy_call_t *)linux_clock_adjtime64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 405 = linux_clock_adjtime64 */ + { 0, (sy_call_t *)linux_clock_getres_time64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 406 = linux_clock_getres_time64 */ + { 0, (sy_call_t *)linux_clock_nanosleep_time64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 407 = linux_clock_nanosleep_time64 */ + { 0, (sy_call_t *)linux_timer_gettime64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 408 = linux_timer_gettime64 */ + { 0, (sy_call_t *)linux_timer_settime64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 409 = linux_timer_settime64 */ + { 0, (sy_call_t *)linux_timerfd_gettime64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 410 = linux_timerfd_gettime64 */ + { 0, (sy_call_t *)linux_timerfd_settime64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 411 = linux_timerfd_settime64 */ + { 0, (sy_call_t *)linux_utimensat_time64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 412 = linux_utimensat_time64 */ + { 0, (sy_call_t *)linux_pselect6_time64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 413 = linux_pselect6_time64 */ + { 0, (sy_call_t *)linux_ppoll_time64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 414 = linux_ppoll_time64 */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 415 = nosys */ + { 0, (sy_call_t *)linux_io_pgetevents_time64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 416 = linux_io_pgetevents_time64 */ + { 0, (sy_call_t *)linux_recvmmsg_time64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 417 = linux_recvmmsg_time64 */ + { 0, (sy_call_t *)linux_mq_timedsend_time64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 418 = linux_mq_timedsend_time64 */ + { 0, (sy_call_t *)linux_mq_timedreceive_time64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 419 = linux_mq_timedreceive_time64 */ + { 0, (sy_call_t *)linux_semtimedop_time64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 420 = linux_semtimedop_time64 */ + { 0, (sy_call_t *)linux_rt_sigtimedwait_time64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 421 = linux_rt_sigtimedwait_time64 */ + { 0, (sy_call_t *)linux_futex_time64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 422 = linux_futex_time64 */ + { 0, (sy_call_t *)linux_sched_rr_get_interval_time64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 423 = linux_sched_rr_get_interval_time64 */ + { AS(linux_pidfd_send_signal_args), (sy_call_t *)linux_pidfd_send_signal, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 424 = linux_pidfd_send_signal */ + { 0, (sy_call_t *)linux_io_uring_setup, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 425 = linux_io_uring_setup */ + { 0, (sy_call_t *)linux_io_uring_enter, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 426 = linux_io_uring_enter */ + { 0, (sy_call_t *)linux_io_uring_register, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 427 = linux_io_uring_register */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 428 = nosys */ }; Modified: head/sys/amd64/linux32/linux32_systrace_args.c ============================================================================== --- head/sys/amd64/linux32/linux32_systrace_args.c Sun Mar 24 14:50:02 2019 (r345471) +++ head/sys/amd64/linux32/linux32_systrace_args.c Sun Mar 24 14:51:17 2019 (r345472) @@ -2708,6 +2708,251 @@ systrace_args(int sysnum, void *params, uint64_t *uarg *n_args = 1; break; } + /* linux_statx */ + case 383: { + struct linux_statx_args *p = params; + iarg[0] = p->dirfd; /* l_int */ + uarg[1] = (intptr_t) p->pathname; /* const char * */ + iarg[2] = p->flags; /* l_uint */ + iarg[3] = p->mask; /* l_uint */ + uarg[4] = (intptr_t) p->statxbuf; /* void * */ + *n_args = 5; + break; + } + /* linux_arch_prctl */ + case 384: { + struct linux_arch_prctl_args *p = params; + iarg[0] = p->option; /* l_int */ + iarg[1] = p->arg2; /* l_ulong */ + *n_args = 2; + break; + } + /* linux_io_pgetevents */ + case 385: { + *n_args = 0; + break; + } + /* linux_rseq */ + case 386: { + *n_args = 0; + break; + } + /* linux_semget */ + case 393: { + struct linux_semget_args *p = params; + iarg[0] = p->key; /* l_key_t */ + iarg[1] = p->nsems; /* l_int */ + iarg[2] = p->semflg; /* l_int */ + *n_args = 3; + break; + } + /* linux_semctl */ + case 394: { + struct linux_semctl_args *p = params; + iarg[0] = p->semid; /* l_int */ + iarg[1] = p->semnum; /* l_int */ + iarg[2] = p->cmd; /* l_int */ + uarg[3] = p->arg.buf; /* union l_semun */ + *n_args = 4; + break; + } + /* linux_shmget */ + case 395: { + struct linux_shmget_args *p = params; + iarg[0] = p->key; /* l_key_t */ + iarg[1] = p->size; /* l_size_t */ + iarg[2] = p->shmflg; /* l_int */ + *n_args = 3; + break; + } + /* linux_shmctl */ + case 396: { + struct linux_shmctl_args *p = params; + iarg[0] = p->shmid; /* l_int */ + iarg[1] = p->cmd; /* l_int */ + uarg[2] = (intptr_t) p->buf; /* struct l_shmid_ds * */ + *n_args = 3; + break; + } + /* linux_shmat */ + case 397: { + struct linux_shmat_args *p = params; + iarg[0] = p->shmid; /* l_int */ + uarg[1] = (intptr_t) p->shmaddr; /* char * */ + iarg[2] = p->shmflg; /* l_int */ + *n_args = 3; + break; + } + /* linux_shmdt */ + case 398: { + struct linux_shmdt_args *p = params; + uarg[0] = (intptr_t) p->shmaddr; /* char * */ + *n_args = 1; + break; + } + /* linux_msgget */ + case 399: { + struct linux_msgget_args *p = params; + iarg[0] = p->key; /* l_key_t */ + iarg[1] = p->msgflg; /* l_int */ + *n_args = 2; + break; + } + /* linux_msgsnd */ + case 400: { + struct linux_msgsnd_args *p = params; + iarg[0] = p->msqid; /* l_int */ + uarg[1] = (intptr_t) p->msgp; /* struct l_msgbuf * */ + iarg[2] = p->msgsz; /* l_size_t */ + iarg[3] = p->msgflg; /* l_int */ + *n_args = 4; + break; + } + /* linux_msgrcv */ + case 401: { + struct linux_msgrcv_args *p = params; + iarg[0] = p->msqid; /* l_int */ + uarg[1] = (intptr_t) p->msgp; /* struct l_msgbuf * */ + iarg[2] = p->msgsz; /* l_size_t */ + iarg[3] = p->msgtyp; /* l_long */ + iarg[4] = p->msgflg; /* l_int */ + *n_args = 5; + break; + } + /* linux_msgctl */ + case 402: { + struct linux_msgctl_args *p = params; + iarg[0] = p->msqid; /* l_int */ + iarg[1] = p->cmd; /* l_int */ + uarg[2] = (intptr_t) p->buf; /* struct l_msqid_ds * */ + *n_args = 3; + break; + } + /* linux_clock_gettime64 */ + case 403: { + *n_args = 0; + break; + } + /* linux_clock_settime64 */ + case 404: { + *n_args = 0; + break; + } + /* linux_clock_adjtime64 */ + case 405: { + *n_args = 0; + break; + } + /* linux_clock_getres_time64 */ + case 406: { + *n_args = 0; + break; + } + /* linux_clock_nanosleep_time64 */ + case 407: { + *n_args = 0; + break; + } + /* linux_timer_gettime64 */ + case 408: { + *n_args = 0; + break; + } + /* linux_timer_settime64 */ + case 409: { + *n_args = 0; + break; + } + /* linux_timerfd_gettime64 */ + case 410: { + *n_args = 0; + break; + } + /* linux_timerfd_settime64 */ + case 411: { + *n_args = 0; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Mar 24 17:53:27 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D25215629DE; Sun, 24 Mar 2019 17:53:27 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3D0658F376; Sun, 24 Mar 2019 17:53:27 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ED02D23B66; Sun, 24 Mar 2019 17:53:26 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2OHrQKb083156; Sun, 24 Mar 2019 17:53:26 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2OHrQiY083155; Sun, 24 Mar 2019 17:53:26 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201903241753.x2OHrQiY083155@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 24 Mar 2019 17:53:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345475 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 345475 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3D0658F376 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Mar 2019 17:53:27 -0000 Author: ian Date: Sun Mar 24 17:53:26 2019 New Revision: 345475 URL: https://svnweb.freebsd.org/changeset/base/345475 Log: Truncate a too-long interrupt handler name when there is only one handler. There are only 19 bytes available for the name of an interrupt plus the name(s) of handlers/drivers using it. There is a mechanism from the days of shared interrupts that replaces some of the handler names with '+' when they don't all fit into 19 bytes. In modern times there is typically only one device on an interrupt, but long device names are the norm, especially with embedded systems. Also, in systems with multiple interrupt controllers, the names of the interrupts themselves can be long. For example, 'gic0,s54: imx6_anatop0' doesn't fit, and replacing the device driver name with a '+' provides no useful info at all. When there is only one handler but its name was too long to fit, this change truncates enough leading chars of the handler name (replacing them with a '-' char to indicate that some chars are missing) to use all 19 bytes, preserving the unit number typically on the end of the name. Using the prior example, this results in: 'gic0,s54:-6_anatop0' which provides plenty of info to figure out which device is involved. PR: 211946 Reviewed by: gonzo@ (prior version without the '-' char) Differential Revision: https://reviews.freebsd.org/D19675 Modified: head/sys/kern/kern_intr.c Modified: head/sys/kern/kern_intr.c ============================================================================== --- head/sys/kern/kern_intr.c Sun Mar 24 16:47:43 2019 (r345474) +++ head/sys/kern/kern_intr.c Sun Mar 24 17:53:26 2019 (r345475) @@ -197,7 +197,7 @@ intr_event_update(struct intr_event *ie) /* Run through all the handlers updating values. */ CK_SLIST_FOREACH(ih, &ie->ie_handlers, ih_next) { - if (strlen(ie->ie_fullname) + strlen(ih->ih_name) + 1 < + if (strlen(ie->ie_fullname) + strlen(ih->ih_name) + 2 < sizeof(ie->ie_fullname)) { strcat(ie->ie_fullname, " "); strcat(ie->ie_fullname, ih->ih_name); @@ -209,10 +209,20 @@ intr_event_update(struct intr_event *ie) } /* - * If the handler names were too long, add +'s to indicate missing - * names. If we run out of room and still have +'s to add, change - * the last character from a + to a *. + * If there is only one handler and its name is too long, just copy in + * as much of the end of the name (includes the unit number) as will + * fit. Otherwise, we have multiple handlers and not all of the names + * will fit. Add +'s to indicate missing names. If we run out of room + * and still have +'s to add, change the last character from a + to a *. */ + if (missed == 1 && space == 1) { + ih = CK_SLIST_FIRST(&ie->ie_handlers); + missed = strlen(ie->ie_fullname) + strlen(ih->ih_name) + 2 - + sizeof(ie->ie_fullname); + strcat(ie->ie_fullname, (missed == 0) ? " " : "-"); + strcat(ie->ie_fullname, &ih->ih_name[missed]); + missed = 0; + } last = &ie->ie_fullname[sizeof(ie->ie_fullname) - 2]; while (missed-- > 0) { if (strlen(ie->ie_fullname) + 1 == sizeof(ie->ie_fullname)) { From owner-svn-src-all@freebsd.org Sun Mar 24 18:02:28 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E9321562C7F; Sun, 24 Mar 2019 18:02:28 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 339DF8F801; Sun, 24 Mar 2019 18:02:28 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0547C23D26; Sun, 24 Mar 2019 18:02:28 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2OI2RUQ088245; Sun, 24 Mar 2019 18:02:27 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2OI2RXq088244; Sun, 24 Mar 2019 18:02:27 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201903241802.x2OI2RXq088244@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 24 Mar 2019 18:02:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345476 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 345476 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 339DF8F801 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Mar 2019 18:02:28 -0000 Author: ian Date: Sun Mar 24 18:02:27 2019 New Revision: 345476 URL: https://svnweb.freebsd.org/changeset/base/345476 Log: Revert accidental change that should not have been included in r345475. I had changed this value as part of a local experiment, and neglected to change it back before committing the other changes. Modified: head/sys/kern/kern_intr.c Modified: head/sys/kern/kern_intr.c ============================================================================== --- head/sys/kern/kern_intr.c Sun Mar 24 17:53:26 2019 (r345475) +++ head/sys/kern/kern_intr.c Sun Mar 24 18:02:27 2019 (r345476) @@ -197,7 +197,7 @@ intr_event_update(struct intr_event *ie) /* Run through all the handlers updating values. */ CK_SLIST_FOREACH(ih, &ie->ie_handlers, ih_next) { - if (strlen(ie->ie_fullname) + strlen(ih->ih_name) + 2 < + if (strlen(ie->ie_fullname) + strlen(ih->ih_name) + 1 < sizeof(ie->ie_fullname)) { strcat(ie->ie_fullname, " "); strcat(ie->ie_fullname, ih->ih_name); From owner-svn-src-all@freebsd.org Sun Mar 24 15:08:35 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2EBF9155D2E1; Sun, 24 Mar 2019 15:08:35 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A103789258; Sun, 24 Mar 2019 15:08:32 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A8A9421EA1; Sun, 24 Mar 2019 15:08:30 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2OF8UG0094646; Sun, 24 Mar 2019 15:08:30 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2OF8UZc094645; Sun, 24 Mar 2019 15:08:30 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201903241508.x2OF8UZc094645@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sun, 24 Mar 2019 15:08:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345473 - head/sys/compat/linux X-SVN-Group: head X-SVN-Commit-Author: dchagin X-SVN-Commit-Paths: head/sys/compat/linux X-SVN-Commit-Revision: 345473 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A103789258 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Mar 2019 15:08:35 -0000 Author: dchagin Date: Sun Mar 24 15:08:30 2019 New Revision: 345473 URL: https://svnweb.freebsd.org/changeset/base/345473 Log: Whitespace cleanup (annoying). MFC after: 1 month Modified: head/sys/compat/linux/linux_fork.c Modified: head/sys/compat/linux/linux_fork.c ============================================================================== --- head/sys/compat/linux/linux_fork.c Sun Mar 24 14:51:17 2019 (r345472) +++ head/sys/compat/linux/linux_fork.c Sun Mar 24 15:08:30 2019 (r345473) @@ -353,7 +353,7 @@ linux_clone_thread(struct thread *td, struct linux_clo thread_unlock(td); if (P_SHOULDSTOP(p)) newtd->td_flags |= TDF_ASTPENDING | TDF_NEEDSUSPCHK; - + if (p->p_ptevents & PTRACE_LWP) newtd->td_dbgflags |= TDB_BORN; PROC_UNLOCK(p); From owner-svn-src-all@freebsd.org Sun Mar 24 18:51:56 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6260A15647BA; Sun, 24 Mar 2019 18:51:56 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 12B7E91B19; Sun, 24 Mar 2019 18:51:56 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E0E1D2457B; Sun, 24 Mar 2019 18:51:55 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2OIptUo013884; Sun, 24 Mar 2019 18:51:55 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2OIpqWP013870; Sun, 24 Mar 2019 18:51:52 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201903241851.x2OIpqWP013870@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 24 Mar 2019 18:51:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345477 - in head/stand: common efi/libefi efi/loader i386/libi386 libsa/zfs mips/beri/loader uboot/common uboot/lib usb/storage userboot/userboot X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in head/stand: common efi/libefi efi/loader i386/libi386 libsa/zfs mips/beri/loader uboot/common uboot/lib usb/storage userboot/userboot X-SVN-Commit-Revision: 345477 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 12B7E91B19 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.99 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.99)[-0.988,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Mar 2019 18:51:56 -0000 Author: ian Date: Sun Mar 24 18:51:52 2019 New Revision: 345477 URL: https://svnweb.freebsd.org/changeset/base/345477 Log: Distinguish between "no partition" and "choose best partition" with a constant. The values of the d_slice and d_partition fields of a disk_devdesc have a few values with special meanings in the disk_open() routine. Through various evolutions of the loader code over time, a d_partition value of -1 has meant both "use the first ufs partition found in the bsd label" and "don't open a bsd partition at all, open the raw slice." This defines a new special value of -2 to mean open the raw slice, and it gives symbolic names to all the special values used in d_slice and d_partition, and adjusts all existing uses of those fields to use the new constants. The phab review for this timed out without being accepted, but I'm still citing it below because there is useful commentary there. Differential Revision: https://reviews.freebsd.org/D19262 Modified: head/stand/common/disk.c head/stand/common/disk.h head/stand/efi/libefi/efipart.c head/stand/efi/loader/main.c head/stand/i386/libi386/biosdisk.c head/stand/libsa/zfs/zfs.c head/stand/mips/beri/loader/beri_disk_cfi.c head/stand/mips/beri/loader/beri_disk_sdcard.c head/stand/uboot/common/main.c head/stand/uboot/lib/disk.c head/stand/usb/storage/umass_loader.c head/stand/userboot/userboot/main.c head/stand/userboot/userboot/userboot_disk.c Modified: head/stand/common/disk.c ============================================================================== --- head/stand/common/disk.c Sun Mar 24 18:02:27 2019 (r345476) +++ head/stand/common/disk.c Sun Mar 24 18:51:52 2019 (r345477) @@ -129,15 +129,8 @@ ptable_print(void *arg, const char *pname, const struc dev.dd.d_dev = pa->dev->dd.d_dev; dev.dd.d_unit = pa->dev->dd.d_unit; dev.d_slice = part->index; - dev.d_partition = -1; + dev.d_partition = D_PARTNONE; if (disk_open(&dev, partsize, sectsize) == 0) { - /* - * disk_open() for partition -1 on a bsd slice assumes - * you want the first bsd partition. Reset things so - * that we're looking at the start of the raw slice. - */ - dev.d_partition = -1; - dev.d_offset = part->start; table = ptable_open(&dev, partsize, sectsize, ptblread); if (table != NULL) { sprintf(line, " %s%s", pa->prefix, pname); @@ -244,8 +237,8 @@ disk_open(struct disk_devdesc *dev, uint64_t mediasize */ memcpy(&partdev, dev, sizeof(partdev)); partdev.d_offset = 0; - partdev.d_slice = -1; - partdev.d_partition = -1; + partdev.d_slice = D_SLICENONE; + partdev.d_partition = D_PARTNONE; dev->d_offset = 0; table = NULL; @@ -373,9 +366,9 @@ disk_fmtdev(struct disk_devdesc *dev) char *cp; cp = buf + sprintf(buf, "%s%d", dev->dd.d_dev->dv_name, dev->dd.d_unit); - if (dev->d_slice >= 0) { + if (dev->d_slice > D_SLICENONE) { #ifdef LOADER_GPT_SUPPORT - if (dev->d_partition == 255) { + if (dev->d_partition == D_PARTISGPT) { sprintf(cp, "p%d:", dev->d_slice); return (buf); } else @@ -384,7 +377,7 @@ disk_fmtdev(struct disk_devdesc *dev) cp += sprintf(cp, "s%d", dev->d_slice); #endif } - if (dev->d_partition >= 0) + if (dev->d_partition > D_PARTNONE) cp += sprintf(cp, "%c", dev->d_partition + 'a'); strcat(cp, ":"); return (buf); @@ -398,7 +391,9 @@ disk_parsedev(struct disk_devdesc *dev, const char *de char *cp; np = devspec; - unit = slice = partition = -1; + unit = -1; + slice = D_SLICEWILD; + partition = D_PARTWILD; if (*np != '\0' && *np != ':') { unit = strtol(np, &cp, 10); if (cp == np) Modified: head/stand/common/disk.h ============================================================================== --- head/stand/common/disk.h Sun Mar 24 18:02:27 2019 (r345476) +++ head/stand/common/disk.h Sun Mar 24 18:51:52 2019 (r345477) @@ -32,33 +32,36 @@ * * Whole disk access: * - * d_slice = -1 - * d_partition = -1 + * d_slice = D_SLICENONE + * d_partition = * * Whole MBR slice: * * d_slice = MBR slice number (typically 1..4) - * d_partition = -1 + * d_partition = D_PARTNONE * * BSD disklabel partition within an MBR slice: * * d_slice = MBR slice number (typically 1..4) - * d_partition = disklabel partition (typically 0..19) + * d_partition = disklabel partition (typically 0..19 or D_PARTWILD) * * BSD disklabel partition on the true dedicated disk: * - * d_slice = -1 - * d_partition = disklabel partition (typically 0..19) + * d_slice = D_SLICENONE + * d_partition = disklabel partition (typically 0..19 or D_PARTWILD) * * GPT partition: * * d_slice = GPT partition number (typically 1..N) - * d_partition = 255 + * d_partition = D_PARTISGPT * - * For both MBR and GPT, to automatically find the 'best' slice or partition, - * set d_slice to zero. This uses the partition type to decide which partition - * to use according to the following list of preferences: + * For MBR, setting d_partition to D_PARTWILD will automatically use the first + * partition within the slice. * + * For both MBR and GPT, to automatically find the 'best' slice and partition, + * set d_slice to D_SLICEWILD. This uses the partition type to decide which + * partition to use according to the following list of preferences: + * * FreeBSD (active) * FreeBSD (inactive) * Linux (active) @@ -80,6 +83,12 @@ #ifndef _DISK_H #define _DISK_H + +#define D_SLICENONE -1 +#define D_SLICEWILD 0 +#define D_PARTNONE -1 +#define D_PARTWILD -2 +#define D_PARTISGPT 255 struct disk_devdesc { struct devdesc dd; /* Must be first. */ Modified: head/stand/efi/libefi/efipart.c ============================================================================== --- head/stand/efi/libefi/efipart.c Sun Mar 24 18:02:27 2019 (r345476) +++ head/stand/efi/libefi/efipart.c Sun Mar 24 18:51:52 2019 (r345477) @@ -813,8 +813,8 @@ efipart_print_common(struct devsw *dev, pdinfo_list_t pd->pd_blkio = blkio; pd_dev.dd.d_dev = dev; pd_dev.dd.d_unit = pd->pd_unit; - pd_dev.d_slice = -1; - pd_dev.d_partition = -1; + pd_dev.d_slice = D_SLICENONE; + pd_dev.d_partition = D_PARTNONE; ret = disk_open(&pd_dev, blkio->Media->BlockSize * (blkio->Media->LastBlock + 1), blkio->Media->BlockSize); Modified: head/stand/efi/loader/main.c ============================================================================== --- head/stand/efi/loader/main.c Sun Mar 24 18:02:27 2019 (r345476) +++ head/stand/efi/loader/main.c Sun Mar 24 18:51:52 2019 (r345477) @@ -217,12 +217,12 @@ set_currdev_pdinfo(pdinfo_t *dp) currdev.dd.d_dev = dp->pd_devsw; if (dp->pd_parent == NULL) { currdev.dd.d_unit = dp->pd_unit; - currdev.d_slice = -1; - currdev.d_partition = -1; + currdev.d_slice = D_SLICENONE; + currdev.d_partition = D_PARTNONE; } else { currdev.dd.d_unit = dp->pd_parent->pd_unit; currdev.d_slice = dp->pd_unit; - currdev.d_partition = 255; /* Assumes GPT */ + currdev.d_partition = D_PARTISGPT; /* XXX Assumes GPT */ } set_currdev_devdesc((struct devdesc *)&currdev); } else { Modified: head/stand/i386/libi386/biosdisk.c ============================================================================== --- head/stand/i386/libi386/biosdisk.c Sun Mar 24 18:02:27 2019 (r345476) +++ head/stand/i386/libi386/biosdisk.c Sun Mar 24 18:51:52 2019 (r345477) @@ -691,8 +691,8 @@ bd_print_common(struct devsw *dev, bdinfo_list_t *bdi, devd.dd.d_dev = dev; devd.dd.d_unit = i; - devd.d_slice = -1; - devd.d_partition = -1; + devd.d_slice = D_SLICENONE; + devd.d_partition = D_PARTNONE; if (disk_open(&devd, bd->bd_sectorsize * bd->bd_sectors, bd->bd_sectorsize) == 0) { @@ -745,8 +745,8 @@ bd_disk_get_sectors(struct disk_devdesc *dev) disk.dd.d_dev = dev->dd.d_dev; disk.dd.d_unit = dev->dd.d_unit; - disk.d_slice = -1; - disk.d_partition = -1; + disk.d_slice = D_SLICENONE; + disk.d_partition = D_PARTNONE; disk.d_offset = 0; size = bd->bd_sectors * bd->bd_sectorsize; Modified: head/stand/libsa/zfs/zfs.c ============================================================================== --- head/stand/libsa/zfs/zfs.c Sun Mar 24 18:02:27 2019 (r345476) +++ head/stand/libsa/zfs/zfs.c Sun Mar 24 18:51:52 2019 (r345477) @@ -588,7 +588,7 @@ zfs_probe_dev(const char *devname, uint64_t *pool_guid int slice = dev->d_slice; free(dev); - if (partition != -1 && slice != -1) { + if (partition != D_PARTNONE && slice != D_SLICENONE) { ret = zfs_probe(pa.fd, pool_guid); if (ret == 0) return (0); Modified: head/stand/mips/beri/loader/beri_disk_cfi.c ============================================================================== --- head/stand/mips/beri/loader/beri_disk_cfi.c Sun Mar 24 18:02:27 2019 (r345476) +++ head/stand/mips/beri/loader/beri_disk_cfi.c Sun Mar 24 18:51:52 2019 (r345477) @@ -129,8 +129,8 @@ beri_cfi_disk_print(int verbose) return (ret); dev.dd.d_dev = &beri_cfi_disk; dev.dd.d_unit = 0; - dev.d_slice = -1; - dev.d_partition = -1; + dev.d_slice = D_SLICENONE; + dev.d_partition = D_PARTNONE; if (disk_open(&dev, cfi_get_mediasize(), cfi_get_sectorsize()) == 0) { snprintf(line, sizeof(line), " cfi%d", 0); ret = disk_print(&dev, line, verbose); Modified: head/stand/mips/beri/loader/beri_disk_sdcard.c ============================================================================== --- head/stand/mips/beri/loader/beri_disk_sdcard.c Sun Mar 24 18:02:27 2019 (r345476) +++ head/stand/mips/beri/loader/beri_disk_sdcard.c Sun Mar 24 18:51:52 2019 (r345477) @@ -135,8 +135,8 @@ beri_sdcard_disk_print(int verbose) return (ret); dev.dd.d_dev = &beri_sdcard_disk; dev.dd.d_unit = 0; - dev.d_slice = -1; - dev.d_partition = -1; + dev.d_slice = D_SLICENONE; + dev.d_partition = D_PARTNONE; if (disk_open(&dev, altera_sdcard_get_mediasize(), altera_sdcard_get_sectorsize()) == 0) { snprintf(line, sizeof(line), " sdcard%d", 0); Modified: head/stand/uboot/common/main.c ============================================================================== --- head/stand/uboot/common/main.c Sun Mar 24 18:02:27 2019 (r345476) +++ head/stand/uboot/common/main.c Sun Mar 24 18:51:52 2019 (r345477) @@ -213,8 +213,8 @@ get_load_device(int *type, int *unit, int *slice, int *type = DEV_TYP_NONE; *unit = -1; - *slice = 0; - *partition = -1; + *slice = D_SLICEWILD; + *partition = D_PARTWILD; devstr = ub_env_get("loaderdev"); if (devstr == NULL) { @@ -295,7 +295,7 @@ get_load_device(int *type, int *unit, int *slice, int if (p == endp) { *type = DEV_TYP_NONE; *unit = -1; - *slice = 0; + *slice = D_SLICEWILD; return; } @@ -309,7 +309,7 @@ get_load_device(int *type, int *unit, int *slice, int if (*p != '.') { *type = DEV_TYP_NONE; *unit = -1; - *slice = 0; + *slice = D_SLICEWILD; return; } @@ -329,8 +329,8 @@ get_load_device(int *type, int *unit, int *slice, int /* Junk beyond partition number. */ *type = DEV_TYP_NONE; *unit = -1; - *slice = 0; - *partition = -1; + *slice = D_SLICEWILD; + *partition = D_PARTWILD; } static void @@ -339,15 +339,20 @@ print_disk_probe_info() char slice[32]; char partition[32]; - if (currdev.d_disk.d_slice > 0) - sprintf(slice, "%d", currdev.d_disk.d_slice); + if (currdev.d_disk.d_slice == D_SLICENONE) + strlcpy(slice, "", sizeof(slice)); + else if (currdev.d_disk.d_slice == D_SLICEWILD) + strlcpy(slice, "", sizeof(slice)); else - strcpy(slice, ""); + snprintf(slice, sizeof(slice), "%d", currdev.d_disk.d_slice); - if (currdev.d_disk.d_partition >= 0) - sprintf(partition, "%d", currdev.d_disk.d_partition); + if (currdev.d_disk.d_partition == D_PARTNONE) + strlcpy(partition, "", sizeof(partition)); + else if (currdev.d_disk.d_partition == D_PARTWILD) + strlcpy(partition, "", sizeof(partition)); else - strcpy(partition, ""); + snprintf(partition, sizeof(partition), "%d", + currdev.d_disk.d_partition); printf(" Checking unit=%d slice=%s partition=%s...", currdev.dd.d_unit, slice, partition); Modified: head/stand/uboot/lib/disk.c ============================================================================== --- head/stand/uboot/lib/disk.c Sun Mar 24 18:02:27 2019 (r345476) +++ head/stand/uboot/lib/disk.c Sun Mar 24 18:51:52 2019 (r345477) @@ -254,8 +254,8 @@ stor_print(int verbose) for (i = 0; i < stor_info_no; i++) { dev.dd.d_dev = &uboot_storage; dev.dd.d_unit = i; - dev.d_slice = -1; - dev.d_partition = -1; + dev.d_slice = D_SLICENONE; + dev.d_partition = D_PARTNONE; snprintf(line, sizeof(line), "\tdisk%d (%s)\n", i, ub_stor_type(SI(&dev).type)); if ((ret = pager_output(line)) != 0) Modified: head/stand/usb/storage/umass_loader.c ============================================================================== --- head/stand/usb/storage/umass_loader.c Sun Mar 24 18:02:27 2019 (r345476) +++ head/stand/usb/storage/umass_loader.c Sun Mar 24 18:51:52 2019 (r345477) @@ -196,8 +196,8 @@ umass_disk_print(int verbose) return (ret); dev.d_dev = &umass_disk; dev.d_unit = 0; - dev.d_slice = -1; - dev.d_partition = -1; + dev.d_slice = D_SLICENONE; + dev.d_partition = D_PARTNONE; if (umass_disk_open_sub(&dev) == 0) { ret = disk_print(&dev, " umass0", verbose); Modified: head/stand/userboot/userboot/main.c ============================================================================== --- head/stand/userboot/userboot/main.c Sun Mar 24 18:02:27 2019 (r345476) +++ head/stand/userboot/userboot/main.c Sun Mar 24 18:51:52 2019 (r345477) @@ -240,15 +240,15 @@ extract_currdev(void) if (userboot_disk_maxunit > 0) { dev.dd.d_dev = &userboot_disk; dev.dd.d_unit = 0; - dev.d_slice = 0; - dev.d_partition = 0; + dev.d_slice = D_SLICEWILD; + dev.d_partition = D_PARTWILD; /* * If we cannot auto-detect the partition type then * access the disk as a raw device. */ if (dev.dd.d_dev->dv_open(NULL, &dev)) { - dev.d_slice = -1; - dev.d_partition = -1; + dev.d_slice = D_SLICENONE; + dev.d_partition = D_PARTNONE; } dd = &dev.dd; } else { Modified: head/stand/userboot/userboot/userboot_disk.c ============================================================================== --- head/stand/userboot/userboot/userboot_disk.c Sun Mar 24 18:02:27 2019 (r345476) +++ head/stand/userboot/userboot/userboot_disk.c Sun Mar 24 18:51:52 2019 (r345477) @@ -137,8 +137,8 @@ userdisk_print(int verbose) break; dev.dd.d_dev = &userboot_disk; dev.dd.d_unit = i; - dev.d_slice = -1; - dev.d_partition = -1; + dev.d_slice = D_SLICENONE; + dev.d_partition = D_PARTNONE; if (disk_open(&dev, ud_info[i].mediasize, ud_info[i].sectorsize) == 0) { snprintf(line, sizeof(line), " disk%d", i); From owner-svn-src-all@freebsd.org Sun Mar 24 19:09:51 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C12E115331EA; Sun, 24 Mar 2019 19:09:51 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6735E92581; Sun, 24 Mar 2019 19:09:51 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 40AA924772; Sun, 24 Mar 2019 19:09:51 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2OJ9pDx020865; Sun, 24 Mar 2019 19:09:51 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2OJ9ohI020863; Sun, 24 Mar 2019 19:09:50 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201903241909.x2OJ9ohI020863@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Sun, 24 Mar 2019 19:09:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345479 - in head/sys/dev: mpr mps X-SVN-Group: head X-SVN-Commit-Author: scottl X-SVN-Commit-Paths: in head/sys/dev: mpr mps X-SVN-Commit-Revision: 345479 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6735E92581 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.99 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.99)[-0.987,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Mar 2019 19:09:52 -0000 Author: scottl Date: Sun Mar 24 19:09:50 2019 New Revision: 345479 URL: https://svnweb.freebsd.org/changeset/base/345479 Log: r329522 created problemss with commands that enter the TIMEDOUT state but are successfully returned by the card (usually due to an abort being issued as part of timeout recovery). Remove what amounts to an insufficient KASSERT, and don't overwrite the state value. State should probably be re-designed, and that will be done with a future commit. Reported by: phk, bei.io Reviewed by: imp, mav Differential Revision: D19677 Modified: head/sys/dev/mpr/mpr.c head/sys/dev/mps/mps.c Modified: head/sys/dev/mpr/mpr.c ============================================================================== --- head/sys/dev/mpr/mpr.c Sun Mar 24 18:57:03 2019 (r345478) +++ head/sys/dev/mpr/mpr.c Sun Mar 24 19:09:50 2019 (r345479) @@ -2617,10 +2617,8 @@ mpr_intr_locked(void *data) } else { cm = &sc->commands[ le16toh(desc->AddressReply.SMID)]; - KASSERT(cm->cm_state == MPR_CM_STATE_INQUEUE, - ("command SMID %d not inqueue\n", - desc->AddressReply.SMID)); - cm->cm_state = MPR_CM_STATE_BUSY; + if (cm->cm_state != MPR_CM_STATE_TIMEDOUT) + cm->cm_state = MPR_CM_STATE_BUSY; cm->cm_reply = reply; cm->cm_reply_data = le32toh(desc->AddressReply. Modified: head/sys/dev/mps/mps.c ============================================================================== --- head/sys/dev/mps/mps.c Sun Mar 24 18:57:03 2019 (r345478) +++ head/sys/dev/mps/mps.c Sun Mar 24 19:09:50 2019 (r345479) @@ -2481,9 +2481,8 @@ mps_intr_locked(void *data) } else { cm = &sc->commands[ le16toh(desc->AddressReply.SMID)]; - KASSERT(cm->cm_state == MPS_CM_STATE_INQUEUE, - ("command not inqueue\n")); - cm->cm_state = MPS_CM_STATE_BUSY; + if (cm->cm_state != MPS_MPS_STATE_TIMEDOUT) + cm->cm_state = MPS_CM_STATE_BUSY; cm->cm_reply = reply; cm->cm_reply_data = le32toh( desc->AddressReply.ReplyFrameAddress); From owner-svn-src-all@freebsd.org Sun Mar 24 18:57:05 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5A4C15649E6; Sun, 24 Mar 2019 18:57:05 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D1D391D91; Sun, 24 Mar 2019 18:57:05 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 11C51245C3; Sun, 24 Mar 2019 18:57:05 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2OIv4LG015792; Sun, 24 Mar 2019 18:57:04 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2OIv4WU015788; Sun, 24 Mar 2019 18:57:04 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201903241857.x2OIv4WU015788@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Sun, 24 Mar 2019 18:57:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345478 - head/lib/libvgl X-SVN-Group: head X-SVN-Commit-Author: bde X-SVN-Commit-Paths: head/lib/libvgl X-SVN-Commit-Revision: 345478 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4D1D391D91 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.99 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.99)[-0.988,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Mar 2019 18:57:05 -0000 Author: bde Date: Sun Mar 24 18:57:03 2019 New Revision: 345478 URL: https://svnweb.freebsd.org/changeset/base/345478 Log: Fix buffer overruns in modes with color depth more than 8. Support for 16-bit and 32-bit Truecolor modes was supposed to be complete in r70991 of main.c and in nearby revisions for other files, but it was broken by the overruns in most cases (all cases were the mouse is enabled, and most cases where bitmaps are used). r70991 also uninintentionally added support for depths 9-15, 17-23 and 25-31. Depth 24 was more obviously broken and its support is ifdefed out. In the other ranges, only depth 15 is common. It was broken by buffer overruns in all cases. bitmap.c: - the static buffer was used even when it was too small (but it was large enough to often work accidentally in depth 16) - the size of the dynamically allocated buffer was too small - the sizing info bitmap->PixelBytes was not inititialzed in the bitmap constructor. It often ended up as 0 for MEMBUFs, so using it in more places gave more null pointer accesses. (It is per-bitmap, but since conversion between bitmaps of different depths is not supported (except from 4 bits by padding to 8), it would work better if it were global.) main.c: - depths were rounded down instead of up to a multiple of 8, so PixelBytes was 1 too small for depths above 8 except 16, 24 and 32. - PixelBytes was not initialized for 4-bit planar modes. It isn't really used for frame buffer accesses in these modes, but needs to be 1 in MEMBUF images. mouse.c: - the mouse cursor buffers were too small. vgl.h: - PixelBytes was not initialized in the static bitmap constructor. It should be initialized to the value for the current mode, but that is impossible in a static constructor. Initialize it to -1 so as to fail if it is used without further initialization. All modes that are supposed to be supported now don't crash in nontrivial tests, and almost work. Missing uses of PixelBytes now give in-bounds wrong pointers instead of overruns. Misconversions of bitmaps give multiple miscolored mouse cursors instead of 1 white one, and similarly for bitmaps copied through a MEMBUF. Modified: head/lib/libvgl/bitmap.c head/lib/libvgl/main.c head/lib/libvgl/mouse.c head/lib/libvgl/vgl.h Modified: head/lib/libvgl/bitmap.c ============================================================================== --- head/lib/libvgl/bitmap.c Sun Mar 24 18:51:52 2019 (r345477) +++ head/lib/libvgl/bitmap.c Sun Mar 24 18:57:03 2019 (r345478) @@ -338,8 +338,8 @@ __VGLBitmapCopy(VGLBitmap *src, int srcx, int srcy, byte buffer[2048]; /* XXX */ byte *p; - if (width > sizeof(buffer)) { - p = malloc(width); + if (width * src->PixelBytes > sizeof(buffer)) { + p = malloc(width * src->PixelBytes); if (p == NULL) return 1; } else { @@ -349,7 +349,7 @@ __VGLBitmapCopy(VGLBitmap *src, int srcx, int srcy, ReadVerticalLine(src, srcx, srcline, width, p); WriteVerticalLine(dst, dstx, dstline, width, p); } - if (width > sizeof(buffer)) + if (width * src->PixelBytes > sizeof(buffer)) free(p); } return 0; @@ -387,6 +387,7 @@ VGLBitmap object->Xorigin = 0; object->Yorigin = 0; object->Bitmap = bits; + object->PixelBytes = VGLDisplay->PixelBytes; return object; } @@ -401,7 +402,7 @@ VGLBitmapDestroy(VGLBitmap *object) int VGLBitmapAllocateBits(VGLBitmap *object) { - object->Bitmap = (byte *)malloc(object->VXsize*object->VYsize); + object->Bitmap = malloc(object->VXsize*object->VYsize*object->PixelBytes); if (object->Bitmap == NULL) return -1; return 0; Modified: head/lib/libvgl/main.c ============================================================================== --- head/lib/libvgl/main.c Sun Mar 24 18:51:52 2019 (r345477) +++ head/lib/libvgl/main.c Sun Mar 24 18:57:03 2019 (r345478) @@ -132,7 +132,7 @@ int VGLInit(int mode) { struct vt_mode smode; - int adptype; + int adptype, depth; if (VGLInitDone) return -1; @@ -188,6 +188,7 @@ VGLInit(int mode) return -4; } VGLDisplay->Type = VIDBUF4; + VGLDisplay->PixelBytes = 1; break; case V_INFO_MM_PACKED: /* we can do only 256 color packed modes */ @@ -294,8 +295,11 @@ VGLInit(int mode) VGLDisplay->Xsize = VGLModeInfo.vi_width; VGLDisplay->Ysize = VGLModeInfo.vi_height; + depth = VGLModeInfo.vi_depth; + if (depth == 15) + depth = 16; VGLDisplay->VXsize = VGLAdpInfo.va_line_width - *8/(VGLModeInfo.vi_depth/VGLModeInfo.vi_planes); + *8/(depth/VGLModeInfo.vi_planes); VGLDisplay->VYsize = VGLBufSize/VGLModeInfo.vi_planes/VGLAdpInfo.va_line_width; VGLDisplay->Xorigin = 0; VGLDisplay->Yorigin = 0; @@ -530,6 +534,8 @@ VGLSetSegment(unsigned int offset) int VGLSetVScreenSize(VGLBitmap *object, int VXsize, int VYsize) { + int depth; + if (VXsize < object->Xsize || VYsize < object->Ysize) return -1; if (object->Type == MEMBUF) @@ -537,8 +543,11 @@ VGLSetVScreenSize(VGLBitmap *object, int VXsize, int V if (ioctl(0, FBIO_SETLINEWIDTH, &VXsize)) return -1; ioctl(0, CONS_ADPINFO, &VGLAdpInfo); /* FBIO_ADPINFO */ + depth = VGLModeInfo.vi_depth; + if (depth == 15) + depth = 16; object->VXsize = VGLAdpInfo.va_line_width - *8/(VGLModeInfo.vi_depth/VGLModeInfo.vi_planes); + *8/(depth/VGLModeInfo.vi_planes); object->VYsize = VGLBufSize/VGLModeInfo.vi_planes/VGLAdpInfo.va_line_width; if (VYsize < object->VYsize) object->VYsize = VYsize; Modified: head/lib/libvgl/mouse.c ============================================================================== --- head/lib/libvgl/mouse.c Sun Mar 24 18:51:52 2019 (r345477) +++ head/lib/libvgl/mouse.c Sun Mar 24 18:57:03 2019 (r345478) @@ -82,7 +82,7 @@ static VGLBitmap VGLMouseStdAndMask = static VGLBitmap VGLMouseStdOrMask = VGLBITMAP_INITIALIZER(MEMBUF, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE, StdOrMask); static VGLBitmap *VGLMouseAndMask, *VGLMouseOrMask; -static byte map[MOUSE_IMG_SIZE*MOUSE_IMG_SIZE]; +static byte map[MOUSE_IMG_SIZE*MOUSE_IMG_SIZE*4]; static VGLBitmap VGLMouseSave = VGLBITMAP_INITIALIZER(MEMBUF, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE, map); static int VGLMouseVisible = 0; @@ -95,7 +95,7 @@ static int VGLMouseButtons = 0; void VGLMousePointerShow() { - byte buf[MOUSE_IMG_SIZE*MOUSE_IMG_SIZE]; + byte buf[MOUSE_IMG_SIZE*MOUSE_IMG_SIZE*4]; VGLBitmap buffer = VGLBITMAP_INITIALIZER(MEMBUF, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE, buf); byte crtcidx, crtcval, gdcidx, gdcval; Modified: head/lib/libvgl/vgl.h ============================================================================== --- head/lib/libvgl/vgl.h Sun Mar 24 18:51:52 2019 (r345477) +++ head/lib/libvgl/vgl.h Sun Mar 24 18:57:03 2019 (r345478) @@ -49,7 +49,7 @@ typedef struct { } VGLBitmap; #define VGLBITMAP_INITIALIZER(t, x, y, bits) \ - { (t), (x), (y), (x), (y), 0, 0, (bits) } + { (t), (x), (y), (x), (y), 0, 0, (bits), -1 } /* * Defined Type's From owner-svn-src-all@freebsd.org Sun Mar 24 16:47:44 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A595F1560678; Sun, 24 Mar 2019 16:47:44 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 45AC78CFCE; Sun, 24 Mar 2019 16:47:44 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1BC7222F99; Sun, 24 Mar 2019 16:47:44 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2OGlhTR047162; Sun, 24 Mar 2019 16:47:43 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2OGlhrB047161; Sun, 24 Mar 2019 16:47:43 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201903241647.x2OGlhrB047161@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Sun, 24 Mar 2019 16:47:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345474 - head/lib/libvgl X-SVN-Group: head X-SVN-Commit-Author: bde X-SVN-Commit-Paths: head/lib/libvgl X-SVN-Commit-Revision: 345474 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 45AC78CFCE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Mar 2019 16:47:44 -0000 Author: bde Date: Sun Mar 24 16:47:43 2019 New Revision: 345474 URL: https://svnweb.freebsd.org/changeset/base/345474 Log: Fix libvgl to not always fail to initialize due to its invalid mmap() args (neither MAP_PRIVATE nor MAP_SHARED). It was broken in r271635 and/or r271724 by stricter checking. The compatibility code in r271724 doesn't work for my old binaries (actually new binaries with old libraries). PR: needed to test the fix for PR 162373 Modified: head/lib/libvgl/main.c Modified: head/lib/libvgl/main.c ============================================================================== --- head/lib/libvgl/main.c Sun Mar 24 15:08:30 2019 (r345473) +++ head/lib/libvgl/main.c Sun Mar 24 16:47:43 2019 (r345474) @@ -301,7 +301,7 @@ VGLInit(int mode) VGLDisplay->Yorigin = 0; VGLMem = (byte*)mmap(0, VGLAdpInfo.va_window_size, PROT_READ|PROT_WRITE, - MAP_FILE, 0, 0); + MAP_FILE | MAP_SHARED, 0, 0); if (VGLMem == MAP_FAILED) { VGLEnd(); return -7; @@ -350,7 +350,7 @@ VGLCheckSwitch() ioctl(0, VGLMode, 0); VGLCurWindow = 0; VGLMem = (byte*)mmap(0, VGLAdpInfo.va_window_size, PROT_READ|PROT_WRITE, - MAP_FILE, 0, 0); + MAP_FILE | MAP_SHARED, 0, 0); /* XXX: what if mmap() has failed! */ VGLDisplay->Type = VIDBUF8; /* XXX */ From owner-svn-src-all@freebsd.org Sun Mar 24 19:11:47 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37EFC15334EA; Sun, 24 Mar 2019 19:11:47 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D0D3D929A8; Sun, 24 Mar 2019 19:11:46 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AB05D247E8; Sun, 24 Mar 2019 19:11:46 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2OJBkVT024109; Sun, 24 Mar 2019 19:11:46 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2OJBj6x024102; Sun, 24 Mar 2019 19:11:45 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201903241911.x2OJBj6x024102@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 24 Mar 2019 19:11:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345480 - in head/sys: conf geom geom/label X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in head/sys: conf geom geom/label X-SVN-Commit-Revision: 345480 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D0D3D929A8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.99 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.99)[-0.988,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Mar 2019 19:11:47 -0000 Author: ian Date: Sun Mar 24 19:11:45 2019 New Revision: 345480 URL: https://svnweb.freebsd.org/changeset/base/345480 Log: Support device-independent labels for geom_flashmap slices. While geom_flashmap has always supported label names for its slices, it does so by appending "s.labelname" to the provider device name, meaning you still have to know the name and unit of the hardware device to use the labels. These changes add support for device-independent geom_flashmap labels, using the standard geom_label infrastructure. geom_flashmap now creates a softc struct attached to its geom, and as it creates slices it stores the label into an array in the softc. The new geom_label_flashmap uses those labels when tasting a geom_flashmap provider. Differential Revision: https://reviews.freebsd.org/D19535 Added: head/sys/geom/geom_flashmap.h (contents, props changed) head/sys/geom/label/g_label_flashmap.c (contents, props changed) Modified: head/sys/conf/files head/sys/geom/geom_flashmap.c head/sys/geom/label/g_label.c head/sys/geom/label/g_label.h Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sun Mar 24 19:09:50 2019 (r345479) +++ head/sys/conf/files Sun Mar 24 19:11:45 2019 (r345480) @@ -3628,6 +3628,7 @@ geom/journal/g_journal.c optional geom_journal geom/journal/g_journal_ufs.c optional geom_journal geom/label/g_label.c optional geom_label | geom_label_gpt geom/label/g_label_ext2fs.c optional geom_label +geom/label/g_label_flashmap.c optional geom_label geom/label/g_label_iso9660.c optional geom_label geom/label/g_label_msdosfs.c optional geom_label geom/label/g_label_ntfs.c optional geom_label Modified: head/sys/geom/geom_flashmap.c ============================================================================== --- head/sys/geom/geom_flashmap.c Sun Mar 24 19:09:50 2019 (r345479) +++ head/sys/geom/geom_flashmap.c Sun Mar 24 19:11:45 2019 (r345480) @@ -39,13 +39,12 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include +#include +#include #include -#define FLASHMAP_CLASS_NAME "Flashmap" - struct g_flashmap_slice { off_t sl_start; off_t sl_end; @@ -71,8 +70,8 @@ static g_taste_t g_flashmap_taste; static int g_flashmap_load(device_t dev, struct g_provider *pp, flash_slicer_t slicer, struct g_flashmap_head *head); -static int g_flashmap_modify(struct g_geom *gp, const char *devname, - int secsize, struct g_flashmap_head *slices); +static int g_flashmap_modify(struct g_flashmap *gfp, struct g_geom *gp, + const char *devname, int secsize, struct g_flashmap_head *slices); static void g_flashmap_print(struct g_flashmap_slice *slice); MALLOC_DECLARE(M_FLASHMAP); @@ -88,8 +87,8 @@ g_flashmap_print(struct g_flashmap_slice *slice) } static int -g_flashmap_modify(struct g_geom *gp, const char *devname, int secsize, - struct g_flashmap_head *slices) +g_flashmap_modify(struct g_flashmap *gfp, struct g_geom *gp, + const char *devname, int secsize, struct g_flashmap_head *slices) { struct g_flashmap_slice *slice; int i, error; @@ -114,6 +113,8 @@ g_flashmap_modify(struct g_geom *gp, const char *devna i = 0; STAILQ_FOREACH(slice, slices, sl_link) { + free(__DECONST(void *, gfp->labels[i]), M_FLASHMAP); + gfp->labels[i] = strdup(slice->sl_name, M_FLASHMAP); error = g_slice_config(gp, i++, G_SLICE_CONFIG_SET, slice->sl_start, slice->sl_end - slice->sl_start + 1, @@ -153,6 +154,7 @@ g_flashmap_taste(struct g_class *mp, struct g_provider struct g_consumer *cp; struct g_flashmap_head head; struct g_flashmap_slice *slice, *slice_temp; + struct g_flashmap *gfp; flash_slicer_t slicer; device_t dev; int i, size; @@ -164,7 +166,8 @@ g_flashmap_taste(struct g_class *mp, struct g_provider strcmp(pp->geom->class->name, G_DISK_CLASS_NAME) != 0) return (NULL); - gp = g_slice_new(mp, FLASH_SLICES_MAX_NUM, pp, &cp, NULL, 0, NULL); + gp = g_slice_new(mp, FLASH_SLICES_MAX_NUM, pp, &cp, (void**)&gfp, + sizeof(struct g_flashmap), NULL); if (gp == NULL) return (NULL); @@ -186,7 +189,7 @@ g_flashmap_taste(struct g_class *mp, struct g_provider if (g_flashmap_load(dev, pp, slicer, &head) == 0) break; - g_flashmap_modify(gp, cp->provider->name, + g_flashmap_modify(gfp, gp, cp->provider->name, cp->provider->sectorsize, &head); } while (0); Added: head/sys/geom/geom_flashmap.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/geom/geom_flashmap.h Sun Mar 24 19:11:45 2019 (r345480) @@ -0,0 +1,39 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2019 Ian Lepore + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _GEOM_GEOM_FLASHMAP_H_ + +#define FLASHMAP_CLASS_NAME "Flashmap" + +struct g_flashmap { + const char *labels[FLASH_SLICES_MAX_NUM]; +}; + +#endif + Modified: head/sys/geom/label/g_label.c ============================================================================== --- head/sys/geom/label/g_label.c Sun Mar 24 19:09:50 2019 (r345479) +++ head/sys/geom/label/g_label.c Sun Mar 24 19:11:45 2019 (r345480) @@ -95,6 +95,7 @@ const struct g_label_desc *g_labels[] = { &g_label_reiserfs, &g_label_ntfs, &g_label_disk_ident, + &g_label_flashmap, #endif NULL }; Modified: head/sys/geom/label/g_label.h ============================================================================== --- head/sys/geom/label/g_label.h Sun Mar 24 19:09:50 2019 (r345479) +++ head/sys/geom/label/g_label.h Sun Mar 24 19:11:45 2019 (r345480) @@ -88,6 +88,7 @@ extern struct g_label_desc g_label_ntfs; extern struct g_label_desc g_label_gpt; extern struct g_label_desc g_label_gpt_uuid; extern struct g_label_desc g_label_disk_ident; +extern struct g_label_desc g_label_flashmap; extern void g_label_rtrim(char *label, size_t size); #endif /* _KERNEL */ Added: head/sys/geom/label/g_label_flashmap.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/geom/label/g_label_flashmap.c Sun Mar 24 19:11:45 2019 (r345480) @@ -0,0 +1,77 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Ian Lepore + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#define G_LABEL_FLASHMAP_SLICE_DIR "flash" + +static void +g_label_flashmap_taste(struct g_consumer *cp, char *label, size_t size) +{ + struct g_flashmap *gfp; + struct g_slicer *gsp; + struct g_provider *pp; + + g_topology_assert_not(); + + pp = cp->provider; + label[0] = '\0'; + + /* We taste only partitions handled by flashmap */ + if (strncmp(pp->geom->class->name, FLASHMAP_CLASS_NAME, + sizeof(FLASHMAP_CLASS_NAME)) != 0) + return; + + gsp = (struct g_slicer *)pp->geom->softc; + gfp = (struct g_flashmap *)gsp->softc; + + /* If it's handled by flashmap it should have a label, but be safe. */ + if (gfp->labels[pp->index] == NULL) + return; + + strlcpy(label, gfp->labels[pp->index], size); +} + +struct g_label_desc g_label_flashmap = { + .ld_taste = g_label_flashmap_taste, + .ld_dir = G_LABEL_FLASHMAP_SLICE_DIR, + .ld_enabled = 1 +}; + +G_LABEL_INIT(flashmap, g_label_flashmap, "Create device nodes for Flashmap labels"); From owner-svn-src-all@freebsd.org Sun Mar 24 19:27:05 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 036661533FBC; Sun, 24 Mar 2019 19:27:05 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8F72393228; Sun, 24 Mar 2019 19:27:04 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 688C024B0B; Sun, 24 Mar 2019 19:27:04 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2OJR45N031376; Sun, 24 Mar 2019 19:27:04 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2OJR4C9031375; Sun, 24 Mar 2019 19:27:04 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201903241927.x2OJR4C9031375@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Sun, 24 Mar 2019 19:27:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345481 - head/lib/libvgl X-SVN-Group: head X-SVN-Commit-Author: bde X-SVN-Commit-Paths: head/lib/libvgl X-SVN-Commit-Revision: 345481 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8F72393228 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Mar 2019 19:27:05 -0000 Author: bde Date: Sun Mar 24 19:27:03 2019 New Revision: 345481 URL: https://svnweb.freebsd.org/changeset/base/345481 Log: Fix reading of pixels in (4 and 8-plane) planar modes. There seems to be no alternative to reading each plane independently using 3 slow i/o's per plane (this delivers 8 nearby pixels, but we don't buffer the results so run 8 times slower than necessary. All the code for this was there, but it was ifdefed out and replaced by simpler code that cannot work in planar modes. The ifdefed out code was correct except it was missing a volatile declaration, so compilers optimized the multiple dummy reads in it to a single read. Modified: head/lib/libvgl/simple.c Modified: head/lib/libvgl/simple.c ============================================================================== --- head/lib/libvgl/simple.c Sun Mar 24 19:11:45 2019 (r345480) +++ head/lib/libvgl/simple.c Sun Mar 24 19:27:03 2019 (r345481) @@ -148,11 +148,9 @@ VGLGetXY(VGLBitmap *object, int x, int y) { int offset; byte b[4]; -#if 0 int i; u_long color; byte mask; -#endif VGLCheckSwitch(); if (x<0 || x>=object->VXsize || y<0 || y>=object->VYsize) @@ -185,17 +183,14 @@ VGLGetXY(VGLBitmap *object, int x, int y) case VIDBUF4: offset = y*VGLAdpInfo.va_line_width + x/8; get_planar: -#if 1 - return (object->Bitmap[offset]&(0x80>>(x%8))) ? 1 : 0; /* XXX */ -#else color = 0; mask = 0x80 >> (x%8); for (i = 0; i < VGLModeInfo.vi_planes; i++) { outb(0x3ce, 0x04); outb(0x3cf, i); - color |= (object->Bitmap[offset] & mask) ? (1 << i) : 0; + color |= (((volatile VGLBitmap *)object)->Bitmap[offset] & mask) ? + (1 << i) : 0; } return color; -#endif } return 0; /* XXX black? */ } From owner-svn-src-all@freebsd.org Sun Mar 24 19:29:31 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 78014153415A; Sun, 24 Mar 2019 19:29:31 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1B02393382; Sun, 24 Mar 2019 19:29:31 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E8DF424B13; Sun, 24 Mar 2019 19:29:30 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2OJTU0v031508; Sun, 24 Mar 2019 19:29:30 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2OJTUD4031507; Sun, 24 Mar 2019 19:29:30 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201903241929.x2OJTUD4031507@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Sun, 24 Mar 2019 19:29:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345482 - head/sys/dev/mps X-SVN-Group: head X-SVN-Commit-Author: scottl X-SVN-Commit-Paths: head/sys/dev/mps X-SVN-Commit-Revision: 345482 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1B02393382 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Mar 2019 19:29:31 -0000 Author: scottl Date: Sun Mar 24 19:29:30 2019 New Revision: 345482 URL: https://svnweb.freebsd.org/changeset/base/345482 Log: Fix a transposition error from the previous commit Modified: head/sys/dev/mps/mps.c Modified: head/sys/dev/mps/mps.c ============================================================================== --- head/sys/dev/mps/mps.c Sun Mar 24 19:27:03 2019 (r345481) +++ head/sys/dev/mps/mps.c Sun Mar 24 19:29:30 2019 (r345482) @@ -2481,7 +2481,7 @@ mps_intr_locked(void *data) } else { cm = &sc->commands[ le16toh(desc->AddressReply.SMID)]; - if (cm->cm_state != MPS_MPS_STATE_TIMEDOUT) + if (cm->cm_state != MPS_CM_STATE_TIMEDOUT) cm->cm_state = MPS_CM_STATE_BUSY; cm->cm_reply = reply; cm->cm_reply_data = le32toh( From owner-svn-src-all@freebsd.org Sun Mar 24 19:41:46 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B690315348F1; Sun, 24 Mar 2019 19:41:46 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 557B793CC3; Sun, 24 Mar 2019 19:41:46 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2F5AE24D22; Sun, 24 Mar 2019 19:41:46 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2OJfkoA040630; Sun, 24 Mar 2019 19:41:46 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2OJfkLm040629; Sun, 24 Mar 2019 19:41:46 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201903241941.x2OJfkLm040629@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Sun, 24 Mar 2019 19:41:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345483 - head/lib/libvgl X-SVN-Group: head X-SVN-Commit-Author: bde X-SVN-Commit-Paths: head/lib/libvgl X-SVN-Commit-Revision: 345483 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 557B793CC3 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Mar 2019 19:41:47 -0000 Author: bde Date: Sun Mar 24 19:41:45 2019 New Revision: 345483 URL: https://svnweb.freebsd.org/changeset/base/345483 Log: Add support for arbitrary font widths. Only multiples of 8 were supported. Since the font format is undocumented, it is unclear how non-multiples of 8 should be padded to bytes in the font file. Use the same representation as bdf text format (big- endian, with padding in the lower bits). Modified: head/lib/libvgl/text.c Modified: head/lib/libvgl/text.c ============================================================================== --- head/lib/libvgl/text.c Sun Mar 24 19:29:30 2019 (r345482) +++ head/lib/libvgl/text.c Sun Mar 24 19:41:45 2019 (r345483) @@ -66,7 +66,7 @@ FILE *fd; VGLTextFont->BitmapArray = (byte*)malloc(256*((VGLTextFont->Width + 7)/8)*VGLTextFont->Height); fread(VGLTextFont->BitmapArray, 1, - (256*VGLTextFont->Width* VGLTextFont->Height), fd); + (256*((VGLTextFont->Width + 7)/8)*VGLTextFont->Height), fd); fclose(fd); } return 0; @@ -76,44 +76,48 @@ void VGLBitmapPutChar(VGLBitmap *Object, int x, int y, byte ch, byte fgcol, byte bgcol, int fill, int dir) { - int lin, bit; + int b, Bpc, Bpl, lin, bit, topbit; + Bpl = (VGLTextFont->Width + 7) / 8; + Bpc = Bpl * VGLTextFont->Height; + topbit = VGLTextFont->Width - 1; for(lin = 0; lin < VGLTextFont->Height; lin++) { for(bit = 0; bit < VGLTextFont->Width; bit++) { - if (VGLTextFont->BitmapArray[((ch*VGLTextFont->Height)+lin)]&(1<Width & 7); + if (VGLTextFont->BitmapArray[(ch*Bpc)+(lin*Bpl)+(b/8)]&(1<<(b%8))) switch (dir) { case 0: - VGLSetXY(Object, (x+7-bit), (y+lin), fgcol); + VGLSetXY(Object, (x+topbit-bit), (y+lin), fgcol); break; case 1: - VGLSetXY(Object, (x+lin), (y-7+bit), fgcol); + VGLSetXY(Object, (x+lin), (y-topbit+bit), fgcol); break; case 2: - VGLSetXY(Object, (x-7+bit), (y-lin), fgcol); + VGLSetXY(Object, (x-topbit+bit), (y-lin), fgcol); break; case 3: - VGLSetXY(Object, (x-lin), (y+7-bit), fgcol); + VGLSetXY(Object, (x-lin), (y+topbit-bit), fgcol); break; case 4: - VGLSetXY(Object, (x+lin+7-bit), (y+lin+bit), fgcol); + VGLSetXY(Object, (x+lin+topbit-bit), (y+lin+bit), fgcol); break; } else if (fill) switch (dir) { case 0: - VGLSetXY(Object, (x+7-bit), (y+lin), bgcol); + VGLSetXY(Object, (x+topbit-bit), (y+lin), bgcol); break; case 1: - VGLSetXY(Object, (x+lin), (y-7+bit), bgcol); + VGLSetXY(Object, (x+lin), (y-topbit+bit), bgcol); break; case 2: - VGLSetXY(Object, (x-7+bit), (y-lin), bgcol); + VGLSetXY(Object, (x-topbit+bit), (y-lin), bgcol); break; case 3: - VGLSetXY(Object, (x-lin), (y+7-bit), bgcol); + VGLSetXY(Object, (x-lin), (y+topbit-bit), bgcol); break; case 4: - VGLSetXY(Object, (x+lin+7-bit), (y+lin+bit), bgcol); + VGLSetXY(Object, (x+lin+topbit-bit), (y+lin+bit), bgcol); break; } } From owner-svn-src-all@freebsd.org Sun Mar 24 20:36:39 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EFE90154300B; Sun, 24 Mar 2019 20:36:38 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8F7C096251; Sun, 24 Mar 2019 20:36:38 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 789E025709; Sun, 24 Mar 2019 20:36:36 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2OKaaYZ068464; Sun, 24 Mar 2019 20:36:36 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2OKaZl7068460; Sun, 24 Mar 2019 20:36:35 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201903242036.x2OKaZl7068460@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Sun, 24 Mar 2019 20:36:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345484 - head/lib/libvgl X-SVN-Group: head X-SVN-Commit-Author: bde X-SVN-Commit-Paths: head/lib/libvgl X-SVN-Commit-Revision: 345484 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8F7C096251 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.982,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Mar 2019 20:36:39 -0000 Author: bde Date: Sun Mar 24 20:36:35 2019 New Revision: 345484 URL: https://svnweb.freebsd.org/changeset/base/345484 Log: Fix the type of the color args for VGLMouseFreeze(), VGLBitmapPutChar(), VGLBitmapString() and VGLSetBorder() so as to not truncate to 8 bits. Complete the corresponding fix for VGLGetXY() and VGLPutXY() (parts of the man page were out of date). Modified: head/lib/libvgl/mouse.c head/lib/libvgl/text.c head/lib/libvgl/vgl.3 head/lib/libvgl/vgl.h Modified: head/lib/libvgl/mouse.c ============================================================================== --- head/lib/libvgl/mouse.c Sun Mar 24 19:41:45 2019 (r345483) +++ head/lib/libvgl/mouse.c Sun Mar 24 20:36:35 2019 (r345484) @@ -234,7 +234,7 @@ VGLMouseStatus(int *x, int *y, char *buttons) } int -VGLMouseFreeze(int x, int y, int width, int hight, byte color) +VGLMouseFreeze(int x, int y, int width, int hight, u_long color) { if (!VGLMouseFrozen) { VGLMouseFrozen = 1; Modified: head/lib/libvgl/text.c ============================================================================== --- head/lib/libvgl/text.c Sun Mar 24 19:41:45 2019 (r345483) +++ head/lib/libvgl/text.c Sun Mar 24 20:36:35 2019 (r345484) @@ -74,7 +74,7 @@ FILE *fd; void VGLBitmapPutChar(VGLBitmap *Object, int x, int y, byte ch, - byte fgcol, byte bgcol, int fill, int dir) + u_long fgcol, u_long bgcol, int fill, int dir) { int b, Bpc, Bpl, lin, bit, topbit; @@ -126,7 +126,7 @@ VGLBitmapPutChar(VGLBitmap *Object, int x, int y, byte void VGLBitmapString(VGLBitmap *Object, int x, int y, char *str, - byte fgcol, byte bgcol, int fill, int dir) + u_long fgcol, u_long bgcol, int fill, int dir) { int pos; Modified: head/lib/libvgl/vgl.3 ============================================================================== --- head/lib/libvgl/vgl.3 Sun Mar 24 19:41:45 2019 (r345483) +++ head/lib/libvgl/vgl.3 Sun Mar 24 20:36:35 2019 (r345484) @@ -117,9 +117,9 @@ .Ft int .Fn VGLBitmapCopy "VGLBitmap *src" "int srcx" "int srcy" "VGLBitmap *dst" "int dstx" "int dsty" "int width" "int hight" .Ft void -.Fn VGLBitmapPutChar "VGLBitmap *Object" "int x" "int y" "byte ch" "byte fgcol" "byte bgcol" "int fill" "int dir" +.Fn VGLBitmapPutChar "VGLBitmap *Object" "int x" "int y" "byte ch" "u_long fgcol" "u_long bgcol" "int fill" "int dir" .Ft void -.Fn VGLBitmapString "VGLBitmap *Object" "int x" "int y" "char *str" "byte fgcol" "byte bgcol" "int fill" "int dir" +.Fn VGLBitmapString "VGLBitmap *Object" "int x" "int y" "char *str" "u_long fgcol" "u_long bgcol" "int fill" "int dir" .Ft void .Fn VGLClear "VGLBitmap *object" "u_long color" .Ft void @@ -127,7 +127,7 @@ .Ft void .Fn VGLSetPaletteIndex "byte color" "byte red" "byte green" "byte blue" .Ft void -.Fn VGLSetBorder "byte color" +.Fn VGLSetBorder "u_long color" .Ft int .Fn VGLSetVScreenSize "VGLBitmap *object" "int vxsize" "int vysize" .Ft int @@ -238,7 +238,7 @@ retrieves the color of the pixel located at .Va x , y , coordinates of the .Va object -argument, and returns it as a byte value. +argument, and returns it as a u_long value. .Pp .Fn VGLSetXY sets the color of the pixel located at @@ -247,7 +247,7 @@ coordinates of the .Va object argument to .Va color -byte value. +u_long value. .Pp .Fn VGLLine draw a line from Modified: head/lib/libvgl/vgl.h ============================================================================== --- head/lib/libvgl/vgl.h Sun Mar 24 19:41:45 2019 (r345483) +++ head/lib/libvgl/vgl.h Sun Mar 24 20:36:35 2019 (r345484) @@ -131,7 +131,7 @@ void VGLMouseSetImage(VGLBitmap *AndMask, VGLBitmap *O void VGLMouseSetStdImage(void); int VGLMouseInit(int mode); int VGLMouseStatus(int *x, int *y, char *buttons); -int VGLMouseFreeze(int x, int y, int width, int hight, byte color); +int VGLMouseFreeze(int x, int y, int width, int hight, u_long color); void VGLMouseUnFreeze(void); /* simple.c */ void VGLSetXY(VGLBitmap *object, int x, int y, u_long color); @@ -146,11 +146,11 @@ void VGLRestorePalette(void); void VGLSavePalette(void); void VGLSetPalette(byte *red, byte *green, byte *blue); void VGLSetPaletteIndex(byte color, byte red, byte green, byte blue); -void VGLSetBorder(byte color); +void VGLSetBorder(u_long color); void VGLBlankDisplay(int blank); /* text.c */ int VGLTextSetFontFile(char *filename); -void VGLBitmapPutChar(VGLBitmap *Object, int x, int y, byte ch, byte fgcol, byte bgcol, int fill, int dir); -void VGLBitmapString(VGLBitmap *Object, int x, int y, char *str, byte fgcol, byte bgcol, int fill, int dir); +void VGLBitmapPutChar(VGLBitmap *Object, int x, int y, byte ch, u_long fgcol, u_long bgcol, int fill, int dir); +void VGLBitmapString(VGLBitmap *Object, int x, int y, char *str, u_long fgcol, u_long bgcol, int fill, int dir); #endif /* !_VGL_H_ */ From owner-svn-src-all@freebsd.org Sun Mar 24 20:37:39 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2240015430A2; Sun, 24 Mar 2019 20:37:39 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B4D7A963DE; Sun, 24 Mar 2019 20:37:38 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5C4262570A; Sun, 24 Mar 2019 20:37:38 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2OKbcL0068546; Sun, 24 Mar 2019 20:37:38 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2OKbbGb068544; Sun, 24 Mar 2019 20:37:37 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201903242037.x2OKbbGb068544@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Sun, 24 Mar 2019 20:37:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345485 - in head/sys/dev: mpr mps X-SVN-Group: head X-SVN-Commit-Author: scottl X-SVN-Commit-Paths: in head/sys/dev: mpr mps X-SVN-Commit-Revision: 345485 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B4D7A963DE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.980,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Mar 2019 20:37:39 -0000 Author: scottl Date: Sun Mar 24 20:37:37 2019 New Revision: 345485 URL: https://svnweb.freebsd.org/changeset/base/345485 Log: Add event table decoding for SAS Broadcast Primitive events. Modified: head/sys/dev/mpr/mpr_table.c head/sys/dev/mps/mps_table.c Modified: head/sys/dev/mpr/mpr_table.c ============================================================================== --- head/sys/dev/mpr/mpr_table.c Sun Mar 24 20:36:35 2019 (r345484) +++ head/sys/dev/mpr/mpr_table.c Sun Mar 24 20:37:37 2019 (r345485) @@ -452,6 +452,16 @@ mpr_print_evt_sas(struct mpr_softc *sc, MPI2_EVENT_NOT mpr_print_field(sc, "SASAddress: 0x%jx\n", mpr_to_u64(&data->SASAddress)); } + case MPI2_EVENT_SAS_BROADCAST_PRIMITIVE: + { + MPI2_EVENT_DATA_SAS_BROADCAST_PRIMITIVE *data; + + data = (MPI2_EVENT_DATA_SAS_BROADCAST_PRIMITIVE *)&event->EventData; + MPR_PRINTFIELD(sc, data, PhyNum, %d); + MPR_PRINTFIELD(sc, data, Port, %d); + MPR_PRINTFIELD(sc, data, PortWidth, %d); + MPR_PRINTFIELD(sc, data, Primitive, 0x%x); + } default: break; } Modified: head/sys/dev/mps/mps_table.c ============================================================================== --- head/sys/dev/mps/mps_table.c Sun Mar 24 20:36:35 2019 (r345484) +++ head/sys/dev/mps/mps_table.c Sun Mar 24 20:37:37 2019 (r345485) @@ -431,6 +431,16 @@ mps_print_evt_sas(struct mps_softc *sc, MPI2_EVENT_NOT mps_print_field(sc, "SASAddress: 0x%jx\n", mps_to_u64(&data->SASAddress)); } + case MPI2_EVENT_SAS_BROADCAST_PRIMITIVE: + { + MPI2_EVENT_DATA_SAS_BROADCAST_PRIMITIVE *data; + + data = (MPI2_EVENT_DATA_SAS_BROADCAST_PRIMITIVE *)&event->EventData; + MPS_PRINTFIELD(sc, data, PhyNum, %d); + MPS_PRINTFIELD(sc, data, Port, %d); + MPS_PRINTFIELD(sc, data, PortWidth, %d); + MPS_PRINTFIELD(sc, data, Primitive, 0x%x); + } default: break; } From owner-svn-src-all@freebsd.org Sun Mar 24 20:43:23 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 17D5B15434B2; Sun, 24 Mar 2019 20:43:23 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A18B4968A1; Sun, 24 Mar 2019 20:43:22 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8A3A5258B5; Sun, 24 Mar 2019 20:43:22 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2OKhMpv073782; Sun, 24 Mar 2019 20:43:22 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2OKhMuS073781; Sun, 24 Mar 2019 20:43:22 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201903242043.x2OKhMuS073781@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Sun, 24 Mar 2019 20:43:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345486 - head/lib/libvgl X-SVN-Group: head X-SVN-Commit-Author: bde X-SVN-Commit-Paths: head/lib/libvgl X-SVN-Commit-Revision: 345486 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A18B4968A1 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.980,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Mar 2019 20:43:23 -0000 Author: bde Date: Sun Mar 24 20:43:21 2019 New Revision: 345486 URL: https://svnweb.freebsd.org/changeset/base/345486 Log: Oops, my previous commit to libvgl was missing the change of VGLSetBorder() to match the change in its declaration. Change the declaration back to "byte color" since setting of the border color is not supported for more than 256 colors. Modified: head/lib/libvgl/vgl.3 head/lib/libvgl/vgl.h Modified: head/lib/libvgl/vgl.3 ============================================================================== --- head/lib/libvgl/vgl.3 Sun Mar 24 20:37:37 2019 (r345485) +++ head/lib/libvgl/vgl.3 Sun Mar 24 20:43:21 2019 (r345486) @@ -127,7 +127,7 @@ .Ft void .Fn VGLSetPaletteIndex "byte color" "byte red" "byte green" "byte blue" .Ft void -.Fn VGLSetBorder "u_long color" +.Fn VGLSetBorder "byte color" .Ft int .Fn VGLSetVScreenSize "VGLBitmap *object" "int vxsize" "int vysize" .Ft int Modified: head/lib/libvgl/vgl.h ============================================================================== --- head/lib/libvgl/vgl.h Sun Mar 24 20:37:37 2019 (r345485) +++ head/lib/libvgl/vgl.h Sun Mar 24 20:43:21 2019 (r345486) @@ -146,7 +146,7 @@ void VGLRestorePalette(void); void VGLSavePalette(void); void VGLSetPalette(byte *red, byte *green, byte *blue); void VGLSetPaletteIndex(byte color, byte red, byte green, byte blue); -void VGLSetBorder(u_long color); +void VGLSetBorder(byte color); void VGLBlankDisplay(int blank); /* text.c */ int VGLTextSetFontFile(char *filename); From owner-svn-src-all@freebsd.org Sun Mar 24 22:10:29 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3CC6C15461DA; Sun, 24 Mar 2019 22:10:29 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D33386AC22; Sun, 24 Mar 2019 22:10:28 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AC23126648; Sun, 24 Mar 2019 22:10:28 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2OMAS9M016025; Sun, 24 Mar 2019 22:10:28 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2OMAQIT016012; Sun, 24 Mar 2019 22:10:26 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201903242210.x2OMAQIT016012@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 24 Mar 2019 22:10:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345487 - in stable/12/bin/sh: . tests/execution X-SVN-Group: stable-12 X-SVN-Commit-Author: jilles X-SVN-Commit-Paths: in stable/12/bin/sh: . tests/execution X-SVN-Commit-Revision: 345487 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D33386AC22 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Mar 2019 22:10:29 -0000 Author: jilles Date: Sun Mar 24 22:10:26 2019 New Revision: 345487 URL: https://svnweb.freebsd.org/changeset/base/345487 Log: MFC r344502: sh: Add set -o pipefail The pipefail option allows checking the exit status of all commands in a pipeline more easily, at a limited cost of complexity in sh itself. It works similarly to the option in bash, ksh93 and mksh. Like ksh93 and unlike bash and mksh, the state of the option is saved when a pipeline is started. Therefore, even in the case of commands like A | B & a later change of the option does not affect the exit status, the same way (A | B) & works. Since SIGPIPE is not handled specially, more work in the script is required for a proper exit status for pipelines containing commands such as head that may terminate successfully without reading all input. This can be something like ( cmd1 r=$? if [ "$r" -gt 128 ] && [ "$(kill -l "$r")" = PIPE ]; then exit 0 else exit "$r" fi ) | head PR: 244270 Relnotes: yes Added: stable/12/bin/sh/tests/execution/pipefail1.0 - copied unchanged from r344502, head/bin/sh/tests/execution/pipefail1.0 stable/12/bin/sh/tests/execution/pipefail2.42 - copied unchanged from r344502, head/bin/sh/tests/execution/pipefail2.42 stable/12/bin/sh/tests/execution/pipefail3.42 - copied unchanged from r344502, head/bin/sh/tests/execution/pipefail3.42 stable/12/bin/sh/tests/execution/pipefail4.42 - copied unchanged from r344502, head/bin/sh/tests/execution/pipefail4.42 stable/12/bin/sh/tests/execution/pipefail5.42 - copied unchanged from r344502, head/bin/sh/tests/execution/pipefail5.42 stable/12/bin/sh/tests/execution/pipefail6.42 - copied unchanged from r344502, head/bin/sh/tests/execution/pipefail6.42 stable/12/bin/sh/tests/execution/pipefail7.0 - copied unchanged from r344502, head/bin/sh/tests/execution/pipefail7.0 Modified: stable/12/bin/sh/jobs.c stable/12/bin/sh/options.h stable/12/bin/sh/sh.1 stable/12/bin/sh/tests/execution/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/bin/sh/jobs.c ============================================================================== --- stable/12/bin/sh/jobs.c Sun Mar 24 20:43:21 2019 (r345486) +++ stable/12/bin/sh/jobs.c Sun Mar 24 22:10:26 2019 (r345487) @@ -104,6 +104,7 @@ struct job { char changed; /* true if status has changed */ char foreground; /* true if running in the foreground */ char remembered; /* true if $! referenced */ + char pipefail; /* pass any non-zero status */ #if JOBS char jobctl; /* job running under job control */ struct job *next; /* job used after this one */ @@ -143,6 +144,7 @@ static void setcurjob(struct job *); static void deljob(struct job *); static struct job *getcurjob(struct job *); #endif +static int getjobstatus(const struct job *); static void printjobcmd(struct job *); static void showjob(struct job *, int); @@ -340,6 +342,20 @@ jobscmd(int argc __unused, char *argv[] __unused) return (0); } +static int getjobstatus(const struct job *jp) +{ + int i, status; + + if (!jp->pipefail) + return (jp->ps[jp->nprocs - 1].status); + for (i = jp->nprocs - 1; i >= 0; i--) { + status = jp->ps[i].status; + if (status != 0) + return (status); + } + return (0); +} + static void printjobcmd(struct job *jp) { @@ -376,7 +392,7 @@ showjob(struct job *jp, int mode) } #endif coredump = ""; - status = jp->ps[jp->nprocs - 1].status; + status = getjobstatus(jp); if (jp->state == 0) { statestr = "Running"; #if JOBS @@ -555,7 +571,7 @@ waitcmdloop(struct job *job) do { if (job != NULL) { if (job->state == JOBDONE) { - status = job->ps[job->nprocs - 1].status; + status = getjobstatus(job); if (WIFEXITED(status)) retval = WEXITSTATUS(status); else @@ -780,6 +796,7 @@ makejob(union node *node __unused, int nprocs) jp->nprocs = 0; jp->foreground = 0; jp->remembered = 0; + jp->pipefail = pipefailflag; #if JOBS jp->jobctl = jobctl; jp->next = NULL; @@ -1075,7 +1092,7 @@ waitforjob(struct job *jp, int *signaled) if (jp->state == JOBSTOPPED) setcurjob(jp); #endif - status = jp->ps[jp->nprocs - 1].status; + status = getjobstatus(jp); if (signaled != NULL) *signaled = WIFSIGNALED(status); /* convert to 8 bits */ Modified: stable/12/bin/sh/options.h ============================================================================== --- stable/12/bin/sh/options.h Sun Mar 24 20:43:21 2019 (r345486) +++ stable/12/bin/sh/options.h Sun Mar 24 22:10:26 2019 (r345487) @@ -67,9 +67,10 @@ struct shparam { #define Pflag optval[17] #define hflag optval[18] #define nologflag optval[19] +#define pipefailflag optval[20] #define NSHORTOPTS 19 -#define NOPTS 20 +#define NOPTS 21 extern char optval[NOPTS]; extern const char optletter[NSHORTOPTS]; @@ -97,6 +98,7 @@ static const unsigned char optname[] = "\010physical" "\010trackall" "\005nolog" + "\010pipefail" ; #endif Modified: stable/12/bin/sh/sh.1 ============================================================================== --- stable/12/bin/sh/sh.1 Sun Mar 24 20:43:21 2019 (r345486) +++ stable/12/bin/sh/sh.1 Sun Mar 24 22:10:26 2019 (r345487) @@ -32,7 +32,7 @@ .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd July 19, 2018 +.Dd February 24, 2019 .Dt SH 1 .Os .Sh NAME @@ -343,6 +343,18 @@ Useful for debugging. .It Li nolog Another do-nothing option for POSIX compliance. It only has a long name. +.It Li pipefail +Change the exit status of a pipeline to the last non-zero exit status of +any command in the pipeline, if any. +Since an exit due to +.Dv SIGPIPE +counts as a non-zero exit status, +this option may cause non-zero exit status for successful pipelines +if a command such as +.Xr head 1 +in the pipeline terminates with status 0 without reading its +input completely. +This option only has a long name. .El .Pp The @@ -856,12 +868,15 @@ If the keyword .Ic !\& does not precede the pipeline, the exit status is the exit status of the last command specified -in the pipeline. +in the pipeline if the +.Cm pipefail +option is not set or all commands returned zero, +or the last non-zero exit status of any command in the pipeline otherwise. Otherwise, the exit status is the logical -NOT of the exit status of the last command. +NOT of that exit status. That is, if -the last command returns zero, the exit status is 1; if -the last command returns greater than zero, the exit status +that status is zero, the exit status is 1; if +that status is greater than zero, the exit status is zero. .Pp Because pipeline assignment of standard input or standard Modified: stable/12/bin/sh/tests/execution/Makefile ============================================================================== --- stable/12/bin/sh/tests/execution/Makefile Sun Mar 24 20:43:21 2019 (r345486) +++ stable/12/bin/sh/tests/execution/Makefile Sun Mar 24 22:10:26 2019 (r345487) @@ -30,6 +30,13 @@ ${PACKAGE}FILES+= killed2.0 ${PACKAGE}FILES+= not1.0 ${PACKAGE}FILES+= not2.0 ${PACKAGE}FILES+= path1.0 +${PACKAGE}FILES+= pipefail1.0 +${PACKAGE}FILES+= pipefail2.42 +${PACKAGE}FILES+= pipefail3.42 +${PACKAGE}FILES+= pipefail4.42 +${PACKAGE}FILES+= pipefail5.42 +${PACKAGE}FILES+= pipefail6.42 +${PACKAGE}FILES+= pipefail7.0 ${PACKAGE}FILES+= redir1.0 ${PACKAGE}FILES+= redir2.0 ${PACKAGE}FILES+= redir3.0 Copied: stable/12/bin/sh/tests/execution/pipefail1.0 (from r344502, head/bin/sh/tests/execution/pipefail1.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/bin/sh/tests/execution/pipefail1.0 Sun Mar 24 22:10:26 2019 (r345487, copy of r344502, head/bin/sh/tests/execution/pipefail1.0) @@ -0,0 +1,4 @@ +# $FreeBSD$ + +set -o pipefail +: && : | : && : | : | : && : | : | : | : Copied: stable/12/bin/sh/tests/execution/pipefail2.42 (from r344502, head/bin/sh/tests/execution/pipefail2.42) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/bin/sh/tests/execution/pipefail2.42 Sun Mar 24 22:10:26 2019 (r345487, copy of r344502, head/bin/sh/tests/execution/pipefail2.42) @@ -0,0 +1,4 @@ +# $FreeBSD$ + +set -o pipefail +(exit 42) | : Copied: stable/12/bin/sh/tests/execution/pipefail3.42 (from r344502, head/bin/sh/tests/execution/pipefail3.42) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/bin/sh/tests/execution/pipefail3.42 Sun Mar 24 22:10:26 2019 (r345487, copy of r344502, head/bin/sh/tests/execution/pipefail3.42) @@ -0,0 +1,4 @@ +# $FreeBSD$ + +set -o pipefail +: | (exit 42) Copied: stable/12/bin/sh/tests/execution/pipefail4.42 (from r344502, head/bin/sh/tests/execution/pipefail4.42) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/bin/sh/tests/execution/pipefail4.42 Sun Mar 24 22:10:26 2019 (r345487, copy of r344502, head/bin/sh/tests/execution/pipefail4.42) @@ -0,0 +1,4 @@ +# $FreeBSD$ + +set -o pipefail +(exit 43) | (exit 42) Copied: stable/12/bin/sh/tests/execution/pipefail5.42 (from r344502, head/bin/sh/tests/execution/pipefail5.42) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/bin/sh/tests/execution/pipefail5.42 Sun Mar 24 22:10:26 2019 (r345487, copy of r344502, head/bin/sh/tests/execution/pipefail5.42) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +set -o pipefail +(exit 42) | : & +wait %+ Copied: stable/12/bin/sh/tests/execution/pipefail6.42 (from r344502, head/bin/sh/tests/execution/pipefail6.42) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/bin/sh/tests/execution/pipefail6.42 Sun Mar 24 22:10:26 2019 (r345487, copy of r344502, head/bin/sh/tests/execution/pipefail6.42) @@ -0,0 +1,6 @@ +# $FreeBSD$ + +set -o pipefail +(exit 42) | : & +set +o pipefail +wait %+ Copied: stable/12/bin/sh/tests/execution/pipefail7.0 (from r344502, head/bin/sh/tests/execution/pipefail7.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/bin/sh/tests/execution/pipefail7.0 Sun Mar 24 22:10:26 2019 (r345487, copy of r344502, head/bin/sh/tests/execution/pipefail7.0) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +(exit 42) | : & +set -o pipefail +wait %+ From owner-svn-src-all@freebsd.org Sun Mar 24 23:26:04 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15AA41548088; Sun, 24 Mar 2019 23:26:04 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A9D0E6CDCA; Sun, 24 Mar 2019 23:26:03 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 83F86273F2; Sun, 24 Mar 2019 23:26:03 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2ONQ3vf057303; Sun, 24 Mar 2019 23:26:03 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2ONQ3DM057302; Sun, 24 Mar 2019 23:26:03 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201903242326.x2ONQ3DM057302@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 24 Mar 2019 23:26:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345488 - head/tools/build/options X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/tools/build/options X-SVN-Commit-Revision: 345488 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A9D0E6CDCA X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.984,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Mar 2019 23:26:04 -0000 Author: emaste Date: Sun Mar 24 23:26:03 2019 New Revision: 345488 URL: https://svnweb.freebsd.org/changeset/base/345488 Log: Add description for WITHOUT_RETPOLINE Not used by default at the moment, but added for the benefit of downstream projects/branches with different options. Added: head/tools/build/options/WITHOUT_RETPOLINE (contents, props changed) Added: head/tools/build/options/WITHOUT_RETPOLINE ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_RETPOLINE Sun Mar 24 23:26:03 2019 (r345488) @@ -0,0 +1,3 @@ +.\" $FreeBSD$ +Do not build the base system with the retpoline speculative execution +vulnerability mitigation. From owner-svn-src-all@freebsd.org Mon Mar 25 01:06:31 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E6E61154BC30; Mon, 25 Mar 2019 01:06:30 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 86CAF70A0E; Mon, 25 Mar 2019 01:06:30 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 742F7567; Mon, 25 Mar 2019 01:06:30 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2P16Uh8009771; Mon, 25 Mar 2019 01:06:30 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2P16Ur9009770; Mon, 25 Mar 2019 01:06:30 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201903250106.x2P16Ur9009770@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 25 Mar 2019 01:06:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345489 - head/gnu/usr.bin/binutils/objdump X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/gnu/usr.bin/binutils/objdump X-SVN-Commit-Revision: 345489 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 86CAF70A0E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Mar 2019 01:06:31 -0000 Author: emaste Date: Mon Mar 25 01:06:29 2019 New Revision: 345489 URL: https://svnweb.freebsd.org/changeset/base/345489 Log: Fix GNU objdump build under WITH_PIE Explicitly specified bare .a libraries need ${PIE_SUFFIX}. Reported by: David E. Cross, on twitter Modified: head/gnu/usr.bin/binutils/objdump/Makefile Modified: head/gnu/usr.bin/binutils/objdump/Makefile ============================================================================== --- head/gnu/usr.bin/binutils/objdump/Makefile Sun Mar 24 23:26:03 2019 (r345488) +++ head/gnu/usr.bin/binutils/objdump/Makefile Mon Mar 25 01:06:29 2019 (r345489) @@ -10,10 +10,10 @@ CFLAGS+= -D_GNU_SOURCE CFLAGS+= -I${.CURDIR}/${GNURELTOP}/libbinutils CFLAGS+= -I${SRCDIR}/binutils CFLAGS+= -DBFD_VERSION_STRING=\"${VERSION}\" -DPADD= ${GNURELTOP}/libbinutils/libbinutils.a -DPADD+= ${GNURELTOP}/libopcodes/libopcodes.a -DPADD+= ${GNURELTOP}/libbfd/libbfd.a -DPADD+= ${GNURELTOP}/libiberty/libiberty.a +DPADD= ${GNURELTOP}/libbinutils/libbinutils${PIE_SUFFIX}.a +DPADD+= ${GNURELTOP}/libopcodes/libopcodes${PIE_SUFFIX}.a +DPADD+= ${GNURELTOP}/libbfd/libbfd${PIE_SUFFIX}.a +DPADD+= ${GNURELTOP}/libiberty/libiberty${PIE_SUFFIX}.a LDADD= ${DPADD} .include From owner-svn-src-all@freebsd.org Mon Mar 25 01:18:28 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12661154C6C6; Mon, 25 Mar 2019 01:18:28 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AA89E7124A; Mon, 25 Mar 2019 01:18:27 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7F3DA719; Mon, 25 Mar 2019 01:18:27 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2P1IRml015103; Mon, 25 Mar 2019 01:18:27 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2P1IQO3015100; Mon, 25 Mar 2019 01:18:26 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201903250118.x2P1IQO3015100@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 25 Mar 2019 01:18:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345490 - in head/gnu/usr.bin/binutils: as ld objcopy X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head/gnu/usr.bin/binutils: as ld objcopy X-SVN-Commit-Revision: 345490 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AA89E7124A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Mar 2019 01:18:28 -0000 Author: emaste Date: Mon Mar 25 01:18:26 2019 New Revision: 345490 URL: https://svnweb.freebsd.org/changeset/base/345490 Log: Apply WITH_PIE changes to other binutils components Followon to r345489, explicitly specified bare .a libraries need ${PIE_SUFFIX} (although these still built). MFC with: r345489 Modified: head/gnu/usr.bin/binutils/as/Makefile head/gnu/usr.bin/binutils/ld/Makefile head/gnu/usr.bin/binutils/objcopy/Makefile Modified: head/gnu/usr.bin/binutils/as/Makefile ============================================================================== --- head/gnu/usr.bin/binutils/as/Makefile Mon Mar 25 01:06:29 2019 (r345489) +++ head/gnu/usr.bin/binutils/as/Makefile Mon Mar 25 01:18:26 2019 (r345490) @@ -95,9 +95,9 @@ CFLAGS+= -I${.CURDIR} -I${.CURDIR}/${TARGET_CPUARCH}-f NO_SHARED?= yes .endif -DPADD= ${GNURELTOP}/libbfd/libbfd.a -DPADD+= ${GNURELTOP}/libiberty/libiberty.a -DPADD+= ${GNURELTOP}/libopcodes/libopcodes.a +DPADD= ${GNURELTOP}/libbfd/libbfd${PIE_SUFFIX}.a +DPADD+= ${GNURELTOP}/libiberty/libiberty${PIE_SUFFIX}.a +DPADD+= ${GNURELTOP}/libopcodes/libopcodes${PIE_SUFFIX}.a LDADD= ${DPADD} .include Modified: head/gnu/usr.bin/binutils/ld/Makefile ============================================================================== --- head/gnu/usr.bin/binutils/ld/Makefile Mon Mar 25 01:06:29 2019 (r345489) +++ head/gnu/usr.bin/binutils/ld/Makefile Mon Mar 25 01:18:26 2019 (r345490) @@ -51,8 +51,8 @@ CFLAGS+= -I${SRCDIR}/ld -I${SRCDIR}/bfd .if ${MK_SHARED_TOOLCHAIN} == "no" NO_SHARED?= yes .endif -DPADD= ${GNURELTOP}/libbfd/libbfd.a -DPADD+= ${GNURELTOP}/libiberty/libiberty.a +DPADD= ${GNURELTOP}/libbfd/libbfd${PIE_SUFFIX}.a +DPADD+= ${GNURELTOP}/libiberty/libiberty${PIE_SUFFIX}.a LDADD= ${DPADD} CLEANDIRS+= ldscripts CLEANFILES+= ldemul-list.h stringify.sed Modified: head/gnu/usr.bin/binutils/objcopy/Makefile ============================================================================== --- head/gnu/usr.bin/binutils/objcopy/Makefile Mon Mar 25 01:06:29 2019 (r345489) +++ head/gnu/usr.bin/binutils/objcopy/Makefile Mon Mar 25 01:18:26 2019 (r345490) @@ -9,9 +9,9 @@ SRCS= objcopy.c not-strip.c CFLAGS+= -D_GNU_SOURCE CFLAGS+= -I${.CURDIR}/${GNURELTOP}/libbinutils CFLAGS+= -I${SRCDIR}/binutils -I${SRCDIR}/bfd -DPADD= ${GNURELTOP}/libbinutils/libbinutils.a -DPADD+= ${GNURELTOP}/libbfd/libbfd.a -DPADD+= ${GNURELTOP}/libiberty/libiberty.a +DPADD= ${GNURELTOP}/libbinutils/libbinutils${PIE_SUFFIX}.a +DPADD+= ${GNURELTOP}/libbfd/libbfd${PIE_SUFFIX}.a +DPADD+= ${GNURELTOP}/libiberty/libiberty${PIE_SUFFIX}.a LDADD= ${DPADD} .include From owner-svn-src-all@freebsd.org Mon Mar 25 07:46:22 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E1335155539A; Mon, 25 Mar 2019 07:46:21 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 866C784C5D; Mon, 25 Mar 2019 07:46:21 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 44F704C8D; Mon, 25 Mar 2019 07:46:21 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2P7kLgh019792; Mon, 25 Mar 2019 07:46:21 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2P7kKUu019786; Mon, 25 Mar 2019 07:46:20 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201903250746.x2P7kKUu019786@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Mon, 25 Mar 2019 07:46:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345491 - in head/sys: conf fs/tmpfs modules/tmpfs X-SVN-Group: head X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: in head/sys: conf fs/tmpfs modules/tmpfs X-SVN-Commit-Revision: 345491 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 866C784C5D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.965,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Mar 2019 07:46:22 -0000 Author: allanjude Date: Mon Mar 25 07:46:20 2019 New Revision: 345491 URL: https://svnweb.freebsd.org/changeset/base/345491 Log: Make TMPFS_PAGES_MINRESERVED a kernel option TMPFS_PAGES_MINRESERVED controls how much memory is reserved for the system and not used by tmpfs. On very small memory systems, the default value may be too high and this prevents these small memory systems from using reroot, which is required for them to install firmware updates. Submitted by: Hiroki Mori Reviewed by: mizhka Differential Revision: https://reviews.freebsd.org/D13583 Modified: head/sys/conf/options head/sys/fs/tmpfs/tmpfs.h head/sys/fs/tmpfs/tmpfs_vfsops.c head/sys/modules/tmpfs/Makefile Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Mon Mar 25 01:18:26 2019 (r345490) +++ head/sys/conf/options Mon Mar 25 07:46:20 2019 (r345491) @@ -640,6 +640,9 @@ NFS_MINDIRATTRTIMO opt_nfs.h NFS_MAXDIRATTRTIMO opt_nfs.h NFS_DEBUG opt_nfs.h +# TMPFS options +TMPFS_PAGES_MINRESERVED opt_tmpfs.h + # For the Bt848/Bt848A/Bt849/Bt878/Bt879 driver OVERRIDE_CARD opt_bktr.h OVERRIDE_TUNER opt_bktr.h Modified: head/sys/fs/tmpfs/tmpfs.h ============================================================================== --- head/sys/fs/tmpfs/tmpfs.h Mon Mar 25 01:18:26 2019 (r345490) +++ head/sys/fs/tmpfs/tmpfs.h Mon Mar 25 07:46:20 2019 (r345491) @@ -487,7 +487,9 @@ struct tmpfs_dirent *tmpfs_dir_next(struct tmpfs_node * Amount of memory pages to reserve for the system (e.g., to not use by * tmpfs). */ +#if !defined(TMPFS_PAGES_MINRESERVED) #define TMPFS_PAGES_MINRESERVED (4 * 1024 * 1024 / PAGE_SIZE) +#endif size_t tmpfs_mem_avail(void); Modified: head/sys/fs/tmpfs/tmpfs_vfsops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vfsops.c Mon Mar 25 01:18:26 2019 (r345490) +++ head/sys/fs/tmpfs/tmpfs_vfsops.c Mon Mar 25 07:46:20 2019 (r345491) @@ -42,6 +42,9 @@ * memory-specific data structures and algorithms to automatically * allocate and release resources. */ + +#include "opt_tmpfs.h" + #include __FBSDID("$FreeBSD$"); Modified: head/sys/modules/tmpfs/Makefile ============================================================================== --- head/sys/modules/tmpfs/Makefile Mon Mar 25 01:18:26 2019 (r345490) +++ head/sys/modules/tmpfs/Makefile Mon Mar 25 07:46:20 2019 (r345491) @@ -4,6 +4,6 @@ KMOD= tmpfs SRCS= vnode_if.h \ - tmpfs_vnops.c tmpfs_fifoops.c tmpfs_vfsops.c tmpfs_subr.c + tmpfs_vnops.c tmpfs_fifoops.c tmpfs_vfsops.c tmpfs_subr.c opt_tmpfs.h .include From owner-svn-src-all@freebsd.org Mon Mar 25 07:48:53 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A749155552F; Mon, 25 Mar 2019 07:48:53 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3064484EFC; Mon, 25 Mar 2019 07:48:53 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 054024C9B; Mon, 25 Mar 2019 07:48:53 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2P7mqDq020125; Mon, 25 Mar 2019 07:48:52 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2P7mqKZ020124; Mon, 25 Mar 2019 07:48:52 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201903250748.x2P7mqKZ020124@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Mon, 25 Mar 2019 07:48:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345492 - head/sys/mips/atheros X-SVN-Group: head X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: head/sys/mips/atheros X-SVN-Commit-Revision: 345492 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3064484EFC X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Mar 2019 07:48:53 -0000 Author: allanjude Date: Mon Mar 25 07:48:52 2019 New Revision: 345492 URL: https://svnweb.freebsd.org/changeset/base/345492 Log: The Atheros AR7241 has 20 GPIO pins AR724X_GPIO_PINS used for this family is defined as 18 The datasheet for the AR7241 describes 20 pins, allow all to be used. Submitted by: Hiroki Mori Reviewed by: mizhka Differential Revision: https://reviews.freebsd.org/D17580 Modified: head/sys/mips/atheros/ar71xx_gpio.c head/sys/mips/atheros/ar71xx_gpiovar.h Modified: head/sys/mips/atheros/ar71xx_gpio.c ============================================================================== --- head/sys/mips/atheros/ar71xx_gpio.c Mon Mar 25 07:46:20 2019 (r345491) +++ head/sys/mips/atheros/ar71xx_gpio.c Mon Mar 25 07:48:52 2019 (r345492) @@ -226,9 +226,11 @@ ar71xx_gpio_pin_max(device_t dev, int *maxpin) *maxpin = AR91XX_GPIO_PINS - 1; break; case AR71XX_SOC_AR7240: - case AR71XX_SOC_AR7241: case AR71XX_SOC_AR7242: *maxpin = AR724X_GPIO_PINS - 1; + break; + case AR71XX_SOC_AR7241: + *maxpin = AR7241_GPIO_PINS - 1; break; case AR71XX_SOC_AR9330: case AR71XX_SOC_AR9331: Modified: head/sys/mips/atheros/ar71xx_gpiovar.h ============================================================================== --- head/sys/mips/atheros/ar71xx_gpiovar.h Mon Mar 25 07:46:20 2019 (r345491) +++ head/sys/mips/atheros/ar71xx_gpiovar.h Mon Mar 25 07:48:52 2019 (r345492) @@ -55,6 +55,7 @@ #define AR71XX_GPIO_PINS 12 #define AR724X_GPIO_PINS 18 +#define AR7241_GPIO_PINS 20 #define AR91XX_GPIO_PINS 22 struct ar71xx_gpio_softc { From owner-svn-src-all@freebsd.org Mon Mar 25 09:10:08 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8514115580FF; Mon, 25 Mar 2019 09:10:08 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 28C6C87BCB; Mon, 25 Mar 2019 09:10:08 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 025855A5B; Mon, 25 Mar 2019 09:10:08 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2P9A7nW063717; Mon, 25 Mar 2019 09:10:07 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2P9A7Hr063716; Mon, 25 Mar 2019 09:10:07 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201903250910.x2P9A7Hr063716@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Mon, 25 Mar 2019 09:10:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345493 - head/sys/dev/usb/wlan X-SVN-Group: head X-SVN-Commit-Author: avos X-SVN-Commit-Paths: head/sys/dev/usb/wlan X-SVN-Commit-Revision: 345493 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 28C6C87BCB X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.982,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Mar 2019 09:10:08 -0000 Author: avos Date: Mon Mar 25 09:10:07 2019 New Revision: 345493 URL: https://svnweb.freebsd.org/changeset/base/345493 Log: run(4): merge some common TSF-related code into run_disable_tsf() No functional change intended. MFC after: 5 days Modified: head/sys/dev/usb/wlan/if_run.c Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Mon Mar 25 07:48:52 2019 (r345492) +++ head/sys/dev/usb/wlan/if_run.c Mon Mar 25 09:10:07 2019 (r345493) @@ -464,6 +464,7 @@ static void run_usb_timeout_cb(void *); static void run_reset_livelock(struct run_softc *); static void run_enable_tsf_sync(struct run_softc *); static void run_enable_tsf(struct run_softc *); +static void run_disable_tsf(struct run_softc *); static void run_get_tsf(struct run_softc *, uint64_t *); static void run_enable_mrr(struct run_softc *); static void run_set_txpreamble(struct run_softc *); @@ -2090,7 +2091,6 @@ run_newstate(struct ieee80211vap *vap, enum ieee80211_ struct run_vap *rvp = RUN_VAP(vap); enum ieee80211_state ostate; uint32_t sta[3]; - uint32_t tmp; uint8_t ratectl; uint8_t restart_ratectl = 0; uint8_t bid = 1 << rvp->rvp_id; @@ -2123,12 +2123,8 @@ run_newstate(struct ieee80211vap *vap, enum ieee80211_ sc->runbmap &= ~bid; /* abort TSF synchronization if there is no vap running */ - if (--sc->running == 0) { - run_read(sc, RT2860_BCN_TIME_CFG, &tmp); - run_write(sc, RT2860_BCN_TIME_CFG, - tmp & ~(RT2860_BCN_TX_EN | RT2860_TSF_TIMER_EN | - RT2860_TBTT_TIMER_EN)); - } + if (--sc->running == 0) + run_disable_tsf(sc); break; case IEEE80211_S_RUN: @@ -4863,15 +4859,11 @@ static void run_scan_start(struct ieee80211com *ic) { struct run_softc *sc = ic->ic_softc; - uint32_t tmp; RUN_LOCK(sc); /* abort TSF synchronization */ - run_read(sc, RT2860_BCN_TIME_CFG, &tmp); - run_write(sc, RT2860_BCN_TIME_CFG, - tmp & ~(RT2860_BCN_TX_EN | RT2860_TSF_TIMER_EN | - RT2860_TBTT_TIMER_EN)); + run_disable_tsf(sc); run_set_bssid(sc, ieee80211broadcastaddr); RUN_UNLOCK(sc); @@ -5158,6 +5150,18 @@ run_enable_tsf(struct run_softc *sc) } static void +run_disable_tsf(struct run_softc *sc) +{ + uint32_t tmp; + + if (run_read(sc, RT2860_BCN_TIME_CFG, &tmp) == 0) { + tmp &= ~(RT2860_BCN_TX_EN | RT2860_TSF_TIMER_EN | + RT2860_TBTT_TIMER_EN); + run_write(sc, RT2860_BCN_TIME_CFG, tmp); + } +} + +static void run_get_tsf(struct run_softc *sc, uint64_t *buf) { run_read_region_1(sc, RT2860_TSF_TIMER_DW0, (uint8_t *)buf, @@ -6108,10 +6112,7 @@ run_init_locked(struct run_softc *sc) } /* abort TSF synchronization */ - run_read(sc, RT2860_BCN_TIME_CFG, &tmp); - tmp &= ~(RT2860_BCN_TX_EN | RT2860_TSF_TIMER_EN | - RT2860_TBTT_TIMER_EN); - run_write(sc, RT2860_BCN_TIME_CFG, tmp); + run_disable_tsf(sc); /* clear RX WCID search table */ run_set_region_4(sc, RT2860_WCID_ENTRY(0), 0, 512); From owner-svn-src-all@freebsd.org Mon Mar 25 09:47:23 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 614AA155915E; Mon, 25 Mar 2019 09:47:23 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F26F489300; Mon, 25 Mar 2019 09:47:22 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BD2A86139; Mon, 25 Mar 2019 09:47:22 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2P9lMre088294; Mon, 25 Mar 2019 09:47:22 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2P9lMEV088293; Mon, 25 Mar 2019 09:47:22 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201903250947.x2P9lMEV088293@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 25 Mar 2019 09:47:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345494 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 345494 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: F26F489300 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Mar 2019 09:47:23 -0000 Author: tuexen Date: Mon Mar 25 09:47:22 2019 New Revision: 345494 URL: https://svnweb.freebsd.org/changeset/base/345494 Log: Fix the handling of fragmented unordered messages when using DATA chunks and FORWARD-TSN. This bug was reported in https://github.com/sctplab/usrsctp/issues/286 for the userland stack. This is joint work with rrs@. MFC after: 1 week Modified: head/sys/netinet/sctp_indata.c Modified: head/sys/netinet/sctp_indata.c ============================================================================== --- head/sys/netinet/sctp_indata.c Mon Mar 25 09:10:07 2019 (r345493) +++ head/sys/netinet/sctp_indata.c Mon Mar 25 09:47:22 2019 (r345494) @@ -947,6 +947,15 @@ sctp_inject_old_unordered_data(struct sctp_tcb *stcb, SCTPDBG(SCTP_DEBUG_XXX, "chunk is a first fsn: %u becomes fsn_included\n", chk->rec.data.fsn); + at = TAILQ_FIRST(&control->reasm); + if (at && SCTP_TSN_GT(chk->rec.data.fsn, at->rec.data.fsn)) { + /* + * The first chunk in the reassembly is a smaller + * TSN than this one, even though this has a first, + * it must be from a subsequent msg. + */ + goto place_chunk; + } if (control->first_frag_seen) { /* * In old un-ordered we can reassembly on one From owner-svn-src-all@freebsd.org Mon Mar 25 11:39:53 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 26241155D34F; Mon, 25 Mar 2019 11:39:53 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BBCD98DE65; Mon, 25 Mar 2019 11:39:52 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7736D73DE; Mon, 25 Mar 2019 11:39:52 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2PBdqKZ058144; Mon, 25 Mar 2019 11:39:52 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2PBdnp5058125; Mon, 25 Mar 2019 11:39:49 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201903251139.x2PBdnp5058125@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Mon, 25 Mar 2019 11:39:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r345495 - in vendor/libarchive/dist: . build/ci libarchive libarchive/test X-SVN-Group: vendor X-SVN-Commit-Author: mm X-SVN-Commit-Paths: in vendor/libarchive/dist: . build/ci libarchive libarchive/test X-SVN-Commit-Revision: 345495 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BBCD98DE65 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.982,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Mar 2019 11:39:53 -0000 Author: mm Date: Mon Mar 25 11:39:49 2019 New Revision: 345495 URL: https://svnweb.freebsd.org/changeset/base/345495 Log: Update vendor/libarchive/dist to git 3c079320b23ddf5ef38c443569c25898ad79ddb9 Relevant vendor changes: PR #1153: fixed 2 bugs in ZIP reader PR #1143: ensure archive_read_disk_entry_from_file() uses ARCHIVE_READ_DISK Changes to file flags code, support more file flags on FreeBSD: UF_OFFLINE, UF_READONLY, UF_SPARSE, UF_REPARSE, UF_SYSTEM UF_ARCHIVE is not supported by intention (yet) Added: vendor/libarchive/dist/.travis.yml vendor/libarchive/dist/build/ci/travis_ci.sh (contents, props changed) vendor/libarchive/dist/libarchive/test/test_read_format_zip_bz2_hang.zip.uu vendor/libarchive/dist/libarchive/test/test_read_format_zip_ppmd8_crash_1.zipx.uu vendor/libarchive/dist/libarchive/test/test_read_format_zip_ppmd8_crash_2.zipx.uu Modified: vendor/libarchive/dist/CMakeLists.txt vendor/libarchive/dist/Makefile.am vendor/libarchive/dist/libarchive/CMakeLists.txt vendor/libarchive/dist/libarchive/archive_blake2sp_ref.c vendor/libarchive/dist/libarchive/archive_entry.c vendor/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c vendor/libarchive/dist/libarchive/archive_read_support_format_rar5.c vendor/libarchive/dist/libarchive/archive_read_support_format_zip.c vendor/libarchive/dist/libarchive/archive_string.c vendor/libarchive/dist/libarchive/archive_write_disk_posix.c vendor/libarchive/dist/libarchive/archive_write_disk_windows.c vendor/libarchive/dist/libarchive/archive_write_set_format_7zip.c vendor/libarchive/dist/libarchive/test/test_entry.c vendor/libarchive/dist/libarchive/test/test_read_format_rar5.c vendor/libarchive/dist/libarchive/test/test_read_format_xar.c vendor/libarchive/dist/libarchive/test/test_read_format_zip.c Added: vendor/libarchive/dist/.travis.yml ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libarchive/dist/.travis.yml Mon Mar 25 11:39:49 2019 (r345495) @@ -0,0 +1,9 @@ +language: C +matrix: + include: + - os: windows + env: BS=msbuild + - os: windows + env: BS=mingw +script: + - build/ci/travis_ci.sh Modified: vendor/libarchive/dist/CMakeLists.txt ============================================================================== --- vendor/libarchive/dist/CMakeLists.txt Mon Mar 25 09:47:22 2019 (r345494) +++ vendor/libarchive/dist/CMakeLists.txt Mon Mar 25 11:39:49 2019 (r345495) @@ -1,5 +1,8 @@ # CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12 FATAL_ERROR) +if(POLICY CMP0074) + cmake_policy(SET CMP0074 NEW) #3.12.0 `find_package()`` uses ``_ROOT`` variables. +endif() # PROJECT(libarchive C) # @@ -84,6 +87,11 @@ SET(CMAKE_REQUIRED_DEFINITIONS) SET(CMAKE_REQUIRED_INCLUDES) SET(CMAKE_REQUIRED_LIBRARIES) SET(CMAKE_REQUIRED_FLAGS) +if (CMAKE_BUILD_TYPE STREQUAL "Debug") + OPTION(ENABLE_WERROR "Treat warnings as errors - default is ON for Debug, OFF otherwise." ON) +else () + OPTION(ENABLE_WERROR "Treat warnings as errors - default is ON for Debug, OFF otherwise." OFF) +endif () # Especially for early development, we want to be a little # aggressive about diagnosing build problems; this can get @@ -93,10 +101,12 @@ IF (CMAKE_C_COMPILER_ID MATCHES "^GNU$") ################################################################# # Set compile flags for all build types. SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wformat -Wformat-security") + if (ENABLE_WERROR) + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") + endif () ################################################################# # Set compile flags for debug build. # This is added into CMAKE_C_FLAGS when CMAKE_BUILD_TYPE is "Debug" - SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Werror") SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wextra") SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wunused") SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wshadow") @@ -108,11 +118,13 @@ IF (CMAKE_C_COMPILER_ID MATCHES "^Clang$") ################################################################# # Set compile flags for all build types. SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wformat -Wformat-security") + if (ENABLE_WERROR) + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") + endif () ################################################################# # Set compile flags for debug build. # This is added into CMAKE_C_FLAGS when CMAKE_BUILD_TYPE is "Debug" SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g") - SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Werror") SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wextra") SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wunused") SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wshadow") @@ -125,15 +137,21 @@ IF (CMAKE_C_COMPILER_ID MATCHES "^XL$") ################################################################# # Set compile flags for all build types. SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -qflag=e:e -qformat=sec") + if (ENABLE_WERROR) + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -qhalt=w") + endif () ################################################################# # Set compile flags for debug build. # This is added into CMAKE_C_FLAGS when CMAKE_BUILD_TYPE is "Debug" SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g") - SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -qhalt=w") SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -qflag=w:w") SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -qinfo=pro:use") ENDIF(CMAKE_C_COMPILER_ID MATCHES "^XL$") IF (MSVC) + if (ENABLE_WERROR) + # /WX option is the same as gcc's -Werror option. + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX") + endif () ################################################################# # Set compile flags for debug build. # This is added into CMAKE_C_FLAGS when CMAKE_BUILD_TYPE is "Debug" @@ -165,8 +183,6 @@ IF (MSVC) # Enable level 4 C4706: The test value in a conditional expression was the # result of an assignment. SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4706") - # /WX option is the same as gcc's -Werror option. - SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /WX") # /Oi option enables built-in functions. SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /Oi") ################################################################# Modified: vendor/libarchive/dist/Makefile.am ============================================================================== --- vendor/libarchive/dist/Makefile.am Mon Mar 25 09:47:22 2019 (r345494) +++ vendor/libarchive/dist/Makefile.am Mon Mar 25 11:39:49 2019 (r345495) @@ -256,6 +256,8 @@ endif if INC_BLAKE2 libarchive_la_SOURCES+= \ + libarchive/archive_blake2.h \ + libarchive/archive_blake2_impl.h \ libarchive/archive_blake2s_ref.c \ libarchive/archive_blake2sp_ref.c endif Added: vendor/libarchive/dist/build/ci/travis_ci.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libarchive/dist/build/ci/travis_ci.sh Mon Mar 25 11:39:49 2019 (r345495) @@ -0,0 +1,32 @@ +#!/bin/sh +set -e +UNAME=`uname` +CURDIR=`pwd` +SRCDIR="${SRCDIR:-`pwd`}" +if [ -z "${BUILDDIR}" ]; then + BUILDDIR="${CURDIR}/build_ci/${BS}" +fi +mkdir -p "${BUILDDIR}" +cd "${BUILDDIR}" +case "$UNAME" in + MSYS*) + if [ "${BS}" = "msbuild" ]; then + set -x + cmake -G "Visual Studio 15 2017" -D CMAKE_BUILD_TYPE="Release" "${SRCDIR}" + cmake --build . --target ALL_BUILD + # Until fixed, we don't run tests on Windows (lots of fails + timeout) + #cmake --build . --target RUN_TESTS + set +x + elif [ "${BS}" = "mingw" ]; then + set -x + cmake -G "MSYS Makefiles" -D CMAKE_C_COMPILER="${CC}" -D CMAKE_MAKE_PROGRAM="mingw32-make" -D CMAKE_BUILD_TYPE="Release" "${SRCDIR}" + mingw32-make + # The MinGW tests time out on Travis CI, disable for now + #mingw32-make test + set +x + else + echo "Unknown or unspecified build type: ${BS}" + exit 1 + fi + ;; +esac Modified: vendor/libarchive/dist/libarchive/CMakeLists.txt ============================================================================== --- vendor/libarchive/dist/libarchive/CMakeLists.txt Mon Mar 25 09:47:22 2019 (r345494) +++ vendor/libarchive/dist/libarchive/CMakeLists.txt Mon Mar 25 11:39:49 2019 (r345495) @@ -235,6 +235,7 @@ ENDIF() # Libarchive is a shared library ADD_LIBRARY(archive SHARED ${libarchive_SOURCES} ${include_HEADERS}) +TARGET_INCLUDE_DIRECTORIES(archive PUBLIC .) TARGET_LINK_LIBRARIES(archive ${ADDITIONAL_LIBS}) SET_TARGET_PROPERTIES(archive PROPERTIES SOVERSION ${SOVERSION}) Modified: vendor/libarchive/dist/libarchive/archive_blake2sp_ref.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_blake2sp_ref.c Mon Mar 25 09:47:22 2019 (r345494) +++ vendor/libarchive/dist/libarchive/archive_blake2sp_ref.c Mon Mar 25 11:39:49 2019 (r345495) @@ -89,7 +89,7 @@ int blake2sp_init( blake2sp_state *S, size_t outlen ) return -1; for( i = 0; i < PARALLELISM_DEGREE; ++i ) - if( blake2sp_init_leaf( S->S[i], outlen, 0, i ) < 0 ) return -1; + if( blake2sp_init_leaf( S->S[i], outlen, 0, (uint32_t)i ) < 0 ) return -1; S->R->last_node = 1; S->S[PARALLELISM_DEGREE - 1]->last_node = 1; @@ -112,7 +112,7 @@ int blake2sp_init_key( blake2sp_state *S, size_t outle return -1; for( i = 0; i < PARALLELISM_DEGREE; ++i ) - if( blake2sp_init_leaf( S->S[i], outlen, keylen, i ) < 0 ) return -1; + if( blake2sp_init_leaf( S->S[i], outlen, keylen, (uint32_t)i ) < 0 ) return -1; S->R->last_node = 1; S->S[PARALLELISM_DEGREE - 1]->last_node = 1; @@ -230,7 +230,7 @@ int blake2sp( void *out, size_t outlen, const void *in if( keylen > BLAKE2S_KEYBYTES ) return -1; for( i = 0; i < PARALLELISM_DEGREE; ++i ) - if( blake2sp_init_leaf( S[i], outlen, keylen, i ) < 0 ) return -1; + if( blake2sp_init_leaf( S[i], outlen, keylen, (uint32_t)i ) < 0 ) return -1; S[PARALLELISM_DEGREE - 1]->last_node = 1; /* mark last node */ Modified: vendor/libarchive/dist/libarchive/archive_entry.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_entry.c Mon Mar 25 09:47:22 2019 (r345494) +++ vendor/libarchive/dist/libarchive/archive_entry.c Mon Mar 25 11:39:49 2019 (r345495) @@ -1632,6 +1632,51 @@ _archive_entry_acl_text_l(struct archive_entry *entry, * SUCH DAMAGE. */ +/* + * Supported file flags on FreeBSD and Mac OS: + * sappnd,sappend SF_APPEND + * arch,archived SF_ARCHIVED + * schg,schange,simmutable SF_IMMUTABLE + * sunlnk,sunlink SF_NOUNLINK (FreeBSD only) + * uappnd,uappend UF_APPEND + * compressed UF_COMPRESSED (Mac OS only) + * hidden,uhidden UF_HIDDEN + * uchg,uchange,uimmutable UF_IMMUTABLE + * nodump UF_NODUMP + * uunlnk,uunlink UF_NOUNLINK (FreeBSD only) + * offline,uoffline UF_OFFLINE (FreeBSD only) + * opaque UF_OPAQUE + * rdonly,urdonly,readonly UF_READONLY (FreeBSD only) + * reparse,ureparse UF_REPARSE (FreeBSD only) + * sparse,usparse UF_SPARSE (FreeBSD only) + * system,usystem UF_SYSTEM (FreeBSD only) + * + * See chflags(2) for more information + * + * Supported file attributes on Linux: + * a append only FS_APPEND_FL sappnd + * A no atime updates FS_NOATIME_FL atime + * c compress FS_COMPR_FL compress + * C no copy on write FS_NOCOW_FL cow + * d no dump FS_NODUMP_FL dump + * D synchronous directory updates FS_DIRSYNC_FL dirsync + * i immutable FS_IMMUTABLE_FL schg + * j data journalling FS_JOURNAL_DATA_FL journal + * P project hierarchy FS_PROJINHERIT_FL projinherit + * s secure deletion FS_SECRM_FL securedeletion + * S synchronous updates FS_SYNC_FL sync + * t no tail-merging FS_NOTAIL_FL tail + * T top of directory hierarchy FS_TOPDIR_FL topdir + * u undeletable FS_UNRM_FL undel + * + * See ioctl_iflags(2) for more information + * + * Equivalent file flags supported on FreeBSD / Mac OS and Linux: + * SF_APPEND FS_APPEND_FL sappnd + * SF_IMMUTABLE FS_IMMUTABLE_FL schg + * UF_NODUMP FS_NODUMP_FL nodump + */ + static const struct flag { const char *name; const wchar_t *wname; @@ -1640,190 +1685,149 @@ static const struct flag { } flags[] = { /* Preferred (shorter) names per flag first, all prefixed by "no" */ #ifdef SF_APPEND - { "nosappnd", L"nosappnd", SF_APPEND, 0 }, - { "nosappend", L"nosappend", SF_APPEND, 0 }, + { "nosappnd", L"nosappnd", SF_APPEND, 0}, + { "nosappend", L"nosappend", SF_APPEND, 0}, #endif #if defined(FS_APPEND_FL) /* 'a' */ - { "nosappnd", L"nosappnd", FS_APPEND_FL, 0 }, - { "nosappend", L"nosappend", FS_APPEND_FL, 0 }, + { "nosappnd", L"nosappnd", FS_APPEND_FL, 0}, + { "nosappend", L"nosappend", FS_APPEND_FL, 0}, #elif defined(EXT2_APPEND_FL) /* 'a' */ - { "nosappnd", L"nosappnd", EXT2_APPEND_FL, 0 }, - { "nosappend", L"nosappend", EXT2_APPEND_FL, 0 }, + { "nosappnd", L"nosappnd", EXT2_APPEND_FL, 0}, + { "nosappend", L"nosappend", EXT2_APPEND_FL, 0}, #endif #ifdef SF_ARCHIVED - { "noarch", L"noarch", SF_ARCHIVED, 0 }, - { "noarchived", L"noarchived", SF_ARCHIVED, 0 }, + { "noarch", L"noarch", SF_ARCHIVED, 0}, + { "noarchived", L"noarchived", SF_ARCHIVED, 0}, #endif #ifdef SF_IMMUTABLE - { "noschg", L"noschg", SF_IMMUTABLE, 0 }, - { "noschange", L"noschange", SF_IMMUTABLE, 0 }, - { "nosimmutable", L"nosimmutable", SF_IMMUTABLE, 0 }, + { "noschg", L"noschg", SF_IMMUTABLE, 0}, + { "noschange", L"noschange", SF_IMMUTABLE, 0}, + { "nosimmutable", L"nosimmutable", SF_IMMUTABLE, 0}, #endif #if defined(FS_IMMUTABLE_FL) /* 'i' */ - { "noschg", L"noschg", FS_IMMUTABLE_FL, 0 }, - { "noschange", L"noschange", FS_IMMUTABLE_FL, 0 }, - { "nosimmutable", L"nosimmutable", FS_IMMUTABLE_FL, 0 }, + { "noschg", L"noschg", FS_IMMUTABLE_FL, 0}, + { "noschange", L"noschange", FS_IMMUTABLE_FL, 0}, + { "nosimmutable", L"nosimmutable", FS_IMMUTABLE_FL, 0}, #elif defined(EXT2_IMMUTABLE_FL) /* 'i' */ - { "noschg", L"noschg", EXT2_IMMUTABLE_FL, 0 }, - { "noschange", L"noschange", EXT2_IMMUTABLE_FL, 0 }, - { "nosimmutable", L"nosimmutable", EXT2_IMMUTABLE_FL, 0 }, + { "noschg", L"noschg", EXT2_IMMUTABLE_FL, 0}, + { "noschange", L"noschange", EXT2_IMMUTABLE_FL, 0}, + { "nosimmutable", L"nosimmutable", EXT2_IMMUTABLE_FL, 0}, #endif #ifdef SF_NOUNLINK - { "nosunlnk", L"nosunlnk", SF_NOUNLINK, 0 }, - { "nosunlink", L"nosunlink", SF_NOUNLINK, 0 }, + { "nosunlnk", L"nosunlnk", SF_NOUNLINK, 0}, + { "nosunlink", L"nosunlink", SF_NOUNLINK, 0}, #endif -#ifdef SF_SNAPSHOT - { "nosnapshot", L"nosnapshot", SF_SNAPSHOT, 0 }, -#endif #ifdef UF_APPEND - { "nouappnd", L"nouappnd", UF_APPEND, 0 }, - { "nouappend", L"nouappend", UF_APPEND, 0 }, + { "nouappnd", L"nouappnd", UF_APPEND, 0}, + { "nouappend", L"nouappend", UF_APPEND, 0}, #endif #ifdef UF_IMMUTABLE - { "nouchg", L"nouchg", UF_IMMUTABLE, 0 }, - { "nouchange", L"nouchange", UF_IMMUTABLE, 0 }, - { "nouimmutable", L"nouimmutable", UF_IMMUTABLE, 0 }, + { "nouchg", L"nouchg", UF_IMMUTABLE, 0}, + { "nouchange", L"nouchange", UF_IMMUTABLE, 0}, + { "nouimmutable", L"nouimmutable", UF_IMMUTABLE, 0}, #endif #ifdef UF_NODUMP { "nodump", L"nodump", 0, UF_NODUMP}, #endif #if defined(FS_NODUMP_FL) /* 'd' */ { "nodump", L"nodump", 0, FS_NODUMP_FL}, -#elif defined(EXT2_NODUMP_FL) /* 'd' */ +#elif defined(EXT2_NODUMP_FL) { "nodump", L"nodump", 0, EXT2_NODUMP_FL}, #endif #ifdef UF_OPAQUE - { "noopaque", L"noopaque", UF_OPAQUE, 0 }, + { "noopaque", L"noopaque", UF_OPAQUE, 0}, #endif #ifdef UF_NOUNLINK - { "nouunlnk", L"nouunlnk", UF_NOUNLINK, 0 }, - { "nouunlink", L"nouunlink", UF_NOUNLINK, 0 }, + { "nouunlnk", L"nouunlnk", UF_NOUNLINK, 0}, + { "nouunlink", L"nouunlink", UF_NOUNLINK, 0}, #endif #ifdef UF_COMPRESSED - { "nocompressed",L"nocompressed", UF_COMPRESSED, 0 }, + /* Mac OS */ + { "nocompressed", L"nocompressed", UF_COMPRESSED, 0}, #endif #ifdef UF_HIDDEN - { "nohidden", L"nohidden", UF_HIDDEN, 0 }, + { "nohidden", L"nohidden", UF_HIDDEN, 0}, + { "nouhidden", L"nouhidden", UF_HIDDEN, 0}, #endif -#if defined(FS_UNRM_FL) - { "nouunlink", L"nouunlink", FS_UNRM_FL, 0}, -#elif defined(EXT2_UNRM_FL) - { "nouunlink", L"nouunlink", EXT2_UNRM_FL, 0}, +#ifdef UF_OFFLINE + { "nooffline", L"nooffline", UF_OFFLINE, 0}, + { "nouoffline", L"nouoffline", UF_OFFLINE, 0}, #endif - -#if defined(FS_BTREE_FL) - { "nobtree", L"nobtree", FS_BTREE_FL, 0 }, -#elif defined(EXT2_BTREE_FL) - { "nobtree", L"nobtree", EXT2_BTREE_FL, 0 }, +#ifdef UF_READONLY + { "nordonly", L"nordonly", UF_READONLY, 0}, + { "nourdonly", L"nourdonly", UF_READONLY, 0}, + { "noreadonly", L"noreadonly", UF_READONLY, 0}, #endif - -#if defined(FS_ECOMPR_FL) - { "nocomperr", L"nocomperr", FS_ECOMPR_FL, 0 }, -#elif defined(EXT2_ECOMPR_FL) - { "nocomperr", L"nocomperr", EXT2_ECOMPR_FL, 0 }, +#ifdef UF_SPARSE + { "nosparse", L"nosparse", UF_SPARSE, 0}, + { "nousparse", L"nousparse", UF_SPARSE, 0}, #endif - -#if defined(FS_COMPR_FL) /* 'c' */ - { "nocompress", L"nocompress", FS_COMPR_FL, 0 }, -#elif defined(EXT2_COMPR_FL) /* 'c' */ - { "nocompress", L"nocompress", EXT2_COMPR_FL, 0 }, +#ifdef UF_REPARSE + { "noreparse", L"noreparse", UF_REPARSE, 0}, + { "noureparse", L"noureparse", UF_REPARSE, 0}, #endif - -#if defined(FS_NOATIME_FL) /* 'A' */ - { "noatime", L"noatime", 0, FS_NOATIME_FL}, -#elif defined(EXT2_NOATIME_FL) /* 'A' */ - { "noatime", L"noatime", 0, EXT2_NOATIME_FL}, +#ifdef UF_SYSTEM + { "nosystem", L"nosystem", UF_SYSTEM, 0}, + { "nousystem", L"nousystem", UF_SYSTEM, 0}, #endif +#if defined(FS_UNRM_FL) /* 'u' */ + { "noundel", L"noundel", FS_UNRM_FL, 0}, +#elif defined(EXT2_UNRM_FL) + { "noundel", L"noundel", EXT2_UNRM_FL, 0}, +#endif -#if defined(FS_DIRTY_FL) - { "nocompdirty",L"nocompdirty", FS_DIRTY_FL, 0}, -#elif defined(EXT2_DIRTY_FL) - { "nocompdirty",L"nocompdirty", EXT2_DIRTY_FL, 0}, +#if defined(FS_COMPR_FL) /* 'c' */ + { "nocompress", L"nocompress", FS_COMPR_FL, 0}, +#elif defined(EXT2_COMPR_FL) + { "nocompress", L"nocompress", EXT2_COMPR_FL, 0}, #endif -#if defined(FS_COMPRBLK_FL) -#if defined(FS_NOCOMPR_FL) - { "nocomprblk", L"nocomprblk", FS_COMPRBLK_FL, FS_NOCOMPR_FL}, -#else - { "nocomprblk", L"nocomprblk", FS_COMPRBLK_FL, 0}, +#if defined(FS_NOATIME_FL) /* 'A' */ + { "noatime", L"noatime", 0, FS_NOATIME_FL}, +#elif defined(EXT2_NOATIME_FL) + { "noatime", L"noatime", 0, EXT2_NOATIME_FL}, #endif -#elif defined(EXT2_COMPRBLK_FL) -#if defined(EXT2_NOCOMPR_FL) - { "nocomprblk", L"nocomprblk", EXT2_COMPRBLK_FL, EXT2_NOCOMPR_FL}, -#else - { "nocomprblk", L"nocomprblk", EXT2_COMPRBLK_FL, 0}, -#endif -#endif -#if defined(FS_DIRSYNC_FL) - { "nodirsync", L"nodirsync", FS_DIRSYNC_FL, 0}, +#if defined(FS_DIRSYNC_FL) /* 'D' */ + { "nodirsync", L"nodirsync", FS_DIRSYNC_FL, 0}, #elif defined(EXT2_DIRSYNC_FL) - { "nodirsync", L"nodirsync", EXT2_DIRSYNC_FL, 0}, + { "nodirsync", L"nodirsync", EXT2_DIRSYNC_FL, 0}, #endif -#if defined(FS_INDEX_FL) - { "nohashidx", L"nohashidx", FS_INDEX_FL, 0}, -#elif defined(EXT2_INDEX_FL) - { "nohashidx", L"nohashidx", EXT2_INDEX_FL, 0}, -#endif -#if defined(FS_IMAGIC_FL) - { "noimagic", L"noimagic", FS_IMAGIC_FL, 0}, -#elif defined(EXT2_IMAGIC_FL) - { "noimagic", L"noimagic", EXT2_IMAGIC_FL, 0}, -#endif -#if defined(FS_JOURNAL_DATA_FL) - { "nojournal", L"nojournal", FS_JOURNAL_DATA_FL, 0}, +#if defined(FS_JOURNAL_DATA_FL) /* 'j' */ + { "nojournal-data",L"nojournal-data", FS_JOURNAL_DATA_FL, 0}, + { "nojournal", L"nojournal", FS_JOURNAL_DATA_FL, 0}, #elif defined(EXT3_JOURNAL_DATA_FL) - { "nojournal", L"nojournal", EXT3_JOURNAL_DATA_FL, 0}, + { "nojournal-data",L"nojournal-data", EXT3_JOURNAL_DATA_FL, 0}, + { "nojournal", L"nojournal", EXT3_JOURNAL_DATA_FL, 0}, #endif -#if defined(FS_SECRM_FL) - { "nosecuredeletion",L"nosecuredeletion",FS_SECRM_FL, 0}, +#if defined(FS_SECRM_FL) /* 's' */ + { "nosecdel", L"nosecdel", FS_SECRM_FL, 0}, + { "nosecuredeletion",L"nosecuredeletion",FS_SECRM_FL, 0}, #elif defined(EXT2_SECRM_FL) - { "nosecuredeletion",L"nosecuredeletion",EXT2_SECRM_FL, 0}, + { "nosecdel", L"nosecdel", EXT2_SECRM_FL, 0}, + { "nosecuredeletion",L"nosecuredeletion",EXT2_SECRM_FL, 0}, #endif -#if defined(FS_SYNC_FL) - { "nosync", L"nosync", FS_SYNC_FL, 0}, +#if defined(FS_SYNC_FL) /* 'S' */ + { "nosync", L"nosync", FS_SYNC_FL, 0}, #elif defined(EXT2_SYNC_FL) - { "nosync", L"nosync", EXT2_SYNC_FL, 0}, + { "nosync", L"nosync", EXT2_SYNC_FL, 0}, #endif -#if defined(FS_NOTAIL_FL) - { "notail", L"notail", 0, FS_NOTAIL_FL}, +#if defined(FS_NOTAIL_FL) /* 't' */ + { "notail", L"notail", 0, FS_NOTAIL_FL}, #elif defined(EXT2_NOTAIL_FL) - { "notail", L"notail", 0, EXT2_NOTAIL_FL}, + { "notail", L"notail", 0, EXT2_NOTAIL_FL}, #endif -#if defined(FS_TOPDIR_FL) - { "notopdir", L"notopdir", FS_TOPDIR_FL, 0}, +#if defined(FS_TOPDIR_FL) /* 'T' */ + { "notopdir", L"notopdir", FS_TOPDIR_FL, 0}, #elif defined(EXT2_TOPDIR_FL) - { "notopdir", L"notopdir", EXT2_TOPDIR_FL, 0}, + { "notopdir", L"notopdir", EXT2_TOPDIR_FL, 0}, #endif -#ifdef FS_ENCRYPT_FL - { "noencrypt", L"noencrypt", FS_ENCRYPT_FL, 0}, +#ifdef FS_NOCOW_FL /* 'C' */ + { "nocow", L"nocow", 0, FS_NOCOW_FL}, #endif -#ifdef FS_HUGE_FILE_FL - { "nohugefile", L"nohugefile", FS_HUGE_FILE_FL, 0}, +#ifdef FS_PROJINHERIT_FL /* 'P' */ + { "noprojinherit",L"noprojinherit", FS_PROJINHERIT_FL, 0}, #endif -#ifdef FS_EXTENT_FL - { "noextent", L"noextent", FS_EXTENT_FL, 0}, -#endif -#ifdef FS_EA_INODE_FL - { "noeainode", L"noeainode", FS_EA_INODE_FL, 0}, -#endif -#ifdef FS_EOFBLOCKS_FL - { "noeofblocks",L"noeofblocks", FS_EOFBLOCKS_FL, 0}, -#endif -#ifdef FS_NOCOW_FL - { "nocow", L"nocow", FS_NOCOW_FL, 0}, -#endif -#ifdef FS_INLINE_DATA_FL - { "noinlinedata",L"noinlinedata", FS_INLINE_DATA_FL, 0}, -#endif -#ifdef FS_PROJINHERIT_FL - { "noprojinherit",L"noprojinherit", FS_PROJINHERIT_FL, 0}, -#endif -#if defined(FS_RESERVED_FL) - { "noreserved", L"noreserved", FS_RESERVED_FL, 0}, -#elif defined(EXT2_RESERVED_FL) - { "noreserved", L"noreserved", EXT2_RESERVED_FL, 0}, -#endif - { NULL, NULL, 0, 0 } + { NULL, NULL, 0, 0} }; /* Modified: vendor/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c Mon Mar 25 09:47:22 2019 (r345494) +++ vendor/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c Mon Mar 25 11:39:49 2019 (r345495) @@ -163,6 +163,9 @@ archive_read_disk_entry_from_file(struct archive *_a, int initial_fd = fd; int r, r1; + archive_check_magic(_a, ARCHIVE_READ_DISK_MAGIC, ARCHIVE_STATE_ANY, + "archive_read_disk_entry_from_file"); + archive_clear_error(_a); path = archive_entry_sourcepath(entry); if (path == NULL) Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_rar5.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_support_format_rar5.c Mon Mar 25 09:47:22 2019 (r345494) +++ vendor/libarchive/dist/libarchive/archive_read_support_format_rar5.c Mon Mar 25 11:39:49 2019 (r345495) @@ -517,15 +517,16 @@ static int run_e8e9_filter(struct rar5* rar, struct fi const uint32_t file_size = 0x1000000; ssize_t i; + const int mask = (int)rar->cstate.window_mask; circular_memcpy(rar->cstate.filtered_buf, rar->cstate.window_buf, - rar->cstate.window_mask, + mask, rar->cstate.solid_offset + flt->block_start, rar->cstate.solid_offset + flt->block_start + flt->block_length); for(i = 0; i < flt->block_length - 4;) { uint8_t b = rar->cstate.window_buf[(rar->cstate.solid_offset + - flt->block_start + i++) & rar->cstate.window_mask]; + flt->block_start + i++) & mask]; /* 0xE8 = x86's call (function call) * 0xE9 = x86's jmp (unconditional jump) */ @@ -534,17 +535,17 @@ static int run_e8e9_filter(struct rar5* rar, struct fi uint32_t addr; uint32_t offset = (i + flt->block_start) % file_size; - addr = read_filter_data(rar, (rar->cstate.solid_offset + + addr = read_filter_data(rar, (uint32_t)(rar->cstate.solid_offset + flt->block_start + i) & rar->cstate.window_mask); if(addr & 0x80000000) { if(((addr + offset) & 0x80000000) == 0) { - write_filter_data(rar, i, addr + file_size); + write_filter_data(rar, (uint32_t)i, addr + file_size); } } else { if((addr - file_size) & 0x80000000) { uint32_t naddr = addr - offset; - write_filter_data(rar, i, naddr); + write_filter_data(rar, (uint32_t)i, naddr); } } @@ -558,11 +559,11 @@ static int run_e8e9_filter(struct rar5* rar, struct fi static int run_arm_filter(struct rar5* rar, struct filter_info* flt) { ssize_t i = 0; uint32_t offset; - const int mask = rar->cstate.window_mask; + const int mask = (int)rar->cstate.window_mask; circular_memcpy(rar->cstate.filtered_buf, rar->cstate.window_buf, - rar->cstate.window_mask, + mask, rar->cstate.solid_offset + flt->block_start, rar->cstate.solid_offset + flt->block_start + flt->block_length); @@ -577,7 +578,7 @@ static int run_arm_filter(struct rar5* rar, struct fil offset -= (uint32_t) ((i + flt->block_start) / 4); offset = (offset & 0x00ffffff) | 0xeb000000; - write_filter_data(rar, i, offset); + write_filter_data(rar, (uint32_t)i, offset); } } @@ -643,7 +644,7 @@ static int run_filter(struct archive_read* a, struct f static void push_data(struct archive_read* a, struct rar5* rar, const uint8_t* buf, int64_t idx_begin, int64_t idx_end) { - const int wmask = rar->cstate.window_mask; + const int wmask = (int)rar->cstate.window_mask; const ssize_t solid_write_ptr = (rar->cstate.solid_offset + rar->cstate.last_write_ptr) & wmask; @@ -1716,8 +1717,8 @@ static int process_base_block(struct archive_read* a, rar->generic.split_after = (header_flags & HFL_SPLIT_AFTER) > 0; rar->generic.split_before = (header_flags & HFL_SPLIT_BEFORE) > 0; - rar->generic.size = hdr_size; - rar->generic.last_header_id = header_id; + rar->generic.size = (int)hdr_size; + rar->generic.last_header_id = (int)header_id; rar->main.endarc = 0; /* Those are possible header ids in RARv5. */ @@ -1933,7 +1934,7 @@ static int create_decode_tables(uint8_t* bit_length, } } - quick_data_size = 1 << table->quick_bits; + quick_data_size = (int64_t)1 << table->quick_bits; cur_len = 1; for(code = 0; code < quick_data_size; code++) { int bit_field = code << (16 - table->quick_bits); @@ -2364,7 +2365,7 @@ static int decode_code_length(struct rar5* rar, const static int copy_string(struct archive_read* a, int len, int dist) { struct rar5* rar = get_context(a); - const int cmask = rar->cstate.window_mask; + const int cmask = (int)rar->cstate.window_mask; const int64_t write_ptr = rar->cstate.write_ptr + rar->cstate.solid_offset; int i; @@ -2390,7 +2391,7 @@ static int do_uncompress_block(struct archive_read* a, uint16_t num; int ret; - const int cmask = rar->cstate.window_mask; + const int cmask = (int)rar->cstate.window_mask; const struct compressed_block_header* hdr = &rar->last_block_hdr; const uint8_t bit_size = 1 + bf_bit_size(hdr); Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_zip.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_support_format_zip.c Mon Mar 25 09:47:22 2019 (r345494) +++ vendor/libarchive/dist/libarchive/archive_read_support_format_zip.c Mon Mar 25 11:39:49 2019 (r345495) @@ -194,6 +194,7 @@ struct zip { ssize_t zipx_ppmd_read_compressed; CPpmd8 ppmd8; char ppmd8_valid; + char ppmd8_stream_failed; struct archive_string_conv *sconv; struct archive_string_conv *sconv_default; @@ -254,9 +255,15 @@ ppmd_read(void* p) { /* Get the handle to current decompression context. */ struct archive_read *a = ((IByteIn*)p)->a; struct zip *zip = (struct zip*) a->format->data; + ssize_t bytes_avail = 0; /* Fetch next byte. */ - const uint8_t* data = __archive_read_ahead(a, 1, NULL); + const uint8_t* data = __archive_read_ahead(a, 1, &bytes_avail); + if(bytes_avail < 1) { + zip->ppmd8_stream_failed = 1; + return 0; + } + __archive_read_consume(a, 1); /* Increment the counter. */ @@ -1750,6 +1757,7 @@ zipx_ppmd8_init(struct archive_read *a, struct zip *zi /* Create a new decompression context. */ __archive_ppmd8_functions.Ppmd8_Construct(&zip->ppmd8); + zip->ppmd8_stream_failed = 0; /* Setup function pointers required by Ppmd8 decompressor. The * 'ppmd_read' function will feed new bytes to the decompressor, @@ -1869,6 +1877,14 @@ zip_read_data_zipx_ppmd(struct archive_read *a, const break; } + /* This field is set by ppmd_read() when there was no more data + * to be read. */ + if(zip->ppmd8_stream_failed) { + archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, + "Truncated PPMd8 file body"); + return (ARCHIVE_FATAL); + } + zip->uncompressed_buffer[consumed_bytes] = (uint8_t) sym; ++consumed_bytes; } while(consumed_bytes < zip->uncompressed_buffer_size); @@ -1902,7 +1918,7 @@ zipx_bzip2_init(struct archive_read *a, struct zip *zi { int r; - /* Deallocate already existing BZ2 decompression context if it + /* Deallocate already existing BZ2 decompression context if it * exists. */ if(zip->bzstream_valid) { BZ2_bzDecompressEnd(&zip->bzstream); @@ -1968,6 +1984,15 @@ zip_read_data_zipx_bzip2(struct archive_read *a, const } in_bytes = zipmin(zip->entry_bytes_remaining, bytes_avail); + if(in_bytes < 1) { + /* libbz2 doesn't complain when caller feeds avail_in == 0. It will + * actually return success in this case, which is undesirable. This is + * why we need to make this check manually. */ + + archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, + "Truncated bzip2 file body"); + return (ARCHIVE_FATAL); + } /* Setup buffer boundaries. */ zip->bzstream.next_in = (char*)(uintptr_t) compressed_buff; Modified: vendor/libarchive/dist/libarchive/archive_string.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_string.c Mon Mar 25 09:47:22 2019 (r345494) +++ vendor/libarchive/dist/libarchive/archive_string.c Mon Mar 25 11:39:49 2019 (r345495) @@ -1512,8 +1512,10 @@ get_current_codepage(void) p = strrchr(locale, '.'); if (p == NULL) return (GetACP()); + if (strcmp(p+1, "utf8") == 0) + return CP_UTF8; cp = my_atoi(p+1); - if (cp <= 0) + if ((int)cp <= 0) return (GetACP()); return (cp); } @@ -4050,6 +4052,7 @@ archive_mstring_copy_utf8(struct archive_mstring *aes, { if (utf8 == NULL) { aes->aes_set = 0; + return (0); } aes->aes_set = AES_SET_UTF8; archive_string_empty(&(aes->aes_mbs)); @@ -4064,6 +4067,7 @@ archive_mstring_copy_wcs_len(struct archive_mstring *a { if (wcs == NULL) { aes->aes_set = 0; + return (0); } aes->aes_set = AES_SET_WCS; /* Only WCS form set. */ archive_string_empty(&(aes->aes_mbs)); Modified: vendor/libarchive/dist/libarchive/archive_write_disk_posix.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_write_disk_posix.c Mon Mar 25 09:47:22 2019 (r345494) +++ vendor/libarchive/dist/libarchive/archive_write_disk_posix.c Mon Mar 25 11:39:49 2019 (r345495) @@ -2588,8 +2588,11 @@ check_symlinks_fsobj(char *path, int *a_eno, struct ar */ restore_pwd = open(".", O_RDONLY | O_BINARY | O_CLOEXEC); __archive_ensure_cloexec_flag(restore_pwd); - if (restore_pwd < 0) + if (restore_pwd < 0) { + fsobj_error(a_eno, a_estr, errno, + "Could not open ", path); return (ARCHIVE_FATAL); + } head = path; tail = path; last = 0; @@ -3128,12 +3131,14 @@ create_dir(struct archive_write_disk *a, char *path) static int set_ownership(struct archive_write_disk *a) { -#ifndef __CYGWIN__ -/* unfortunately, on win32 there is no 'root' user with uid 0, - so we just have to try the chown and see if it works */ - - /* If we know we can't change it, don't bother trying. */ - if (a->user_uid != 0 && a->user_uid != a->uid) { +#if !defined(__CYGWIN__) && !defined(__linux__) +/* + * On Linux, a process may have the CAP_CHOWN capability. + * On Windows there is no 'root' user with uid 0. + * Elsewhere we can skip calling chown if we are not root and the desired + * user id does not match the current user. + */ + if (a->user_uid != 0 && a->user_uid != a->uid) { archive_set_error(&a->archive, errno, "Can't set UID=%jd", (intmax_t)a->uid); return (ARCHIVE_WARN); @@ -3500,9 +3505,7 @@ set_fflags(struct archive_write_disk *a) struct fixup_entry *le; unsigned long set, clear; int r; - int critical_flags; mode_t mode = archive_entry_mode(a->entry); - /* * Make 'critical_flags' hold all file flags that can't be * immediately restored. For example, on BSD systems, @@ -3518,33 +3521,33 @@ set_fflags(struct archive_write_disk *a) * other programs that might try to muck with files as they're * being restored. */ - /* Hopefully, the compiler will optimize this mess into a constant. */ - critical_flags = 0; + const int critical_flags = 0 #ifdef SF_IMMUTABLE - critical_flags |= SF_IMMUTABLE; + | SF_IMMUTABLE #endif #ifdef UF_IMMUTABLE - critical_flags |= UF_IMMUTABLE; + | UF_IMMUTABLE #endif #ifdef SF_APPEND - critical_flags |= SF_APPEND; + | SF_APPEND #endif #ifdef UF_APPEND - critical_flags |= UF_APPEND; + | UF_APPEND #endif #if defined(FS_APPEND_FL) - critical_flags |= FS_APPEND_FL; + | FS_APPEND_FL #elif defined(EXT2_APPEND_FL) - critical_flags |= EXT2_APPEND_FL; + | EXT2_APPEND_FL #endif #if defined(FS_IMMUTABLE_FL) - critical_flags |= FS_IMMUTABLE_FL; + | FS_IMMUTABLE_FL #elif defined(EXT2_IMMUTABLE_FL) - critical_flags |= EXT2_IMMUTABLE_FL; + | EXT2_IMMUTABLE_FL #endif #ifdef FS_JOURNAL_DATA_FL - critical_flags |= FS_JOURNAL_DATA_FL; + | FS_JOURNAL_DATA_FL #endif + ; if (a->todo & TODO_FFLAGS) { archive_entry_fflags(a->entry, &set, &clear); @@ -3575,29 +3578,27 @@ set_fflags(struct archive_write_disk *a) static int clear_nochange_fflags(struct archive_write_disk *a) { - int nochange_flags; mode_t mode = archive_entry_mode(a->entry); - - /* Hopefully, the compiler will optimize this mess into a constant. */ - nochange_flags = 0; + const int nochange_flags = 0 #ifdef SF_IMMUTABLE - nochange_flags |= SF_IMMUTABLE; + | SF_IMMUTABLE #endif #ifdef UF_IMMUTABLE - nochange_flags |= UF_IMMUTABLE; + | UF_IMMUTABLE #endif #ifdef SF_APPEND - nochange_flags |= SF_APPEND; + | SF_APPEND #endif #ifdef UF_APPEND - nochange_flags |= UF_APPEND; + | UF_APPEND #endif #ifdef EXT2_APPEND_FL - nochange_flags |= EXT2_APPEND_FL; + | EXT2_APPEND_FL #endif #ifdef EXT2_IMMUTABLE_FL - nochange_flags |= EXT2_IMMUTABLE_FL; + | EXT2_IMMUTABLE_FL #endif + ; return (set_fflags_platform(a, a->fd, a->name, mode, 0, nochange_flags)); @@ -3613,8 +3614,22 @@ set_fflags_platform(struct archive_write_disk *a, int mode_t mode, unsigned long set, unsigned long clear) { int r; - + const int sf_mask = 0 +#ifdef SF_APPEND + | SF_APPEND +#endif +#ifdef SF_ARCHIVED + | SF_ARCHIVED +#endif +#ifdef SF_IMMUTABLE + | SF_IMMUTABLE +#endif +#ifdef SF_NOUNLINK + | SF_NOUNLINK +#endif + ; (void)mode; /* UNUSED */ + if (set == 0 && clear == 0) return (ARCHIVE_OK); @@ -3629,6 +3644,12 @@ set_fflags_platform(struct archive_write_disk *a, int a->st.st_flags &= ~clear; a->st.st_flags |= set; + + /* Only super-user may change SF_* flags */ + + if (a->user_uid != 0) + a->st.st_flags &= ~sf_mask; + #ifdef HAVE_FCHFLAGS /* If platform has fchflags() and we were given an fd, use it. */ if (fd >= 0 && fchflags(fd, a->st.st_flags) == 0) @@ -3670,22 +3691,6 @@ set_fflags_platform(struct archive_write_disk *a, int int ret; int myfd = fd; int newflags, oldflags; - int sf_mask = 0; - - if (set == 0 && clear == 0) - return (ARCHIVE_OK); - /* Only regular files and dirs can have flags. */ - if (!S_ISREG(mode) && !S_ISDIR(mode)) - return (ARCHIVE_OK); - - /* If we weren't given an fd, open it ourselves. */ - if (myfd < 0) { - myfd = open(name, O_RDONLY | O_NONBLOCK | O_BINARY | O_CLOEXEC); - __archive_ensure_cloexec_flag(myfd); - } - if (myfd < 0) - return (ARCHIVE_OK); - /* * Linux has no define for the flags that are only settable by * the root user. This code may seem a little complex, but @@ -3693,19 +3698,36 @@ set_fflags_platform(struct archive_write_disk *a, int * defines. (?) The code below degrades reasonably gracefully * if sf_mask is incomplete. */ + const int sf_mask = 0 #if defined(FS_IMMUTABLE_FL) - sf_mask |= FS_IMMUTABLE_FL; + | FS_IMMUTABLE_FL #elif defined(EXT2_IMMUTABLE_FL) - sf_mask |= EXT2_IMMUTABLE_FL; + | EXT2_IMMUTABLE_FL #endif #if defined(FS_APPEND_FL) - sf_mask |= FS_APPEND_FL; + | FS_APPEND_FL #elif defined(EXT2_APPEND_FL) - sf_mask |= EXT2_APPEND_FL; + | EXT2_APPEND_FL #endif #if defined(FS_JOURNAL_DATA_FL) - sf_mask |= FS_JOURNAL_DATA_FL; + | FS_JOURNAL_DATA_FL #endif + ; + + if (set == 0 && clear == 0) + return (ARCHIVE_OK); + /* Only regular files and dirs can have flags. */ + if (!S_ISREG(mode) && !S_ISDIR(mode)) + return (ARCHIVE_OK); + + /* If we weren't given an fd, open it ourselves. */ + if (myfd < 0) { + myfd = open(name, O_RDONLY | O_NONBLOCK | O_BINARY | O_CLOEXEC); + __archive_ensure_cloexec_flag(myfd); + } + if (myfd < 0) + return (ARCHIVE_OK); + /* * XXX As above, this would be way simpler if we didn't have * to read the current flags from disk. XXX Modified: vendor/libarchive/dist/libarchive/archive_write_disk_windows.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_write_disk_windows.c Mon Mar 25 09:47:22 2019 (r345494) +++ vendor/libarchive/dist/libarchive/archive_write_disk_windows.c Mon Mar 25 11:39:49 2019 (r345495) @@ -474,6 +474,11 @@ permissive_name_w(struct archive_write_disk *a) { archive_wstrncpy(&(a->_name_data), wsp, l); } + else if (l > 2 && wsp[0] == L'\\' && wsp[1] == L'\\' && wsp[2] != L'\\') + { + archive_wstrncpy(&(a->_name_data), L"\\\\?\\UNC\\", 8); + archive_wstrncat(&(a->_name_data), wsp+2, l-2); + } else { archive_wstrncpy(&(a->_name_data), L"\\\\?\\", 4); Modified: vendor/libarchive/dist/libarchive/archive_write_set_format_7zip.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_write_set_format_7zip.c Mon Mar 25 09:47:22 2019 (r345494) +++ vendor/libarchive/dist/libarchive/archive_write_set_format_7zip.c Mon Mar 25 11:39:49 2019 (r345495) @@ -439,7 +439,8 @@ _7z_write_header(struct archive_write *a, struct archi r = file_new(a, entry, &file); if (r < ARCHIVE_WARN) { - file_free(file); + if (file != NULL) + file_free(file); return (r); } if (file->size == 0 && file->dir) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Mar 25 11:48:41 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 583C8155D807; Mon, 25 Mar 2019 11:48:41 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EC8368E4A5; Mon, 25 Mar 2019 11:48:40 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CA1C67592; Mon, 25 Mar 2019 11:48:40 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2PBme9e064435; Mon, 25 Mar 2019 11:48:40 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2PBmeFj064434; Mon, 25 Mar 2019 11:48:40 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201903251148.x2PBmeFj064434@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Mon, 25 Mar 2019 11:48:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345496 - head/lib/libvgl X-SVN-Group: head X-SVN-Commit-Author: bde X-SVN-Commit-Paths: head/lib/libvgl X-SVN-Commit-Revision: 345496 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EC8368E4A5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Mar 2019 11:48:41 -0000 Author: bde Date: Mon Mar 25 11:48:40 2019 New Revision: 345496 URL: https://svnweb.freebsd.org/changeset/base/345496 Log: Fix another type of buffer overrun for segmented modes. The buffer index was not taken modulo the window size in VGLClear(). Segmented modes also need a kernel fix to almost work. The ioctl to set the window origin is broken. These bugs are rarely problems since non-VESA modes only need segmentation to support multiple pages but libvgl doesn't support multiple pages and treats these modes as non-segmented, and VESA modes are usually mapped linearly except on old hardware so they really are non-segmented. Modified: head/lib/libvgl/simple.c Modified: head/lib/libvgl/simple.c ============================================================================== --- head/lib/libvgl/simple.c Mon Mar 25 11:39:49 2019 (r345495) +++ head/lib/libvgl/simple.c Mon Mar 25 11:48:40 2019 (r345496) @@ -535,7 +535,8 @@ VGLClear(VGLBitmap *object, u_long color) VGLSetSegment(offset); len = min(total - offset, VGLAdpInfo.va_window_size); for (i = 0; i < len; i += object->PixelBytes) - bcopy(b, object->Bitmap + offset + i, object->PixelBytes); + bcopy(object->Bitmap + (offset + i) % VGLAdpInfo.va_window_size, b, + object->PixelBytes); offset += len; } break; From owner-svn-src-all@freebsd.org Mon Mar 25 11:50:01 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C07FD155D8E1; Mon, 25 Mar 2019 11:50:00 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7166D8E8C1; Mon, 25 Mar 2019 11:50:00 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4C0937597; Mon, 25 Mar 2019 11:50:00 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2PBo0PD064724; Mon, 25 Mar 2019 11:50:00 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2PBnvH5064675; Mon, 25 Mar 2019 11:49:57 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201903251149.x2PBnvH5064675@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Mon, 25 Mar 2019 11:49:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345497 - in head: contrib/libarchive/libarchive contrib/libarchive/libarchive/test lib/libarchive/tests X-SVN-Group: head X-SVN-Commit-Author: mm X-SVN-Commit-Paths: in head: contrib/libarchive/libarchive contrib/libarchive/libarchive/test lib/libarchive/tests X-SVN-Commit-Revision: 345497 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7166D8E8C1 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.982,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Mar 2019 11:50:01 -0000 Author: mm Date: Mon Mar 25 11:49:57 2019 New Revision: 345497 URL: https://svnweb.freebsd.org/changeset/base/345497 Log: MFV r345495: Sync libarchive with vendor. Relevant vendor changes: PR #1153: fixed 2 bugs in ZIP reader [1] PR #1143: ensure archive_read_disk_entry_from_file() uses ARCHIVE_READ_DISK Changes to file flags code, support more file flags on FreeBSD: UF_OFFLINE, UF_READONLY, UF_SPARSE, UF_REPARSE, UF_SYSTEM UF_ARCHIVE is not supported by intention (yet) PR: 236300 MFC after: 2 weeks Added: head/contrib/libarchive/libarchive/test/test_read_format_zip_bz2_hang.zip.uu - copied unchanged from r345495, vendor/libarchive/dist/libarchive/test/test_read_format_zip_bz2_hang.zip.uu head/contrib/libarchive/libarchive/test/test_read_format_zip_ppmd8_crash_1.zipx.uu - copied unchanged from r345495, vendor/libarchive/dist/libarchive/test/test_read_format_zip_ppmd8_crash_1.zipx.uu head/contrib/libarchive/libarchive/test/test_read_format_zip_ppmd8_crash_2.zipx.uu - copied unchanged from r345495, vendor/libarchive/dist/libarchive/test/test_read_format_zip_ppmd8_crash_2.zipx.uu Modified: head/contrib/libarchive/libarchive/archive_blake2sp_ref.c head/contrib/libarchive/libarchive/archive_entry.c head/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c head/contrib/libarchive/libarchive/archive_read_support_format_rar5.c head/contrib/libarchive/libarchive/archive_read_support_format_zip.c head/contrib/libarchive/libarchive/archive_string.c head/contrib/libarchive/libarchive/archive_write_disk_posix.c head/contrib/libarchive/libarchive/archive_write_set_format_7zip.c head/contrib/libarchive/libarchive/test/test_entry.c head/contrib/libarchive/libarchive/test/test_read_format_rar5.c head/contrib/libarchive/libarchive/test/test_read_format_xar.c head/contrib/libarchive/libarchive/test/test_read_format_zip.c head/lib/libarchive/tests/Makefile Directory Properties: head/contrib/libarchive/ (props changed) Modified: head/contrib/libarchive/libarchive/archive_blake2sp_ref.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_blake2sp_ref.c Mon Mar 25 11:48:40 2019 (r345496) +++ head/contrib/libarchive/libarchive/archive_blake2sp_ref.c Mon Mar 25 11:49:57 2019 (r345497) @@ -89,7 +89,7 @@ int blake2sp_init( blake2sp_state *S, size_t outlen ) return -1; for( i = 0; i < PARALLELISM_DEGREE; ++i ) - if( blake2sp_init_leaf( S->S[i], outlen, 0, i ) < 0 ) return -1; + if( blake2sp_init_leaf( S->S[i], outlen, 0, (uint32_t)i ) < 0 ) return -1; S->R->last_node = 1; S->S[PARALLELISM_DEGREE - 1]->last_node = 1; @@ -112,7 +112,7 @@ int blake2sp_init_key( blake2sp_state *S, size_t outle return -1; for( i = 0; i < PARALLELISM_DEGREE; ++i ) - if( blake2sp_init_leaf( S->S[i], outlen, keylen, i ) < 0 ) return -1; + if( blake2sp_init_leaf( S->S[i], outlen, keylen, (uint32_t)i ) < 0 ) return -1; S->R->last_node = 1; S->S[PARALLELISM_DEGREE - 1]->last_node = 1; @@ -230,7 +230,7 @@ int blake2sp( void *out, size_t outlen, const void *in if( keylen > BLAKE2S_KEYBYTES ) return -1; for( i = 0; i < PARALLELISM_DEGREE; ++i ) - if( blake2sp_init_leaf( S[i], outlen, keylen, i ) < 0 ) return -1; + if( blake2sp_init_leaf( S[i], outlen, keylen, (uint32_t)i ) < 0 ) return -1; S[PARALLELISM_DEGREE - 1]->last_node = 1; /* mark last node */ Modified: head/contrib/libarchive/libarchive/archive_entry.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_entry.c Mon Mar 25 11:48:40 2019 (r345496) +++ head/contrib/libarchive/libarchive/archive_entry.c Mon Mar 25 11:49:57 2019 (r345497) @@ -1632,6 +1632,51 @@ _archive_entry_acl_text_l(struct archive_entry *entry, * SUCH DAMAGE. */ +/* + * Supported file flags on FreeBSD and Mac OS: + * sappnd,sappend SF_APPEND + * arch,archived SF_ARCHIVED + * schg,schange,simmutable SF_IMMUTABLE + * sunlnk,sunlink SF_NOUNLINK (FreeBSD only) + * uappnd,uappend UF_APPEND + * compressed UF_COMPRESSED (Mac OS only) + * hidden,uhidden UF_HIDDEN + * uchg,uchange,uimmutable UF_IMMUTABLE + * nodump UF_NODUMP + * uunlnk,uunlink UF_NOUNLINK (FreeBSD only) + * offline,uoffline UF_OFFLINE (FreeBSD only) + * opaque UF_OPAQUE + * rdonly,urdonly,readonly UF_READONLY (FreeBSD only) + * reparse,ureparse UF_REPARSE (FreeBSD only) + * sparse,usparse UF_SPARSE (FreeBSD only) + * system,usystem UF_SYSTEM (FreeBSD only) + * + * See chflags(2) for more information + * + * Supported file attributes on Linux: + * a append only FS_APPEND_FL sappnd + * A no atime updates FS_NOATIME_FL atime + * c compress FS_COMPR_FL compress + * C no copy on write FS_NOCOW_FL cow + * d no dump FS_NODUMP_FL dump + * D synchronous directory updates FS_DIRSYNC_FL dirsync + * i immutable FS_IMMUTABLE_FL schg + * j data journalling FS_JOURNAL_DATA_FL journal + * P project hierarchy FS_PROJINHERIT_FL projinherit + * s secure deletion FS_SECRM_FL securedeletion + * S synchronous updates FS_SYNC_FL sync + * t no tail-merging FS_NOTAIL_FL tail + * T top of directory hierarchy FS_TOPDIR_FL topdir + * u undeletable FS_UNRM_FL undel + * + * See ioctl_iflags(2) for more information + * + * Equivalent file flags supported on FreeBSD / Mac OS and Linux: + * SF_APPEND FS_APPEND_FL sappnd + * SF_IMMUTABLE FS_IMMUTABLE_FL schg + * UF_NODUMP FS_NODUMP_FL nodump + */ + static const struct flag { const char *name; const wchar_t *wname; @@ -1640,190 +1685,149 @@ static const struct flag { } flags[] = { /* Preferred (shorter) names per flag first, all prefixed by "no" */ #ifdef SF_APPEND - { "nosappnd", L"nosappnd", SF_APPEND, 0 }, - { "nosappend", L"nosappend", SF_APPEND, 0 }, + { "nosappnd", L"nosappnd", SF_APPEND, 0}, + { "nosappend", L"nosappend", SF_APPEND, 0}, #endif #if defined(FS_APPEND_FL) /* 'a' */ - { "nosappnd", L"nosappnd", FS_APPEND_FL, 0 }, - { "nosappend", L"nosappend", FS_APPEND_FL, 0 }, + { "nosappnd", L"nosappnd", FS_APPEND_FL, 0}, + { "nosappend", L"nosappend", FS_APPEND_FL, 0}, #elif defined(EXT2_APPEND_FL) /* 'a' */ - { "nosappnd", L"nosappnd", EXT2_APPEND_FL, 0 }, - { "nosappend", L"nosappend", EXT2_APPEND_FL, 0 }, + { "nosappnd", L"nosappnd", EXT2_APPEND_FL, 0}, + { "nosappend", L"nosappend", EXT2_APPEND_FL, 0}, #endif #ifdef SF_ARCHIVED - { "noarch", L"noarch", SF_ARCHIVED, 0 }, - { "noarchived", L"noarchived", SF_ARCHIVED, 0 }, + { "noarch", L"noarch", SF_ARCHIVED, 0}, + { "noarchived", L"noarchived", SF_ARCHIVED, 0}, #endif #ifdef SF_IMMUTABLE - { "noschg", L"noschg", SF_IMMUTABLE, 0 }, - { "noschange", L"noschange", SF_IMMUTABLE, 0 }, - { "nosimmutable", L"nosimmutable", SF_IMMUTABLE, 0 }, + { "noschg", L"noschg", SF_IMMUTABLE, 0}, + { "noschange", L"noschange", SF_IMMUTABLE, 0}, + { "nosimmutable", L"nosimmutable", SF_IMMUTABLE, 0}, #endif #if defined(FS_IMMUTABLE_FL) /* 'i' */ - { "noschg", L"noschg", FS_IMMUTABLE_FL, 0 }, - { "noschange", L"noschange", FS_IMMUTABLE_FL, 0 }, - { "nosimmutable", L"nosimmutable", FS_IMMUTABLE_FL, 0 }, + { "noschg", L"noschg", FS_IMMUTABLE_FL, 0}, + { "noschange", L"noschange", FS_IMMUTABLE_FL, 0}, + { "nosimmutable", L"nosimmutable", FS_IMMUTABLE_FL, 0}, #elif defined(EXT2_IMMUTABLE_FL) /* 'i' */ - { "noschg", L"noschg", EXT2_IMMUTABLE_FL, 0 }, - { "noschange", L"noschange", EXT2_IMMUTABLE_FL, 0 }, - { "nosimmutable", L"nosimmutable", EXT2_IMMUTABLE_FL, 0 }, + { "noschg", L"noschg", EXT2_IMMUTABLE_FL, 0}, + { "noschange", L"noschange", EXT2_IMMUTABLE_FL, 0}, + { "nosimmutable", L"nosimmutable", EXT2_IMMUTABLE_FL, 0}, #endif #ifdef SF_NOUNLINK - { "nosunlnk", L"nosunlnk", SF_NOUNLINK, 0 }, - { "nosunlink", L"nosunlink", SF_NOUNLINK, 0 }, + { "nosunlnk", L"nosunlnk", SF_NOUNLINK, 0}, + { "nosunlink", L"nosunlink", SF_NOUNLINK, 0}, #endif -#ifdef SF_SNAPSHOT - { "nosnapshot", L"nosnapshot", SF_SNAPSHOT, 0 }, -#endif #ifdef UF_APPEND - { "nouappnd", L"nouappnd", UF_APPEND, 0 }, - { "nouappend", L"nouappend", UF_APPEND, 0 }, + { "nouappnd", L"nouappnd", UF_APPEND, 0}, + { "nouappend", L"nouappend", UF_APPEND, 0}, #endif #ifdef UF_IMMUTABLE - { "nouchg", L"nouchg", UF_IMMUTABLE, 0 }, - { "nouchange", L"nouchange", UF_IMMUTABLE, 0 }, - { "nouimmutable", L"nouimmutable", UF_IMMUTABLE, 0 }, + { "nouchg", L"nouchg", UF_IMMUTABLE, 0}, + { "nouchange", L"nouchange", UF_IMMUTABLE, 0}, + { "nouimmutable", L"nouimmutable", UF_IMMUTABLE, 0}, #endif #ifdef UF_NODUMP { "nodump", L"nodump", 0, UF_NODUMP}, #endif #if defined(FS_NODUMP_FL) /* 'd' */ { "nodump", L"nodump", 0, FS_NODUMP_FL}, -#elif defined(EXT2_NODUMP_FL) /* 'd' */ +#elif defined(EXT2_NODUMP_FL) { "nodump", L"nodump", 0, EXT2_NODUMP_FL}, #endif #ifdef UF_OPAQUE - { "noopaque", L"noopaque", UF_OPAQUE, 0 }, + { "noopaque", L"noopaque", UF_OPAQUE, 0}, #endif #ifdef UF_NOUNLINK - { "nouunlnk", L"nouunlnk", UF_NOUNLINK, 0 }, - { "nouunlink", L"nouunlink", UF_NOUNLINK, 0 }, + { "nouunlnk", L"nouunlnk", UF_NOUNLINK, 0}, + { "nouunlink", L"nouunlink", UF_NOUNLINK, 0}, #endif #ifdef UF_COMPRESSED - { "nocompressed",L"nocompressed", UF_COMPRESSED, 0 }, + /* Mac OS */ + { "nocompressed", L"nocompressed", UF_COMPRESSED, 0}, #endif #ifdef UF_HIDDEN - { "nohidden", L"nohidden", UF_HIDDEN, 0 }, + { "nohidden", L"nohidden", UF_HIDDEN, 0}, + { "nouhidden", L"nouhidden", UF_HIDDEN, 0}, #endif -#if defined(FS_UNRM_FL) - { "nouunlink", L"nouunlink", FS_UNRM_FL, 0}, -#elif defined(EXT2_UNRM_FL) - { "nouunlink", L"nouunlink", EXT2_UNRM_FL, 0}, +#ifdef UF_OFFLINE + { "nooffline", L"nooffline", UF_OFFLINE, 0}, + { "nouoffline", L"nouoffline", UF_OFFLINE, 0}, #endif - -#if defined(FS_BTREE_FL) - { "nobtree", L"nobtree", FS_BTREE_FL, 0 }, -#elif defined(EXT2_BTREE_FL) - { "nobtree", L"nobtree", EXT2_BTREE_FL, 0 }, +#ifdef UF_READONLY + { "nordonly", L"nordonly", UF_READONLY, 0}, + { "nourdonly", L"nourdonly", UF_READONLY, 0}, + { "noreadonly", L"noreadonly", UF_READONLY, 0}, #endif - -#if defined(FS_ECOMPR_FL) - { "nocomperr", L"nocomperr", FS_ECOMPR_FL, 0 }, -#elif defined(EXT2_ECOMPR_FL) - { "nocomperr", L"nocomperr", EXT2_ECOMPR_FL, 0 }, +#ifdef UF_SPARSE + { "nosparse", L"nosparse", UF_SPARSE, 0}, + { "nousparse", L"nousparse", UF_SPARSE, 0}, #endif - -#if defined(FS_COMPR_FL) /* 'c' */ - { "nocompress", L"nocompress", FS_COMPR_FL, 0 }, -#elif defined(EXT2_COMPR_FL) /* 'c' */ - { "nocompress", L"nocompress", EXT2_COMPR_FL, 0 }, +#ifdef UF_REPARSE + { "noreparse", L"noreparse", UF_REPARSE, 0}, + { "noureparse", L"noureparse", UF_REPARSE, 0}, #endif - -#if defined(FS_NOATIME_FL) /* 'A' */ - { "noatime", L"noatime", 0, FS_NOATIME_FL}, -#elif defined(EXT2_NOATIME_FL) /* 'A' */ - { "noatime", L"noatime", 0, EXT2_NOATIME_FL}, +#ifdef UF_SYSTEM + { "nosystem", L"nosystem", UF_SYSTEM, 0}, + { "nousystem", L"nousystem", UF_SYSTEM, 0}, #endif +#if defined(FS_UNRM_FL) /* 'u' */ + { "noundel", L"noundel", FS_UNRM_FL, 0}, +#elif defined(EXT2_UNRM_FL) + { "noundel", L"noundel", EXT2_UNRM_FL, 0}, +#endif -#if defined(FS_DIRTY_FL) - { "nocompdirty",L"nocompdirty", FS_DIRTY_FL, 0}, -#elif defined(EXT2_DIRTY_FL) - { "nocompdirty",L"nocompdirty", EXT2_DIRTY_FL, 0}, +#if defined(FS_COMPR_FL) /* 'c' */ + { "nocompress", L"nocompress", FS_COMPR_FL, 0}, +#elif defined(EXT2_COMPR_FL) + { "nocompress", L"nocompress", EXT2_COMPR_FL, 0}, #endif -#if defined(FS_COMPRBLK_FL) -#if defined(FS_NOCOMPR_FL) - { "nocomprblk", L"nocomprblk", FS_COMPRBLK_FL, FS_NOCOMPR_FL}, -#else - { "nocomprblk", L"nocomprblk", FS_COMPRBLK_FL, 0}, +#if defined(FS_NOATIME_FL) /* 'A' */ + { "noatime", L"noatime", 0, FS_NOATIME_FL}, +#elif defined(EXT2_NOATIME_FL) + { "noatime", L"noatime", 0, EXT2_NOATIME_FL}, #endif -#elif defined(EXT2_COMPRBLK_FL) -#if defined(EXT2_NOCOMPR_FL) - { "nocomprblk", L"nocomprblk", EXT2_COMPRBLK_FL, EXT2_NOCOMPR_FL}, -#else - { "nocomprblk", L"nocomprblk", EXT2_COMPRBLK_FL, 0}, -#endif -#endif -#if defined(FS_DIRSYNC_FL) - { "nodirsync", L"nodirsync", FS_DIRSYNC_FL, 0}, +#if defined(FS_DIRSYNC_FL) /* 'D' */ + { "nodirsync", L"nodirsync", FS_DIRSYNC_FL, 0}, #elif defined(EXT2_DIRSYNC_FL) - { "nodirsync", L"nodirsync", EXT2_DIRSYNC_FL, 0}, + { "nodirsync", L"nodirsync", EXT2_DIRSYNC_FL, 0}, #endif -#if defined(FS_INDEX_FL) - { "nohashidx", L"nohashidx", FS_INDEX_FL, 0}, -#elif defined(EXT2_INDEX_FL) - { "nohashidx", L"nohashidx", EXT2_INDEX_FL, 0}, -#endif -#if defined(FS_IMAGIC_FL) - { "noimagic", L"noimagic", FS_IMAGIC_FL, 0}, -#elif defined(EXT2_IMAGIC_FL) - { "noimagic", L"noimagic", EXT2_IMAGIC_FL, 0}, -#endif -#if defined(FS_JOURNAL_DATA_FL) - { "nojournal", L"nojournal", FS_JOURNAL_DATA_FL, 0}, +#if defined(FS_JOURNAL_DATA_FL) /* 'j' */ + { "nojournal-data",L"nojournal-data", FS_JOURNAL_DATA_FL, 0}, + { "nojournal", L"nojournal", FS_JOURNAL_DATA_FL, 0}, #elif defined(EXT3_JOURNAL_DATA_FL) - { "nojournal", L"nojournal", EXT3_JOURNAL_DATA_FL, 0}, + { "nojournal-data",L"nojournal-data", EXT3_JOURNAL_DATA_FL, 0}, + { "nojournal", L"nojournal", EXT3_JOURNAL_DATA_FL, 0}, #endif -#if defined(FS_SECRM_FL) - { "nosecuredeletion",L"nosecuredeletion",FS_SECRM_FL, 0}, +#if defined(FS_SECRM_FL) /* 's' */ + { "nosecdel", L"nosecdel", FS_SECRM_FL, 0}, + { "nosecuredeletion",L"nosecuredeletion",FS_SECRM_FL, 0}, #elif defined(EXT2_SECRM_FL) - { "nosecuredeletion",L"nosecuredeletion",EXT2_SECRM_FL, 0}, + { "nosecdel", L"nosecdel", EXT2_SECRM_FL, 0}, + { "nosecuredeletion",L"nosecuredeletion",EXT2_SECRM_FL, 0}, #endif -#if defined(FS_SYNC_FL) - { "nosync", L"nosync", FS_SYNC_FL, 0}, +#if defined(FS_SYNC_FL) /* 'S' */ + { "nosync", L"nosync", FS_SYNC_FL, 0}, #elif defined(EXT2_SYNC_FL) - { "nosync", L"nosync", EXT2_SYNC_FL, 0}, + { "nosync", L"nosync", EXT2_SYNC_FL, 0}, #endif -#if defined(FS_NOTAIL_FL) - { "notail", L"notail", 0, FS_NOTAIL_FL}, +#if defined(FS_NOTAIL_FL) /* 't' */ + { "notail", L"notail", 0, FS_NOTAIL_FL}, #elif defined(EXT2_NOTAIL_FL) - { "notail", L"notail", 0, EXT2_NOTAIL_FL}, + { "notail", L"notail", 0, EXT2_NOTAIL_FL}, #endif -#if defined(FS_TOPDIR_FL) - { "notopdir", L"notopdir", FS_TOPDIR_FL, 0}, +#if defined(FS_TOPDIR_FL) /* 'T' */ + { "notopdir", L"notopdir", FS_TOPDIR_FL, 0}, #elif defined(EXT2_TOPDIR_FL) - { "notopdir", L"notopdir", EXT2_TOPDIR_FL, 0}, + { "notopdir", L"notopdir", EXT2_TOPDIR_FL, 0}, #endif -#ifdef FS_ENCRYPT_FL - { "noencrypt", L"noencrypt", FS_ENCRYPT_FL, 0}, +#ifdef FS_NOCOW_FL /* 'C' */ + { "nocow", L"nocow", 0, FS_NOCOW_FL}, #endif -#ifdef FS_HUGE_FILE_FL - { "nohugefile", L"nohugefile", FS_HUGE_FILE_FL, 0}, +#ifdef FS_PROJINHERIT_FL /* 'P' */ + { "noprojinherit",L"noprojinherit", FS_PROJINHERIT_FL, 0}, #endif -#ifdef FS_EXTENT_FL - { "noextent", L"noextent", FS_EXTENT_FL, 0}, -#endif -#ifdef FS_EA_INODE_FL - { "noeainode", L"noeainode", FS_EA_INODE_FL, 0}, -#endif -#ifdef FS_EOFBLOCKS_FL - { "noeofblocks",L"noeofblocks", FS_EOFBLOCKS_FL, 0}, -#endif -#ifdef FS_NOCOW_FL - { "nocow", L"nocow", FS_NOCOW_FL, 0}, -#endif -#ifdef FS_INLINE_DATA_FL - { "noinlinedata",L"noinlinedata", FS_INLINE_DATA_FL, 0}, -#endif -#ifdef FS_PROJINHERIT_FL - { "noprojinherit",L"noprojinherit", FS_PROJINHERIT_FL, 0}, -#endif -#if defined(FS_RESERVED_FL) - { "noreserved", L"noreserved", FS_RESERVED_FL, 0}, -#elif defined(EXT2_RESERVED_FL) - { "noreserved", L"noreserved", EXT2_RESERVED_FL, 0}, -#endif - { NULL, NULL, 0, 0 } + { NULL, NULL, 0, 0} }; /* Modified: head/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c Mon Mar 25 11:48:40 2019 (r345496) +++ head/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c Mon Mar 25 11:49:57 2019 (r345497) @@ -163,6 +163,9 @@ archive_read_disk_entry_from_file(struct archive *_a, int initial_fd = fd; int r, r1; + archive_check_magic(_a, ARCHIVE_READ_DISK_MAGIC, ARCHIVE_STATE_ANY, + "archive_read_disk_entry_from_file"); + archive_clear_error(_a); path = archive_entry_sourcepath(entry); if (path == NULL) Modified: head/contrib/libarchive/libarchive/archive_read_support_format_rar5.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_rar5.c Mon Mar 25 11:48:40 2019 (r345496) +++ head/contrib/libarchive/libarchive/archive_read_support_format_rar5.c Mon Mar 25 11:49:57 2019 (r345497) @@ -517,15 +517,16 @@ static int run_e8e9_filter(struct rar5* rar, struct fi const uint32_t file_size = 0x1000000; ssize_t i; + const int mask = (int)rar->cstate.window_mask; circular_memcpy(rar->cstate.filtered_buf, rar->cstate.window_buf, - rar->cstate.window_mask, + mask, rar->cstate.solid_offset + flt->block_start, rar->cstate.solid_offset + flt->block_start + flt->block_length); for(i = 0; i < flt->block_length - 4;) { uint8_t b = rar->cstate.window_buf[(rar->cstate.solid_offset + - flt->block_start + i++) & rar->cstate.window_mask]; + flt->block_start + i++) & mask]; /* 0xE8 = x86's call (function call) * 0xE9 = x86's jmp (unconditional jump) */ @@ -534,17 +535,17 @@ static int run_e8e9_filter(struct rar5* rar, struct fi uint32_t addr; uint32_t offset = (i + flt->block_start) % file_size; - addr = read_filter_data(rar, (rar->cstate.solid_offset + + addr = read_filter_data(rar, (uint32_t)(rar->cstate.solid_offset + flt->block_start + i) & rar->cstate.window_mask); if(addr & 0x80000000) { if(((addr + offset) & 0x80000000) == 0) { - write_filter_data(rar, i, addr + file_size); + write_filter_data(rar, (uint32_t)i, addr + file_size); } } else { if((addr - file_size) & 0x80000000) { uint32_t naddr = addr - offset; - write_filter_data(rar, i, naddr); + write_filter_data(rar, (uint32_t)i, naddr); } } @@ -558,11 +559,11 @@ static int run_e8e9_filter(struct rar5* rar, struct fi static int run_arm_filter(struct rar5* rar, struct filter_info* flt) { ssize_t i = 0; uint32_t offset; - const int mask = rar->cstate.window_mask; + const int mask = (int)rar->cstate.window_mask; circular_memcpy(rar->cstate.filtered_buf, rar->cstate.window_buf, - rar->cstate.window_mask, + mask, rar->cstate.solid_offset + flt->block_start, rar->cstate.solid_offset + flt->block_start + flt->block_length); @@ -577,7 +578,7 @@ static int run_arm_filter(struct rar5* rar, struct fil offset -= (uint32_t) ((i + flt->block_start) / 4); offset = (offset & 0x00ffffff) | 0xeb000000; - write_filter_data(rar, i, offset); + write_filter_data(rar, (uint32_t)i, offset); } } @@ -643,7 +644,7 @@ static int run_filter(struct archive_read* a, struct f static void push_data(struct archive_read* a, struct rar5* rar, const uint8_t* buf, int64_t idx_begin, int64_t idx_end) { - const int wmask = rar->cstate.window_mask; + const int wmask = (int)rar->cstate.window_mask; const ssize_t solid_write_ptr = (rar->cstate.solid_offset + rar->cstate.last_write_ptr) & wmask; @@ -1716,8 +1717,8 @@ static int process_base_block(struct archive_read* a, rar->generic.split_after = (header_flags & HFL_SPLIT_AFTER) > 0; rar->generic.split_before = (header_flags & HFL_SPLIT_BEFORE) > 0; - rar->generic.size = hdr_size; - rar->generic.last_header_id = header_id; + rar->generic.size = (int)hdr_size; + rar->generic.last_header_id = (int)header_id; rar->main.endarc = 0; /* Those are possible header ids in RARv5. */ @@ -1933,7 +1934,7 @@ static int create_decode_tables(uint8_t* bit_length, } } - quick_data_size = 1 << table->quick_bits; + quick_data_size = (int64_t)1 << table->quick_bits; cur_len = 1; for(code = 0; code < quick_data_size; code++) { int bit_field = code << (16 - table->quick_bits); @@ -2364,7 +2365,7 @@ static int decode_code_length(struct rar5* rar, const static int copy_string(struct archive_read* a, int len, int dist) { struct rar5* rar = get_context(a); - const int cmask = rar->cstate.window_mask; + const int cmask = (int)rar->cstate.window_mask; const int64_t write_ptr = rar->cstate.write_ptr + rar->cstate.solid_offset; int i; @@ -2390,7 +2391,7 @@ static int do_uncompress_block(struct archive_read* a, uint16_t num; int ret; - const int cmask = rar->cstate.window_mask; + const int cmask = (int)rar->cstate.window_mask; const struct compressed_block_header* hdr = &rar->last_block_hdr; const uint8_t bit_size = 1 + bf_bit_size(hdr); Modified: head/contrib/libarchive/libarchive/archive_read_support_format_zip.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_zip.c Mon Mar 25 11:48:40 2019 (r345496) +++ head/contrib/libarchive/libarchive/archive_read_support_format_zip.c Mon Mar 25 11:49:57 2019 (r345497) @@ -194,6 +194,7 @@ struct zip { ssize_t zipx_ppmd_read_compressed; CPpmd8 ppmd8; char ppmd8_valid; + char ppmd8_stream_failed; struct archive_string_conv *sconv; struct archive_string_conv *sconv_default; @@ -254,9 +255,15 @@ ppmd_read(void* p) { /* Get the handle to current decompression context. */ struct archive_read *a = ((IByteIn*)p)->a; struct zip *zip = (struct zip*) a->format->data; + ssize_t bytes_avail = 0; /* Fetch next byte. */ - const uint8_t* data = __archive_read_ahead(a, 1, NULL); + const uint8_t* data = __archive_read_ahead(a, 1, &bytes_avail); + if(bytes_avail < 1) { + zip->ppmd8_stream_failed = 1; + return 0; + } + __archive_read_consume(a, 1); /* Increment the counter. */ @@ -1750,6 +1757,7 @@ zipx_ppmd8_init(struct archive_read *a, struct zip *zi /* Create a new decompression context. */ __archive_ppmd8_functions.Ppmd8_Construct(&zip->ppmd8); + zip->ppmd8_stream_failed = 0; /* Setup function pointers required by Ppmd8 decompressor. The * 'ppmd_read' function will feed new bytes to the decompressor, @@ -1869,6 +1877,14 @@ zip_read_data_zipx_ppmd(struct archive_read *a, const break; } + /* This field is set by ppmd_read() when there was no more data + * to be read. */ + if(zip->ppmd8_stream_failed) { + archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, + "Truncated PPMd8 file body"); + return (ARCHIVE_FATAL); + } + zip->uncompressed_buffer[consumed_bytes] = (uint8_t) sym; ++consumed_bytes; } while(consumed_bytes < zip->uncompressed_buffer_size); @@ -1902,7 +1918,7 @@ zipx_bzip2_init(struct archive_read *a, struct zip *zi { int r; - /* Deallocate already existing BZ2 decompression context if it + /* Deallocate already existing BZ2 decompression context if it * exists. */ if(zip->bzstream_valid) { BZ2_bzDecompressEnd(&zip->bzstream); @@ -1968,6 +1984,15 @@ zip_read_data_zipx_bzip2(struct archive_read *a, const } in_bytes = zipmin(zip->entry_bytes_remaining, bytes_avail); + if(in_bytes < 1) { + /* libbz2 doesn't complain when caller feeds avail_in == 0. It will + * actually return success in this case, which is undesirable. This is + * why we need to make this check manually. */ + + archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, + "Truncated bzip2 file body"); + return (ARCHIVE_FATAL); + } /* Setup buffer boundaries. */ zip->bzstream.next_in = (char*)(uintptr_t) compressed_buff; Modified: head/contrib/libarchive/libarchive/archive_string.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_string.c Mon Mar 25 11:48:40 2019 (r345496) +++ head/contrib/libarchive/libarchive/archive_string.c Mon Mar 25 11:49:57 2019 (r345497) @@ -1512,8 +1512,10 @@ get_current_codepage(void) p = strrchr(locale, '.'); if (p == NULL) return (GetACP()); + if (strcmp(p+1, "utf8") == 0) + return CP_UTF8; cp = my_atoi(p+1); - if (cp <= 0) + if ((int)cp <= 0) return (GetACP()); return (cp); } @@ -4050,6 +4052,7 @@ archive_mstring_copy_utf8(struct archive_mstring *aes, { if (utf8 == NULL) { aes->aes_set = 0; + return (0); } aes->aes_set = AES_SET_UTF8; archive_string_empty(&(aes->aes_mbs)); @@ -4064,6 +4067,7 @@ archive_mstring_copy_wcs_len(struct archive_mstring *a { if (wcs == NULL) { aes->aes_set = 0; + return (0); } aes->aes_set = AES_SET_WCS; /* Only WCS form set. */ archive_string_empty(&(aes->aes_mbs)); Modified: head/contrib/libarchive/libarchive/archive_write_disk_posix.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_write_disk_posix.c Mon Mar 25 11:48:40 2019 (r345496) +++ head/contrib/libarchive/libarchive/archive_write_disk_posix.c Mon Mar 25 11:49:57 2019 (r345497) @@ -2588,8 +2588,11 @@ check_symlinks_fsobj(char *path, int *a_eno, struct ar */ restore_pwd = open(".", O_RDONLY | O_BINARY | O_CLOEXEC); __archive_ensure_cloexec_flag(restore_pwd); - if (restore_pwd < 0) + if (restore_pwd < 0) { + fsobj_error(a_eno, a_estr, errno, + "Could not open ", path); return (ARCHIVE_FATAL); + } head = path; tail = path; last = 0; @@ -3128,12 +3131,14 @@ create_dir(struct archive_write_disk *a, char *path) static int set_ownership(struct archive_write_disk *a) { -#ifndef __CYGWIN__ -/* unfortunately, on win32 there is no 'root' user with uid 0, - so we just have to try the chown and see if it works */ - - /* If we know we can't change it, don't bother trying. */ - if (a->user_uid != 0 && a->user_uid != a->uid) { +#if !defined(__CYGWIN__) && !defined(__linux__) +/* + * On Linux, a process may have the CAP_CHOWN capability. + * On Windows there is no 'root' user with uid 0. + * Elsewhere we can skip calling chown if we are not root and the desired + * user id does not match the current user. + */ + if (a->user_uid != 0 && a->user_uid != a->uid) { archive_set_error(&a->archive, errno, "Can't set UID=%jd", (intmax_t)a->uid); return (ARCHIVE_WARN); @@ -3500,9 +3505,7 @@ set_fflags(struct archive_write_disk *a) struct fixup_entry *le; unsigned long set, clear; int r; - int critical_flags; mode_t mode = archive_entry_mode(a->entry); - /* * Make 'critical_flags' hold all file flags that can't be * immediately restored. For example, on BSD systems, @@ -3518,33 +3521,33 @@ set_fflags(struct archive_write_disk *a) * other programs that might try to muck with files as they're * being restored. */ - /* Hopefully, the compiler will optimize this mess into a constant. */ - critical_flags = 0; + const int critical_flags = 0 #ifdef SF_IMMUTABLE - critical_flags |= SF_IMMUTABLE; + | SF_IMMUTABLE #endif #ifdef UF_IMMUTABLE - critical_flags |= UF_IMMUTABLE; + | UF_IMMUTABLE #endif #ifdef SF_APPEND - critical_flags |= SF_APPEND; + | SF_APPEND #endif #ifdef UF_APPEND - critical_flags |= UF_APPEND; + | UF_APPEND #endif #if defined(FS_APPEND_FL) - critical_flags |= FS_APPEND_FL; + | FS_APPEND_FL #elif defined(EXT2_APPEND_FL) - critical_flags |= EXT2_APPEND_FL; + | EXT2_APPEND_FL #endif #if defined(FS_IMMUTABLE_FL) - critical_flags |= FS_IMMUTABLE_FL; + | FS_IMMUTABLE_FL #elif defined(EXT2_IMMUTABLE_FL) - critical_flags |= EXT2_IMMUTABLE_FL; + | EXT2_IMMUTABLE_FL #endif #ifdef FS_JOURNAL_DATA_FL - critical_flags |= FS_JOURNAL_DATA_FL; + | FS_JOURNAL_DATA_FL #endif + ; if (a->todo & TODO_FFLAGS) { archive_entry_fflags(a->entry, &set, &clear); @@ -3575,29 +3578,27 @@ set_fflags(struct archive_write_disk *a) static int clear_nochange_fflags(struct archive_write_disk *a) { - int nochange_flags; mode_t mode = archive_entry_mode(a->entry); - - /* Hopefully, the compiler will optimize this mess into a constant. */ - nochange_flags = 0; + const int nochange_flags = 0 #ifdef SF_IMMUTABLE - nochange_flags |= SF_IMMUTABLE; + | SF_IMMUTABLE #endif #ifdef UF_IMMUTABLE - nochange_flags |= UF_IMMUTABLE; + | UF_IMMUTABLE #endif #ifdef SF_APPEND - nochange_flags |= SF_APPEND; + | SF_APPEND #endif #ifdef UF_APPEND - nochange_flags |= UF_APPEND; + | UF_APPEND #endif #ifdef EXT2_APPEND_FL - nochange_flags |= EXT2_APPEND_FL; + | EXT2_APPEND_FL #endif #ifdef EXT2_IMMUTABLE_FL - nochange_flags |= EXT2_IMMUTABLE_FL; + | EXT2_IMMUTABLE_FL #endif + ; return (set_fflags_platform(a, a->fd, a->name, mode, 0, nochange_flags)); @@ -3613,8 +3614,22 @@ set_fflags_platform(struct archive_write_disk *a, int mode_t mode, unsigned long set, unsigned long clear) { int r; - + const int sf_mask = 0 +#ifdef SF_APPEND + | SF_APPEND +#endif +#ifdef SF_ARCHIVED + | SF_ARCHIVED +#endif +#ifdef SF_IMMUTABLE + | SF_IMMUTABLE +#endif +#ifdef SF_NOUNLINK + | SF_NOUNLINK +#endif + ; (void)mode; /* UNUSED */ + if (set == 0 && clear == 0) return (ARCHIVE_OK); @@ -3629,6 +3644,12 @@ set_fflags_platform(struct archive_write_disk *a, int a->st.st_flags &= ~clear; a->st.st_flags |= set; + + /* Only super-user may change SF_* flags */ + + if (a->user_uid != 0) + a->st.st_flags &= ~sf_mask; + #ifdef HAVE_FCHFLAGS /* If platform has fchflags() and we were given an fd, use it. */ if (fd >= 0 && fchflags(fd, a->st.st_flags) == 0) @@ -3670,22 +3691,6 @@ set_fflags_platform(struct archive_write_disk *a, int int ret; int myfd = fd; int newflags, oldflags; - int sf_mask = 0; - - if (set == 0 && clear == 0) - return (ARCHIVE_OK); - /* Only regular files and dirs can have flags. */ - if (!S_ISREG(mode) && !S_ISDIR(mode)) - return (ARCHIVE_OK); - - /* If we weren't given an fd, open it ourselves. */ - if (myfd < 0) { - myfd = open(name, O_RDONLY | O_NONBLOCK | O_BINARY | O_CLOEXEC); - __archive_ensure_cloexec_flag(myfd); - } - if (myfd < 0) - return (ARCHIVE_OK); - /* * Linux has no define for the flags that are only settable by * the root user. This code may seem a little complex, but @@ -3693,19 +3698,36 @@ set_fflags_platform(struct archive_write_disk *a, int * defines. (?) The code below degrades reasonably gracefully * if sf_mask is incomplete. */ + const int sf_mask = 0 #if defined(FS_IMMUTABLE_FL) - sf_mask |= FS_IMMUTABLE_FL; + | FS_IMMUTABLE_FL #elif defined(EXT2_IMMUTABLE_FL) - sf_mask |= EXT2_IMMUTABLE_FL; + | EXT2_IMMUTABLE_FL #endif #if defined(FS_APPEND_FL) - sf_mask |= FS_APPEND_FL; + | FS_APPEND_FL #elif defined(EXT2_APPEND_FL) - sf_mask |= EXT2_APPEND_FL; + | EXT2_APPEND_FL #endif #if defined(FS_JOURNAL_DATA_FL) - sf_mask |= FS_JOURNAL_DATA_FL; + | FS_JOURNAL_DATA_FL #endif + ; + + if (set == 0 && clear == 0) + return (ARCHIVE_OK); + /* Only regular files and dirs can have flags. */ + if (!S_ISREG(mode) && !S_ISDIR(mode)) + return (ARCHIVE_OK); + + /* If we weren't given an fd, open it ourselves. */ + if (myfd < 0) { + myfd = open(name, O_RDONLY | O_NONBLOCK | O_BINARY | O_CLOEXEC); + __archive_ensure_cloexec_flag(myfd); + } + if (myfd < 0) + return (ARCHIVE_OK); + /* * XXX As above, this would be way simpler if we didn't have * to read the current flags from disk. XXX Modified: head/contrib/libarchive/libarchive/archive_write_set_format_7zip.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_write_set_format_7zip.c Mon Mar 25 11:48:40 2019 (r345496) +++ head/contrib/libarchive/libarchive/archive_write_set_format_7zip.c Mon Mar 25 11:49:57 2019 (r345497) @@ -439,7 +439,8 @@ _7z_write_header(struct archive_write *a, struct archi r = file_new(a, entry, &file); if (r < ARCHIVE_WARN) { - file_free(file); + if (file != NULL) + file_free(file); return (r); } if (file->size == 0 && file->dir) { Modified: head/contrib/libarchive/libarchive/test/test_entry.c ============================================================================== --- head/contrib/libarchive/libarchive/test/test_entry.c Mon Mar 25 11:48:40 2019 (r345496) +++ head/contrib/libarchive/libarchive/test/test_entry.c Mon Mar 25 11:49:57 2019 (r345497) @@ -336,7 +336,7 @@ DEFINE_TEST(test_entry) /* Converting fflags bitmap to string is currently system-dependent. */ /* TODO: Make this system-independent. */ assertEqualString(archive_entry_fflags_text(e), - "uappnd,nouchg,nodump,noopaque,uunlnk"); + "uappnd,nouchg,nodump,noopaque,uunlnk,nosystem"); /* Test archive_entry_copy_fflags_text_w() */ archive_entry_copy_fflags_text_w(e, L" ,nouappnd, nouchg, dump,uunlnk"); archive_entry_fflags(e, &set, &clear); Modified: head/contrib/libarchive/libarchive/test/test_read_format_rar5.c ============================================================================== --- head/contrib/libarchive/libarchive/test/test_read_format_rar5.c Mon Mar 25 11:48:40 2019 (r345496) +++ head/contrib/libarchive/libarchive/test/test_read_format_rar5.c Mon Mar 25 11:49:57 2019 (r345497) @@ -96,7 +96,7 @@ int extract_one(struct archive* a, struct archive_entr int ret = 1; uint32_t computed_crc; - fsize = archive_entry_size(ae); + fsize = (la_ssize_t) archive_entry_size(ae); buf = malloc(fsize); if(buf == NULL) return 1; @@ -110,13 +110,13 @@ int extract_one(struct archive* a, struct archive_entr computed_crc = crc32(0, buf, fsize); assertEqualInt(computed_crc, crc); ret = 0; - + fn_exit: free(buf); return ret; } -DEFINE_TEST(test_read_format_rar5_stored) +DEFINE_TEST(test_read_format_rar5_stored) { const char helloworld_txt[] = "hello libarchive test suite!\n"; la_ssize_t file_size = sizeof(helloworld_txt) - 1; @@ -143,7 +143,7 @@ DEFINE_TEST(test_read_format_rar5_stored) DEFINE_TEST(test_read_format_rar5_compressed) { const int DATA_SIZE = 1200; - uint8_t buff[DATA_SIZE]; + uint8_t buff[1200]; PROLOGUE("test_read_format_rar5_compressed.rar"); @@ -161,7 +161,7 @@ DEFINE_TEST(test_read_format_rar5_compressed) DEFINE_TEST(test_read_format_rar5_multiple_files) { const int DATA_SIZE = 4096; - uint8_t buff[DATA_SIZE]; + uint8_t buff[4096]; PROLOGUE("test_read_format_rar5_multiple_files.rar"); @@ -173,7 +173,7 @@ DEFINE_TEST(test_read_format_rar5_multiple_files) assertEqualInt(DATA_SIZE, archive_entry_size(ae)); assertA(DATA_SIZE == archive_read_data(a, buff, DATA_SIZE)); assertA(verify_data(buff, 1, DATA_SIZE)); - + assertA(0 == archive_read_next_header(a, &ae)); assertEqualString("test2.bin", archive_entry_pathname(ae)); assertEqualInt(DATA_SIZE, archive_entry_size(ae)); @@ -207,7 +207,7 @@ DEFINE_TEST(test_read_format_rar5_multiple_files) DEFINE_TEST(test_read_format_rar5_multiple_files_solid) { const int DATA_SIZE = 4096; - uint8_t buff[DATA_SIZE]; + uint8_t buff[4096]; PROLOGUE("test_read_format_rar5_multiple_files_solid.rar"); @@ -216,7 +216,7 @@ DEFINE_TEST(test_read_format_rar5_multiple_files_solid assertEqualInt(DATA_SIZE, archive_entry_size(ae)); assertA(DATA_SIZE == archive_read_data(a, buff, DATA_SIZE)); assertA(verify_data(buff, 1, DATA_SIZE)); - + assertA(0 == archive_read_next_header(a, &ae)); assertEqualString("test2.bin", archive_entry_pathname(ae)); assertEqualInt(DATA_SIZE, archive_entry_size(ae)); @@ -309,7 +309,7 @@ DEFINE_TEST(test_read_format_rar5_multiarchive_skip_al DEFINE_TEST(test_read_format_rar5_blake2) { const la_ssize_t proper_size = 814; - uint8_t buf[proper_size]; + uint8_t buf[814]; PROLOGUE("test_read_format_rar5_blake2.rar"); assertA(0 == archive_read_next_header(a, &ae)); @@ -334,7 +334,7 @@ DEFINE_TEST(test_read_format_rar5_arm_filter) * test. */ const la_ssize_t proper_size = 90808; - uint8_t buf[proper_size]; + uint8_t buf[90808]; PROLOGUE("test_read_format_rar5_arm.rar"); assertA(0 == archive_read_next_header(a, &ae)); @@ -598,7 +598,7 @@ DEFINE_TEST(test_read_format_rar5_multiarchive_solid_s EPILOGUE(); } -DEFINE_TEST(test_read_format_rar5_solid_skip_all) +DEFINE_TEST(test_read_format_rar5_solid_skip_all) { const char* reffile = "test_read_format_rar5_solid.rar"; @@ -623,7 +623,7 @@ DEFINE_TEST(test_read_format_rar5_solid_skip_all) EPILOGUE(); } -DEFINE_TEST(test_read_format_rar5_solid_skip_all_but_first) +DEFINE_TEST(test_read_format_rar5_solid_skip_all_but_first) { const char* reffile = "test_read_format_rar5_solid.rar"; @@ -649,7 +649,7 @@ DEFINE_TEST(test_read_format_rar5_solid_skip_all_but_f EPILOGUE(); } -DEFINE_TEST(test_read_format_rar5_solid_skip_all_but_second) +DEFINE_TEST(test_read_format_rar5_solid_skip_all_but_second) { const char* reffile = "test_read_format_rar5_solid.rar"; Modified: head/contrib/libarchive/libarchive/test/test_read_format_xar.c ============================================================================== --- head/contrib/libarchive/libarchive/test/test_read_format_xar.c Mon Mar 25 11:48:40 2019 (r345496) +++ head/contrib/libarchive/libarchive/test/test_read_format_xar.c Mon Mar 25 11:49:57 2019 (r345497) @@ -799,7 +799,7 @@ static void verify(unsigned char *d, size_t s, static void verifyB(unsigned char *d, size_t s) { struct archive* a; struct archive_entry *entry = NULL; - la_int64_t buf_size; + size_t buf_size; unsigned char *buf; assert((a = archive_read_new()) != NULL); @@ -826,20 +826,20 @@ static void verifyB(unsigned char *d, size_t s) { // f1, content "onetwothree\n", size 12 bytes assertA(0 == archive_read_next_header(a, &entry)); - buf_size = archive_entry_size(entry); + buf_size = (size_t) archive_entry_size(entry); assertA(buf_size == 12); buf = (unsigned char*) malloc(buf_size); assertA(NULL != buf); - assertA(buf_size == archive_read_data(a, buf, buf_size)); + assertA(buf_size == (size_t) archive_read_data(a, buf, buf_size)); free(buf); // f2, content "fourfivesix\n", size 12 bytes assertA(0 == archive_read_next_header(a, &entry)); - buf_size = archive_entry_size(entry); + buf_size = (size_t) archive_entry_size(entry); assertA(buf_size == 12); buf = (unsigned char*) malloc(buf_size); assertA(NULL != buf); - assertA(buf_size == archive_read_data(a, buf, buf_size)); + assertA(buf_size == (size_t) archive_read_data(a, buf, buf_size)); free(buf); assertEqualInt(ARCHIVE_OK, archive_read_free(a)); Modified: head/contrib/libarchive/libarchive/test/test_read_format_zip.c ============================================================================== --- head/contrib/libarchive/libarchive/test/test_read_format_zip.c Mon Mar 25 11:48:40 2019 (r345496) +++ head/contrib/libarchive/libarchive/test/test_read_format_zip.c Mon Mar 25 11:49:57 2019 (r345497) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Mar 25 12:43:10 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 83CE21560000; Mon, 25 Mar 2019 12:43:10 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 9D3AD6A1B7; Mon, 25 Mar 2019 12:43:08 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id 8OwLh5a52Gusj8OwMhwdRL; Mon, 25 Mar 2019 06:43:00 -0600 X-Authority-Analysis: v=2.3 cv=fOdHIqSe c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=NTGMnVQrEZIA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=M8EQYUHMig5_a_JoYg4A:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 7F66CBDC; Mon, 25 Mar 2019 05:42:54 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id x2PCgrbK051713; Mon, 25 Mar 2019 05:42:53 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id x2PCgre6051543; Mon, 25 Mar 2019 05:42:53 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201903251242.x2PCgre6051543@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Allan Jude cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r345491 - in head/sys: conf fs/tmpfs modules/tmpfs In-Reply-To: Message from Allan Jude of "Mon, 25 Mar 2019 07:46:20 -0000." <201903250746.x2P7kKUu019786@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 25 Mar 2019 05:42:53 -0700 X-CMAE-Envelope: MS4wfIPIsD/cH5MD2PmbJp2ugrMJm+0zjWrmsJPoAFMURaAY92ZIZrbf2wPucDb3viqiVXBZ6pr83H7DuOiKNO3XafoGTv81KXryiFawFg6pRvRC21Oh7LYt ast6mYPZ5/5+YrP72BpUx6MKwMXlQJvCUMSBW9U+rO2/PItq5xmALMY/ZxoT6ljjdyspsUNKJWlQHvlEWzdShJXZ+MaO3k7B9Xc2RsP94Mj1GGIyk+zaDze7 nQOB7p3XTnBJ02mS/uJI3AVKXbuwtt/QqUFYXJ4EV0lsX383F/2EmVEH0Etzxqks X-Rspamd-Queue-Id: 9D3AD6A1B7 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-4.88 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; MV_CASE(0.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_DN_SOME(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MX_GOOD(-0.01)[cached: spqr.komquats.com]; NEURAL_HAM_SHORT(-0.92)[-0.916,0]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_SPF_NA(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[17.125.67.70.zen.spamhaus.org : 127.0.0.11]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; MIME_TRACE(0.00)[0:+]; IP_SCORE(-2.25)[ip: (-5.91), ipnet: 64.59.128.0/20(-2.97), asn: 6327(-2.29), country: CA(-0.09)]; RCVD_IN_DNSWL_LOW(-0.10)[137.136.59.64.list.dnswl.org : 127.0.5.1] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Mar 2019 12:43:10 -0000 In message <201903250746.x2P7kKUu019786@repo.freebsd.org>, Allan Jude writes: > Author: allanjude > Date: Mon Mar 25 07:46:20 2019 > New Revision: 345491 > URL: https://svnweb.freebsd.org/changeset/base/345491 > > Log: > Make TMPFS_PAGES_MINRESERVED a kernel option > > TMPFS_PAGES_MINRESERVED controls how much memory is reserved for the system > and not used by tmpfs. > > On very small memory systems, the default value may be too high and this > prevents these small memory systems from using reroot, which is required > for them to install firmware updates. > > Submitted by: Hiroki Mori > Reviewed by: mizhka > Differential Revision: https://reviews.freebsd.org/D13583 > > Modified: > head/sys/conf/options > head/sys/fs/tmpfs/tmpfs.h > head/sys/fs/tmpfs/tmpfs_vfsops.c > head/sys/modules/tmpfs/Makefile > Would this be a good candidate for a sysctl or tuneable? -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Mon Mar 25 13:50:39 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 806CE156232F; Mon, 25 Mar 2019 13:50:39 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 242896CC25; Mon, 25 Mar 2019 13:50:39 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 00C698A57; Mon, 25 Mar 2019 13:50:39 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2PDocQs038236; Mon, 25 Mar 2019 13:50:38 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2PDocIJ038235; Mon, 25 Mar 2019 13:50:38 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201903251350.x2PDocIJ038235@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 25 Mar 2019 13:50:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345499 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 345499 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 242896CC25 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.949,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Mar 2019 13:50:39 -0000 Author: hselasky Date: Mon Mar 25 13:50:38 2019 New Revision: 345499 URL: https://svnweb.freebsd.org/changeset/base/345499 Log: Change all kernel C-type macros into static inline functions. The current kernel C-type macros might obscurely hide the fact that the input argument might be used multiple times. This breaks code like: isalpha(*ptr++) Use static inline functions instead of macros to fix this. Reviewed by: kib @ Differential Revision: https://reviews.freebsd.org/D19694 MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/sys/ctype.h Modified: head/sys/sys/ctype.h ============================================================================== --- head/sys/sys/ctype.h Mon Mar 25 12:15:42 2019 (r345498) +++ head/sys/sys/ctype.h Mon Mar 25 13:50:38 2019 (r345499) @@ -41,19 +41,65 @@ #ifdef _KERNEL -#define isspace(c) ((c) == ' ' || ((c) >= '\t' && (c) <= '\r')) -#define isascii(c) (((c) & ~0x7f) == 0) -#define isupper(c) ((c) >= 'A' && (c) <= 'Z') -#define islower(c) ((c) >= 'a' && (c) <= 'z') -#define isalpha(c) (isupper(c) || islower(c)) -#define isdigit(c) ((c) >= '0' && (c) <= '9') -#define isxdigit(c) (isdigit(c) \ - || ((c) >= 'A' && (c) <= 'F') \ - || ((c) >= 'a' && (c) <= 'f')) -#define isprint(c) ((c) >= ' ' && (c) <= '~') +static __inline int +isspace(int c) +{ + return (c == ' ' || (c >= '\t' && c <= '\r')); +} -#define toupper(c) ((c) - 0x20 * (((c) >= 'a') && ((c) <= 'z'))) -#define tolower(c) ((c) + 0x20 * (((c) >= 'A') && ((c) <= 'Z'))) +static __inline int +isascii(int c) +{ + return ((c & ~0x7f) == 0); +} + +static __inline int +isupper(int c) +{ + return (c >= 'A' && c <= 'Z'); +} + +static __inline int +islower(int c) +{ + return (c >= 'a' && c <= 'z'); +} + +static __inline int +isalpha(int c) +{ + return (isupper(c) || islower(c)); +} + +static __inline int +isdigit(int c) +{ + return (c >= '0' && c <= '9'); +} + +static __inline int +isxdigit(int c) +{ + return (isdigit(c) || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f')); +} + +static __inline int +isprint(int c) +{ + return (c >= ' ' && c <= '~'); +} + +static __inline int +toupper(int c) +{ + return (c - 0x20 * ((c >= 'a') && (c <= 'z'))); +} + +static __inline int +tolower(int c) +{ + return (c + 0x20 * ((c >= 'A') && (c <= 'Z'))); +} #endif #endif /* !_SYS_CTYPE_H_ */ From owner-svn-src-all@freebsd.org Mon Mar 25 14:04:25 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E90241562A3B; Mon, 25 Mar 2019 14:04:24 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8E40A6D73B; Mon, 25 Mar 2019 14:04:24 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 69D6A8DBE; Mon, 25 Mar 2019 14:04:24 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2PE4OeO049284; Mon, 25 Mar 2019 14:04:24 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2PE4Ok5049283; Mon, 25 Mar 2019 14:04:24 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201903251404.x2PE4Ok5049283@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 25 Mar 2019 14:04:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345500 - stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall X-SVN-Commit-Revision: 345500 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8E40A6D73B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.94)[-0.943,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Mar 2019 14:04:25 -0000 Author: markj Date: Mon Mar 25 14:04:23 2019 New Revision: 345500 URL: https://svnweb.freebsd.org/changeset/base/345500 Log: MFC r345355: Ensure that we use a 64-bit value for the last mmap() argument. Modified: stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c Directory Properties: stable/12/ (props changed) Modified: stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c ============================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c Mon Mar 25 13:50:38 2019 (r345499) +++ stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c Mon Mar 25 14:04:23 2019 (r345500) @@ -35,7 +35,8 @@ int main(int argc, char **argv) { for (;;) { - (void) __syscall(SYS_mmap, NULL, 1, 2, 3, -1, 0x12345678); + (void) __syscall(SYS_mmap, NULL, (size_t)1, 2, 3, -1, + (off_t)0x12345678); } return (0); From owner-svn-src-all@freebsd.org Mon Mar 25 14:05:37 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 506BF1562AAF; Mon, 25 Mar 2019 14:05:37 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8FA886D886; Mon, 25 Mar 2019 14:05: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 6B5338DBF; Mon, 25 Mar 2019 14:05: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 x2PE5aN9049445; Mon, 25 Mar 2019 14:05:36 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2PE5aoh049444; Mon, 25 Mar 2019 14:05:36 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201903251405.x2PE5aoh049444@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 25 Mar 2019 14:05:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345501 - in stable/12: contrib/netbsd-tests/lib/libpthread lib/libthr/thread X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in stable/12: contrib/netbsd-tests/lib/libpthread lib/libthr/thread X-SVN-Commit-Revision: 345501 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8FA886D886 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.94)[-0.944,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Mar 2019 14:05:37 -0000 Author: markj Date: Mon Mar 25 14:05:35 2019 New Revision: 345501 URL: https://svnweb.freebsd.org/changeset/base/345501 Log: MFC r344935: Have pthread_cond_destroy() return EBUSY if the condvar has waiters. PR: 234805 Modified: stable/12/contrib/netbsd-tests/lib/libpthread/t_cond.c stable/12/lib/libthr/thread/thr_cond.c Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/netbsd-tests/lib/libpthread/t_cond.c ============================================================================== --- stable/12/contrib/netbsd-tests/lib/libpthread/t_cond.c Mon Mar 25 14:04:23 2019 (r345500) +++ stable/12/contrib/netbsd-tests/lib/libpthread/t_cond.c Mon Mar 25 14:05:35 2019 (r345501) @@ -493,6 +493,51 @@ ATF_TC_BODY(bogus_timedwaits, tc) PTHREAD_REQUIRE(pthread_mutex_unlock(&static_mutex)); } +#ifdef __FreeBSD__ +static void * +destroy_busy_threadfunc(void *arg) +{ + PTHREAD_REQUIRE(pthread_mutex_lock(&mutex)); + + share = 1; + PTHREAD_REQUIRE(pthread_cond_broadcast(&cond)); + PTHREAD_REQUIRE(pthread_cond_wait(&cond, &mutex)); + + PTHREAD_REQUIRE(pthread_mutex_unlock(&mutex)); + + return NULL; +} + +ATF_TC(destroy_busy); +ATF_TC_HEAD(destroy_busy, tc) +{ + atf_tc_set_md_var(tc, "descr", "Checks non-standard behaviour of " + "returning EBUSY when attempting to destroy an active condvar"); +} +ATF_TC_BODY(destroy_busy, tc) +{ + pthread_t thread; + + PTHREAD_REQUIRE(pthread_mutex_init(&mutex, NULL)); + PTHREAD_REQUIRE(pthread_cond_init(&cond, NULL)); + PTHREAD_REQUIRE(pthread_mutex_lock(&mutex)); + PTHREAD_REQUIRE(pthread_create(&thread, NULL, destroy_busy_threadfunc, + NULL)); + + while (share == 0) { + PTHREAD_REQUIRE(pthread_cond_wait(&cond, &mutex)); + } + + PTHREAD_REQUIRE_STATUS(pthread_cond_destroy(&cond), EBUSY); + PTHREAD_REQUIRE(pthread_cond_signal(&cond)); + PTHREAD_REQUIRE(pthread_cond_destroy(&cond)); + + PTHREAD_REQUIRE(pthread_mutex_unlock(&mutex)); + PTHREAD_REQUIRE(pthread_join(thread, NULL)); + PTHREAD_REQUIRE(pthread_mutex_destroy(&mutex)); +} +#endif + static void unlock(void *arg) { @@ -547,6 +592,49 @@ ATF_TC_BODY(destroy_after_cancel, tc) PTHREAD_REQUIRE(pthread_mutex_destroy(&mutex)); } +static void * +destroy_after_signal_threadfunc(void *arg) +{ + PTHREAD_REQUIRE(pthread_mutex_lock(&mutex)); + + share = 1; + PTHREAD_REQUIRE(pthread_cond_broadcast(&cond)); + PTHREAD_REQUIRE(pthread_cond_wait(&cond, &mutex)); + + PTHREAD_REQUIRE(pthread_mutex_unlock(&mutex)); + + return NULL; +} + +ATF_TC(destroy_after_signal); +ATF_TC_HEAD(destroy_after_signal, tc) +{ + atf_tc_set_md_var(tc, "descr", "Checks destroying a condition variable " + "immediately after signaling waiters"); +} +ATF_TC_BODY(destroy_after_signal, tc) +{ + pthread_t thread; + + PTHREAD_REQUIRE(pthread_mutex_init(&mutex, NULL)); + PTHREAD_REQUIRE(pthread_cond_init(&cond, NULL)); + PTHREAD_REQUIRE(pthread_mutex_lock(&mutex)); + PTHREAD_REQUIRE(pthread_create(&thread, NULL, + destroy_after_signal_threadfunc, NULL)); + + while (share == 0) { + PTHREAD_REQUIRE(pthread_cond_wait(&cond, &mutex)); + } + + PTHREAD_REQUIRE(pthread_cond_signal(&cond)); + PTHREAD_REQUIRE(pthread_cond_destroy(&cond)); + PTHREAD_REQUIRE(pthread_mutex_unlock(&mutex)); + + PTHREAD_REQUIRE(pthread_join(thread, NULL)); + + PTHREAD_REQUIRE(pthread_mutex_destroy(&mutex)); +} + ATF_TC(condattr); ATF_TC_HEAD(condattr, tc) { @@ -577,7 +665,11 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, cond_timedwait_race); ATF_TP_ADD_TC(tp, broadcast); ATF_TP_ADD_TC(tp, bogus_timedwaits); +#ifdef __FreeBSD__ + ATF_TP_ADD_TC(tp, destroy_busy); +#endif ATF_TP_ADD_TC(tp, destroy_after_cancel); + ATF_TP_ADD_TC(tp, destroy_after_signal); ATF_TP_ADD_TC(tp, condattr); return atf_no_error(); Modified: stable/12/lib/libthr/thread/thr_cond.c ============================================================================== --- stable/12/lib/libthr/thread/thr_cond.c Mon Mar 25 14:04:23 2019 (r345500) +++ stable/12/lib/libthr/thread/thr_cond.c Mon Mar 25 14:05:35 2019 (r345501) @@ -166,17 +166,26 @@ _pthread_cond_destroy(pthread_cond_t *cond) error = 0; if (*cond == THR_PSHARED_PTR) { cvp = __thr_pshared_offpage(cond, 0); - if (cvp != NULL) - __thr_pshared_destroy(cond); - *cond = THR_COND_DESTROYED; + if (cvp != NULL) { + if (cvp->kcond.c_has_waiters) + error = EBUSY; + else + __thr_pshared_destroy(cond); + } + if (error == 0) + *cond = THR_COND_DESTROYED; } else if ((cvp = *cond) == THR_COND_INITIALIZER) { /* nothing */ } else if (cvp == THR_COND_DESTROYED) { error = EINVAL; } else { cvp = *cond; - *cond = THR_COND_DESTROYED; - free(cvp); + if (cvp->__has_user_waiters || cvp->kcond.c_has_waiters) + error = EBUSY; + else { + *cond = THR_COND_DESTROYED; + free(cvp); + } } return (error); } From owner-svn-src-all@freebsd.org Mon Mar 25 14:08:51 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4C131562C90; Mon, 25 Mar 2019 14:08:50 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 888BD6DC0B; Mon, 25 Mar 2019 14:08:50 +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 63B998DDE; Mon, 25 Mar 2019 14:08:50 +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 x2PE8oZu049800; Mon, 25 Mar 2019 14:08:50 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2PE8nVS049794; Mon, 25 Mar 2019 14:08:49 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201903251408.x2PE8nVS049794@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 25 Mar 2019 14:08:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345502 - in stable/12: sys/kern sys/sys usr.bin/procstat X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in stable/12: sys/kern sys/sys usr.bin/procstat X-SVN-Commit-Revision: 345502 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 888BD6DC0B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.944,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Mar 2019 14:08:51 -0000 Author: markj Date: Mon Mar 25 14:08:49 2019 New Revision: 345502 URL: https://svnweb.freebsd.org/changeset/base/345502 Log: MFC r344823: Show wiring state of map entries in procstat -v. Modified: stable/12/sys/kern/kern_proc.c stable/12/sys/sys/user.h stable/12/usr.bin/procstat/procstat.1 stable/12/usr.bin/procstat/procstat_vm.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/kern_proc.c ============================================================================== --- stable/12/sys/kern/kern_proc.c Mon Mar 25 14:05:35 2019 (r345501) +++ stable/12/sys/kern/kern_proc.c Mon Mar 25 14:08:49 2019 (r345502) @@ -2460,6 +2460,8 @@ kern_proc_vmmap_out(struct proc *p, struct sbuf *sb, s kve->kve_flags |= KVME_FLAG_GROWS_UP; if (entry->eflags & MAP_ENTRY_GROWS_DOWN) kve->kve_flags |= KVME_FLAG_GROWS_DOWN; + if (entry->eflags & MAP_ENTRY_USER_WIRED) + kve->kve_flags |= KVME_FLAG_USER_WIRED; last_timestamp = map->timestamp; vm_map_unlock_read(map); Modified: stable/12/sys/sys/user.h ============================================================================== --- stable/12/sys/sys/user.h Mon Mar 25 14:05:35 2019 (r345501) +++ stable/12/sys/sys/user.h Mon Mar 25 14:08:49 2019 (r345502) @@ -471,6 +471,7 @@ struct kinfo_file { #define KVME_FLAG_SUPER 0x00000008 #define KVME_FLAG_GROWS_UP 0x00000010 #define KVME_FLAG_GROWS_DOWN 0x00000020 +#define KVME_FLAG_USER_WIRED 0x00000040 #if defined(__amd64__) #define KINFO_OVMENTRY_SIZE 1168 Modified: stable/12/usr.bin/procstat/procstat.1 ============================================================================== --- stable/12/usr.bin/procstat/procstat.1 Mon Mar 25 14:05:35 2019 (r345501) +++ stable/12/usr.bin/procstat/procstat.1 Mon Mar 25 14:08:49 2019 (r345502) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 14, 2017 +.Dd March 4, 2019 .Dt PROCSTAT 1 .Os .Sh NAME @@ -662,6 +662,11 @@ one or more superpage mappings are used grows down (top-down stack) .It U grows up (bottom-up stack) +.It W +pages in this range are locked by +.Xr mlock 2 +or +.Xr mlockall 2 .El .Ss ELF Auxiliary Vector Display ELF auxiliary vector values: @@ -684,6 +689,8 @@ auxiliary vector value .Xr sockstat 1 , .Xr cap_enter 2 , .Xr cap_rights_limit 2 , +.Xr mlock 2 , +.Xr mlockall 2 , .Xr libprocstat 3 , .Xr libxo 3 , .Xr signal 3 , Modified: stable/12/usr.bin/procstat/procstat_vm.c ============================================================================== --- stable/12/usr.bin/procstat/procstat_vm.c Mon Mar 25 14:05:35 2019 (r345501) +++ stable/12/usr.bin/procstat/procstat_vm.c Mon Mar 25 14:08:49 2019 (r345502) @@ -53,7 +53,7 @@ procstat_vm(struct procstat *procstat, struct kinfo_pr ptrwidth = 2*sizeof(void *) + 2; if ((procstat_opts & PS_OPT_NOHEADER) == 0) - xo_emit("{T:/%5s %*s %*s %3s %4s %4s %3s %3s %-4s %-2s %-s}\n", + xo_emit("{T:/%5s %*s %*s %3s %4s %4s %3s %3s %-5s %-2s %-s}\n", "PID", ptrwidth, "START", ptrwidth, "END", "PRT", "RES", "PRES", "REF", "SHD", "FLAG", "TP", "PATH"); @@ -98,9 +98,11 @@ procstat_vm(struct procstat *procstat, struct kinfo_pr KVME_FLAG_NEEDS_COPY ? "N" : "-"); xo_emit("{d:super_pages/%-1s}", kve->kve_flags & KVME_FLAG_SUPER ? "S" : "-"); - xo_emit("{d:grows_down/%-1s} ", kve->kve_flags & + xo_emit("{d:grows_down/%-1s}", kve->kve_flags & KVME_FLAG_GROWS_UP ? "U" : kve->kve_flags & KVME_FLAG_GROWS_DOWN ? "D" : "-"); + xo_emit("{d:wired/%-1s} ", kve->kve_flags & + KVME_FLAG_USER_WIRED ? "W" : "-"); xo_open_container("kve_flags"); xo_emit("{en:copy_on_write/%s}", kve->kve_flags & KVME_FLAG_COW ? "true" : "false"); @@ -112,6 +114,8 @@ procstat_vm(struct procstat *procstat, struct kinfo_pr KVME_FLAG_GROWS_UP ? "true" : "false"); xo_emit("{en:grows_down/%s}", kve->kve_flags & KVME_FLAG_GROWS_DOWN ? "true" : "false"); + xo_emit("{en:wired/%s}", kve->kve_flags & + KVME_FLAG_USER_WIRED ? "true" : "false"); xo_close_container("kve_flags"); switch (kve->kve_type) { case KVME_TYPE_NONE: From owner-svn-src-all@freebsd.org Mon Mar 25 14:13:03 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C93071562F51 for ; Mon, 25 Mar 2019 14:13:03 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound3d.ore.mailhop.org (outbound3d.ore.mailhop.org [54.186.57.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4730C6E0AD for ; Mon, 25 Mar 2019 14:13:03 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1553523181; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=OrBMEuMnGj1f7qcBAOPmt/Wl/jcnrTbgunL+oR9bXwZNWZQBLjEa9XaAeqx0bvecT4MNhXt4YYor6 GMbzS+Nu13VB06plIRz2qYkcMzZKM8KMYJfoh2+7VsRo96GiTtP0E2kT+YgHVUekZ2Pu+VcROHEqqF XUQ7oSedY1zccJkQLDHBLL86TUsqbtn7AAmWgdr5UEsiYUvfNdN4X4pTHeDzea/UOwZH6Y/0zn2kZT xxrLR63mMTsMhGLt+dMVkEp9L3wMdWrBbpIoShU42NhX6K8w4OZB1pqG5qTA4fw048Yq1aqUj9VgLr hlR1nn0tmMILNJrzZWfef7IUtdX1oOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=fjLrQ7kUogUd8RcxbiU2tdIiGG8pQEzyppF+wuGhXbE=; b=d1r4RVsvmHqAv0Me8YrMbZ1k5p2G886rEg1X1SqS+Y+Bt6TPOpDZP/IE34iYKsn/q4XUPFRmw2sEv lyVuBQ66gl0ofenm6W2nsf4osxCEQsrrB/KLm4u539foeK6oZIhbrvJBbcSSt/w9h3vr955zB6+a0B 2IMTfsK8cdEFFb6X1ROnFvWZMoT3bIssAmUb3APH3Bm7FzqWk1pR9FHFhy12BL598bhdgak0LBVvi8 krwM6zCW1gdf0fMrDJc4u0s7jx47vrNhQLaPEmR4iidXrMSMkqG+e9KgfQTGbd2TgoiyYZG0q+9fXq XbxKtKAGumQE7mc5x/0lwS17BT198JQ== ARC-Authentication-Results: i=1; outbound3.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=fjLrQ7kUogUd8RcxbiU2tdIiGG8pQEzyppF+wuGhXbE=; b=tJmPxKzvULHuorqgawFUd787UFddOW+5lDY8KC1C8zLaWtu3jLunvbLb4j4wX5AXQAowuMmKjdAL3 HWCuplJS+QuL44fFHYZ7FqyRugmdTN8X2YmBMvl/rH9IRElWZkL7zTpkz3d2kMe6ACkoAhufdNnX25 4cLMJ64dERWaFQjfdLbVeV4iPV7jQ3zbCnpGJHDz+DpGp1yqmY7N8j8KAKHi4oVq5zpwyDBcRxytIZ maiUKMVONoKFdLvKU7Rae2s2uDpI68Hb+i02Nn02yQc68HvDp0NUdevzitYcYy5kgHcW96MSW1+Hf5 y/ghEWGZskrQvuhktSfmWs6z0nJXttA== X-MHO-RoutePath: aGlwcGll X-MHO-User: 17b2f355-4f08-11e9-9bb1-1f29e4676f89 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound3.ore.mailhop.org (Halon) with ESMTPSA id 17b2f355-4f08-11e9-9bb1-1f29e4676f89; Mon, 25 Mar 2019 14:13:00 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x2PECwsv083222; Mon, 25 Mar 2019 08:12:58 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <3398a21318a4a6715609004d569d20de86f1dc7a.camel@freebsd.org> Subject: Re: svn commit: r345491 - in head/sys: conf fs/tmpfs modules/tmpfs From: Ian Lepore To: Cy Schubert , Allan Jude Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Mon, 25 Mar 2019 08:12:58 -0600 In-Reply-To: <201903251242.x2PCgre6051543@slippy.cwsent.com> References: <201903251242.x2PCgre6051543@slippy.cwsent.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4730C6E0AD X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.991,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Mar 2019 14:13:04 -0000 On Mon, 2019-03-25 at 05:42 -0700, Cy Schubert wrote: > In message <201903250746.x2P7kKUu019786@repo.freebsd.org>, Allan > Jude > writes: > > Author: allanjude > > Date: Mon Mar 25 07:46:20 2019 > > New Revision: 345491 > > URL: https://svnweb.freebsd.org/changeset/base/345491 > > > > Log: > > Make TMPFS_PAGES_MINRESERVED a kernel option > > > > TMPFS_PAGES_MINRESERVED controls how much memory is reserved for > > the system > > and not used by tmpfs. > > > > On very small memory systems, the default value may be too high > > and this > > prevents these small memory systems from using reroot, which is > > required > > for them to install firmware updates. > > > > Submitted by: Hiroki Mori > > Reviewed by: mizhka > > Differential Revision: https://reviews.freebsd.org/D13583 > > > > Modified: > > head/sys/conf/options > > head/sys/fs/tmpfs/tmpfs.h > > head/sys/fs/tmpfs/tmpfs_vfsops.c > > head/sys/modules/tmpfs/Makefile > > > > Would this be a good candidate for a sysctl or tuneable? > The small-memory embedded systems most affected by this often don't use loader(8) at all, so tunables aren't an option, and sysctl may be too late. No reason it can't be a tunable as well, but it'll probably need to remain as a compile-time option too. -- Ian From owner-svn-src-all@freebsd.org Mon Mar 25 14:50:40 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2BD4F1563DC1; Mon, 25 Mar 2019 14:50:40 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C3D736F7F8; Mon, 25 Mar 2019 14:50:39 +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 9E37494C3; Mon, 25 Mar 2019 14:50:39 +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 x2PEodJI073540; Mon, 25 Mar 2019 14:50:39 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2PEodCZ073538; Mon, 25 Mar 2019 14:50:39 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201903251450.x2PEodCZ073538@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 25 Mar 2019 14:50:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345503 - stable/12/release/arm64 X-SVN-Group: stable-12 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: stable/12/release/arm64 X-SVN-Commit-Revision: 345503 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C3D736F7F8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Mar 2019 14:50:40 -0000 Author: gjb Date: Mon Mar 25 14:50:38 2019 New Revision: 345503 URL: https://svnweb.freebsd.org/changeset/base/345503 Log: MFC 345379: Bump the IMAGE_SIZE for arm64 SoC images to prevent failures due to full filesystem. This makes the size of the arm64 SoC images consistent with armv6 and armv7. Sponsored by: The FreeBSD Foundation Modified: stable/12/release/arm64/PINE64-LTS.conf stable/12/release/arm64/PINE64.conf stable/12/release/arm64/RPI3.conf Directory Properties: stable/12/ (props changed) Modified: stable/12/release/arm64/PINE64-LTS.conf ============================================================================== --- stable/12/release/arm64/PINE64-LTS.conf Mon Mar 25 14:08:49 2019 (r345502) +++ stable/12/release/arm64/PINE64-LTS.conf Mon Mar 25 14:50:38 2019 (r345503) @@ -9,7 +9,7 @@ EMBEDDEDBUILD=1 EMBEDDEDPORTS="sysutils/u-boot-sopine" FAT_SIZE="54m -b 1m" FAT_TYPE="16" -IMAGE_SIZE="2560M" +IMAGE_SIZE="3072M" KERNEL="GENERIC" MD_ARGS="-x 63 -y 255" NODOC=1 Modified: stable/12/release/arm64/PINE64.conf ============================================================================== --- stable/12/release/arm64/PINE64.conf Mon Mar 25 14:08:49 2019 (r345502) +++ stable/12/release/arm64/PINE64.conf Mon Mar 25 14:50:38 2019 (r345503) @@ -9,7 +9,7 @@ EMBEDDEDBUILD=1 EMBEDDEDPORTS="sysutils/u-boot-pine64" FAT_SIZE="54m -b 1m" FAT_TYPE="16" -IMAGE_SIZE="2560M" +IMAGE_SIZE="3072M" KERNEL="GENERIC" MD_ARGS="-x 63 -y 255" NODOC=1 Modified: stable/12/release/arm64/RPI3.conf ============================================================================== --- stable/12/release/arm64/RPI3.conf Mon Mar 25 14:08:49 2019 (r345502) +++ stable/12/release/arm64/RPI3.conf Mon Mar 25 14:50:38 2019 (r345503) @@ -11,7 +11,7 @@ EMBEDDEDBUILD=1 EMBEDDEDPORTS="sysutils/u-boot-rpi3 sysutils/rpi-firmware" FAT_SIZE="50m -b 1m" FAT_TYPE="16" -IMAGE_SIZE="2560M" +IMAGE_SIZE="3072M" KERNEL="GENERIC" MD_ARGS="-x 63 -y 255" NODOC=1 From owner-svn-src-all@freebsd.org Mon Mar 25 15:23:21 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 969B41564E47; Mon, 25 Mar 2019 15:23:21 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 335FB7113F; Mon, 25 Mar 2019 15:23:21 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 245D49B6B; Mon, 25 Mar 2019 15:23:21 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2PFNLIB096194; Mon, 25 Mar 2019 15:23:21 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2PFNL6I096193; Mon, 25 Mar 2019 15:23:21 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201903251523.x2PFNL6I096193@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 25 Mar 2019 15:23:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345504 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 345504 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 335FB7113F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Mar 2019 15:23:21 -0000 Author: tuexen Date: Mon Mar 25 15:23:20 2019 New Revision: 345504 URL: https://svnweb.freebsd.org/changeset/base/345504 Log: Improve locking when tearing down an SCTP association. This is joint work with rrs@ and the issue was found by syzkaller. MFC after: 1 week Modified: head/sys/netinet/sctp_pcb.c Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Mon Mar 25 14:50:38 2019 (r345503) +++ head/sys/netinet/sctp_pcb.c Mon Mar 25 15:23:20 2019 (r345504) @@ -4982,6 +4982,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tc * in case. */ /* anything on the wheel needs to be removed */ + SCTP_TCB_SEND_LOCK(stcb); for (i = 0; i < asoc->streamoutcnt; i++) { struct sctp_stream_out *outs; @@ -4990,7 +4991,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tc TAILQ_FOREACH_SAFE(sp, &outs->outqueue, next, nsp) { atomic_subtract_int(&asoc->stream_queue_cnt, 1); TAILQ_REMOVE(&outs->outqueue, sp, next); - stcb->asoc.ss_functions.sctp_ss_remove_from_stream(stcb, asoc, outs, sp, 0); + stcb->asoc.ss_functions.sctp_ss_remove_from_stream(stcb, asoc, outs, sp, 1); sctp_free_spbufspace(stcb, asoc, sp); if (sp->data) { if (so) { @@ -5012,6 +5013,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tc sctp_free_a_strmoq(stcb, sp, SCTP_SO_LOCKED); } } + SCTP_TCB_SEND_UNLOCK(stcb); /* sa_ignore FREED_MEMORY */ TAILQ_FOREACH_SAFE(strrst, &asoc->resetHead, next_resp, nstrrst) { TAILQ_REMOVE(&asoc->resetHead, strrst, next_resp); From owner-svn-src-all@freebsd.org Mon Mar 25 16:40:55 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 793DC15452A4; Mon, 25 Mar 2019 16:40:55 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1D40B74874; Mon, 25 Mar 2019 16:40:55 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E6B7FA7C4; Mon, 25 Mar 2019 16:40:54 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2PGesA2041580; Mon, 25 Mar 2019 16:40:54 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2PGesW6041578; Mon, 25 Mar 2019 16:40:54 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201903251640.x2PGesW6041578@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 25 Mar 2019 16:40:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345505 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 345505 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1D40B74874 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Mar 2019 16:40:55 -0000 Author: tuexen Date: Mon Mar 25 16:40:54 2019 New Revision: 345505 URL: https://svnweb.freebsd.org/changeset/base/345505 Log: Initialize scheduler specific data for the FCFS scheduler. This is joint work with rrs@. The issue was reported by using syzkaller. MFC after: 1 week Modified: head/sys/netinet/sctp_ss_functions.c Modified: head/sys/netinet/sctp_ss_functions.c ============================================================================== --- head/sys/netinet/sctp_ss_functions.c Mon Mar 25 15:23:20 2019 (r345504) +++ head/sys/netinet/sctp_ss_functions.c Mon Mar 25 16:40:54 2019 (r345505) @@ -838,6 +838,8 @@ sctp_ss_fcfs_init_stream(struct sctp_tcb *stcb, struct stcb->asoc.ss_data.last_out_stream = strq; } } + strq->ss_params.fb.next_spoke.tqe_next = NULL; + strq->ss_params.fb.next_spoke.tqe_prev = NULL; return; } From owner-svn-src-all@freebsd.org Mon Mar 25 17:03:40 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 641851546100; Mon, 25 Mar 2019 17:03:40 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C8CCA75900; Mon, 25 Mar 2019 17:03:39 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B668CACB2; Mon, 25 Mar 2019 17:03:39 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2PH3dpa059332; Mon, 25 Mar 2019 17:03:39 GMT (envelope-from dab@FreeBSD.org) Received: (from dab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2PH3dHC059331; Mon, 25 Mar 2019 17:03:39 GMT (envelope-from dab@FreeBSD.org) Message-Id: <201903251703.x2PH3dHC059331@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dab set sender to dab@FreeBSD.org using -f From: David Bright Date: Mon, 25 Mar 2019 17:03:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345506 - stable/12/sys/dev/pms/RefTisa/tisa/sassata/sas/ini X-SVN-Group: stable-12 X-SVN-Commit-Author: dab X-SVN-Commit-Paths: stable/12/sys/dev/pms/RefTisa/tisa/sassata/sas/ini X-SVN-Commit-Revision: 345506 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C8CCA75900 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.951,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Mar 2019 17:03:40 -0000 Author: dab Date: Mon Mar 25 17:03:39 2019 New Revision: 345506 URL: https://svnweb.freebsd.org/changeset/base/345506 Log: MFC r345009: Fix a scribbler in the PMS driver. The ESGL bit was left uninitialized when executing the REPORT LUNS ioctl. This could allow a zeroed data buffer to be treated as a scatter/gather list. The firmware would eventually walk past the end of the data buffer, potentially find what looked like a valid address/length pair, and write the result to semi-random memory. Obtained from: Dell EMC Isilon Sponsored by: Dell EMC Isilon Modified: stable/12/sys/dev/pms/RefTisa/tisa/sassata/sas/ini/itdio.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/pms/RefTisa/tisa/sassata/sas/ini/itdio.c ============================================================================== --- stable/12/sys/dev/pms/RefTisa/tisa/sassata/sas/ini/itdio.c Mon Mar 25 16:40:54 2019 (r345505) +++ stable/12/sys/dev/pms/RefTisa/tisa/sassata/sas/ini/itdio.c Mon Mar 25 17:03:39 2019 (r345506) @@ -1874,7 +1874,9 @@ tiNumOfLunIOCTLreq( agSSPFrame->dataLength = REPORT_LUN_LEN; agSSPFrame->agSgl.len = sizeof(agsaSSPCmdInfoUnit_t); - + agSSPFrame->agSgl.extReserved = 0; + CLEAR_ESGL_EXTEND(agSSPFrame->agSgl.extReserved); + status = saSSPStart(agRoot, agIORequest, 0, agDevHandle, agRequestType,agSASRequestBody,agNULL, &ossaSSPIoctlCompleted); if(status != AGSA_RC_SUCCESS) From owner-svn-src-all@freebsd.org Mon Mar 25 17:04:15 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80D1F1546179; Mon, 25 Mar 2019 17:04:15 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 25C7775A3E; Mon, 25 Mar 2019 17:04:15 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 00C34ACB5; Mon, 25 Mar 2019 17:04:15 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2PH4EaG059467; Mon, 25 Mar 2019 17:04:14 GMT (envelope-from dab@FreeBSD.org) Received: (from dab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2PH4EQ5059466; Mon, 25 Mar 2019 17:04:14 GMT (envelope-from dab@FreeBSD.org) Message-Id: <201903251704.x2PH4EQ5059466@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dab set sender to dab@FreeBSD.org using -f From: David Bright Date: Mon, 25 Mar 2019 17:04:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r345507 - stable/11/sys/dev/pms/RefTisa/tisa/sassata/sas/ini X-SVN-Group: stable-11 X-SVN-Commit-Author: dab X-SVN-Commit-Paths: stable/11/sys/dev/pms/RefTisa/tisa/sassata/sas/ini X-SVN-Commit-Revision: 345507 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 25C7775A3E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.951,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Mar 2019 17:04:15 -0000 Author: dab Date: Mon Mar 25 17:04:14 2019 New Revision: 345507 URL: https://svnweb.freebsd.org/changeset/base/345507 Log: MFC r345009: Fix a scribbler in the PMS driver. The ESGL bit was left uninitialized when executing the REPORT LUNS ioctl. This could allow a zeroed data buffer to be treated as a scatter/gather list. The firmware would eventually walk past the end of the data buffer, potentially find what looked like a valid address/length pair, and write the result to semi-random memory. Obtained from: Dell EMC Isilon Sponsored by: Dell EMC Isilon Modified: stable/11/sys/dev/pms/RefTisa/tisa/sassata/sas/ini/itdio.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/pms/RefTisa/tisa/sassata/sas/ini/itdio.c ============================================================================== --- stable/11/sys/dev/pms/RefTisa/tisa/sassata/sas/ini/itdio.c Mon Mar 25 17:03:39 2019 (r345506) +++ stable/11/sys/dev/pms/RefTisa/tisa/sassata/sas/ini/itdio.c Mon Mar 25 17:04:14 2019 (r345507) @@ -1874,7 +1874,9 @@ tiNumOfLunIOCTLreq( agSSPFrame->dataLength = REPORT_LUN_LEN; agSSPFrame->agSgl.len = sizeof(agsaSSPCmdInfoUnit_t); - + agSSPFrame->agSgl.extReserved = 0; + CLEAR_ESGL_EXTEND(agSSPFrame->agSgl.extReserved); + status = saSSPStart(agRoot, agIORequest, 0, agDevHandle, agRequestType,agSASRequestBody,agNULL, &ossaSSPIoctlCompleted); if(status != AGSA_RC_SUCCESS) From owner-svn-src-all@freebsd.org Mon Mar 25 17:04:34 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 327B415461EB; Mon, 25 Mar 2019 17:04:34 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CAAEF75B76; Mon, 25 Mar 2019 17:04:33 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A7DD1ACB6; Mon, 25 Mar 2019 17:04:33 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2PH4Xbs059558; Mon, 25 Mar 2019 17:04:33 GMT (envelope-from dab@FreeBSD.org) Received: (from dab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2PH4Xld059557; Mon, 25 Mar 2019 17:04:33 GMT (envelope-from dab@FreeBSD.org) Message-Id: <201903251704.x2PH4Xld059557@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dab set sender to dab@FreeBSD.org using -f From: David Bright Date: Mon, 25 Mar 2019 17:04:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r345508 - stable/10/sys/dev/pms/RefTisa/tisa/sassata/sas/ini X-SVN-Group: stable-10 X-SVN-Commit-Author: dab X-SVN-Commit-Paths: stable/10/sys/dev/pms/RefTisa/tisa/sassata/sas/ini X-SVN-Commit-Revision: 345508 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CAAEF75B76 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.951,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Mar 2019 17:04:34 -0000 Author: dab Date: Mon Mar 25 17:04:33 2019 New Revision: 345508 URL: https://svnweb.freebsd.org/changeset/base/345508 Log: MFC r345009: Fix a scribbler in the PMS driver. The ESGL bit was left uninitialized when executing the REPORT LUNS ioctl. This could allow a zeroed data buffer to be treated as a scatter/gather list. The firmware would eventually walk past the end of the data buffer, potentially find what looked like a valid address/length pair, and write the result to semi-random memory. Obtained from: Dell EMC Isilon Sponsored by: Dell EMC Isilon Modified: stable/10/sys/dev/pms/RefTisa/tisa/sassata/sas/ini/itdio.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/pms/RefTisa/tisa/sassata/sas/ini/itdio.c ============================================================================== --- stable/10/sys/dev/pms/RefTisa/tisa/sassata/sas/ini/itdio.c Mon Mar 25 17:04:14 2019 (r345507) +++ stable/10/sys/dev/pms/RefTisa/tisa/sassata/sas/ini/itdio.c Mon Mar 25 17:04:33 2019 (r345508) @@ -1874,7 +1874,9 @@ tiNumOfLunIOCTLreq( agSSPFrame->dataLength = REPORT_LUN_LEN; agSSPFrame->agSgl.len = sizeof(agsaSSPCmdInfoUnit_t); - + agSSPFrame->agSgl.extReserved = 0; + CLEAR_ESGL_EXTEND(agSSPFrame->agSgl.extReserved); + status = saSSPStart(agRoot, agIORequest, 0, agDevHandle, agRequestType,agSASRequestBody,agNULL, &ossaSSPIoctlCompleted); if(status != AGSA_RC_SUCCESS) From owner-svn-src-all@freebsd.org Mon Mar 25 17:45:49 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86641154778A; Mon, 25 Mar 2019 17:45:49 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DDB6A778B6; Mon, 25 Mar 2019 17:45:48 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AC834B3A5; Mon, 25 Mar 2019 17:45:48 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2PHjmdj085158; Mon, 25 Mar 2019 17:45:48 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2PHjmmJ085155; Mon, 25 Mar 2019 17:45:48 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201903251745.x2PHjmmJ085155@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Mon, 25 Mar 2019 17:45:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345509 - in stable: 11/share/examples/etc 11/share/mk 12/share/examples/etc 12/share/mk X-SVN-Group: stable-12 X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in stable: 11/share/examples/etc 11/share/mk 12/share/examples/etc 12/share/mk X-SVN-Commit-Revision: 345509 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DDB6A778B6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.953,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Mar 2019 17:45:49 -0000 Author: jkim Date: Mon Mar 25 17:45:47 2019 New Revision: 345509 URL: https://svnweb.freebsd.org/changeset/base/345509 Log: MFC: r345387 Catch up with Clang 7.0. Modified: stable/12/share/examples/etc/make.conf stable/12/share/mk/bsd.cpu.mk Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/share/examples/etc/make.conf stable/11/share/mk/bsd.cpu.mk Directory Properties: stable/11/ (props changed) Modified: stable/12/share/examples/etc/make.conf ============================================================================== --- stable/12/share/examples/etc/make.conf Mon Mar 25 17:04:33 2019 (r345508) +++ stable/12/share/examples/etc/make.conf Mon Mar 25 17:45:47 2019 (r345509) @@ -45,7 +45,8 @@ # Additionally the following CPU types are recognized by clang: # Intel x86 architecture (for both amd64 and i386): # (AMD CPUs) znver1, bdver4, bdver3, bdver2, bdver1, btver2, btver1 -# (Intel CPUs) cannonlake, knm, skylake-avx512, knl, goldmont, +# (Intel CPUs) tremont, goldmont-plus, icelake-server, icelake-client, +# cannonlake, knm, skylake-avx512, knl, goldmont, # skylake, broadwell, haswell, ivybridge, # sandybridge, westmere, nehalem, silvermont, bonnell # Modified: stable/12/share/mk/bsd.cpu.mk ============================================================================== --- stable/12/share/mk/bsd.cpu.mk Mon Mar 25 17:04:33 2019 (r345508) +++ stable/12/share/mk/bsd.cpu.mk Mon Mar 25 17:45:47 2019 (r345509) @@ -31,6 +31,8 @@ MACHINE_CPU = ultrasparc . if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" . if ${CPUTYPE} == "barcelona" CPUTYPE = amdfam10 +. elif ${CPUTYPE} == "skx" +CPUTYPE = skylake-avx512 . elif ${CPUTYPE} == "core-avx2" CPUTYPE = haswell . elif ${CPUTYPE} == "core-avx-i" @@ -199,7 +201,8 @@ MACHINE_CPU = 3dnow mmx k6 k5 i586 MACHINE_CPU = mmx k6 k5 i586 . elif ${CPUTYPE} == "k5" MACHINE_CPU = k5 i586 -. elif ${CPUTYPE} == "cannonlake" || ${CPUTYPE} == "knm" || \ +. elif ${CPUTYPE} == "icelake-server" || ${CPUTYPE} == "icelake-client" || \ + ${CPUTYPE} == "cannonlake" || ${CPUTYPE} == "knm" || \ ${CPUTYPE} == "skylake-avx512" || ${CPUTYPE} == "knl" MACHINE_CPU = avx512 avx2 avx sse42 sse41 ssse3 sse3 sse2 sse i686 mmx i586 . elif ${CPUTYPE} == "skylake" || ${CPUTYPE} == "broadwell" || \ @@ -207,7 +210,8 @@ MACHINE_CPU = avx512 avx2 avx sse42 sse41 ssse3 sse3 s MACHINE_CPU = avx2 avx sse42 sse41 ssse3 sse3 sse2 sse i686 mmx i586 . elif ${CPUTYPE} == "ivybridge" || ${CPUTYPE} == "sandybridge" MACHINE_CPU = avx sse42 sse41 ssse3 sse3 sse2 sse i686 mmx i586 -. elif ${CPUTYPE} == "goldmont" || ${CPUTYPE} == "westmere" || \ +. elif ${CPUTYPE} == "tremont" || ${CPUTYPE} == "goldmont-plus" || \ + ${CPUTYPE} == "goldmont" || ${CPUTYPE} == "westmere" || \ ${CPUTYPE} == "nehalem" || ${CPUTYPE} == "silvermont" MACHINE_CPU = sse42 sse41 ssse3 sse3 sse2 sse i686 mmx i586 . elif ${CPUTYPE} == "penryn" @@ -262,7 +266,8 @@ MACHINE_CPU = k8 3dnow sse3 . elif ${CPUTYPE} == "opteron" || ${CPUTYPE} == "athlon64" || \ ${CPUTYPE} == "athlon-fx" || ${CPUTYPE} == "k8" MACHINE_CPU = k8 3dnow -. elif ${CPUTYPE} == "cannonlake" || ${CPUTYPE} == "knm" || \ +. elif ${CPUTYPE} == "icelake-server" || ${CPUTYPE} == "icelake-client" || \ + ${CPUTYPE} == "cannonlake" || ${CPUTYPE} == "knm" || \ ${CPUTYPE} == "skylake-avx512" || ${CPUTYPE} == "knl" MACHINE_CPU = avx512 avx2 avx sse42 sse41 ssse3 sse3 . elif ${CPUTYPE} == "skylake" || ${CPUTYPE} == "broadwell" || \ @@ -270,7 +275,8 @@ MACHINE_CPU = avx512 avx2 avx sse42 sse41 ssse3 sse3 MACHINE_CPU = avx2 avx sse42 sse41 ssse3 sse3 . elif ${CPUTYPE} == "ivybridge" || ${CPUTYPE} == "sandybridge" MACHINE_CPU = avx sse42 sse41 ssse3 sse3 -. elif ${CPUTYPE} == "goldmont" || ${CPUTYPE} == "westmere" || \ +. elif ${CPUTYPE} == "tremont" || ${CPUTYPE} == "goldmont-plus" || \ + ${CPUTYPE} == "goldmont" || ${CPUTYPE} == "westmere" || \ ${CPUTYPE} == "nehalem" || ${CPUTYPE} == "silvermont" MACHINE_CPU = sse42 sse41 ssse3 sse3 . elif ${CPUTYPE} == "penryn" From owner-svn-src-all@freebsd.org Mon Mar 25 17:45:49 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1827154778B; Mon, 25 Mar 2019 17:45:49 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 42445778B7; Mon, 25 Mar 2019 17:45:49 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1EC4BB3A6; Mon, 25 Mar 2019 17:45:49 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2PHjnfE085166; Mon, 25 Mar 2019 17:45:49 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2PHjmIs085163; Mon, 25 Mar 2019 17:45:48 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201903251745.x2PHjmIs085163@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Mon, 25 Mar 2019 17:45:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r345509 - in stable: 11/share/examples/etc 11/share/mk 12/share/examples/etc 12/share/mk X-SVN-Group: stable-11 X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in stable: 11/share/examples/etc 11/share/mk 12/share/examples/etc 12/share/mk X-SVN-Commit-Revision: 345509 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 42445778B7 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.953,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Mar 2019 17:45:49 -0000 Author: jkim Date: Mon Mar 25 17:45:47 2019 New Revision: 345509 URL: https://svnweb.freebsd.org/changeset/base/345509 Log: MFC: r345387 Catch up with Clang 7.0. Modified: stable/11/share/examples/etc/make.conf stable/11/share/mk/bsd.cpu.mk Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/share/examples/etc/make.conf stable/12/share/mk/bsd.cpu.mk Directory Properties: stable/12/ (props changed) Modified: stable/11/share/examples/etc/make.conf ============================================================================== --- stable/11/share/examples/etc/make.conf Mon Mar 25 17:04:33 2019 (r345508) +++ stable/11/share/examples/etc/make.conf Mon Mar 25 17:45:47 2019 (r345509) @@ -45,7 +45,8 @@ # Additionally the following CPU types are recognized by clang: # Intel x86 architecture (for both amd64 and i386): # (AMD CPUs) znver1, bdver4, bdver3, bdver2, bdver1, btver2, btver1 -# (Intel CPUs) cannonlake, knm, skylake-avx512, knl, goldmont, +# (Intel CPUs) tremont, goldmont-plus, icelake-server, icelake-client, +# cannonlake, knm, skylake-avx512, knl, goldmont, # skylake, broadwell, haswell, ivybridge, # sandybridge, westmere, nehalem, silvermont, bonnell # Modified: stable/11/share/mk/bsd.cpu.mk ============================================================================== --- stable/11/share/mk/bsd.cpu.mk Mon Mar 25 17:04:33 2019 (r345508) +++ stable/11/share/mk/bsd.cpu.mk Mon Mar 25 17:45:47 2019 (r345509) @@ -31,6 +31,8 @@ MACHINE_CPU = ultrasparc . if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" . if ${CPUTYPE} == "barcelona" CPUTYPE = amdfam10 +. elif ${CPUTYPE} == "skx" +CPUTYPE = skylake-avx512 . elif ${CPUTYPE} == "core-avx2" CPUTYPE = haswell . elif ${CPUTYPE} == "core-avx-i" @@ -202,7 +204,8 @@ MACHINE_CPU = 3dnow mmx k6 k5 i586 MACHINE_CPU = mmx k6 k5 i586 . elif ${CPUTYPE} == "k5" MACHINE_CPU = k5 i586 -. elif ${CPUTYPE} == "cannonlake" || ${CPUTYPE} == "knm" || \ +. elif ${CPUTYPE} == "icelake-server" || ${CPUTYPE} == "icelake-client" || \ + ${CPUTYPE} == "cannonlake" || ${CPUTYPE} == "knm" || \ ${CPUTYPE} == "skylake-avx512" || ${CPUTYPE} == "knl" MACHINE_CPU = avx512 avx2 avx sse42 sse41 ssse3 sse3 sse2 sse i686 mmx i586 . elif ${CPUTYPE} == "skylake" || ${CPUTYPE} == "broadwell" || \ @@ -210,7 +213,8 @@ MACHINE_CPU = avx512 avx2 avx sse42 sse41 ssse3 sse3 s MACHINE_CPU = avx2 avx sse42 sse41 ssse3 sse3 sse2 sse i686 mmx i586 . elif ${CPUTYPE} == "ivybridge" || ${CPUTYPE} == "sandybridge" MACHINE_CPU = avx sse42 sse41 ssse3 sse3 sse2 sse i686 mmx i586 -. elif ${CPUTYPE} == "goldmont" || ${CPUTYPE} == "westmere" || \ +. elif ${CPUTYPE} == "tremont" || ${CPUTYPE} == "goldmont-plus" || \ + ${CPUTYPE} == "goldmont" || ${CPUTYPE} == "westmere" || \ ${CPUTYPE} == "nehalem" || ${CPUTYPE} == "silvermont" MACHINE_CPU = sse42 sse41 ssse3 sse3 sse2 sse i686 mmx i586 . elif ${CPUTYPE} == "penryn" @@ -265,7 +269,8 @@ MACHINE_CPU = k8 3dnow sse3 . elif ${CPUTYPE} == "opteron" || ${CPUTYPE} == "athlon64" || \ ${CPUTYPE} == "athlon-fx" || ${CPUTYPE} == "k8" MACHINE_CPU = k8 3dnow -. elif ${CPUTYPE} == "cannonlake" || ${CPUTYPE} == "knm" || \ +. elif ${CPUTYPE} == "icelake-server" || ${CPUTYPE} == "icelake-client" || \ + ${CPUTYPE} == "cannonlake" || ${CPUTYPE} == "knm" || \ ${CPUTYPE} == "skylake-avx512" || ${CPUTYPE} == "knl" MACHINE_CPU = avx512 avx2 avx sse42 sse41 ssse3 sse3 . elif ${CPUTYPE} == "skylake" || ${CPUTYPE} == "broadwell" || \ @@ -273,7 +278,8 @@ MACHINE_CPU = avx512 avx2 avx sse42 sse41 ssse3 sse3 MACHINE_CPU = avx2 avx sse42 sse41 ssse3 sse3 . elif ${CPUTYPE} == "ivybridge" || ${CPUTYPE} == "sandybridge" MACHINE_CPU = avx sse42 sse41 ssse3 sse3 -. elif ${CPUTYPE} == "goldmont" || ${CPUTYPE} == "westmere" || \ +. elif ${CPUTYPE} == "tremont" || ${CPUTYPE} == "goldmont-plus" || \ + ${CPUTYPE} == "goldmont" || ${CPUTYPE} == "westmere" || \ ${CPUTYPE} == "nehalem" || ${CPUTYPE} == "silvermont" MACHINE_CPU = sse42 sse41 ssse3 sse3 . elif ${CPUTYPE} == "penryn" From owner-svn-src-all@freebsd.org Mon Mar 25 18:02:05 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 905F81548018; Mon, 25 Mar 2019 18:02:05 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 33008805A5; Mon, 25 Mar 2019 18:02:05 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 289B0B6ED; Mon, 25 Mar 2019 18:02:05 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2PI25lu097025; Mon, 25 Mar 2019 18:02:05 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2PI25UO097024; Mon, 25 Mar 2019 18:02:05 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201903251802.x2PI25UO097024@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 25 Mar 2019 18:02:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345510 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 345510 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 33008805A5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Mar 2019 18:02:05 -0000 Author: andrew Date: Mon Mar 25 18:02:04 2019 New Revision: 345510 URL: https://svnweb.freebsd.org/changeset/base/345510 Log: Sort printing of the ID registers on arm64 to be identical to the documentation. This will simplify checking new fields when they are added. MFC after: 2 weeks Sponsored by: DARPA, AFRL Modified: head/sys/arm64/arm64/identcpu.c Modified: head/sys/arm64/arm64/identcpu.c ============================================================================== --- head/sys/arm64/arm64/identcpu.c Mon Mar 25 17:45:47 2019 (r345509) +++ head/sys/arm64/arm64/identcpu.c Mon Mar 25 18:02:04 2019 (r345510) @@ -494,63 +494,68 @@ print_cpu_features(u_int cpu) printed = 0; sbuf_printf(sb, " Instruction Set Attributes 0 = <"); - switch (ID_AA64ISAR0_RDM(cpu_desc[cpu].id_aa64isar0)) { - case ID_AA64ISAR0_RDM_NONE: + switch (ID_AA64ISAR0_DP(cpu_desc[cpu].id_aa64isar0)) { + case ID_AA64ISAR0_DP_NONE: break; - case ID_AA64ISAR0_RDM_IMPL: - sbuf_printf(sb, "%sRDM", SEP_STR); + case ID_AA64ISAR0_DP_IMPL: + sbuf_printf(sb, "%sDotProd", SEP_STR); break; default: - sbuf_printf(sb, "%sUnknown RDM", SEP_STR); + sbuf_printf(sb, "%sUnknown DP", SEP_STR); + break; } - switch (ID_AA64ISAR0_ATOMIC(cpu_desc[cpu].id_aa64isar0)) { - case ID_AA64ISAR0_ATOMIC_NONE: + switch (ID_AA64ISAR0_SM4(cpu_desc[cpu].id_aa64isar0)) { + case ID_AA64ISAR0_SM4_NONE: break; - case ID_AA64ISAR0_ATOMIC_IMPL: - sbuf_printf(sb, "%sAtomic", SEP_STR); + case ID_AA64ISAR0_SM4_IMPL: + sbuf_printf(sb, "%sSM4", SEP_STR); break; default: - sbuf_printf(sb, "%sUnknown Atomic", SEP_STR); + sbuf_printf(sb, "%sUnknown SM4", SEP_STR); + break; } - switch (ID_AA64ISAR0_AES(cpu_desc[cpu].id_aa64isar0)) { - case ID_AA64ISAR0_AES_NONE: + switch (ID_AA64ISAR0_SM3(cpu_desc[cpu].id_aa64isar0)) { + case ID_AA64ISAR0_SM3_NONE: break; - case ID_AA64ISAR0_AES_BASE: - sbuf_printf(sb, "%sAES", SEP_STR); + case ID_AA64ISAR0_SM3_IMPL: + sbuf_printf(sb, "%sSM3", SEP_STR); break; - case ID_AA64ISAR0_AES_PMULL: - sbuf_printf(sb, "%sAES+PMULL", SEP_STR); - break; default: - sbuf_printf(sb, "%sUnknown AES", SEP_STR); + sbuf_printf(sb, "%sUnknown SM3", SEP_STR); break; } - switch (ID_AA64ISAR0_SHA1(cpu_desc[cpu].id_aa64isar0)) { - case ID_AA64ISAR0_SHA1_NONE: + switch (ID_AA64ISAR0_SHA3(cpu_desc[cpu].id_aa64isar0)) { + case ID_AA64ISAR0_SHA3_NONE: break; - case ID_AA64ISAR0_SHA1_BASE: - sbuf_printf(sb, "%sSHA1", SEP_STR); + case ID_AA64ISAR0_SHA3_IMPL: + sbuf_printf(sb, "%sSHA3", SEP_STR); break; default: - sbuf_printf(sb, "%sUnknown SHA1", SEP_STR); + sbuf_printf(sb, "%sUnknown SHA3", SEP_STR); break; } - switch (ID_AA64ISAR0_SHA2(cpu_desc[cpu].id_aa64isar0)) { - case ID_AA64ISAR0_SHA2_NONE: + switch (ID_AA64ISAR0_RDM(cpu_desc[cpu].id_aa64isar0)) { + case ID_AA64ISAR0_RDM_NONE: break; - case ID_AA64ISAR0_SHA2_BASE: - sbuf_printf(sb, "%sSHA2", SEP_STR); + case ID_AA64ISAR0_RDM_IMPL: + sbuf_printf(sb, "%sRDM", SEP_STR); break; - case ID_AA64ISAR0_SHA2_512: - sbuf_printf(sb, "%sSHA2+SHA512", SEP_STR); - break; default: - sbuf_printf(sb, "%sUnknown SHA2", SEP_STR); + sbuf_printf(sb, "%sUnknown RDM", SEP_STR); + } + + switch (ID_AA64ISAR0_ATOMIC(cpu_desc[cpu].id_aa64isar0)) { + case ID_AA64ISAR0_ATOMIC_NONE: break; + case ID_AA64ISAR0_ATOMIC_IMPL: + sbuf_printf(sb, "%sAtomic", SEP_STR); + break; + default: + sbuf_printf(sb, "%sUnknown Atomic", SEP_STR); } switch (ID_AA64ISAR0_CRC32(cpu_desc[cpu].id_aa64isar0)) { @@ -564,47 +569,42 @@ print_cpu_features(u_int cpu) break; } - switch (ID_AA64ISAR0_SHA3(cpu_desc[cpu].id_aa64isar0)) { - case ID_AA64ISAR0_SHA3_NONE: + switch (ID_AA64ISAR0_SHA2(cpu_desc[cpu].id_aa64isar0)) { + case ID_AA64ISAR0_SHA2_NONE: break; - case ID_AA64ISAR0_SHA3_IMPL: - sbuf_printf(sb, "%sSHA3", SEP_STR); + case ID_AA64ISAR0_SHA2_BASE: + sbuf_printf(sb, "%sSHA2", SEP_STR); break; - default: - sbuf_printf(sb, "%sUnknown SHA3", SEP_STR); + case ID_AA64ISAR0_SHA2_512: + sbuf_printf(sb, "%sSHA2+SHA512", SEP_STR); break; - } - - switch (ID_AA64ISAR0_SM3(cpu_desc[cpu].id_aa64isar0)) { - case ID_AA64ISAR0_SM3_NONE: - break; - case ID_AA64ISAR0_SM3_IMPL: - sbuf_printf(sb, "%sSM3", SEP_STR); - break; default: - sbuf_printf(sb, "%sUnknown SM3", SEP_STR); + sbuf_printf(sb, "%sUnknown SHA2", SEP_STR); break; } - switch (ID_AA64ISAR0_SM4(cpu_desc[cpu].id_aa64isar0)) { - case ID_AA64ISAR0_SM4_NONE: + switch (ID_AA64ISAR0_SHA1(cpu_desc[cpu].id_aa64isar0)) { + case ID_AA64ISAR0_SHA1_NONE: break; - case ID_AA64ISAR0_SM4_IMPL: - sbuf_printf(sb, "%sSM4", SEP_STR); + case ID_AA64ISAR0_SHA1_BASE: + sbuf_printf(sb, "%sSHA1", SEP_STR); break; default: - sbuf_printf(sb, "%sUnknown SM4", SEP_STR); + sbuf_printf(sb, "%sUnknown SHA1", SEP_STR); break; } - switch (ID_AA64ISAR0_DP(cpu_desc[cpu].id_aa64isar0)) { - case ID_AA64ISAR0_DP_NONE: + switch (ID_AA64ISAR0_AES(cpu_desc[cpu].id_aa64isar0)) { + case ID_AA64ISAR0_AES_NONE: break; - case ID_AA64ISAR0_DP_IMPL: - sbuf_printf(sb, "%sDotProd", SEP_STR); + case ID_AA64ISAR0_AES_BASE: + sbuf_printf(sb, "%sAES", SEP_STR); break; + case ID_AA64ISAR0_AES_PMULL: + sbuf_printf(sb, "%sAES+PMULL", SEP_STR); + break; default: - sbuf_printf(sb, "%sUnknown DP", SEP_STR); + sbuf_printf(sb, "%sUnknown AES", SEP_STR); break; } @@ -868,17 +868,6 @@ print_cpu_features(u_int cpu) break; } - switch (ID_AA64MMFR0_TGRAN16(cpu_desc[cpu].id_aa64mmfr0)) { - case ID_AA64MMFR0_TGRAN16_NONE: - break; - case ID_AA64MMFR0_TGRAN16_IMPL: - sbuf_printf(sb, "%s16k Granule", SEP_STR); - break; - default: - sbuf_printf(sb, "%sUnknown 16k Granule", SEP_STR); - break; - } - switch (ID_AA64MMFR0_TGRAN64(cpu_desc[cpu].id_aa64mmfr0)) { case ID_AA64MMFR0_TGRAN64_NONE: break; @@ -890,14 +879,14 @@ print_cpu_features(u_int cpu) break; } - switch (ID_AA64MMFR0_BIGEND(cpu_desc[cpu].id_aa64mmfr0)) { - case ID_AA64MMFR0_BIGEND_FIXED: + switch (ID_AA64MMFR0_TGRAN16(cpu_desc[cpu].id_aa64mmfr0)) { + case ID_AA64MMFR0_TGRAN16_NONE: break; - case ID_AA64MMFR0_BIGEND_MIXED: - sbuf_printf(sb, "%sMixedEndian", SEP_STR); + case ID_AA64MMFR0_TGRAN16_IMPL: + sbuf_printf(sb, "%s16k Granule", SEP_STR); break; default: - sbuf_printf(sb, "%sUnknown Endian switching", SEP_STR); + sbuf_printf(sb, "%sUnknown 16k Granule", SEP_STR); break; } @@ -920,6 +909,17 @@ print_cpu_features(u_int cpu) break; default: sbuf_printf(sb, "%sUnknown S/NS Mem", SEP_STR); + break; + } + + switch (ID_AA64MMFR0_BIGEND(cpu_desc[cpu].id_aa64mmfr0)) { + case ID_AA64MMFR0_BIGEND_FIXED: + break; + case ID_AA64MMFR0_BIGEND_MIXED: + sbuf_printf(sb, "%sMixedEndian", SEP_STR); + break; + default: + sbuf_printf(sb, "%sUnknown Endian switching", SEP_STR); break; } From owner-svn-src-all@freebsd.org Mon Mar 25 18:19:38 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 77AED1548699; Mon, 25 Mar 2019 18:19:38 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1BCD58148E; Mon, 25 Mar 2019 18:19:38 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EB77EB8C0; Mon, 25 Mar 2019 18:19:37 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2PIJbUr005341; Mon, 25 Mar 2019 18:19:37 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2PIJbNE005340; Mon, 25 Mar 2019 18:19:37 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201903251819.x2PIJbNE005340@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 25 Mar 2019 18:19:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345511 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 345511 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1BCD58148E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Mar 2019 18:19:38 -0000 Author: glebius Date: Mon Mar 25 18:19:37 2019 New Revision: 345511 URL: https://svnweb.freebsd.org/changeset/base/345511 Log: Merge r344741: Remove bogus assert that I added in r319722. It is a legitimate case to call soabort() on a newborn socket created by sonewconn() in case if further setup of PCB failed. Code in sofree() handles such socket correctly. Submitted by: jtl, rrs Modified: stable/12/sys/kern/uipc_socket.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/uipc_socket.c ============================================================================== --- stable/12/sys/kern/uipc_socket.c Mon Mar 25 18:02:04 2019 (r345510) +++ stable/12/sys/kern/uipc_socket.c Mon Mar 25 18:19:37 2019 (r345511) @@ -1174,7 +1174,6 @@ soabort(struct socket *so) KASSERT(so->so_count == 0, ("soabort: so_count")); KASSERT((so->so_state & SS_PROTOREF) == 0, ("soabort: SS_PROTOREF")); KASSERT(so->so_state & SS_NOFDREF, ("soabort: !SS_NOFDREF")); - KASSERT(so->so_qstate == SQ_NONE, ("soabort: !SQ_NONE")); VNET_SO_ASSERT(so); if (so->so_proto->pr_usrreqs->pru_abort != NULL) From owner-svn-src-all@freebsd.org Mon Mar 25 19:17:39 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 32823154A66D; Mon, 25 Mar 2019 19:17:39 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 2A49B83BCF; Mon, 25 Mar 2019 19:17:36 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id 8V6BhNYAmo7SQ8V6ChUk0R; Mon, 25 Mar 2019 13:17:34 -0600 X-Authority-Analysis: v=2.3 cv=Go88BX9C c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=NTGMnVQrEZIA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=vFUrlwovrnZz3P6XXX4A:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy8 [10.2.2.6]) by spqr.komquats.com (Postfix) with ESMTPS id 09F3D8DA; Mon, 25 Mar 2019 12:17:30 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id x2PJHT0K068318; Mon, 25 Mar 2019 12:17:29 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id x2PJHTnc068310; Mon, 25 Mar 2019 12:17:29 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201903251917.x2PJHTnc068310@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Ian Lepore cc: Cy Schubert , Allan Jude , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r345491 - in head/sys: conf fs/tmpfs modules/tmpfs In-Reply-To: Message from Ian Lepore of "Mon, 25 Mar 2019 08:12:58 -0600." <3398a21318a4a6715609004d569d20de86f1dc7a.camel@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 25 Mar 2019 12:17:29 -0700 X-CMAE-Envelope: MS4wfEAlYWf+lRA3tDfMeVhVtiq2/BAQxSiD51gqSPM5FexHA0BClhuM0QzWfLCZ2Vv1bLYeguElf2BlNjLBnLeXSYPCx3mClytwT1s7T9DGFhrjhm1OAAtF HCTm2WKJQlmyNUdc5e2U4RBn9RCH5Wnt/ajRAEAVc4j5EvLtkBmoFjxrIUcaI15NWbjT4y3Ek10JvxxD08SWy9WAdGEYc12PdYfTQoPRelYLi26jR6/NkWlX Ug+/ZPH+2btMxd0QtZgF+qJd0ENMnMFMvdXI4DkM7jM/NwkXS71rRVGUACOkpWRlgHfKYQsONQKUBa82styICA== X-Rspamd-Queue-Id: 2A49B83BCF X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-4.84 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; RCPT_COUNT_FIVE(0.00)[6]; REPLYTO_EQ_FROM(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[spqr.komquats.com]; NEURAL_HAM_SHORT(-0.91)[-0.906,0]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_SPF_NA(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[138.136.59.64.list.dnswl.org : 127.0.5.1]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; RCVD_TLS_LAST(0.00)[]; IP_SCORE(-2.23)[ip: (-5.78), ipnet: 64.59.128.0/20(-2.98), asn: 6327(-2.29), country: CA(-0.09)]; RECEIVED_SPAMHAUS_PBL(0.00)[17.125.67.70.zen.spamhaus.org : 127.0.0.11] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Mar 2019 19:17:39 -0000 In message <3398a21318a4a6715609004d569d20de86f1dc7a.camel@freebsd.org> , Ian Le pore writes: > On Mon, 2019-03-25 at 05:42 -0700, Cy Schubert wrote: > > In message <201903250746.x2P7kKUu019786@repo.freebsd.org>, Allan > > Jude > > writes: > > > Author: allanjude > > > Date: Mon Mar 25 07:46:20 2019 > > > New Revision: 345491 > > > URL: https://svnweb.freebsd.org/changeset/base/345491 > > > > > > Log: > > > Make TMPFS_PAGES_MINRESERVED a kernel option > > > > > > TMPFS_PAGES_MINRESERVED controls how much memory is reserved for > > > the system > > > and not used by tmpfs. > > > > > > On very small memory systems, the default value may be too high > > > and this > > > prevents these small memory systems from using reroot, which is > > > required > > > for them to install firmware updates. > > > > > > Submitted by: Hiroki Mori > > > Reviewed by: mizhka > > > Differential Revision: https://reviews.freebsd.org/D13583 > > > > > > Modified: > > > head/sys/conf/options > > > head/sys/fs/tmpfs/tmpfs.h > > > head/sys/fs/tmpfs/tmpfs_vfsops.c > > > head/sys/modules/tmpfs/Makefile > > > > > > > Would this be a good candidate for a sysctl or tuneable? > > > > The small-memory embedded systems most affected by this often don't use > loader(8) at all, so tunables aren't an option, and sysctl may be too > late. No reason it can't be a tunable as well, but it'll probably need > to remain as a compile-time option too. Yes, I should have been more clear. I can see using a tuneable on a 2 GB or 4 GB Intel pandaboard. (Perfect for a firewall or a UPS management station.) -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Mon Mar 25 21:14:52 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4A728154E378; Mon, 25 Mar 2019 21:14:52 +0000 (UTC) (envelope-from grembo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DEF9287FCA; Mon, 25 Mar 2019 21:14:51 +0000 (UTC) (envelope-from grembo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B8569D8E3; Mon, 25 Mar 2019 21:14:51 +0000 (UTC) (envelope-from grembo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2PLEpVL015218; Mon, 25 Mar 2019 21:14:51 GMT (envelope-from grembo@FreeBSD.org) Received: (from grembo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2PLEpgH015217; Mon, 25 Mar 2019 21:14:51 GMT (envelope-from grembo@FreeBSD.org) Message-Id: <201903252114.x2PLEpgH015217@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: grembo set sender to grembo@FreeBSD.org using -f From: Michael Gmelin Date: Mon, 25 Mar 2019 21:14:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345512 - head/usr.sbin/daemon X-SVN-Group: head X-SVN-Commit-Author: grembo X-SVN-Commit-Paths: head/usr.sbin/daemon X-SVN-Commit-Revision: 345512 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DEF9287FCA X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Mar 2019 21:14:52 -0000 Author: grembo (ports committer) Date: Mon Mar 25 21:14:51 2019 New Revision: 345512 URL: https://svnweb.freebsd.org/changeset/base/345512 Log: Correct contradictory information on default syslog logging priority. MFC after: 1 week Modified: head/usr.sbin/daemon/daemon.8 Modified: head/usr.sbin/daemon/daemon.8 ============================================================================== --- head/usr.sbin/daemon/daemon.8 Mon Mar 25 18:19:37 2019 (r345511) +++ head/usr.sbin/daemon/daemon.8 Mon Mar 25 21:14:51 2019 (r345512) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 9, 2018 +.Dd March 25, 2019 .Dt DAEMON 8 .Os .Sh NAME @@ -129,7 +129,7 @@ Requires adequate superuser privileges. .It Fl s Ar syslog_priority These priorities are accepted: emerg, alert, crit, err, warning, notice, info, and debug. -The default is info. +The default is notice. .It Fl l Ar syslog_facility These facilities are accepted: auth, authpriv, console, cron, daemon, ftp, kern, lpr, mail, news, ntp, security, syslog, user, uucp, and From owner-svn-src-all@freebsd.org Mon Mar 25 21:38:59 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E7D9154E9FC; Mon, 25 Mar 2019 21:38:59 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 207AE88A08; Mon, 25 Mar 2019 21:38:59 +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 EAC2ADC5B; Mon, 25 Mar 2019 21:38:58 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2PLcwlI025575; Mon, 25 Mar 2019 21:38:58 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2PLcwJr025574; Mon, 25 Mar 2019 21:38:58 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201903252138.x2PLcwJr025574@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 25 Mar 2019 21:38:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345513 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 345513 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 207AE88A08 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Mar 2019 21:38:59 -0000 Author: markj Date: Mon Mar 25 21:38:58 2019 New Revision: 345513 URL: https://svnweb.freebsd.org/changeset/base/345513 Log: Reject F_SETLK_REMOTE commands when sysid == 0. A sysid of 0 denotes the local system, and some handlers for remote locking commands do not attempt to deal with local locks. Note that F_SETLK_REMOTE is only available to privileged users as it is intended to be used as a testing interface. Reviewed by: kib Reported by: syzbot+9c457a6ae014a3281eb8@syzkaller.appspotmail.com MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D19702 Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Mon Mar 25 21:14:51 2019 (r345512) +++ head/sys/kern/kern_descrip.c Mon Mar 25 21:38:58 2019 (r345513) @@ -601,7 +601,7 @@ kern_fcntl(struct thread *td, int fd, int cmd, intptr_ case F_SETLK_REMOTE: error = priv_check(td, PRIV_NFS_LOCKD); - if (error) + if (error != 0) return (error); flg = F_REMOTE; goto do_setlk; @@ -612,6 +612,12 @@ kern_fcntl(struct thread *td, int fd, int cmd, intptr_ case F_SETLK: do_setlk: + flp = (struct flock *)arg; + if ((flg & F_REMOTE) != 0 && flp->l_sysid == 0) { + error = EINVAL; + break; + } + error = fget_unlocked(fdp, fd, &cap_flock_rights, &fp, NULL); if (error != 0) break; @@ -621,7 +627,6 @@ kern_fcntl(struct thread *td, int fd, int cmd, intptr_ break; } - flp = (struct flock *)arg; if (flp->l_whence == SEEK_CUR) { foffset = foffset_get(fp); if (foffset < 0 || @@ -667,10 +672,6 @@ kern_fcntl(struct thread *td, int fd, int cmd, intptr_ flp, flg); break; case F_UNLCKSYS: - /* - * Temporary api for testing remote lock - * infrastructure. - */ if (flg != F_REMOTE) { error = EINVAL; break; From owner-svn-src-all@freebsd.org Tue Mar 26 01:28:12 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1F7151555070; Tue, 26 Mar 2019 01:28:12 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 97F816A299; Tue, 26 Mar 2019 01:28:11 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4551C1846B; Tue, 26 Mar 2019 01:28:11 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2Q1SB6t045844; Tue, 26 Mar 2019 01:28:11 GMT (envelope-from sobomax@FreeBSD.org) Received: (from sobomax@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2Q1SB1Y045843; Tue, 26 Mar 2019 01:28:11 GMT (envelope-from sobomax@FreeBSD.org) Message-Id: <201903260128.x2Q1SB1Y045843@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sobomax set sender to sobomax@FreeBSD.org using -f From: Maxim Sobolev Date: Tue, 26 Mar 2019 01:28:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345514 - head/sys/fs/tmpfs X-SVN-Group: head X-SVN-Commit-Author: sobomax X-SVN-Commit-Paths: head/sys/fs/tmpfs X-SVN-Commit-Revision: 345514 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 97F816A299 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Mar 2019 01:28:12 -0000 Author: sobomax Date: Tue Mar 26 01:28:10 2019 New Revision: 345514 URL: https://svnweb.freebsd.org/changeset/base/345514 Log: Refine r345425: get rid of superfluous helper macro that I have added. MFC after: 2 weeks Modified: head/sys/fs/tmpfs/tmpfs_vfsops.c Modified: head/sys/fs/tmpfs/tmpfs_vfsops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vfsops.c Mon Mar 25 21:38:58 2019 (r345513) +++ head/sys/fs/tmpfs/tmpfs_vfsops.c Tue Mar 26 01:28:10 2019 (r345514) @@ -137,8 +137,6 @@ tmpfs_node_fini(void *mem, int size) mtx_destroy(&node->tn_interlock); } -#define TMPFS_SC(mp) ((struct tmpfs_mount *)(mp)->mnt_data) - static int tmpfs_mount(struct mount *mp) { @@ -174,11 +172,11 @@ tmpfs_mount(struct mount *mp) * parameter, say trying to change rw to ro or vice * versa, would cause vfs_filteropt() to bail. */ - if (size_max != TMPFS_SC(mp)->tm_size_max) + if (size_max != VFS_TO_TMPFS(mp)->tm_size_max) return (EOPNOTSUPP); } if (vfs_flagopt(mp->mnt_optnew, "ro", NULL, 0) && - !(TMPFS_SC(mp)->tm_ronly)) { + !(VFS_TO_TMPFS(mp)->tm_ronly)) { /* RW -> RO */ error = VFS_SYNC(mp, MNT_WAIT); if (error) @@ -189,14 +187,14 @@ tmpfs_mount(struct mount *mp) error = vflush(mp, 0, flags, curthread); if (error) return (error); - TMPFS_SC(mp)->tm_ronly = 1; + VFS_TO_TMPFS(mp)->tm_ronly = 1; MNT_ILOCK(mp); mp->mnt_flag |= MNT_RDONLY; MNT_IUNLOCK(mp); } else if (!vfs_flagopt(mp->mnt_optnew, "ro", NULL, 0) && - TMPFS_SC(mp)->tm_ronly) { + VFS_TO_TMPFS(mp)->tm_ronly) { /* RO -> RW */ - TMPFS_SC(mp)->tm_ronly = 0; + VFS_TO_TMPFS(mp)->tm_ronly = 0; MNT_ILOCK(mp); mp->mnt_flag &= ~MNT_RDONLY; MNT_IUNLOCK(mp); From owner-svn-src-all@freebsd.org Tue Mar 26 02:13:26 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A34331558B72; Tue, 26 Mar 2019 02:13:26 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48D7C6CCC5; Tue, 26 Mar 2019 02:13:26 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3769318EBE; Tue, 26 Mar 2019 02:13:26 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2Q2DQWP071565; Tue, 26 Mar 2019 02:13:26 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2Q2DQWM071564; Tue, 26 Mar 2019 02:13:26 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201903260213.x2Q2DQWM071564@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 26 Mar 2019 02:13:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r345515 - vendor/NetBSD/tests/dist/lib/libc/regex X-SVN-Group: vendor X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: vendor/NetBSD/tests/dist/lib/libc/regex X-SVN-Commit-Revision: 345515 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 48D7C6CCC5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.949,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Mar 2019 02:13:26 -0000 Author: kevans Date: Tue Mar 26 02:13:25 2019 New Revision: 345515 URL: https://svnweb.freebsd.org/changeset/base/345515 Log: netbsd-tests: import memory bump for libc/regex/t_exhaust Modified: vendor/NetBSD/tests/dist/lib/libc/regex/t_exhaust.c Modified: vendor/NetBSD/tests/dist/lib/libc/regex/t_exhaust.c ============================================================================== --- vendor/NetBSD/tests/dist/lib/libc/regex/t_exhaust.c Tue Mar 26 01:28:10 2019 (r345514) +++ vendor/NetBSD/tests/dist/lib/libc/regex/t_exhaust.c Tue Mar 26 02:13:25 2019 (r345515) @@ -1,4 +1,4 @@ -/* $NetBSD: t_exhaust.c,v 1.8 2017/01/14 00:50:56 christos Exp $ */ +/* $NetBSD: t_exhaust.c,v 1.9 2019/03/16 21:57:15 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__RCSID("$NetBSD: t_exhaust.c,v 1.8 2017/01/14 00:50:56 christos Exp $"); +__RCSID("$NetBSD: t_exhaust.c,v 1.9 2019/03/16 21:57:15 christos Exp $"); #include #include @@ -56,7 +56,7 @@ mkstr(const char *str, size_t len) { size_t slen = strlen(str); char *p = malloc(slen * len + 1); - ATF_REQUIRE(p != NULL); + ATF_REQUIRE_MSG(p != NULL, "slen=%zu, len=%zu", slen, len); for (size_t i = 0; i < len; i++) strcpy(&p[i * slen], str); return p; @@ -183,11 +183,12 @@ ATF_TC_HEAD(regcomp_too_big, tc) ATF_TC_BODY(regcomp_too_big, tc) { regex_t re; - struct rlimit limit; int e; + struct rlimit limit; - limit.rlim_cur = limit.rlim_max = 64 * 1024 * 1024; + limit.rlim_cur = limit.rlim_max = 256 * 1024 * 1024; ATF_REQUIRE(setrlimit(RLIMIT_VMEM, &limit) != -1); + for (size_t i = 0; i < __arraycount(tests); i++) { char *d = (*tests[i].pattern)(REGEX_MAXSIZE); e = regcomp(&re, d, tests[i].type); From owner-svn-src-all@freebsd.org Tue Mar 26 02:21:10 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6B74015599C7; Tue, 26 Mar 2019 02:21:10 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 121016D7B0; Tue, 26 Mar 2019 02:21:10 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E181618F49; Tue, 26 Mar 2019 02:21:09 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2Q2L91f071963; Tue, 26 Mar 2019 02:21:09 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2Q2L95G071962; Tue, 26 Mar 2019 02:21:09 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201903260221.x2Q2L95G071962@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 26 Mar 2019 02:21:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345516 - head/contrib/netbsd-tests/lib/libc/regex X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/contrib/netbsd-tests/lib/libc/regex X-SVN-Commit-Revision: 345516 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 121016D7B0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.949,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Mar 2019 02:21:10 -0000 Author: kevans Date: Tue Mar 26 02:21:09 2019 New Revision: 345516 URL: https://svnweb.freebsd.org/changeset/base/345516 Log: MFV r345515: netbsd-tests: import memory bump for libc/regex/t_exhaust MFC after: 3 days Modified: head/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c Directory Properties: head/contrib/netbsd-tests/ (props changed) Modified: head/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c Tue Mar 26 02:13:25 2019 (r345515) +++ head/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c Tue Mar 26 02:21:09 2019 (r345516) @@ -1,4 +1,4 @@ -/* $NetBSD: t_exhaust.c,v 1.8 2017/01/14 00:50:56 christos Exp $ */ +/* $NetBSD: t_exhaust.c,v 1.9 2019/03/16 21:57:15 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__RCSID("$NetBSD: t_exhaust.c,v 1.8 2017/01/14 00:50:56 christos Exp $"); +__RCSID("$NetBSD: t_exhaust.c,v 1.9 2019/03/16 21:57:15 christos Exp $"); #include #include @@ -56,7 +56,7 @@ mkstr(const char *str, size_t len) { size_t slen = strlen(str); char *p = malloc(slen * len + 1); - ATF_REQUIRE(p != NULL); + ATF_REQUIRE_MSG(p != NULL, "slen=%zu, len=%zu", slen, len); for (size_t i = 0; i < len; i++) strcpy(&p[i * slen], str); return p; @@ -183,11 +183,12 @@ ATF_TC_HEAD(regcomp_too_big, tc) ATF_TC_BODY(regcomp_too_big, tc) { regex_t re; - struct rlimit limit; int e; + struct rlimit limit; - limit.rlim_cur = limit.rlim_max = 64 * 1024 * 1024; + limit.rlim_cur = limit.rlim_max = 256 * 1024 * 1024; ATF_REQUIRE(setrlimit(RLIMIT_VMEM, &limit) != -1); + for (size_t i = 0; i < __arraycount(tests); i++) { char *d = (*tests[i].pattern)(REGEX_MAXSIZE); e = regcomp(&re, d, tests[i].type); From owner-svn-src-all@freebsd.org Tue Mar 26 02:33:28 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E90A155B50F; Tue, 26 Mar 2019 02:33:28 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3D0DA6E879; Tue, 26 Mar 2019 02:33:28 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 094C4192F4; Tue, 26 Mar 2019 02:33:28 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2Q2XRPq081867; Tue, 26 Mar 2019 02:33:27 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2Q2XRc0081866; Tue, 26 Mar 2019 02:33:27 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201903260233.x2Q2XRc0081866@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 26 Mar 2019 02:33:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345517 - head/stand/lua X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/lua X-SVN-Commit-Revision: 345517 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3D0DA6E879 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.949,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Mar 2019 02:33:28 -0000 Author: kevans Date: Tue Mar 26 02:33:27 2019 New Revision: 345517 URL: https://svnweb.freebsd.org/changeset/base/345517 Log: lualoader: Clear the screen before prompting for password Assuming that the autoboot sequence was interrupted, we've done enough cursor manipulation that the prompt for the password will be sufficiently obscured a couple of lines up. Clear the screen and reset the cursor position here, too. MFC after: 1 week Modified: head/stand/lua/password.lua Modified: head/stand/lua/password.lua ============================================================================== --- head/stand/lua/password.lua Tue Mar 26 02:21:09 2019 (r345516) +++ head/stand/lua/password.lua Tue Mar 26 02:33:27 2019 (r345517) @@ -40,6 +40,12 @@ local show_password_mask = false local twiddle_chars = {"/", "-", "\\", "|"} local screen_setup = false +local function setup_screen() + screen.clear() + screen.defcursor() + screen_setup = true +end + -- Module exports function password.read(prompt_length) local str = "" @@ -90,9 +96,7 @@ function password.check() end if not screen_setup then - screen.clear() - screen.defcursor() - screen_setup = true + setup_screen() end while true do @@ -131,6 +135,11 @@ function password.check() local pwd = loader.getenv("password") if pwd ~= nil then core.autoboot() + -- The autoboot sequence was interrupted, so we'll need to + -- prompt for a password. Put the screen back into a known + -- good state, otherwise we're drawing back a couple lines + -- in the middle of other text. + setup_screen() end compare("Loader password:", pwd) end From owner-svn-src-all@freebsd.org Tue Mar 26 02:35:59 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8ECEE155BB83; Tue, 26 Mar 2019 02:35:59 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2AFD26ECA5; Tue, 26 Mar 2019 02:35:59 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E7CE419308; Tue, 26 Mar 2019 02:35:58 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2Q2Zw2U082016; Tue, 26 Mar 2019 02:35:58 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2Q2ZwqI082014; Tue, 26 Mar 2019 02:35:58 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201903260235.x2Q2ZwqI082014@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 26 Mar 2019 02:35:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345518 - head/stand/lua X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/lua X-SVN-Commit-Revision: 345518 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2AFD26ECA5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.949,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Mar 2019 02:35:59 -0000 Author: kevans Date: Tue Mar 26 02:35:58 2019 New Revision: 345518 URL: https://svnweb.freebsd.org/changeset/base/345518 Log: lualoader: Fix up some luacheck concerns - Garbage collect an unused (removed because it was useless) constant - Don't bother with vararg notation if args will not be used MFC after: 1 week Modified: head/stand/lua/config.lua head/stand/lua/menu.lua Modified: head/stand/lua/config.lua ============================================================================== --- head/stand/lua/config.lua Tue Mar 26 02:33:27 2019 (r345517) +++ head/stand/lua/config.lua Tue Mar 26 02:35:58 2019 (r345518) @@ -45,7 +45,6 @@ local MSG_FAILOPENCFG = "Failed to open config: '%s'" local MSG_FAILREADCFG = "Failed to read config: '%s'" local MSG_FAILPARSECFG = "Failed to parse config: '%s'" local MSG_FAILEXBEF = "Failed to execute '%s' before loading '%s'" -local MSG_FAILEXMOD = "Failed to execute '%s'" local MSG_FAILEXAF = "Failed to execute '%s' after loading '%s'" local MSG_MALFORMED = "Malformed line (%d):\n\t'%s'" local MSG_DEFAULTKERNFAIL = "No kernel set, failed to load from module_path" Modified: head/stand/lua/menu.lua ============================================================================== --- head/stand/lua/menu.lua Tue Mar 26 02:33:27 2019 (r345517) +++ head/stand/lua/menu.lua Tue Mar 26 02:35:58 2019 (r345518) @@ -494,7 +494,7 @@ function menu.autoboot(delay) end -- CLI commands -function cli.menu(...) +function cli.menu() menu.run() end From owner-svn-src-all@freebsd.org Tue Mar 26 02:45:25 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 50A36155CC65; Tue, 26 Mar 2019 02:45:25 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E5D276F835; Tue, 26 Mar 2019 02:45:24 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BC62B19507; Tue, 26 Mar 2019 02:45:24 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2Q2jON7087264; Tue, 26 Mar 2019 02:45:24 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2Q2jOqI087261; Tue, 26 Mar 2019 02:45:24 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201903260245.x2Q2jOqI087261@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 26 Mar 2019 02:45:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345519 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 345519 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E5D276F835 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.952,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Mar 2019 02:45:25 -0000 Author: kevans Date: Tue Mar 26 02:45:23 2019 New Revision: 345519 URL: https://svnweb.freebsd.org/changeset/base/345519 Log: Allow kernel config to specify DTS/DTSO to build, and out-of-tree support This allows for directives such as makeoptions DTS+=/out/of/tree/myboard.dts # in tree! Same rules applied as if this were in a dtb/ module makeoptions DTS+=otherboard.dts to be specified in config(5) and have these built/installed alongside th kernel. The assumption that overlays live in an overlays/ directory is only made for in-tree DTSO, but we still make the assumption that out-of-tree arm64 DTS will be in vendored directories (for now). This lowers the cost to hacking on an overlay or dts by being able to quickly throw it in a custom config, especially if it doesn't fit one of the current dtb/modules quite appropriately or it's not intended for commit there. The build/install targets were split out of dtb.mk to centralize the build logic and leave out the all/realinstall/CLEANFILES additions... it was believed that we didn't want to pollute the kernel build with these. The build rules were converted to suffix rules at the suggestion of Ian to clean things up a little bit in a world where we can have mixed in-tree/out-of-tree DTS/DTSO specified. Reviewed by: ian MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D19351 Added: head/sys/conf/dtb.build.mk (contents, props changed) Modified: head/sys/conf/dtb.mk head/sys/conf/kern.post.mk Added: head/sys/conf/dtb.build.mk ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/conf/dtb.build.mk Tue Mar 26 02:45:23 2019 (r345519) @@ -0,0 +1,77 @@ +# $FreeBSD$ + +.include +# Grab all the options for a kernel build. For backwards compat, we need to +# do this after bsd.own.mk. +.include "kern.opts.mk" + +DTC?= dtc + +.if !defined(SYSDIR) +.if defined(S) +SYSDIR= ${S} +.else +# Search for kernel source tree in standard places. +.for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. /sys /usr/src/sys +.if exists(${_dir}/kern/) +SYSDIR= ${_dir:tA} +.endif +.endfor +.endif # defined(S) +.endif # defined(SYSDIR) + +.if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) +.error "can't find kernel source tree" +.endif + +DTB=${DTS:T:R:S/$/.dtb/} +DTBO=${DTSO:T:R:S/$/.dtbo/} + +.SUFFIXES: .dtb .dts .dtbo .dtso +.PATH.dts: ${SYSDIR}/gnu/dts/${MACHINE} ${SYSDIR}/dts/${MACHINE} +.PATH.dtso: ${SYSDIR}/dts/${MACHINE}/overlays + +.export DTC ECHO + +.dts.dtb: ${OP_META} + @${ECHO} Generating ${.TARGET} from ${.IMPSRC} + @${SYSDIR}/tools/fdt/make_dtb.sh ${SYSDIR} ${.IMPSRC} ${.OBJDIR} + +.dtso.dtbo: ${OP_META} + @${ECHO} Generating ${.TARGET} from ${.IMPSRC} + @${SYSDIR}/tools/fdt/make_dtbo.sh ${SYSDIR} ${.IMPSRC} ${.OBJDIR} + +# Add dependencies on the source file so that out-of-tree things can be included +# without any .PATH additions. +.for _dts in ${DTS} +${_dts:R:T}.dtb: ${_dts} +.endfor + +.for _dtso in ${DTSO} +${_dtso:R:T}.dtbo: ${_dtso} +.endfor + +_dtbinstall: +# Need to create this because installkernel doesn't invoke mtree with BSD.root.mtree +# to make sure the tree is setup properly. We don't recreate it to avoid duplicate +# entries in the NO_ROOT case. + test -d ${DESTDIR}${DTBDIR} || ${INSTALL} -d -o ${DTBOWN} -g ${DTBGRP} ${DESTDIR}${DTBDIR} +.for _dtb in ${DTB} +.if ${MACHINE_CPUARCH} == "aarch64" + # :H:T here to grab the vendor component of the DTB path in a way that + # allows out-of-tree DTS builds, too. We make the assumption that + # out-of-tree DTS will have a similar directory structure to in-tree, + # with .dts files appearing in a vendor/ directory. + test -d ${DESTDIR}${DTBDIR}/${_dtb:H:T} || ${INSTALL} -d -o ${DTBOWN} -g ${DTBGRP} ${DESTDIR}${DTBDIR}/${_dtb:H:T} + ${INSTALL} -o ${DTBOWN} -g ${DTBGRP} -m ${DTBMODE} \ + ${_INSTALLFLAGS} ${_dtb:T} ${DESTDIR}${DTBDIR}/${_dtb:H:T} +.else + ${INSTALL} -o ${DTBOWN} -g ${DTBGRP} -m ${DTBMODE} \ + ${_INSTALLFLAGS} ${_dtb} ${DESTDIR}${DTBDIR}/ +.endif +.endfor + test -d ${DESTDIR}${DTBODIR} || ${INSTALL} -d -o ${DTBOWN} -g ${DTBGRP} ${DESTDIR}${DTBODIR} +.for _dtbo in ${DTBO} + ${INSTALL} -o ${DTBOWN} -g ${DTBGRP} -m ${DTBMODE} \ + ${_INSTALLFLAGS} ${_dtbo} ${DESTDIR}${DTBODIR}/ +.endfor Modified: head/sys/conf/dtb.mk ============================================================================== --- head/sys/conf/dtb.mk Tue Mar 26 02:35:58 2019 (r345518) +++ head/sys/conf/dtb.mk Tue Mar 26 02:45:23 2019 (r345519) @@ -8,6 +8,8 @@ # # DTS List of the dts files to build and install. # +# DTSO List of the dts overlay files to build and install. +# # DTBDIR Base path for dtb modules [/boot/dtb] # # DTBOWN .dtb file owner. [${BINOWN}] @@ -20,7 +22,7 @@ # # +++ targets +++ # -# install: +# install: # install the kernel module; if the Makefile # does not itself define the target install, the targets # beforeinstall and afterinstall may also be used to cause @@ -28,78 +30,15 @@ # is executed. # -.include -# Grab all the options for a kernel build. For backwards compat, we need to -# do this after bsd.own.mk. -.include "kern.opts.mk" +.include "dtb.build.mk" -DTC?= dtc - -# Search for kernel source tree in standard places. -.for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. /sys /usr/src/sys -.if !defined(SYSDIR) && exists(${_dir}/kern/) -SYSDIR= ${_dir:tA} -.endif -.endfor -.if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) -.error "can't find kernel source tree" -.endif - -.SUFFIXES: .dtb .dts .dtbo .dtso - -.PATH: ${SYSDIR}/gnu/dts/${MACHINE} ${SYSDIR}/dts/${MACHINE} ${SYSDIR}/dts/${MACHINE}/overlays - -DTB=${DTS:R:S/$/.dtb/} -DTBO=${DTSO:R:S/$/.dtbo/} - +.if !target(install) && !target(realinstall) all: ${DTB} ${DTBO} - -.if defined(DTS) -.export DTC ECHO -.for _dts in ${DTS} -${_dts:R:S/$/.dtb/}: ${_dts} ${OP_META} - @${ECHO} Generating ${.TARGET} from ${_dts} - @${SYSDIR}/tools/fdt/make_dtb.sh ${SYSDIR} ${_dts} ${.OBJDIR} -CLEANFILES+=${_dts:R:S/$/.dtb/} -.endfor -.endif - -.if defined(DTSO) -.export DTC ECHO -.for _dtso in ${DTSO} -${_dtso:R:S/$/.dtbo/}: ${_dtso} ${OP_META} - @${ECHO} Generating ${.TARGET} from ${_dtso} - @${SYSDIR}/tools/fdt/make_dtbo.sh ${SYSDIR} overlays/${_dtso} ${.OBJDIR} -CLEANFILES+=${_dtso:R:S/$/.dtbo/} -.endfor -.endif - -.if !target(install) -.if !target(realinstall) realinstall: _dtbinstall -.ORDER: beforeinstall _kmodinstall -_dtbinstall: -# Need to create this because installkernel doesn't invoke mtree with BSD.root.mtree -# to make sure the tree is setup properly. We don't recreate it to avoid duplicate -# entries in the NO_ROOT case. - test -d ${DESTDIR}${DTBDIR} || ${INSTALL} -d -o ${DTBOWN} -g ${DTBGRP} ${DESTDIR}${DTBDIR} -.for _dtb in ${DTB} -.if ${MACHINE_CPUARCH} == "aarch64" - test -d ${DESTDIR}${DTBDIR}/${_dtb:H} || ${INSTALL} -d -o ${DTBOWN} -g ${DTBGRP} ${DESTDIR}${DTBDIR}/${_dtb:H} - ${INSTALL} -o ${DTBOWN} -g ${DTBGRP} -m ${DTBMODE} \ - ${_INSTALLFLAGS} ${_dtb:T} ${DESTDIR}${DTBDIR}/${_dtb:H} -.else - ${INSTALL} -o ${DTBOWN} -g ${DTBGRP} -m ${DTBMODE} \ - ${_INSTALLFLAGS} ${_dtb} ${DESTDIR}${DTBDIR}/ -.endif -.endfor - test -d ${DESTDIR}${DTBODIR} || ${INSTALL} -d -o ${DTBOWN} -g ${DTBGRP} ${DESTDIR}${DTBODIR} -.for _dtbo in ${DTBO} - ${INSTALL} -o ${DTBOWN} -g ${DTBGRP} -m ${DTBMODE} \ - ${_INSTALLFLAGS} ${_dtbo} ${DESTDIR}${DTBODIR}/ -.endfor -.endif # !target(realinstall) -.endif # !target(install) +.ORDER: beforeinstall _dtbinstall + +CLEANFILES+=${DTB} ${DTBO} +.endif # !target(install) && !target(realinstall) .include .include Modified: head/sys/conf/kern.post.mk ============================================================================== --- head/sys/conf/kern.post.mk Tue Mar 26 02:35:58 2019 (r345518) +++ head/sys/conf/kern.post.mk Tue Mar 26 02:45:23 2019 (r345519) @@ -8,6 +8,16 @@ # should be defined in the kern.pre.mk so that port makefiles can # override or augment them. +.if defined(DTS) || defined(DTSO) +.include "dtb.build.mk" + +KERNEL_EXTRA+= ${DTB} ${DTBO} +CLEAN+= ${DTB} ${DTBO} + +kernel-install: _dtbinstall +.ORDER: beforeinstall _dtbinstall +.endif + # In case the config had a makeoptions DESTDIR... .if defined(DESTDIR) MKMODULESENV+= DESTDIR="${DESTDIR}" From owner-svn-src-all@freebsd.org Tue Mar 26 02:53:36 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E6F9155D7D2; Tue, 26 Mar 2019 02:53:36 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E4F6070103; Tue, 26 Mar 2019 02:53:35 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AFA4519705; Tue, 26 Mar 2019 02:53:35 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2Q2rZAp092338; Tue, 26 Mar 2019 02:53:35 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2Q2rZ23092337; Tue, 26 Mar 2019 02:53:35 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201903260253.x2Q2rZ23092337@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 26 Mar 2019 02:53:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345520 - head/sys/powerpc/aim X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/aim X-SVN-Commit-Revision: 345520 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E4F6070103 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.949,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Mar 2019 02:53:36 -0000 Author: jhibbits Date: Tue Mar 26 02:53:35 2019 New Revision: 345520 URL: https://svnweb.freebsd.org/changeset/base/345520 Log: powerpc64: Micro-optimize moea64 native pmap tlbie * Cache moea64_need_lock in a local variable; gcc generates slightly better code this way, it doesn't need to reload the value from memory each read. * VPN cropping is only needed on PowerPC ISA 2.02 and older cores, a subset of those that need serialization, so move this under the need_lock check, so those that don't need the lock don't even need to check this. Modified: head/sys/powerpc/aim/moea64_native.c Modified: head/sys/powerpc/aim/moea64_native.c ============================================================================== --- head/sys/powerpc/aim/moea64_native.c Tue Mar 26 02:45:23 2019 (r345519) +++ head/sys/powerpc/aim/moea64_native.c Tue Mar 26 02:53:35 2019 (r345520) @@ -146,18 +146,19 @@ TLBIE(uint64_t vpn) { #endif static volatile u_int tlbie_lock = 0; + bool need_lock = moea64_need_lock; vpn <<= ADDR_PIDX_SHFT; /* Hobo spinlock: we need stronger guarantees than mutexes provide */ - if (moea64_need_lock) { + if (need_lock) { while (!atomic_cmpset_int(&tlbie_lock, 0, 1)); isync(); /* Flush instruction queue once lock acquired */ + + if (moea64_crop_tlbie) + vpn &= ~(0xffffULL << 48); } - if (moea64_crop_tlbie) - vpn &= ~(0xffffULL << 48); - #ifdef __powerpc64__ /* * Explicitly clobber r0. The tlbie instruction has two forms: an old @@ -196,7 +197,7 @@ TLBIE(uint64_t vpn) { #endif /* No barriers or special ops -- taken care of by ptesync above */ - if (moea64_need_lock) + if (need_lock) tlbie_lock = 0; } From owner-svn-src-all@freebsd.org Tue Mar 26 07:55:52 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B1E01543B24; Tue, 26 Mar 2019 07:55:52 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B8CDE83C1B; Tue, 26 Mar 2019 07:55:51 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 91D941CC08; Tue, 26 Mar 2019 07:55:51 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2Q7tpHV050139; Tue, 26 Mar 2019 07:55:51 GMT (envelope-from philip@FreeBSD.org) Received: (from philip@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2Q7tmdd050121; Tue, 26 Mar 2019 07:55:48 GMT (envelope-from philip@FreeBSD.org) Message-Id: <201903260755.x2Q7tmdd050121@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: philip set sender to philip@FreeBSD.org using -f From: Philip Paeps Date: Tue, 26 Mar 2019 07:55:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r345522 - vendor/tzdata/dist X-SVN-Group: vendor X-SVN-Commit-Author: philip X-SVN-Commit-Paths: vendor/tzdata/dist X-SVN-Commit-Revision: 345522 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B8CDE83C1B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Mar 2019 07:55:52 -0000 Author: philip Date: Tue Mar 26 07:55:48 2019 New Revision: 345522 URL: https://svnweb.freebsd.org/changeset/base/345522 Log: Import tzdata 2019a Modified: vendor/tzdata/dist/Makefile vendor/tzdata/dist/NEWS vendor/tzdata/dist/README vendor/tzdata/dist/africa vendor/tzdata/dist/asia vendor/tzdata/dist/backward vendor/tzdata/dist/backzone vendor/tzdata/dist/etcetera vendor/tzdata/dist/europe vendor/tzdata/dist/iso3166.tab vendor/tzdata/dist/leap-seconds.list vendor/tzdata/dist/leapseconds vendor/tzdata/dist/northamerica vendor/tzdata/dist/theory.html vendor/tzdata/dist/version Modified: vendor/tzdata/dist/Makefile ============================================================================== --- vendor/tzdata/dist/Makefile Tue Mar 26 03:02:45 2019 (r345521) +++ vendor/tzdata/dist/Makefile Tue Mar 26 07:55:48 2019 (r345522) @@ -12,7 +12,10 @@ VERSION= unknown # Email address for bug reports. BUGEMAIL= tz@iana.org -# Choose source data features. To get new features right away, use: +# DATAFORM selects the data format. +# Available formats represent essentially the same data, albeit +# possibly with minor discrepancies that users are not likely to notice. +# To get new features and the best data right away, use: # DATAFORM= vanguard # To wait a while before using new features, to give downstream users # time to upgrade zic (the default), use: @@ -33,11 +36,11 @@ DATAFORM= main LOCALTIME= GMT # If you want something other than Eastern United States time as a template -# for handling POSIX-style timezone environment variables, +# for handling ruleless 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 +# A ruleless environment setting like TZ='CST6CDT' uses the rules in the +# template file 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 timezone, you can just @@ -46,7 +49,6 @@ LOCALTIME= GMT # Use the command # make zonenames # to get a list of the values you can use for POSIXRULES. -# If you want POSIX compatibility, use "America/New_York". POSIXRULES= America/New_York @@ -113,8 +115,8 @@ TIME_T_ALTERNATIVES = $(TIME_T_ALTERNATIVES_HEAD) $(TI 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.) +# What kind of TZif data files to generate. (TZif is the binary time +# zone data format that zic generates; see Internet RFC 8536.) # If you want only POSIX time, with time values interpreted as # seconds since the epoch (not counting leap seconds), use # REDO= posix_only @@ -360,6 +362,9 @@ LEAPSECONDS= zic= ./zic ZIC= $(zic) $(ZFLAGS) +# To shrink the size of installed TZif files, +# append "-r @N" to omit data before N-seconds-after-the-Epoch. +# See the zic man page for more about -r. ZFLAGS= # How to use zic to install TZif files. @@ -491,7 +496,8 @@ MANTXTS= newctime.3.txt newstrftime.3.txt newtzset.3.t COMMON= calendars CONTRIBUTING LICENSE Makefile \ NEWS README theory.html version WEB_PAGES= tz-art.html tz-how-to.html tz-link.html -CHECK_WEB_PAGES=check_tz-art.html check_tz-how-to.html check_tz-link.html +CHECK_WEB_PAGES=check_theory.html check_tz-art.html \ + check_tz-how-to.html check_tz-link.html DOCS= $(MANS) date.1 $(MANTXTS) $(WEB_PAGES) PRIMARY_YDATA= africa antarctica asia australasia \ europe northamerica southamerica @@ -804,9 +810,10 @@ check_tzs: $(TZS) $(TZS_NEW) touch $@ check_web: $(CHECK_WEB_PAGES) +check_theory.html: theory.html check_tz-art.html: tz-art.html check_tz-link.html: tz-link.html -check_tz-art.html check_tz-link.html: +check_theory.html check_tz-art.html check_tz-link.html: $(CURL) -sS --url https://validator.w3.org/nu/ -F out=gnu \ -F file=@$$(expr $@ : 'check_\(.*\)') -o $@.out && \ test ! -s $@.out || { cat $@.out; exit 1; } @@ -840,11 +847,13 @@ check_zishrink_posix check_zishrink_right: \ touch $@ clean_misc: + rm -fr check_*.dir 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) + rm -fr *.dir tzdb-*/ + rm -f *.zi $(TZS_NEW) maintainer-clean: clean @echo 'This command is intended for maintainers to use; it' Modified: vendor/tzdata/dist/NEWS ============================================================================== --- vendor/tzdata/dist/NEWS Tue Mar 26 03:02:45 2019 (r345521) +++ vendor/tzdata/dist/NEWS Tue Mar 26 07:55:48 2019 (r345522) @@ -1,5 +1,53 @@ News for the tz database +Release 20198 - 2019-03-25 22:01:33 -0700 + + Briefly: + Palestine "springs forward" on 2019-03-30 instead of 2019-03-23. + Metlakatla "fell back" to rejoin Alaska Time on 2019-01-20 at 02:00. + + Changes to past and future timestamps + + Palestine will not start DST until 2019-03-30, instead of 2019-03-23 as + previously predicted. Adjust our prediction by guessing that spring + transitions will be between 24 and 30 March, which matches recent practice + since 2016. (Thanks to Even Scharning and Tim Parenti.) + + Metlakatla ended its observance of Pacific standard time, + rejoining Alaska Time, on 2019-01-20 at 02:00. (Thanks to Ryan + Stanley and Tim Parenti.) + + Changes to past timestamps + + Israel observed DST in 1980 (08-02/09-13) and 1984 (05-05/08-25). + (Thanks to Alois Treindl and Isaac Starkman.) + + Changes to time zone abbreviations + + Etc/UCT is now a backward-compatibility link to Etc/UTC, instead + of being a separate zone that generates the abbreviation "UCT", + which nowadays is typically a typo. (Problem reported by Isiah + Meadows.) + + Changes to code + + zic now has an -r option to limit the time range of output data. + For example, 'zic -r @1000000000' limits the output data to + timestamps starting 1000000000 seconds after the Epoch. + This helps shrink output size and can be useful for applications + not needing the full timestamp history, such as TZDIST truncation; + see Internet RFC 8536 section 5.1. (Inspired by a feature request + from Christopher Wong, helped along by bug reports from Wong and + from Tim Parenti.) + + Changes to documentation + + Mention Internet RFC 8536 (February 2019), which documents TZif. + + tz-link.html now cites tzdata-meta + . + + Release 2018i - 2018-12-30 11:05:43 -0800 Briefly: @@ -400,8 +448,9 @@ Release 2018d - 2018-03-22 07:05:46 -0700 downstream parsers do not support it. * The build procedure constructs three files vanguard.zi, main.zi, - and rearguard.zi, one for each format. The files represent the - same data as closely as the formats allow. These three files + and rearguard.zi, one for each format. Although the files + represent essentially the same data, they may have minor + discrepancies that users are not likely to notice. The files are intended for downstream data consumers and are not installed. Zoneinfo parsers that do not support negative SAVE values should start using rearguard.zi, so that they will be unaffected Modified: vendor/tzdata/dist/README ============================================================================== --- vendor/tzdata/dist/README Tue Mar 26 03:02:45 2019 (r345521) +++ vendor/tzdata/dist/README Tue Mar 26 07:55:48 2019 (r345522) @@ -1,7 +1,7 @@ README for the tz distribution -"What time is it?" -- Richard Deacon as The King -"Any time you want it to be." -- Frank Baxter as The Scientist +"Where do I set the hands of the clock?" -- Les Tremayne as The King +"Oh that--you can set them any place you want." -- Frank Baxter as The Scientist (from the Bell System film "About Time") The Time Zone Database (called tz, tzdb or zoneinfo) contains code and Modified: vendor/tzdata/dist/africa ============================================================================== --- vendor/tzdata/dist/africa Tue Mar 26 03:02:45 2019 (r345521) +++ vendor/tzdata/dist/africa Tue Mar 26 07:55:48 2019 (r345522) @@ -364,6 +364,11 @@ Zone Africa/Cairo 2:05:09 - LMT 1900 Oct # See Africa/Lagos. # Eritrea +# See Africa/Nairobi. + +# Eswatini (formerly Swaziland) +# See Africa/Johannesburg. + # Ethiopia # See Africa/Nairobi. # @@ -1188,7 +1193,7 @@ Zone Africa/Johannesburg 1:52:00 - LMT 1892 Feb 8 1:30 - SAST 1903 Mar 2:00 SA SAST Link Africa/Johannesburg Africa/Maseru # Lesotho -Link Africa/Johannesburg Africa/Mbabane # Swaziland +Link Africa/Johannesburg Africa/Mbabane # Eswatini # # Marion and Prince Edward Is # scientific station since 1947 @@ -1229,9 +1234,6 @@ Zone Africa/Khartoum 2:10:08 - LMT 1931 Zone Africa/Juba 2:06:28 - LMT 1931 2:00 Sudan CA%sT 2000 Jan 15 12:00 3:00 - EAT - -# Swaziland -# See Africa/Johannesburg. # Tanzania # See Africa/Nairobi. Modified: vendor/tzdata/dist/asia ============================================================================== --- vendor/tzdata/dist/asia Tue Mar 26 03:02:45 2019 (r345521) +++ vendor/tzdata/dist/asia Tue Mar 26 07:55:48 2019 (r345522) @@ -1620,6 +1620,24 @@ Rule Zion 1974 only - Jul 7 0:00 1:00 D Rule Zion 1974 only - Oct 13 0:00 0 S Rule Zion 1975 only - Apr 20 0:00 1:00 D Rule Zion 1975 only - Aug 31 0:00 0 S + +# From Alois Treindl (2019-03-06): +# http://www.moin.gov.il/Documents/שעון קיץ/clock-50-years-7-2014.pdf +# From Isaac Starkman (2019-03-06): +# Summer time was in that period in 1980 and 1984, see +# https://www.ynet.co.il/articles/0,7340,L-3951073,00.html +# You can of course read it in translation. +# I checked the local newspapers for that years. +# It started on midnight and end at 01.00 am. +# From Paul Eggert (2019-03-06): +# Also see this thread about the moin.gov.il URL: +# https://mm.icann.org/pipermail/tz/2018-November/027194.html +Rule Zion 1980 only - Aug 2 0:00 1:00 D +Rule Zion 1980 only - Sep 13 1:00 0 S +Rule Zion 1984 only - May 5 0:00 1:00 D +Rule Zion 1984 only - Aug 25 1:00 0 S + +# From Shanks & Pottenger: Rule Zion 1985 only - Apr 14 0:00 1:00 D Rule Zion 1985 only - Sep 15 0:00 0 S Rule Zion 1986 only - May 18 0:00 1:00 D @@ -3071,9 +3089,15 @@ Zone Asia/Karachi 4:28:12 - LMT 1907 # the official website, though the decree did not specify the exact # time of the time shift. # http://www.palestinecabinet.gov.ps/Website/AR/NDecrees/ViewFile.ashx?ID=e7a42ab7-ee23-435a-b9c8-a4f7e81f3817 + +# From Even Scharning (2019-03-23): +# DST in Palestine will start on 30 March this year, not 23 March as the time +# zone database predicted. +# https://ramallah.news/post/123610 # -# From Paul Eggert (2018-03-16): -# For 2016 on, predict spring transitions on March's fourth Saturday at 01:00. +# From Tim Parenti (2019-03-23): +# Combining this with the rules observed since 2016, adjust our spring +# transition guess to Mar Sat>=24. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule EgyptAsia 1957 only - May 10 0:00 1:00 S @@ -3104,7 +3128,7 @@ Rule Palestine 2012 only - Sep 21 1:00 0 - Rule Palestine 2013 only - Sep Fri>=21 0:00 0 - Rule Palestine 2014 2015 - Oct Fri>=21 0:00 0 - Rule Palestine 2015 only - Mar lastFri 24:00 1:00 S -Rule Palestine 2016 max - Mar Sat>=22 1:00 1:00 S +Rule Palestine 2016 max - Mar Sat>=24 1:00 1:00 S Rule Palestine 2016 max - Oct lastSat 1:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -3595,6 +3619,18 @@ Zone Asia/Ho_Chi_Minh 7:06:40 - LMT 1906 Jul 1 7:00 - +07 1959 Dec 31 23:00 8:00 - +08 1975 Jun 13 7:00 - +07 + +# From Paul Eggert (2019-02-19): +# +# The Ho Chi Minh entry suffices for most purposes as it agrees with all of +# Vietnam since 1975-06-13. Presumably clocks often changed in south Vietnam +# in the early 1970s as locations changed hands during the war; however the +# details are unknown and would likely be too voluminous for this database. +# +# For timestamps in north Vietnam back to 1970 (the tzdb cutoff), +# use Asia/Bangkok; see the VN entries in the file zone1970.tab. +# For timestamps before 1970, see Asia/Hanoi in the file 'backzone'. + # Yemen # See Asia/Riyadh. Modified: vendor/tzdata/dist/backward ============================================================================== --- vendor/tzdata/dist/backward Tue Mar 26 03:02:45 2019 (r345521) +++ vendor/tzdata/dist/backward Tue Mar 26 07:55:48 2019 (r345522) @@ -77,6 +77,7 @@ Link Pacific/Easter Chile/EasterIsland Link America/Havana Cuba Link Africa/Cairo Egypt Link Europe/Dublin Eire +Link Etc/UTC Etc/UCT Link Europe/London Europe/Belfast Link Europe/Chisinau Europe/Tiraspol Link Europe/London GB @@ -111,7 +112,7 @@ Link Asia/Taipei ROC Link Asia/Seoul ROK Link Asia/Singapore Singapore Link Europe/Istanbul Turkey -Link Etc/UCT UCT +Link Etc/UTC UCT Link America/Anchorage US/Alaska Link America/Adak US/Aleutian Link America/Phoenix US/Arizona Modified: vendor/tzdata/dist/backzone ============================================================================== --- vendor/tzdata/dist/backzone Tue Mar 26 03:02:45 2019 (r345521) +++ vendor/tzdata/dist/backzone Tue Mar 26 07:55:48 2019 (r345522) @@ -204,7 +204,7 @@ Zone Africa/Maseru 1:50:00 - LMT 1903 Mar 2:00 1:00 SAST 1944 Mar 19 2:00 2:00 - SAST -# Swaziland +# Eswatini (formerly Swaziland) Zone Africa/Mbabane 2:04:24 - LMT 1903 Mar 2:00 - SAST @@ -625,7 +625,7 @@ Zone Europe/Sarajevo 1:13:40 - LMT 1884 1:00 - CET 1982 Nov 27 1:00 EU CE%sT -# Macedonia +# North Macedonia Zone Europe/Skopje 1:25:44 - LMT 1884 1:00 - CET 1941 Apr 18 23:00 1:00 C-Eur CE%sT 1945 May 8 2:00s Modified: vendor/tzdata/dist/etcetera ============================================================================== --- vendor/tzdata/dist/etcetera Tue Mar 26 03:02:45 2019 (r345521) +++ vendor/tzdata/dist/etcetera Tue Mar 26 07:55:48 2019 (r345522) @@ -19,7 +19,6 @@ Zone Etc/GMT 0 - GMT Zone Etc/UTC 0 - UTC -Zone Etc/UCT 0 - UCT # The following link uses older naming conventions, # but it belongs here, not in the file 'backward', Modified: vendor/tzdata/dist/europe ============================================================================== --- vendor/tzdata/dist/europe Tue Mar 26 03:02:45 2019 (r345521) +++ vendor/tzdata/dist/europe Tue Mar 26 07:55:48 2019 (r345522) @@ -1855,7 +1855,7 @@ Zone Europe/Luxembourg 0:24:36 - LMT 1904 Jun 1:00 Belgium CE%sT 1977 1:00 EU CE%sT -# Macedonia +# North Macedonia # See Europe/Belgrade. # Malta @@ -3359,7 +3359,7 @@ Zone Europe/Belgrade 1:22:00 - LMT 1884 Link Europe/Belgrade Europe/Ljubljana # Slovenia Link Europe/Belgrade Europe/Podgorica # Montenegro Link Europe/Belgrade Europe/Sarajevo # Bosnia and Herzegovina -Link Europe/Belgrade Europe/Skopje # Macedonia +Link Europe/Belgrade Europe/Skopje # North Macedonia Link Europe/Belgrade Europe/Zagreb # Croatia # Slovakia Modified: vendor/tzdata/dist/iso3166.tab ============================================================================== --- vendor/tzdata/dist/iso3166.tab Tue Mar 26 03:02:45 2019 (r345521) +++ vendor/tzdata/dist/iso3166.tab Tue Mar 26 07:55:48 2019 (r345522) @@ -9,8 +9,8 @@ # All text uses UTF-8 encoding. The columns of the table are as follows: # # 1. ISO 3166-1 alpha-2 country code, current as of -# ISO 3166-1 N905 (2016-11-15). See: Updates on ISO 3166-1 -# http://isotc.iso.org/livelink/livelink/Open/16944257 +# ISO 3166-1 N976 (2018-11-06). See: Updates on ISO 3166-1 +# https://isotc.iso.org/livelink/livelink/Open/16944257 # 2. The usual English name for the coded region, # chosen so that alphabetic sorting of subsets produces helpful lists. # This is not the same as the English name in the ISO 3166 tables. @@ -166,7 +166,7 @@ ME Montenegro MF St Martin (French) MG Madagascar MH Marshall Islands -MK Macedonia +MK North Macedonia ML Mali MM Myanmar (Burma) MN Mongolia @@ -235,7 +235,7 @@ ST Sao Tome & Principe SV El Salvador SX St Maarten (Dutch) SY Syria -SZ Swaziland +SZ Eswatini (Swaziland) TC Turks & Caicos Is TD Chad TF French Southern & Antarctic Lands Modified: vendor/tzdata/dist/leap-seconds.list ============================================================================== --- vendor/tzdata/dist/leap-seconds.list Tue Mar 26 03:02:45 2019 (r345521) +++ vendor/tzdata/dist/leap-seconds.list Tue Mar 26 07:55:48 2019 (r345522) @@ -204,10 +204,10 @@ # current -- the update time stamp, the data and the name of the file # will not change. # -# Updated through IERS Bulletin C56 -# File expires on: 28 June 2019 +# Updated through IERS Bulletin C57 +# File expires on: 28 December 2019 # -#@ 3770668800 +#@ 3786480000 # 2272060800 10 # 1 Jan 1972 2287785600 11 # 1 Jul 1972 @@ -252,4 +252,4 @@ # the hash line is also ignored in the # computation. # -#h 62ca19f6 96a4ae0a 3708451c 9f8693f4 016604eb +#h 83c68138 d3650221 07dbbbcd 11fcc859 ced1106a Modified: vendor/tzdata/dist/leapseconds ============================================================================== --- vendor/tzdata/dist/leapseconds Tue Mar 26 03:02:45 2019 (r345521) +++ vendor/tzdata/dist/leapseconds Tue Mar 26 07:55:48 2019 (r345522) @@ -63,7 +63,7 @@ Leap 2016 Dec 31 23:59:60 + S # POSIX timestamps for the data in this file: #updated 1467936000 -#expires 1561680000 +#expires 1577491200 -# Updated through IERS Bulletin C56 -# File expires on: 28 June 2019 +# Updated through IERS Bulletin C57 +# File expires on: 28 December 2019 Modified: vendor/tzdata/dist/northamerica ============================================================================== --- vendor/tzdata/dist/northamerica Tue Mar 26 03:02:45 2019 (r345521) +++ vendor/tzdata/dist/northamerica Tue Mar 26 07:55:48 2019 (r345522) @@ -609,6 +609,15 @@ Zone America/Los_Angeles -7:52:58 - LMT 1883 Nov 18 12 # In a 2018-12-11 special election, Metlakatla voted to go back to # Alaska time (including daylight saving time) starting next year. # https://www.krbd.org/2018/12/12/metlakatla-to-follow-alaska-standard-time-allow-liquor-sales/ +# +# From Ryan Stanley (2019-01-11): +# The community will be changing back on the 20th of this month... +# From Tim Parenti (2019-01-11): +# Per an announcement on the Metlakatla community's official Facebook page, the +# "fall back" will be on Sunday 2019-01-20 at 02:00: +# https://www.facebook.com/141055983004923/photos/607150969728753/ +# So they won't be waiting for Alaska to join them on 2019-03-10, but will +# rather change their clocks twice in seven weeks. # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Juneau 15:02:19 - LMT 1867 Oct 19 15:33:32 @@ -637,7 +646,7 @@ Zone America/Metlakatla 15:13:42 - LMT 1867 Oct 19 15 -8:00 US P%sT 1983 Oct 30 2:00 -8:00 - PST 2015 Nov 1 2:00 -9:00 US AK%sT 2018 Nov 4 2:00 - -8:00 - PST 2019 Mar Sun>=8 3:00 + -8:00 - PST 2019 Jan 20 2:00 -9:00 US AK%sT Zone America/Yakutat 14:41:05 - LMT 1867 Oct 19 15:12:18 -9:18:55 - LMT 1900 Aug 20 12:00 Modified: vendor/tzdata/dist/theory.html ============================================================================== --- vendor/tzdata/dist/theory.html Tue Mar 26 03:02:45 2019 (r345521) +++ vendor/tzdata/dist/theory.html Tue Mar 26 07:55:48 2019 (r345522) @@ -15,7 +15,7 @@
  • Scope of the tz database
  • -
  • Names of timezones
  • +
  • Timezone identifiers
  • Time zone abbreviations
  • Accuracy of the tz database
  • @@ -107,9 +107,9 @@ It does not always make sense to talk about a timezone
    -

    Names of timezones

    +

    Timezone identifiers

    -Each timezone has a unique name. +Each timezone has a name that uniquely identifies the timezone. Inexperienced users are not expected to select these names unaided. Distributors should provide documentation and/or a simple selection interface that explains each name via a map or via descriptive text like @@ -142,10 +142,12 @@ among the following goals:

  • Be robust in the presence of political changes. - For example, names of countries are ordinarily not used, to avoid + For example, names are typically not tied to countries, to avoid incompatibilities when countries change their name (e.g., - Zaire→Congo) or when locations change countries (e.g., Hong + Swaziland→Eswatini) or when locations change countries (e.g., Hong Kong from UK colony to China). + There is no requirement that every country or national + capital must have a timezone name.
  • Be portable to a wide variety of implementations. @@ -215,19 +217,18 @@ in decreasing order of importance: do not need locations, since local time is not defined there.
  • - There should typically be at least one name for each ISO - 3166-1 officially assigned two-letter code for an inhabited - country or territory. -
  • -
  • If all the clocks in a timezone have agreed since 1970, do not bother to include more than one timezone even if some of the clocks disagreed before 1970. Otherwise these tables would become annoyingly large.
  • + If boundaries between regions are fluid, such as during a war or + insurrection, do not bother to create a new timezone merely + because of yet another boundary change. This helps prevent table + bloat and simplifies maintenance. +
  • +
  • If a name is ambiguous, use a less ambiguous alternative; e.g., many cities are named San José and Georgetown, so prefer America/Costa_Rica to @@ -299,29 +300,23 @@ in decreasing order of importance:

-The file 'zone1970.tab' lists geographical locations used -to name timezones. -It is intended to be an exhaustive list of names for geographic -regions as described above; this is a subset of the timezones in the data. -Although a 'zone1970.tab' location's -longitude -corresponds to -its local mean -time (LMT) offset with one hour for every 15° -east longitude, this relationship is not exact. +Guidelines have evolved with time, and names following old versions of +this guideline might not follow the current version. When guidelines +have changed, old names continue to be supported. Guideline changes +have included the following:

-

-Older versions of this package used a different naming scheme, -and these older names are still supported. +

    +
  • +Older versions of this package used a different naming scheme. See the file 'backward' for most of these older names (e.g., 'US/Eastern' instead of 'America/New_York'). The other old-fashioned names still supported are 'WET', 'CET', 'MET', and 'EET' (see the file 'europe'). -

    +
  • -

    +

  • Older versions of this package defined legacy names that are incompatible with the first guideline of location names, but which are still supported. @@ -332,6 +327,31 @@ Also, the file 'backward' defines the leg and the file 'northamerica' defines the legacy names 'EST5EDT', 'CST6CDT', 'MST7MDT', and 'PST8PDT'. +
  • + +
  • +Older versions of this guideline said that +there should typically be at least one name for each ISO +3166-1 officially assigned two-letter code for an inhabited +country or territory. +This old guideline has been dropped, as it was not needed to handle +timestamps correctly and it increased maintenance burden. +
  • +
+ +

+The file 'zone1970.tab' lists geographical locations used +to name timezones. +It is intended to be an exhaustive list of names for geographic +regions as described above; this is a subset of the timezones in the data. +Although a 'zone1970.tab' location's +longitude +corresponds to +its local mean +time (LMT) offset with one hour for every 15° +east longitude, this relationship is not exact.

@@ -983,7 +1003,9 @@ an older zic. constrained to be a string containing abbreviations and numeric data as described above. The file's format is TZif, - a timezone information format that contains binary data. + a timezone information format that contains binary data; see + Internet + RFC 8536. The daylight saving time rules to be used for a particular timezone are encoded in the TZif file; the format of the file allows US, @@ -1166,7 +1188,7 @@ The tz code and data supply