svn commit: r358156 - head/sys/dev/ath
Author: adrian Date: Thu Feb 20 07:12:43 2020 New Revision: 358156 URL: https://svnweb.freebsd.org/changeset/base/358156 Log: [ath] Attempt to fix epoch handling. The epoch stuff with taskqueues works fine if the driver never calls the receive path in other contexts, but this driver does. If there was a chip reset during active receive then part of the reset will call the receive path to flush out any active packets before reinitialising the receive queue and that needs to be done with the epoch held. So: * make the receive task a normal task again * explicitly call epoch enter/exit around the legacy and newer DMA receive paths * add a couple of epoch asserts to ensure that the receive packet path itself is called with epoch held. This fixes it on my Atom eeepc laptop (circa 2010!) that I did all of my initial 802.11n work in this driver and net80211. Tested: * AR9285, STA mode TODO: * Test on EDMA chipset (AR9380) * Test in AP/adhoc modes, just to be sure (eg for beacon receive processing in particular.) Modified: head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_ath_rx.c head/sys/dev/ath/if_ath_rx_edma.c Modified: head/sys/dev/ath/if_ath.c == --- head/sys/dev/ath/if_ath.c Thu Feb 20 06:45:51 2020(r358155) +++ head/sys/dev/ath/if_ath.c Thu Feb 20 07:12:43 2020(r358156) @@ -760,7 +760,7 @@ ath_attach(u_int16_t devid, struct ath_softc *sc) taskqueue_start_threads(>sc_tq, 1, PI_NET, "%s taskq", device_get_nameunit(sc->sc_dev)); - NET_TASK_INIT(>sc_rxtask, 0, sc->sc_rx.recv_tasklet, sc); + TASK_INIT(>sc_rxtask, 0, sc->sc_rx.recv_tasklet, sc); TASK_INIT(>sc_bmisstask, 0, ath_bmiss_proc, sc); TASK_INIT(>sc_bstucktask,0, ath_bstuck_proc, sc); TASK_INIT(>sc_resettask,0, ath_reset_proc, sc); Modified: head/sys/dev/ath/if_ath_rx.c == --- head/sys/dev/ath/if_ath_rx.cThu Feb 20 06:45:51 2020 (r358155) +++ head/sys/dev/ath/if_ath_rx.cThu Feb 20 07:12:43 2020 (r358156) @@ -656,6 +656,8 @@ ath_rx_pkt(struct ath_softc *sc, struct ath_rx_status int is_good = 0; struct ath_rx_edma *re = >sc_rxedma[qtype]; + NET_EPOCH_ASSERT(); + /* * Calculate the correct 64 bit TSF given * the TSF64 register value and rs_tstamp. @@ -1074,6 +1076,8 @@ ath_rx_proc(struct ath_softc *sc, int resched) int kickpcu = 0; int ret; + NET_EPOCH_ASSERT(); + /* XXX we must not hold the ATH_LOCK here */ ATH_UNLOCK_ASSERT(sc); ATH_PCU_UNLOCK_ASSERT(sc); @@ -1293,6 +1297,7 @@ static void ath_legacy_rx_tasklet(void *arg, int npending) { struct ath_softc *sc = arg; + struct epoch_tracker et; ATH_KTR(sc, ATH_KTR_RXPROC, 1, "ath_rx_proc: pending=%d", npending); DPRINTF(sc, ATH_DEBUG_RX_PROC, "%s: pending %u\n", __func__, npending); @@ -1305,14 +1310,18 @@ ath_legacy_rx_tasklet(void *arg, int npending) } ATH_PCU_UNLOCK(sc); + NET_EPOCH_ENTER(et); ath_rx_proc(sc, 1); + NET_EPOCH_EXIT(et); } static void ath_legacy_flushrecv(struct ath_softc *sc) { - + struct epoch_tracker et; + NET_EPOCH_ENTER(et); ath_rx_proc(sc, 0); + NET_EPOCH_EXIT(et); } static void Modified: head/sys/dev/ath/if_ath_rx_edma.c == --- head/sys/dev/ath/if_ath_rx_edma.c Thu Feb 20 06:45:51 2020 (r358155) +++ head/sys/dev/ath/if_ath_rx_edma.c Thu Feb 20 07:12:43 2020 (r358156) @@ -521,6 +521,7 @@ ath_edma_recv_proc_deferred_queue(struct ath_softc *sc int16_t nf; ath_bufhead rxlist; struct mbuf *m; + struct epoch_tracker et; TAILQ_INIT(); @@ -537,6 +538,8 @@ ath_edma_recv_proc_deferred_queue(struct ath_softc *sc TAILQ_CONCAT(, >sc_rx_rxlist[qtype], bf_list); ATH_RX_UNLOCK(sc); + NET_EPOCH_ENTER(et); + /* Handle the completed descriptors */ /* * XXX is this SAFE call needed? The ath_buf entries @@ -560,6 +563,7 @@ ath_edma_recv_proc_deferred_queue(struct ath_softc *sc if (ngood) { sc->sc_lastrx = tsf; } + NET_EPOCH_EXIT(et); ATH_KTR(sc, ATH_KTR_INTERRUPTS, 1, "ath edma rx deferred proc: ngood=%d\n", ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r358155 - head/share/man/man4
Author: delphij Date: Thu Feb 20 06:45:51 2020 New Revision: 358155 URL: https://svnweb.freebsd.org/changeset/base/358155 Log: Actually install hwpstate_intel.4. Modified: head/share/man/man4/Makefile Modified: head/share/man/man4/Makefile == --- head/share/man/man4/MakefileThu Feb 20 06:03:41 2020 (r358154) +++ head/share/man/man4/MakefileThu Feb 20 06:45:51 2020 (r358155) @@ -192,6 +192,7 @@ MAN=aac.4 \ ${_hv_vmbus.4} \ ${_hv_vss.4} \ hwpmc.4 \ + ${_hwpstate_intel.4} \ iavf.4 \ ichsmb.4 \ ${_ichwd.4} \ @@ -787,6 +788,7 @@ _hv_storvsc.4= hv_storvsc.4 _hv_utils.4= hv_utils.4 _hv_vmbus.4= hv_vmbus.4 _hv_vss.4= hv_vss.4 +_hwpstate_intel.4= hwpstate_intel.4 _i8254.4= i8254.4 _ichwd.4= ichwd.4 _if_bxe.4= if_bxe.4 ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r358153 - head/usr.sbin/services_mkdb
On 2/19/20 10:01 PM, Yuri Pankov wrote: > On 20 Feb 2020, at 06:54, Pedro F. Giffuni wrote: >> >> Author: pfg >> Date: Thu Feb 20 03:54:07 2020 >> New Revision: 358153 >> URL: https://svnweb.freebsd.org/changeset/base/358153 >> >> Log: >> /etc/services: attempt bring the database to this century. >> >> Document better this file, updating the URL to the IANA registry and closely >> match the official services. >> >> For system ports (0 to 1023) we now try to follow the registry closely, >> noting >> some historical differences where applicable. >> For the User ports (1024 - 49151) we try to keep some sensible balance only >> of services that are likely to be found on FreeBSD/UNIX systems. This >> attempts >> to strike a balance between complexity and usefulness. >> >> As a side effect: drop references to unofficial Kerberos IV which was EOL'ed >> on Oct 2006[1]. While it is conceivable some people may still use it in some >> very old FreeBSD machines that can't be replaced easily, the use of it is >> considered a security risk. Also drop the unofficial netatalk, which we >> supported long ago in the kernel but was dropped long ago. >> >> [1] https://web.mit.edu/kerberos/krb4-end-of-life.html >> >> MFC after: 3 weeks (likely to 12-stable only) >> Differential Revision: https://reviews.freebsd.org/D23621 >> >> Modified: >> head/usr.sbin/services_mkdb/services > > I noticed `mergemaster` failing, and it seems to be not happy with this > change: > > # make installconfig > installing DIRS CONFSDIR > install -d -m 0755 -o root -g wheel /etc > install -C -o root -g wheel -m 644 > /usr/src/usr.sbin/services_mkdb/services /etc/services > services_mkdb -l -q -o /var/db/services.db /etc/services > services_mkdb: Ran out of protocols adding `divert'; recompile with larger > PROTOMAX > *** Error code 1 > > Stop. > make: stopped in /usr/src/usr.sbin/services_mkdb Fixed in r358154. Please merge the revision with r358153 when MFC'ing. signature.asc Description: OpenPGP digital signature
svn commit: r358154 - head/usr.sbin/services_mkdb
Author: delphij Date: Thu Feb 20 06:03:41 2020 New Revision: 358154 URL: https://svnweb.freebsd.org/changeset/base/358154 Log: Bump PROTOMAX. MFC after:3 weeks X-MFC-with: r358153 Modified: head/usr.sbin/services_mkdb/services_mkdb.c Modified: head/usr.sbin/services_mkdb/services_mkdb.c == --- head/usr.sbin/services_mkdb/services_mkdb.c Thu Feb 20 03:54:07 2020 (r358153) +++ head/usr.sbin/services_mkdb/services_mkdb.c Thu Feb 20 06:03:41 2020 (r358154) @@ -56,7 +56,7 @@ __FBSDID("$FreeBSD$"); static char tname[MAXPATHLEN]; #definePMASK 0x -#define PROTOMAX 5 +#define PROTOMAX 6 static voidadd(DB *, StringList *, size_t, const char *, size_t *, int); static StringList ***parseservices(const char *, StringList *); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r358153 - head/usr.sbin/services_mkdb
On 20 Feb 2020, at 06:54, Pedro F. Giffuni wrote: > > Author: pfg > Date: Thu Feb 20 03:54:07 2020 > New Revision: 358153 > URL: https://svnweb.freebsd.org/changeset/base/358153 > > Log: > /etc/services: attempt bring the database to this century. > > Document better this file, updating the URL to the IANA registry and closely > match the official services. > > For system ports (0 to 1023) we now try to follow the registry closely, > noting > some historical differences where applicable. > For the User ports (1024 - 49151) we try to keep some sensible balance only > of services that are likely to be found on FreeBSD/UNIX systems. This > attempts > to strike a balance between complexity and usefulness. > > As a side effect: drop references to unofficial Kerberos IV which was EOL'ed > on Oct 2006[1]. While it is conceivable some people may still use it in some > very old FreeBSD machines that can't be replaced easily, the use of it is > considered a security risk. Also drop the unofficial netatalk, which we > supported long ago in the kernel but was dropped long ago. > > [1] https://web.mit.edu/kerberos/krb4-end-of-life.html > > MFC after: 3 weeks (likely to 12-stable only) > Differential Revision: https://reviews.freebsd.org/D23621 > > Modified: > head/usr.sbin/services_mkdb/services I noticed `mergemaster` failing, and it seems to be not happy with this change: # make installconfig installing DIRS CONFSDIR install -d -m 0755 -o root -g wheel /etc install -C -o root -g wheel -m 644 /usr/src/usr.sbin/services_mkdb/services /etc/services services_mkdb -l -q -o /var/db/services.db /etc/services services_mkdb: Ran out of protocols adding `divert'; recompile with larger PROTOMAX *** Error code 1 Stop. make: stopped in /usr/src/usr.sbin/services_mkdb ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r358153 - head/usr.sbin/services_mkdb
Author: pfg Date: Thu Feb 20 03:54:07 2020 New Revision: 358153 URL: https://svnweb.freebsd.org/changeset/base/358153 Log: /etc/services: attempt bring the database to this century. Document better this file, updating the URL to the IANA registry and closely match the official services. For system ports (0 to 1023) we now try to follow the registry closely, noting some historical differences where applicable. For the User ports (1024 - 49151) we try to keep some sensible balance only of services that are likely to be found on FreeBSD/UNIX systems. This attempts to strike a balance between complexity and usefulness. As a side effect: drop references to unofficial Kerberos IV which was EOL'ed on Oct 2006[1]. While it is conceivable some people may still use it in some very old FreeBSD machines that can't be replaced easily, the use of it is considered a security risk. Also drop the unofficial netatalk, which we supported long ago in the kernel but was dropped long ago. [1] https://web.mit.edu/kerberos/krb4-end-of-life.html MFC after:3 weeks (likely to 12-stable only) Differential Revision:https://reviews.freebsd.org/D23621 Modified: head/usr.sbin/services_mkdb/services Modified: head/usr.sbin/services_mkdb/services == --- head/usr.sbin/services_mkdb/servicesThu Feb 20 03:01:27 2020 (r358152) +++ head/usr.sbin/services_mkdb/servicesThu Feb 20 03:54:07 2020 (r358153) @@ -1,65 +1,62 @@ # # Network services, Internet style # -# Note that it is presently the policy of IANA to assign a single well-known -# port number for both TCP and UDP; hence, most entries here have two entries -# even if the protocol doesn't support UDP operations. +# Service names and port numbers are used to distinguish between different +# services that run over transport protocols such as TCP, UDP, DCCP, and +# SCTP. # # The latest IANA port assignments can be gotten from # -# http://www.iana.org/assignments/port-numbers +# https://www.iana.org/assignments/service-names-port-numbers/ # -# The Well Known Ports are those from 0 through 1023. -# The Registered Ports are those from 1024 through 49151 -# The Dynamic and/or Private Ports are those from 49152 through 65535 +# System Ports are those from 0 through 1023. +# User Ports are those from 1024 through 49151. +# Dynamic and/or Private Ports are those from 49152 through 65535. # -# Kerberos services are for Kerberos v4, and are unofficial. Sites running -# v5 should uncomment v5 entries and comment v4 entries. +# Note that it is presently the policy of IANA to assign a single well-known +# port number for both TCP and UDP; hence, most entries here have two entries +# even if the protocol doesn't support UDP operations. # # $FreeBSD$ # From: @(#)services 5.8 (Berkeley) 5/9/91 # # WELL KNOWN PORT NUMBERS # -rtmp 1/ddp#Routing Table Maintenance Protocol tcpmux 1/tcp#TCP Port Service Multiplexer tcpmux 1/udp#TCP Port Service Multiplexer -nbp 2/ddp#Name Binding Protocol compressnet 2/tcp#Management Utility compressnet 2/udp#Management Utility compressnet 3/tcp#Compression Process compressnet 3/udp#Compression Process -echo 4/ddp#AppleTalk Echo Protocol rje 5/tcp#Remote Job Entry rje 5/udp#Remote Job Entry -zip 6/ddp#Zone Information Protocol -echo 7/sctp echo 7/tcp echo 7/udp -discard 9/sctp sink null +echo 7/sctp discard 9/tcpsink null discard 9/udpsink null +discard 9/sctp sink null systat 11/tcpusers#Active Users systat 11/udpusers#Active Users -daytime 13/sctp daytime 13/tcp daytime 13/udp +daytime 13/sctp qotd17/tcpquote#Quote of the Day qotd17/udpquote#Quote of the Day msp 18/tcp#Message Send Protocol msp 18/udp#Message Send Protocol -chargen 19/sctp ttytst source#Character Generator chargen 19/tcpttytst source#Character Generator chargen 19/udpttytst source#Character Generator -ftp-data20/sctp #File Transfer [Default Data] +chargen 19/sctp ttytst source#Character Generator ftp-data20/tcp#File Transfer [Default Data] ftp-data20/udp#File Transfer [Default Data] -ftp 21/sctp #File Transfer [Control] +ftp-data20/sctp #File Transfer [Default Data] ftp 21/tcp#File Transfer [Control] ftp 21/udp#File
svn commit: r358152 - head/bin/sh
Author: hrs Date: Thu Feb 20 03:01:27 2020 New Revision: 358152 URL: https://svnweb.freebsd.org/changeset/base/358152 Log: Improve performance of "read" built-in command when using a seekable fd. The read built-in command calls read(2) with a 1-byte buffer because newline characters need to be detected even on a byte stream which comes from a non-seekable file descriptor. Because of this, the following script calls >6,000 read(2) to show a 6KiB file: while read IN; do echo "$IN"; done < /COPYRIGHT When the input byte stream is seekable, it is possible to read a data block and then reposition the file pointer to where a newline character found. This change adds a small buffer to do this and reduces the number of read(2) calls. Theoretically, multiple built-in commands reading the same seekable byte stream in a single pipe chain can share the buffer. However, this change just makes a single invocation of the read built-in allocate a buffer and deallocate it every time for simplicity. Although this causes read(2) to read the same regions multiple times, the performance penalty should be small compared to the reduction of read(2) calls. Reviewed by: jilles MFC after:1 week Differential Revision:https://reviews.freebsd.org/D23747 Modified: head/bin/sh/miscbltin.c Modified: head/bin/sh/miscbltin.c == --- head/bin/sh/miscbltin.c Thu Feb 20 01:45:55 2020(r358151) +++ head/bin/sh/miscbltin.c Thu Feb 20 03:01:27 2020(r358152) @@ -66,10 +66,79 @@ __FBSDID("$FreeBSD$"); #undef eflag +#defineREAD_BUFLEN 1024 +struct fdctx { + int fd; + size_t off;/* offset in buf */ + size_t buflen; + char*ep;/* tail pointer */ + charbuf[READ_BUFLEN]; +}; + +static void fdctx_init(int, struct fdctx *); +static void fdctx_destroy(struct fdctx *); +static ssize_t fdgetc(struct fdctx *, char *); int readcmd(int, char **); int umaskcmd(int, char **); int ulimitcmd(int, char **); +static void +fdctx_init(int fd, struct fdctx *fdc) +{ + off_t cur; + + /* Check if fd is seekable. */ + cur = lseek(fd, 0, SEEK_CUR); + *fdc = (struct fdctx){ + .fd = fd, + .buflen = (cur != -1) ? READ_BUFLEN : 1, + .ep = >buf[0], /* No data */ + }; +} + +static ssize_t +fdgetc(struct fdctx *fdc, char *c) +{ + ssize_t nread; + + if (>buf[fdc->off] == fdc->ep) { + nread = read(fdc->fd, fdc->buf, fdc->buflen); + if (nread > 0) { + fdc->off = 0; + fdc->ep = fdc->buf + nread; + } else + return (nread); + } + *c = fdc->buf[fdc->off++]; + + return (1); +} + +static void +fdctx_destroy(struct fdctx *fdc) +{ + size_t residue; + + if (fdc->buflen > 1) { + /* +* Reposition the file offset. Here is the layout of buf: +* +* | off +* v +* |*|---| +* buf ep buf+buflen +* |<- residue ->| +* +* off: current character +* ep: offset just after read(2) +* residue: length for reposition +*/ + residue = (fdc->ep - fdc->buf) - fdc->off; + if (residue > 0) + (void) lseek(fdc->fd, -residue, SEEK_CUR); + } +} + /* * The read builtin. The -r option causes backslashes to be treated like * ordinary characters. @@ -108,6 +177,7 @@ readcmd(int argc __unused, char **argv __unused) fd_set ifds; ssize_t nread; int sig; + struct fdctx fdctx; rflag = 0; prompt = NULL; @@ -173,8 +243,9 @@ readcmd(int argc __unused, char **argv __unused) backslash = 0; STARTSTACKSTR(p); lastnonifs = lastnonifsws = -1; + fdctx_init(STDIN_FILENO, ); for (;;) { - nread = read(STDIN_FILENO, , 1); + nread = fdgetc(, ); if (nread == -1) { if (errno == EINTR) { sig = pendingsig; @@ -260,6 +331,7 @@ readcmd(int argc __unused, char **argv __unused) STARTSTACKSTR(p); lastnonifs = lastnonifsws = -1; } + fdctx_destroy(); STACKSTRNUL(p); /* ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r358151 - stable/12/sys/dev/hyperv/vmbus/amd64
Author: kib Date: Thu Feb 20 01:45:55 2020 New Revision: 358151 URL: https://svnweb.freebsd.org/changeset/base/358151 Log: MFC r357871: hyperv: Add Hygon Dhyana support. Modified: stable/12/sys/dev/hyperv/vmbus/amd64/hyperv_machdep.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/hyperv/vmbus/amd64/hyperv_machdep.c == --- stable/12/sys/dev/hyperv/vmbus/amd64/hyperv_machdep.c Thu Feb 20 01:44:50 2020(r358150) +++ stable/12/sys/dev/hyperv/vmbus/amd64/hyperv_machdep.c Thu Feb 20 01:45:55 2020(r358151) @@ -188,6 +188,7 @@ hyperv_tsc_tcinit(void *dummy __unused) switch (cpu_vendor_id) { case CPU_VENDOR_AMD: + case CPU_VENDOR_HYGON: hyperv_tsc_timecounter.tc_get_timecount = hyperv_tsc_timecount_mfence; tc64 = hyperv_tc64_tsc_mfence; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r358150 - stable/12/sys/dev/amd_ecc_inject
Author: kib Date: Thu Feb 20 01:44:50 2020 New Revision: 358150 URL: https://svnweb.freebsd.org/changeset/base/358150 Log: MFC r357870: ecc_inject: Add Hygon Dhyana support. Modified: stable/12/sys/dev/amd_ecc_inject/ecc_inject.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/amd_ecc_inject/ecc_inject.c == --- stable/12/sys/dev/amd_ecc_inject/ecc_inject.c Thu Feb 20 01:42:11 2020(r358149) +++ stable/12/sys/dev/amd_ecc_inject/ecc_inject.c Thu Feb 20 01:44:50 2020(r358150) @@ -203,7 +203,8 @@ ecc_ei_load(void) { uint32_t val; - if (cpu_vendor_id != CPU_VENDOR_AMD || CPUID_TO_FAMILY(cpu_id) < 0x10) { + if ((cpu_vendor_id != CPU_VENDOR_AMD || CPUID_TO_FAMILY(cpu_id) < 0x10) && + cpu_vendor_id != CPU_VENDOR_HYGON) { printf("DRAM ECC error injection is not supported\n"); return (ENXIO); } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r358149 - in stable/12/sys/dev: amdsbwd intpm
Author: kib Date: Thu Feb 20 01:42:11 2020 New Revision: 358149 URL: https://svnweb.freebsd.org/changeset/base/358149 Log: MFC r357869: amdsbwd, intpm: Add Hygon Dhyana support. Modified: stable/12/sys/dev/amdsbwd/amd_chipset.h stable/12/sys/dev/amdsbwd/amdsbwd.c stable/12/sys/dev/intpm/intpm.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/amdsbwd/amd_chipset.h == --- stable/12/sys/dev/amdsbwd/amd_chipset.h Thu Feb 20 01:41:12 2020 (r358148) +++ stable/12/sys/dev/amdsbwd/amd_chipset.h Thu Feb 20 01:42:11 2020 (r358149) @@ -146,3 +146,5 @@ #defineAMDCZ_SMBUS_DEVID 0x790b1022 #defineAMDCZ49_SMBUS_REVID 0x49 +#defineHYGONCZ_SMBUS_DEVID 0x790b1d94 + Modified: stable/12/sys/dev/amdsbwd/amdsbwd.c == --- stable/12/sys/dev/amdsbwd/amdsbwd.c Thu Feb 20 01:41:12 2020 (r358148) +++ stable/12/sys/dev/amdsbwd/amdsbwd.c Thu Feb 20 01:42:11 2020 (r358149) @@ -59,6 +59,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include @@ -268,7 +270,8 @@ amdsbwd_identify(driver_t *driver, device_t parent) return; if (pci_get_devid(smb_dev) != AMDSB_SMBUS_DEVID && pci_get_devid(smb_dev) != AMDFCH_SMBUS_DEVID && - pci_get_devid(smb_dev) != AMDCZ_SMBUS_DEVID) + pci_get_devid(smb_dev) != AMDCZ_SMBUS_DEVID && + pci_get_devid(smb_dev) != HYGONCZ_SMBUS_DEVID) return; child = BUS_ADD_CHILD(parent, ISA_ORDER_SPECULATIVE, "amdsbwd", -1); @@ -377,6 +380,7 @@ static void amdsbwd_probe_fch41(device_t dev, struct resource *pmres, uint32_t *addr) { uint8_t val; + char buf[36]; val = pmio_read(pmres, AMDFCH41_PM_ISA_CTRL); if ((val & AMDFCH41_MMIO_EN) != 0) { @@ -415,7 +419,9 @@ amdsbwd_probe_fch41(device_t dev, struct resource *pmr amdsbwd_verbose_printf(dev, "AMDFCH41_PM_DECODE_EN3 value = %#04x\n", val); #endif - device_set_desc(dev, "AMD FCH Rev 41h+ Watchdog Timer"); + snprintf(buf, sizeof(buf), "%s FCH Rev 41h+ Watchdog Timer", + cpu_vendor_id == CPU_VENDOR_HYGON ? "Hygon" : "AMD"); + device_set_desc_copy(dev, buf); } static int Modified: stable/12/sys/dev/intpm/intpm.c == --- stable/12/sys/dev/intpm/intpm.c Thu Feb 20 01:41:12 2020 (r358148) +++ stable/12/sys/dev/intpm/intpm.c Thu Feb 20 01:42:11 2020 (r358149) @@ -102,6 +102,7 @@ const struct intsmb_device { { AMDSB_SMBUS_DEVID, "AMD SB600/7xx/8xx/9xx SMBus Controller" }, { AMDFCH_SMBUS_DEVID, "AMD FCH SMBus Controller" }, { AMDCZ_SMBUS_DEVID, "AMD FCH SMBus Controller" }, + { HYGONCZ_SMBUS_DEVID, "Hygon FCH SMBus Controller" }, }; static int @@ -243,6 +244,7 @@ intsmb_attach(device_t dev) break; case AMDFCH_SMBUS_DEVID: case AMDCZ_SMBUS_DEVID: + case HYGONCZ_SMBUS_DEVID: sc->sb8xx = 1; break; } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r358148 - stable/12/sys/dev/amdpm
Author: kib Date: Thu Feb 20 01:41:12 2020 New Revision: 358148 URL: https://svnweb.freebsd.org/changeset/base/358148 Log: MFC r357868: amdpm: Add Hygon Dhyana support. Modified: stable/12/sys/dev/amdpm/amdpm.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/amdpm/amdpm.c == --- stable/12/sys/dev/amdpm/amdpm.c Thu Feb 20 01:39:48 2020 (r358147) +++ stable/12/sys/dev/amdpm/amdpm.c Thu Feb 20 01:41:12 2020 (r358148) @@ -67,6 +67,8 @@ static int amdpm_debug = 0; #define AMDPM_DEVICEID_AMD768PM 0x7443 #define AMDPM_DEVICEID_AMD8111PM 0x746B +#define AMDPM_VENDORID_HYGON 0x1d94 + /* nVidia nForce chipset */ #define AMDPM_VENDORID_NVIDIA 0x10de #define AMDPM_DEVICEID_NF_SMB 0x01b4 @@ -199,7 +201,8 @@ amdpm_attach(device_t dev) pci_write_config(dev, AMDPCI_GEN_CONFIG_PM, val_b | AMDPCI_PMIOEN, 1); /* Allocate I/O space */ - if (pci_get_vendor(dev) == AMDPM_VENDORID_AMD) + if (pci_get_vendor(dev) == AMDPM_VENDORID_AMD || + pci_get_vendor(dev) == AMDPM_VENDORID_HYGON) amdpm_sc->rid = AMDPCI_PMBASE; else amdpm_sc->rid = NFPCI_PMBASE; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r358147 - in stable/12/usr.sbin: bhyve bhyvectl
Author: kib Date: Thu Feb 20 01:39:48 2020 New Revision: 358147 URL: https://svnweb.freebsd.org/changeset/base/358147 Log: MFC r357866: bhyve, bhyvectl: Add Hygon Dhyana support. Modified: stable/12/usr.sbin/bhyve/xmsr.c stable/12/usr.sbin/bhyvectl/bhyvectl.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/bhyve/xmsr.c == --- stable/12/usr.sbin/bhyve/xmsr.c Thu Feb 20 01:38:56 2020 (r358146) +++ stable/12/usr.sbin/bhyve/xmsr.c Thu Feb 20 01:39:48 2020 (r358147) @@ -45,7 +45,7 @@ __FBSDID("$FreeBSD$"); #include "xmsr.h" -static int cpu_vendor_intel, cpu_vendor_amd; +static int cpu_vendor_intel, cpu_vendor_amd, cpu_vendor_hygon; int emulate_wrmsr(struct vmctx *ctx, int vcpu, uint32_t num, uint64_t val) @@ -63,7 +63,7 @@ emulate_wrmsr(struct vmctx *ctx, int vcpu, uint32_t nu default: break; } - } else if (cpu_vendor_amd) { + } else if (cpu_vendor_amd || cpu_vendor_hygon) { switch (num) { case MSR_HWCR: /* @@ -127,7 +127,7 @@ emulate_rdmsr(struct vmctx *ctx, int vcpu, uint32_t nu error = -1; break; } - } else if (cpu_vendor_amd) { + } else if (cpu_vendor_amd || cpu_vendor_hygon) { switch (num) { case MSR_BIOS_SIGN: *val = 0; @@ -224,6 +224,8 @@ init_msr(void) error = 0; if (strcmp(cpu_vendor, "AuthenticAMD") == 0) { cpu_vendor_amd = 1; + } else if (strcmp(cpu_vendor, "HygonGenuine") == 0) { + cpu_vendor_hygon = 1; } else if (strcmp(cpu_vendor, "GenuineIntel") == 0) { cpu_vendor_intel = 1; } else { Modified: stable/12/usr.sbin/bhyvectl/bhyvectl.c == --- stable/12/usr.sbin/bhyvectl/bhyvectl.c Thu Feb 20 01:38:56 2020 (r358146) +++ stable/12/usr.sbin/bhyvectl/bhyvectl.c Thu Feb 20 01:39:48 2020 (r358147) @@ -657,6 +657,8 @@ cpu_vendor_intel(void) if (strcmp(cpu_vendor, "AuthenticAMD") == 0) { return (false); + } else if (strcmp(cpu_vendor, "HygonGenuine") == 0) { + return (false); } else if (strcmp(cpu_vendor, "GenuineIntel") == 0) { return (true); } else { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r358146 - in stable/12/sys/amd64/vmm: . io
Author: kib Date: Thu Feb 20 01:38:56 2020 New Revision: 358146 URL: https://svnweb.freebsd.org/changeset/base/358146 Log: MFC r357865: vmm: Add Hygon Dhyana support. Modified: stable/12/sys/amd64/vmm/io/iommu.c stable/12/sys/amd64/vmm/vmm.c stable/12/sys/amd64/vmm/vmm_stat.c stable/12/sys/amd64/vmm/vmm_util.c stable/12/sys/amd64/vmm/vmm_util.h stable/12/sys/amd64/vmm/x86.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/vmm/io/iommu.c == --- stable/12/sys/amd64/vmm/io/iommu.c Thu Feb 20 01:35:30 2020 (r358145) +++ stable/12/sys/amd64/vmm/io/iommu.c Thu Feb 20 01:38:56 2020 (r358146) @@ -184,7 +184,7 @@ iommu_init(void) if (vmm_is_intel()) ops = _ops_intel; - else if (vmm_is_amd()) + else if (vmm_is_svm()) ops = _ops_amd; else ops = NULL; Modified: stable/12/sys/amd64/vmm/vmm.c == --- stable/12/sys/amd64/vmm/vmm.c Thu Feb 20 01:35:30 2020 (r358145) +++ stable/12/sys/amd64/vmm/vmm.c Thu Feb 20 01:38:56 2020 (r358146) @@ -347,7 +347,7 @@ vmm_init(void) if (vmm_is_intel()) ops = _ops_intel; - else if (vmm_is_amd()) + else if (vmm_is_svm()) ops = _ops_amd; else return (ENXIO); Modified: stable/12/sys/amd64/vmm/vmm_stat.c == --- stable/12/sys/amd64/vmm/vmm_stat.c Thu Feb 20 01:35:30 2020 (r358145) +++ stable/12/sys/amd64/vmm/vmm_stat.c Thu Feb 20 01:38:56 2020 (r358146) @@ -67,7 +67,7 @@ vmm_stat_register(void *arg) if (vst->scope == VMM_STAT_SCOPE_INTEL && !vmm_is_intel()) return; - if (vst->scope == VMM_STAT_SCOPE_AMD && !vmm_is_amd()) + if (vst->scope == VMM_STAT_SCOPE_AMD && !vmm_is_svm()) return; if (vst_num_elems + vst->nelems >= MAX_VMM_STAT_ELEMS) { Modified: stable/12/sys/amd64/vmm/vmm_util.c == --- stable/12/sys/amd64/vmm/vmm_util.c Thu Feb 20 01:35:30 2020 (r358145) +++ stable/12/sys/amd64/vmm/vmm_util.c Thu Feb 20 01:38:56 2020 (r358146) @@ -46,9 +46,10 @@ vmm_is_intel(void) } bool -vmm_is_amd(void) +vmm_is_svm(void) { - return (strcmp(cpu_vendor, "AuthenticAMD") == 0); + return (strcmp(cpu_vendor, "AuthenticAMD") == 0 || + strcmp(cpu_vendor, "HygonGenuine") == 0); } bool Modified: stable/12/sys/amd64/vmm/vmm_util.h == --- stable/12/sys/amd64/vmm/vmm_util.h Thu Feb 20 01:35:30 2020 (r358145) +++ stable/12/sys/amd64/vmm/vmm_util.h Thu Feb 20 01:38:56 2020 (r358146) @@ -34,7 +34,7 @@ struct trapframe; bool vmm_is_intel(void); -bool vmm_is_amd(void); +bool vmm_is_svm(void); bool vmm_supports_1G_pages(void); void dump_trapframe(struct trapframe *tf); Modified: stable/12/sys/amd64/vmm/x86.c == --- stable/12/sys/amd64/vmm/x86.c Thu Feb 20 01:35:30 2020 (r358145) +++ stable/12/sys/amd64/vmm/x86.c Thu Feb 20 01:38:56 2020 (r358146) @@ -135,7 +135,7 @@ x86_emulate_cpuid(struct vm *vm, int vcpu_id, break; case CPUID_8000_0008: cpuid_count(*eax, *ecx, regs); - if (vmm_is_amd()) { + if (vmm_is_svm()) { /* * As on Intel (_0007:0, EDX), mask out * unsupported or unsafe AMD extended features @@ -234,7 +234,7 @@ x86_emulate_cpuid(struct vm *vm, int vcpu_id, case CPUID_8000_001D: /* AMD Cache topology, like _0004 for Intel. */ - if (!vmm_is_amd()) + if (!vmm_is_svm()) goto default_leaf; /* @@ -276,8 +276,11 @@ x86_emulate_cpuid(struct vm *vm, int vcpu_id, break; case CPUID_8000_001E: - /* AMD Family 16h+ additional identifiers */ - if (!vmm_is_amd() || CPUID_TO_FAMILY(cpu_id) < 0x16) + /* +* AMD Family 16h+ and Hygon Family 18h additional +* identifiers. +*/ + if (!vmm_is_svm() || CPUID_TO_FAMILY(cpu_id) < 0x16) goto default_leaf; vm_get_topology(vm, , , ,
svn commit: r358145 - stable/11/usr.sbin/pciconf
Author: kib Date: Thu Feb 20 01:35:30 2020 New Revision: 358145 URL: https://svnweb.freebsd.org/changeset/base/358145 Log: MFC r358022: pciconf: List names of all known extended PCIe capabilities. Modified: stable/11/usr.sbin/pciconf/cap.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/pciconf/cap.c == --- stable/11/usr.sbin/pciconf/cap.cThu Feb 20 01:34:29 2020 (r358144) +++ stable/11/usr.sbin/pciconf/cap.cThu Feb 20 01:35:30 2020 (r358145) @@ -950,20 +950,35 @@ static struct { uint16_t id; const char *name; } ecap_names[] = { + { PCIZ_AER, "AER" }, + { PCIZ_VC, "Virtual Channel" }, + { PCIZ_SERNUM, "Device Serial Number" }, { PCIZ_PWRBDGT, "Power Budgeting" }, { PCIZ_RCLINK_DCL, "Root Complex Link Declaration" }, { PCIZ_RCLINK_CTL, "Root Complex Internal Link Control" }, { PCIZ_RCEC_ASSOC, "Root Complex Event Collector ASsociation" }, { PCIZ_MFVC, "MFVC" }, + { PCIZ_VC2, "Virtual Channel 2" }, { PCIZ_RCRB, "RCRB" }, + { PCIZ_CAC, "Configuration Access Correction" }, { PCIZ_ACS, "ACS" }, { PCIZ_ARI, "ARI" }, { PCIZ_ATS, "ATS" }, + { PCIZ_SRIOV, "SRIOV" }, + { PCIZ_MRIOV, "MRIOV" }, { PCIZ_MULTICAST, "Multicast" }, + { PCIZ_PAGE_REQ, "Page Page Request" }, + { PCIZ_AMD, "AMD proprietary "}, { PCIZ_RESIZE_BAR, "Resizable BAR" }, { PCIZ_DPA, "DPA" }, { PCIZ_TPH_REQ, "TPH Requester" }, { PCIZ_LTR, "LTR" }, + { PCIZ_SEC_PCIE, "Secondary PCI Express" }, + { PCIZ_PMUX, "Protocol Multiplexing" }, + { PCIZ_PASID, "Process Address Space ID" }, + { PCIZ_LN_REQ, "LN Requester" }, + { PCIZ_DPC, "Downstream Port Containment" }, + { PCIZ_L1PM, "L1 PM Substates" }, { 0, NULL } }; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r358144 - stable/12/usr.sbin/pciconf
Author: kib Date: Thu Feb 20 01:34:29 2020 New Revision: 358144 URL: https://svnweb.freebsd.org/changeset/base/358144 Log: MFC r358022: pciconf: List names of all known extended PCIe capabilities. Modified: stable/12/usr.sbin/pciconf/cap.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/pciconf/cap.c == --- stable/12/usr.sbin/pciconf/cap.cThu Feb 20 01:33:01 2020 (r358143) +++ stable/12/usr.sbin/pciconf/cap.cThu Feb 20 01:34:29 2020 (r358144) @@ -959,20 +959,35 @@ static struct { uint16_t id; const char *name; } ecap_names[] = { + { PCIZ_AER, "AER" }, + { PCIZ_VC, "Virtual Channel" }, + { PCIZ_SERNUM, "Device Serial Number" }, { PCIZ_PWRBDGT, "Power Budgeting" }, { PCIZ_RCLINK_DCL, "Root Complex Link Declaration" }, { PCIZ_RCLINK_CTL, "Root Complex Internal Link Control" }, { PCIZ_RCEC_ASSOC, "Root Complex Event Collector ASsociation" }, { PCIZ_MFVC, "MFVC" }, + { PCIZ_VC2, "Virtual Channel 2" }, { PCIZ_RCRB, "RCRB" }, + { PCIZ_CAC, "Configuration Access Correction" }, { PCIZ_ACS, "ACS" }, { PCIZ_ARI, "ARI" }, { PCIZ_ATS, "ATS" }, + { PCIZ_SRIOV, "SRIOV" }, + { PCIZ_MRIOV, "MRIOV" }, { PCIZ_MULTICAST, "Multicast" }, + { PCIZ_PAGE_REQ, "Page Page Request" }, + { PCIZ_AMD, "AMD proprietary "}, { PCIZ_RESIZE_BAR, "Resizable BAR" }, { PCIZ_DPA, "DPA" }, { PCIZ_TPH_REQ, "TPH Requester" }, { PCIZ_LTR, "LTR" }, + { PCIZ_SEC_PCIE, "Secondary PCI Express" }, + { PCIZ_PMUX, "Protocol Multiplexing" }, + { PCIZ_PASID, "Process Address Space ID" }, + { PCIZ_LN_REQ, "LN Requester" }, + { PCIZ_DPC, "Downstream Port Containment" }, + { PCIZ_L1PM, "L1 PM Substates" }, { 0, NULL } }; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r358143 - head/sys/vm
Author: imp Date: Thu Feb 20 01:33:01 2020 New Revision: 358143 URL: https://svnweb.freebsd.org/changeset/base/358143 Log: Don't convert all lower-layer errors to EIO. Don't convert all lower layer errors to EIO. Instead, pass the actual error up the stack. This will allow the upper layers that look for ENXIO to react properly to that signal from the lower layers and, for UFS, unmount the filesystem. Reviewed by: kib@ Differential Revision: https://reviews.freebsd.org/D23755 Modified: head/sys/vm/vnode_pager.c Modified: head/sys/vm/vnode_pager.c == --- head/sys/vm/vnode_pager.c Thu Feb 20 01:27:35 2020(r358142) +++ head/sys/vm/vnode_pager.c Thu Feb 20 01:33:01 2020(r358143) @@ -628,8 +628,11 @@ vnode_pager_input_smlfs(vm_object_t object, vm_page_t bwait(bp, PVM, "vnsrd"); - if ((bp->b_ioflags & BIO_ERROR) != 0) - error = EIO; + if ((bp->b_ioflags & BIO_ERROR) != 0) { + KASSERT(bp->b_error != 0, + ("%s: buf error but b_error == 0\n", __func__)); + error = bp->b_error; + } /* * free the buffer header back to the swap buffer pool @@ -1113,7 +1116,9 @@ vnode_pager_generic_getpages_done(struct buf *bp) off_t tfoff, nextoff; int i, error; - error = (bp->b_ioflags & BIO_ERROR) != 0 ? EIO : 0; + KASSERT((bp->b_ioflags & BIO_ERROR) == 0 || bp->b_error != 0, + ("%s: buf error but b_error == 0\n", __func__)); + error = (bp->b_ioflags & BIO_ERROR) != 0 ? bp->b_error : 0; object = bp->b_vp->v_object; if (error == 0 && bp->b_bcount != bp->b_npages * PAGE_SIZE) { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r358142 - in stable/12/libexec/rtld-elf: . aarch64 amd64 arm i386 mips powerpc powerpc64 riscv sparc64
Author: kib Date: Thu Feb 20 01:27:35 2020 New Revision: 358142 URL: https://svnweb.freebsd.org/changeset/base/358142 Log: MFC r357895, r357910: Handle non-plt IRELATIVE relocations, at least for x86. Modified: stable/12/libexec/rtld-elf/aarch64/reloc.c stable/12/libexec/rtld-elf/amd64/reloc.c stable/12/libexec/rtld-elf/arm/reloc.c stable/12/libexec/rtld-elf/i386/reloc.c stable/12/libexec/rtld-elf/mips/reloc.c stable/12/libexec/rtld-elf/powerpc/reloc.c stable/12/libexec/rtld-elf/powerpc64/reloc.c stable/12/libexec/rtld-elf/riscv/reloc.c stable/12/libexec/rtld-elf/rtld.c stable/12/libexec/rtld-elf/rtld.h stable/12/libexec/rtld-elf/sparc64/reloc.c Directory Properties: stable/12/ (props changed) Modified: stable/12/libexec/rtld-elf/aarch64/reloc.c == --- stable/12/libexec/rtld-elf/aarch64/reloc.c Thu Feb 20 01:24:45 2020 (r358141) +++ stable/12/libexec/rtld-elf/aarch64/reloc.c Thu Feb 20 01:27:35 2020 (r358142) @@ -258,31 +258,56 @@ reloc_jmpslots(Obj_Entry *obj, int flags, RtldLockStat return (0); } +static void +reloc_iresolve_one(Obj_Entry *obj, const Elf_Rela *rela, +RtldLockState *lockstate) +{ + Elf_Addr *where, target, *ptr; + + ptr = (Elf_Addr *)(obj->relocbase + rela->r_addend); + where = (Elf_Addr *)(obj->relocbase + rela->r_offset); + lock_release(rtld_bind_lock, lockstate); + target = call_ifunc_resolver(ptr); + wlock_acquire(rtld_bind_lock, lockstate); + *where = target; +} + int reloc_iresolve(Obj_Entry *obj, struct Struct_RtldLockState *lockstate) { const Elf_Rela *relalim; const Elf_Rela *rela; - Elf_Addr *where, target, *ptr; if (!obj->irelative) return (0); - relalim = (const Elf_Rela *)((const char *)obj->pltrela + obj->pltrelasize); + obj->irelative = false; + relalim = (const Elf_Rela *)((const char *)obj->pltrela + + obj->pltrelasize); for (rela = obj->pltrela; rela < relalim; rela++) { - if (ELF_R_TYPE(rela->r_info) == R_AARCH64_IRELATIVE) { - ptr = (Elf_Addr *)(obj->relocbase + rela->r_addend); - where = (Elf_Addr *)(obj->relocbase + rela->r_offset); - lock_release(rtld_bind_lock, lockstate); - target = call_ifunc_resolver(ptr); - wlock_acquire(rtld_bind_lock, lockstate); - *where = target; - } + if (ELF_R_TYPE(rela->r_info) == R_AARCH64_IRELATIVE) + reloc_iresolve_one(obj, rela, lockstate); } - obj->irelative = false; return (0); } int +reloc_iresolve_nonplt(Obj_Entry *obj, struct Struct_RtldLockState *lockstate) +{ + const Elf_Rela *relalim; + const Elf_Rela *rela; + + if (!obj->irelative_nonplt) + return (0); + obj->irelative_nonplt = false; + relalim = (const Elf_Rela *)((const char *)obj->rela + obj->relasize); + for (rela = obj->rela; rela < relalim; rela++) { + if (ELF_R_TYPE(rela->r_info) == R_AARCH64_IRELATIVE) + reloc_iresolve_one(obj, rela, lockstate); + } + return (0); +} + +int reloc_gnu_ifunc(Obj_Entry *obj, int flags, struct Struct_RtldLockState *lockstate) { @@ -497,6 +522,9 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int *where = (Elf_Addr)(obj->relocbase + rela->r_addend); break; case R_AARCH64_NONE: + break; + case R_AARCH64_IRELATIVE: + obj->irelative_nonplt = true; break; default: rtld_printf("%s: Unhandled relocation %lu\n", Modified: stable/12/libexec/rtld-elf/amd64/reloc.c == --- stable/12/libexec/rtld-elf/amd64/reloc.cThu Feb 20 01:24:45 2020 (r358141) +++ stable/12/libexec/rtld-elf/amd64/reloc.cThu Feb 20 01:27:35 2020 (r358142) @@ -303,6 +303,10 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int case R_X86_64_RELATIVE: *where = (Elf_Addr)(obj->relocbase + rela->r_addend); break; + case R_X86_64_IRELATIVE: + obj->irelative_nonplt = true; + break; + /* * missing: * R_X86_64_GOTPCREL, R_X86_64_32, R_X86_64_32S, R_X86_64_16, @@ -410,34 +414,53 @@ reloc_jmpslot(Elf_Addr *where, Elf_Addr target, return (target); } +static void +reloc_iresolve_one(Obj_Entry *obj, const Elf_Rela *rela, +RtldLockState *lockstate) +{ + Elf_Addr *where, target, *ptr; + + ptr = (Elf_Addr
svn commit: r358141 - stable/11/lib/libthr/thread
Author: kib Date: Thu Feb 20 01:24:45 2020 New Revision: 358141 URL: https://svnweb.freebsd.org/changeset/base/358141 Log: MFC r357894: Return success, instead of ESRCH, from pthread_cancel(3) applied to the exited but not yet joined thread. Modified: stable/11/lib/libthr/thread/thr_cancel.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libthr/thread/thr_cancel.c == --- stable/11/lib/libthr/thread/thr_cancel.cThu Feb 20 01:23:39 2020 (r358140) +++ stable/11/lib/libthr/thread/thr_cancel.cThu Feb 20 01:24:45 2020 (r358141) @@ -63,7 +63,7 @@ _pthread_cancel(pthread_t pthread) * _thr_find_thread and THR_THREAD_UNLOCK will enter and leave critical * region automatically. */ - if ((ret = _thr_find_thread(curthread, pthread, 0)) == 0) { + if ((ret = _thr_find_thread(curthread, pthread, 1)) == 0) { if (!pthread->cancel_pending) { pthread->cancel_pending = 1; if (pthread->state != PS_DEAD) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r358140 - stable/12/lib/libthr/thread
Author: kib Date: Thu Feb 20 01:23:39 2020 New Revision: 358140 URL: https://svnweb.freebsd.org/changeset/base/358140 Log: MFC r357894: Return success, instead of ESRCH, from pthread_cancel(3) applied to the exited but not yet joined thread. Modified: stable/12/lib/libthr/thread/thr_cancel.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libthr/thread/thr_cancel.c == --- stable/12/lib/libthr/thread/thr_cancel.cThu Feb 20 01:22:09 2020 (r358139) +++ stable/12/lib/libthr/thread/thr_cancel.cThu Feb 20 01:23:39 2020 (r358140) @@ -71,7 +71,7 @@ _thr_cancel(pthread_t pthread) * _thr_find_thread and THR_THREAD_UNLOCK will enter and leave critical * region automatically. */ - if ((ret = _thr_find_thread(curthread, pthread, 0)) == 0) { + if ((ret = _thr_find_thread(curthread, pthread, 1)) == 0) { if (!pthread->cancel_pending) { pthread->cancel_pending = 1; if (pthread->state != PS_DEAD) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r358139 - stable/11/sys/dev/pci
Author: kib Date: Thu Feb 20 01:22:09 2020 New Revision: 358139 URL: https://svnweb.freebsd.org/changeset/base/358139 Log: MFC r358021: Fix typo. Modified: stable/11/sys/dev/pci/pcireg.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/pci/pcireg.h == --- stable/11/sys/dev/pci/pcireg.h Thu Feb 20 01:16:42 2020 (r358138) +++ stable/11/sys/dev/pci/pcireg.h Thu Feb 20 01:22:09 2020 (r358139) @@ -191,7 +191,7 @@ #definePCIZ_PMUX 0x001a /* Protocol Multiplexing */ #definePCIZ_PASID 0x001b /* Process Address Space ID */ #definePCIZ_LN_REQ 0x001c /* LN Requester */ -#definePCIZ_DPC0x001d /* Downstream Porto Containment */ +#definePCIZ_DPC0x001d /* Downstream Port Containment */ #definePCIZ_L1PM 0x001e /* L1 PM Substates */ /* config registers for header type 0 devices */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r358138 - stable/12/sys/dev/pci
Author: kib Date: Thu Feb 20 01:16:42 2020 New Revision: 358138 URL: https://svnweb.freebsd.org/changeset/base/358138 Log: MFC r358021: Fix typo. Modified: stable/12/sys/dev/pci/pcireg.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/pci/pcireg.h == --- stable/12/sys/dev/pci/pcireg.h Thu Feb 20 01:03:44 2020 (r358137) +++ stable/12/sys/dev/pci/pcireg.h Thu Feb 20 01:16:42 2020 (r358138) @@ -193,7 +193,7 @@ #definePCIZ_PMUX 0x001a /* Protocol Multiplexing */ #definePCIZ_PASID 0x001b /* Process Address Space ID */ #definePCIZ_LN_REQ 0x001c /* LN Requester */ -#definePCIZ_DPC0x001d /* Downstream Porto Containment */ +#definePCIZ_DPC0x001d /* Downstream Port Containment */ #definePCIZ_L1PM 0x001e /* L1 PM Substates */ /* config registers for header type 0 devices */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r358137 - in stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
Author: mav Date: Thu Feb 20 01:03:44 2020 New Revision: 358137 URL: https://svnweb.freebsd.org/changeset/base/358137 Log: MFC r357639: Reduce number of atomic_add() calls in aggsum. Previous code used 4 atomics to do aggsum_flush_bucket() and 2 more to re-borrow after the flush. But since asc_borrowed and asc_delta are accessed only while holding asc_lock, it makes no any sense to modify as_lower_bound and as_upper_bound in multiple steps. Instead of that the new code uses only 2 atomics in all the cases, one per as_*_bound variable. I think even that is overkill, simple atomic store and load could be used here, since all modifications are done under the as_lock, but there are no such primitives in ZFS code now. While there, make borrow code consider previous borrow value, so that on mixed request patterns reduce chance of needing to borrow again if much larger request follows tiny one that needed borrow. Also reduce as_numbuckets from uint64_t to u_int. It makes no sense to use so large division operation on every aggsum_add(). Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/aggsum.c stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/aggsum.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/aggsum.c == --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/aggsum.c Thu Feb 20 00:46:22 2020(r358136) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/aggsum.c Thu Feb 20 01:03:44 2020(r358137) @@ -125,13 +125,11 @@ aggsum_flush_bucket(aggsum_t *as, struct aggsum_bucket * We use atomic instructions for this because we read the upper and * lower bounds without the lock, so we need stores to be atomic. */ - atomic_add_64((volatile uint64_t *)>as_lower_bound, asb->asc_delta); - atomic_add_64((volatile uint64_t *)>as_upper_bound, asb->asc_delta); - asb->asc_delta = 0; - atomic_add_64((volatile uint64_t *)>as_upper_bound, - -asb->asc_borrowed); atomic_add_64((volatile uint64_t *)>as_lower_bound, - asb->asc_borrowed); + asb->asc_delta + asb->asc_borrowed); + atomic_add_64((volatile uint64_t *)>as_upper_bound, + asb->asc_delta - asb->asc_borrowed); + asb->asc_delta = 0; asb->asc_borrowed = 0; } @@ -163,40 +161,43 @@ aggsum_value(aggsum_t *as) return (rv); } -static void -aggsum_borrow(aggsum_t *as, int64_t delta, struct aggsum_bucket *asb) -{ - int64_t abs_delta = (delta < 0 ? -delta : delta); - mutex_enter(>as_lock); - mutex_enter(>asc_lock); - - aggsum_flush_bucket(as, asb); - - atomic_add_64((volatile uint64_t *)>as_upper_bound, abs_delta); - atomic_add_64((volatile uint64_t *)>as_lower_bound, -abs_delta); - asb->asc_borrowed = abs_delta; - - mutex_exit(>asc_lock); - mutex_exit(>as_lock); -} - void aggsum_add(aggsum_t *as, int64_t delta) { struct aggsum_bucket *asb = >as_buckets[CPU_SEQID % as->as_numbuckets]; + int64_t borrow; - for (;;) { - mutex_enter(>asc_lock); - if (asb->asc_delta + delta <= (int64_t)asb->asc_borrowed && - asb->asc_delta + delta >= -(int64_t)asb->asc_borrowed) { - asb->asc_delta += delta; - mutex_exit(>asc_lock); - return; - } + /* Try fast path if we already borrowed enough before. */ + mutex_enter(>asc_lock); + if (asb->asc_delta + delta <= (int64_t)asb->asc_borrowed && + asb->asc_delta + delta >= -(int64_t)asb->asc_borrowed) { + asb->asc_delta += delta; mutex_exit(>asc_lock); - aggsum_borrow(as, delta * aggsum_borrow_multiplier, asb); + return; } + mutex_exit(>asc_lock); + + /* +* We haven't borrowed enough. Take the global lock and borrow +* considering what is requested now and what we borrowed before. +*/ + borrow = (delta < 0 ? -delta : delta) * aggsum_borrow_multiplier; + mutex_enter(>as_lock); + mutex_enter(>asc_lock); + delta += asb->asc_delta; + asb->asc_delta = 0; + if (borrow >= asb->asc_borrowed) + borrow -= asb->asc_borrowed; + else + borrow = (borrow - (int64_t)asb->asc_borrowed) / 4; + asb->asc_borrowed += borrow; + atomic_add_64((volatile uint64_t *)>as_lower_bound, + delta - borrow); + atomic_add_64((volatile uint64_t *)>as_upper_bound, + delta + borrow); + mutex_exit(>asc_lock); + mutex_exit(>as_lock); } /* Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/aggsum.h
svn commit: r358136 - in head/stand: efi/loader i386/libi386 i386/loader libsa
Author: imp Date: Thu Feb 20 00:46:22 2020 New Revision: 358136 URL: https://svnweb.freebsd.org/changeset/base/358136 Log: Move smbios.c to libsa. smbios used to be an i386 only kinda weird quirk to the x86 architecture. But UEFI picked it up, dusted it off and now it's many other locations. Make it base technology by moving it to libsa and fixing up the compliation. The code has issues with unaligned access still, but that will be addressed in a followup commit. Differential Revision: https://reviews.freebsd.org/D23660 Added: head/stand/libsa/smbios.c (contents, props changed) - copied, changed from r358135, head/stand/i386/libi386/smbios.c head/stand/libsa/smbios.h (contents, props changed) - copied, changed from r358135, head/stand/i386/libi386/smbios.h Deleted: head/stand/i386/libi386/smbios.c head/stand/i386/libi386/smbios.h Modified: head/stand/efi/loader/Makefile head/stand/i386/libi386/Makefile head/stand/i386/loader/main.c head/stand/libsa/Makefile Modified: head/stand/efi/loader/Makefile == --- head/stand/efi/loader/Makefile Thu Feb 20 00:46:16 2020 (r358135) +++ head/stand/efi/loader/Makefile Thu Feb 20 00:46:22 2020 (r358136) @@ -22,7 +22,6 @@ SRCS= autoload.c \ framebuffer.c \ main.c \ self_reloc.c \ - smbios.c \ vers.c CFLAGS+= -I${.CURDIR}/../loader @@ -45,8 +44,6 @@ CWARNFLAGS.main.c+= -Wno-format .PATH: ${.CURDIR}/../loader .PATH: ${.CURDIR}/../loader/arch/${MACHINE} -# For smbios.c XXX need to abstract properly -.PATH: ${BOOTSRC}/i386/libi386 .include "${.CURDIR}/../loader/arch/${MACHINE}/Makefile.inc" CFLAGS+= -I${.CURDIR} @@ -56,18 +53,6 @@ CFLAGS+= -I${EFISRC}/include/${MACHINE} CFLAGS+= -I${SYSDIR}/contrib/dev/acpica/include CFLAGS+= -I${BOOTSRC}/i386/libi386 CFLAGS+= -DEFI - -.if !defined(BOOT_HIDE_SERIAL_NUMBERS) -# Export serial numbers, UUID, and asset tag from loader. -CFLAGS+= -DSMBIOS_SERIAL_NUMBERS -.if defined(BOOT_LITTLE_ENDIAN_UUID) -# Use little-endian UUID format as defined in SMBIOS 2.6. -CFLAGS+= -DSMBIOS_LITTLE_ENDIAN_UUID -.elif defined(BOOT_NETWORK_ENDIAN_UUID) -# Use network-endian UUID format for backward compatibility. -CFLAGS+= -DSMBIOS_NETWORK_ENDIAN_UUID -.endif -.endif .if defined(HAVE_FDT) && ${MK_FDT} != "no" .include "${BOOTSRC}/fdt.mk" Modified: head/stand/i386/libi386/Makefile == --- head/stand/i386/libi386/MakefileThu Feb 20 00:46:16 2020 (r358135) +++ head/stand/i386/libi386/MakefileThu Feb 20 00:46:22 2020 (r358136) @@ -9,7 +9,7 @@ SRCS= bio.c biosacpi.c biosdisk.c biosmem.c biospnp.c comconsole.c devicename.c elf32_freebsd.c \ elf64_freebsd.c multiboot.c multiboot_tramp.S relocater_tramp.S \ i386_copy.c i386_module.c nullconsole.c pxe.c pxetramp.S \ - smbios.c time.c vidconsole.c amd64_tramp.S spinconsole.c + time.c vidconsole.c amd64_tramp.S spinconsole.c .PATH: ${ZFSSRC} SRCS+= devicename_stubs.c CFLAGS+= -I${ZFSSRC} @@ -26,18 +26,6 @@ CFLAGS+= -DCOMSPEED=${BOOT_COMCONSOLE_SPEED} .ifdef(BOOT_BIOSDISK_DEBUG) # Make the disk code more talkative CFLAGS+= -DDISK_DEBUG -.endif - -.if !defined(BOOT_HIDE_SERIAL_NUMBERS) -# Export serial numbers, UUID, and asset tag from loader. -CFLAGS+= -DSMBIOS_SERIAL_NUMBERS -.if defined(BOOT_LITTLE_ENDIAN_UUID) -# Use little-endian UUID format as defined in SMBIOS 2.6. -CFLAGS+= -DSMBIOS_LITTLE_ENDIAN_UUID -.elif defined(BOOT_NETWORK_ENDIAN_UUID) -# Use network-endian UUID format for backward compatibility. -CFLAGS+= -DSMBIOS_NETWORK_ENDIAN_UUID -.endif .endif # terminal emulation Modified: head/stand/i386/loader/main.c == --- head/stand/i386/loader/main.c Thu Feb 20 00:46:16 2020 (r358135) +++ head/stand/i386/loader/main.c Thu Feb 20 00:46:22 2020 (r358136) @@ -45,7 +45,7 @@ __FBSDID("$FreeBSD$"); #include "bootstrap.h" #include "common/bootargs.h" #include "libi386/libi386.h" -#include "libi386/smbios.h" +#include #include "btxv86.h" #ifdef LOADER_ZFS_SUPPORT Modified: head/stand/libsa/Makefile == --- head/stand/libsa/Makefile Thu Feb 20 00:46:16 2020(r358135) +++ head/stand/libsa/Makefile Thu Feb 20 00:46:22 2020(r358136) @@ -137,6 +137,20 @@ CLEANFILES+= ${SAFE_INCS} ${STAND_H_INC} ${OTHER_INC} SRCS+= closeall.c dev.c ioctl.c nullfs.c stat.c \ fstat.c close.c lseek.c open.c read.c write.c readdir.c +# SMBios routines +SRCS+= smbios.c +.if !defined(BOOT_HIDE_SERIAL_NUMBERS) +# Export serial numbers, UUID, and asset tag from loader. +CFLAGS.smbios.c+= -DSMBIOS_SERIAL_NUMBERS +.if
svn commit: r358135 - in head/stand: efi/loader i386/libi386 i386/loader libsa
Author: imp Date: Thu Feb 20 00:46:16 2020 New Revision: 358135 URL: https://svnweb.freebsd.org/changeset/base/358135 Log: Create ptov() function. Create a ptov() function. It's basically the same as the btx PTOV macro, but works everywhere. smbios needs this to translate addresses, but the translation differs between BIOS booting and EFI booting. Make it a function so one smbios.o can be used everywhere. Provide definitions for it in the two loaders affected. Differential Revision: https://reviews.freebsd.org/D23660 Modified: head/stand/efi/loader/main.c head/stand/i386/libi386/smbios.c head/stand/i386/loader/main.c head/stand/libsa/stand.h Modified: head/stand/efi/loader/main.c == --- head/stand/efi/loader/main.cThu Feb 20 00:34:46 2020 (r358134) +++ head/stand/efi/loader/main.cThu Feb 20 00:46:16 2020 (r358135) @@ -852,7 +852,11 @@ read_loader_env(const char *name, char *def_fn, bool o } } - +caddr_t +ptov(uintptr_t x) +{ + return ((caddr_t)x); +} EFI_STATUS main(int argc, CHAR16 *argv[]) Modified: head/stand/i386/libi386/smbios.c == --- head/stand/i386/libi386/smbios.cThu Feb 20 00:34:46 2020 (r358134) +++ head/stand/i386/libi386/smbios.cThu Feb 20 00:46:16 2020 (r358135) @@ -28,16 +28,9 @@ __FBSDID("$FreeBSD$"); #include -#include #include -#ifdef EFI -/* In EFI, we don't need PTOV(). */ -#define PTOV(x)(caddr_t)(x) -#else -#include "btxv86.h" -#endif -#include "smbios.h" +#define PTOV(x)ptov(x) /* * Detect SMBIOS and export information about the SMBIOS into the Modified: head/stand/i386/loader/main.c == --- head/stand/i386/loader/main.c Thu Feb 20 00:34:46 2020 (r358134) +++ head/stand/i386/loader/main.c Thu Feb 20 00:46:16 2020 (r358135) @@ -86,6 +86,12 @@ extern char end[]; static void *heap_top; static void *heap_bottom; +caddr_t +ptov(uintptr_t x) +{ + return (PTOV(x)); +} + int main(void) { Modified: head/stand/libsa/stand.h == --- head/stand/libsa/stand.hThu Feb 20 00:34:46 2020(r358134) +++ head/stand/libsa/stand.hThu Feb 20 00:46:16 2020(r358135) @@ -452,4 +452,9 @@ const char *x86_hypervisor(void); #define reallocf(x, y) Reallocf(x, y, NULL, 0) #endif +/* + * va <-> pa routines. MD code must supply. + */ +caddr_t ptov(uintptr_t); + #endif /* STAND_H */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r358134 - head/sys/vm
Author: imp Date: Thu Feb 20 00:34:46 2020 New Revision: 358134 URL: https://svnweb.freebsd.org/changeset/base/358134 Log: Don't spam the console with an additional, and useless, error message. There's no need to spam the console with this error message. If there's an I/O error, the disk/cam driver will report it at the lower levels. If that's an actual problem, the upper layers will report that. Reviewed by: kib@ Differential Revision: https://reviews.freebsd.org/D23756 Modified: head/sys/vm/vnode_pager.c Modified: head/sys/vm/vnode_pager.c == --- head/sys/vm/vnode_pager.c Wed Feb 19 22:34:22 2020(r358133) +++ head/sys/vm/vnode_pager.c Thu Feb 20 00:34:46 2020(r358134) @@ -1169,8 +1169,6 @@ vnode_pager_generic_getpages_done(struct buf *bp) vm_page_readahead_finish(mt); } VM_OBJECT_RUNLOCK(object); - if (error != 0) - printf("%s: I/O read error %d\n", __func__, error); return (error); } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r358133 - head/sys/vm
On Wed, Feb 19, 2020 at 4:49 PM Joerg Sonnenberger wrote: > > On Wed, Feb 19, 2020 at 10:34:23PM +, Jeff Roberson wrote: > > Author: jeff > > Date: Wed Feb 19 22:34:22 2020 > > New Revision: 358133 > > URL: https://svnweb.freebsd.org/changeset/base/358133 > > > > Log: > > Silence a gcc warning about no return from a function that handles every > > possible enum in a switch statement. I verified that this emits nothing > > as expected on clang. radix relies on constant propagation to eliminate > > any branching from these access routines. > > __builtin_unreachable() ? > We seem to call that __unreachable() to address compilers where it may not be defined, but it does seem to be the ideal way to handle it. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r358133 - head/sys/vm
On Wed, Feb 19, 2020 at 10:34:23PM +, Jeff Roberson wrote: > Author: jeff > Date: Wed Feb 19 22:34:22 2020 > New Revision: 358133 > URL: https://svnweb.freebsd.org/changeset/base/358133 > > Log: > Silence a gcc warning about no return from a function that handles every > possible enum in a switch statement. I verified that this emits nothing > as expected on clang. radix relies on constant propagation to eliminate > any branching from these access routines. __builtin_unreachable() ? Joerg ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r358133 - head/sys/vm
Author: jeff Date: Wed Feb 19 22:34:22 2020 New Revision: 358133 URL: https://svnweb.freebsd.org/changeset/base/358133 Log: Silence a gcc warning about no return from a function that handles every possible enum in a switch statement. I verified that this emits nothing as expected on clang. radix relies on constant propagation to eliminate any branching from these access routines. Reported by: lwhsu/tinderbox Modified: head/sys/vm/vm_radix.c Modified: head/sys/vm/vm_radix.c == --- head/sys/vm/vm_radix.c Wed Feb 19 21:12:59 2020(r358132) +++ head/sys/vm/vm_radix.c Wed Feb 19 22:34:22 2020(r358133) @@ -208,6 +208,8 @@ vm_radix_node_load(smrnode_t *p, enum vm_radix_access case SMR: return (smr_entered_load(p, vm_radix_smr)); } + /* This is unreachable, silence gcc. */ + panic("vm_radix_node_get: Unknown access type"); } static __inline void ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r358132 - in head: . share/mk
Author: dim Date: Wed Feb 19 21:12:59 2020 New Revision: 358132 URL: https://svnweb.freebsd.org/changeset/base/358132 Log: Take LINKER_FREEBSD_VERSION from numerical field after dash Summary: With COMPILER_FREEBSD_VERSION, we use a numeric value that we bump each time we make a change that requires re-bootstrapping, but with the linker variant, we instead take the entire part after "FreeBSD", as in this example version output: LLD 9.0.1 (FreeBSD c1a0a213378a458fbea1a5c77b315c7dce08fd05-136) (compatible with GNU linkers) E.g., LINKER_FREEBSD_VERSION is currently being set to "c1a0a213378a458fbea1a5c77b315c7dce08fd05-136". This means that *any* new upstream lld version will cause re-bootstrapping. We should only look at the numerical field we append after a dash instead. This review attempts to make it so. The only thing I am not happy about is the post-processing of awk output in Makefile.inc1. I notice that our awk does not have gensub(), so it can't substitute a numbered sub-regex with \1, \2, etc. Suggestions welcome. :) MFC after:1 week Differential Revision: https://reviews.freebsd.org/D23691 Modified: head/Makefile.inc1 head/share/mk/bsd.linker.mk Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Wed Feb 19 21:03:06 2020(r358131) +++ head/Makefile.inc1 Wed Feb 19 21:12:59 2020(r358132) @@ -272,9 +272,10 @@ WANT_LINKER_TYPE= !make(test-system-compiler) .if ${WANT_LINKER_TYPE} == "lld" WANT_LINKER_FREEBSD_VERSION_FILE= lib/clang/include/VCSVersion.inc -WANT_LINKER_FREEBSD_VERSION!= \ +_WANT_LINKER_FREEBSD_VERSION!= \ awk '$$2 == "LLD_REVISION" {gsub(/"/, "", $$3); print $$3}' \ ${SRCDIR}/${WANT_LINKER_FREEBSD_VERSION_FILE} || echo unknown +WANT_LINKER_FREEBSD_VERSION=${_WANT_LINKER_FREEBSD_VERSION:C/.*-(.*)/\1/} WANT_LINKER_VERSION_FILE= lib/clang/include/lld/Common/Version.inc WANT_LINKER_VERSION!= \ awk '$$2 == "LLD_VERSION" {split($$3, a, "."); print a[1] * 1 + a[2] * 100 + a[3]}' \ Modified: head/share/mk/bsd.linker.mk == --- head/share/mk/bsd.linker.mk Wed Feb 19 21:03:06 2020(r358131) +++ head/share/mk/bsd.linker.mk Wed Feb 19 21:12:59 2020(r358132) @@ -69,9 +69,11 @@ _v= ${_ld_version:M[1-9]*.[0-9]*:[1]} .elif ${_ld_version:[1]} == "LLD" ${X_}LINKER_TYPE= lld _v=${_ld_version:[2]} -${X_}LINKER_FREEBSD_VERSION!= \ - ${${ld}} --version | \ - awk '$$3 ~ /FreeBSD/ {print substr($$4, 1, length($$4)-1)}' +.if ${_ld_version:[3]} == "(FreeBSD" +${X_}LINKER_FREEBSD_VERSION:= ${_ld_version:[4]:C/.*-(.*)\)/\1/} +.else +${X_}LINKER_FREEBSD_VERSION= 0 +.endif .else .warning Unknown linker from ${ld}=${${ld}}: ${_ld_version}, defaulting to bfd ${X_}LINKER_TYPE= bfd ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r358130 - head/sys/vm
Author: jeff Date: Wed Feb 19 19:58:31 2020 New Revision: 358130 URL: https://svnweb.freebsd.org/changeset/base/358130 Log: Use SMR to provide a safe unlocked lookup for vm_radix. The tree is kept correct for readers with store barriers and careful ordering. The existing object lock serializes writers. Consumers will be introduced in later commits. Reviewed by: markj, kib Differential Revision:https://reviews.freebsd.org/D23446 Modified: head/sys/vm/vm_radix.c head/sys/vm/vm_radix.h Modified: head/sys/vm/vm_radix.c == --- head/sys/vm/vm_radix.c Wed Feb 19 19:51:09 2020(r358129) +++ head/sys/vm/vm_radix.c Wed Feb 19 19:58:31 2020(r358130) @@ -58,11 +58,14 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include #include #include #include +#include #include #include @@ -95,26 +98,47 @@ __FBSDID("$FreeBSD$"); #defineVM_RADIX_UNITLEVEL(lev) \ ((vm_pindex_t)1 << ((lev) * VM_RADIX_WIDTH)) +enum vm_radix_access { SMR, LOCKED, UNSERIALIZED }; + +struct vm_radix_node; +SMR_TYPE_DECLARE(smrnode_t, struct vm_radix_node *); + struct vm_radix_node { - vm_pindex_t rn_owner; /* Owner of record. */ - uint16_t rn_count; /* Valid children. */ - uint16_t rn_clev; /* Current level. */ - void*rn_child[VM_RADIX_COUNT]; /* Child nodes. */ + vm_pindex_t rn_owner; /* Owner of record. */ + uint16_trn_count; /* Valid children. */ + uint8_t rn_clev;/* Current level. */ + int8_t rn_last;/* zero last ptr. */ + smrnode_t rn_child[VM_RADIX_COUNT]; /* Child nodes. */ }; static uma_zone_t vm_radix_node_zone; +static smr_t vm_radix_smr; +static void vm_radix_node_store(smrnode_t *p, struct vm_radix_node *v, +enum vm_radix_access access); + /* * Allocate a radix node. */ -static __inline struct vm_radix_node * +static struct vm_radix_node * vm_radix_node_get(vm_pindex_t owner, uint16_t count, uint16_t clevel) { struct vm_radix_node *rnode; - rnode = uma_zalloc(vm_radix_node_zone, M_NOWAIT); + rnode = uma_zalloc_smr(vm_radix_node_zone, M_NOWAIT); if (rnode == NULL) return (NULL); + + /* +* We want to clear the last child pointer after the final section +* has exited so lookup can not return false negatives. It is done +* here because it will be cache-cold in the dtor callback. +*/ + if (rnode->rn_last != 0) { + vm_radix_node_store(>rn_child[rnode->rn_last - 1], + NULL, UNSERIALIZED); + rnode->rn_last = 0; + } rnode->rn_owner = owner; rnode->rn_count = count; rnode->rn_clev = clevel; @@ -125,10 +149,24 @@ vm_radix_node_get(vm_pindex_t owner, uint16_t count, u * Free radix node. */ static __inline void -vm_radix_node_put(struct vm_radix_node *rnode) +vm_radix_node_put(struct vm_radix_node *rnode, int8_t last) { +#ifdef INVARIANTS + int slot; - uma_zfree(vm_radix_node_zone, rnode); + KASSERT(rnode->rn_count == 0, + ("vm_radix_node_put: rnode %p has %d children", rnode, + rnode->rn_count)); + for (slot = 0; slot < VM_RADIX_COUNT; slot++) { + if (slot == last) + continue; + KASSERT(smr_unserialized_load(>rn_child[slot], true) == + NULL, ("vm_radix_node_put: rnode %p has a child", rnode)); + } +#endif + /* Off by one so a freshly zero'd node is not assigned to. */ + rnode->rn_last = last + 1; + uma_zfree_smr(vm_radix_node_zone, rnode); } /* @@ -156,23 +194,59 @@ vm_radix_trimkey(vm_pindex_t index, uint16_t level) } /* + * Fetch a node pointer from a slot in another node. + */ +static __inline struct vm_radix_node * +vm_radix_node_load(smrnode_t *p, enum vm_radix_access access) +{ + + switch (access) { + case UNSERIALIZED: + return (smr_unserialized_load(p, true)); + case LOCKED: + return (smr_serialized_load(p, true)); + case SMR: + return (smr_entered_load(p, vm_radix_smr)); + } +} + +static __inline void +vm_radix_node_store(smrnode_t *p, struct vm_radix_node *v, +enum vm_radix_access access) +{ + + + switch (access) { + case UNSERIALIZED: + smr_unserialized_store(p, v, true); + break; + case LOCKED: + smr_serialized_store(p, v, true); + break; + case SMR: + panic("vm_radix_node_store: Not supported in smr section."); +
svn commit: r358129 - head/sys/sys
Author: jeff Date: Wed Feb 19 19:51:09 2020 New Revision: 358129 URL: https://svnweb.freebsd.org/changeset/base/358129 Log: Since r357940 it is no longer possible to use a single type cast for all atomic_*_ptr functions. Modified: head/sys/sys/smr.h Modified: head/sys/sys/smr.h == --- head/sys/sys/smr.h Wed Feb 19 18:48:46 2020(r358128) +++ head/sys/sys/smr.h Wed Feb 19 19:51:09 2020(r358129) @@ -120,7 +120,7 @@ typedef struct { \ */ #definesmr_serialized_load(p, ex) ({ \ SMR_ASSERT(ex, "smr_serialized_load"); \ - (__typeof((p)->__ptr))atomic_load_ptr((uintptr_t *)&(p)->__ptr);\ + (__typeof((p)->__ptr))atomic_load_ptr(&(p)->__ptr); \ }) /* @@ -155,7 +155,7 @@ typedef struct { \ */ #definesmr_unserialized_load(p, ex) ({ \ SMR_ASSERT(ex, "smr_unserialized_load");\ - (__typeof((p)->__ptr))atomic_load_ptr((uintptr_t *)&(p)->__ptr);\ + (__typeof((p)->__ptr))atomic_load_ptr(&(p)->__ptr); \ }) /* ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r358128 - in head: lib/libmemstat sys/vm
Author: jeff Date: Wed Feb 19 18:48:46 2020 New Revision: 358128 URL: https://svnweb.freebsd.org/changeset/base/358128 Log: Use per-domain locks for the bucket cache. This gives much better concurrency when there are a large number of cores per-domain and multiple domains. Avoid taking the lock entirely if it will not be productive. ROUNDROBIN domains will have mixed memory in each domain and will load balance to all domains. While here refactor the zone/domain separation and bucket limits to simplify callers. Reviewed by: markj Differential Revision:https://reviews.freebsd.org/D23673 Modified: head/lib/libmemstat/memstat_uma.c head/sys/vm/uma_core.c head/sys/vm/uma_int.h Modified: head/lib/libmemstat/memstat_uma.c == --- head/lib/libmemstat/memstat_uma.c Wed Feb 19 17:09:08 2020 (r358127) +++ head/lib/libmemstat/memstat_uma.c Wed Feb 19 18:48:46 2020 (r358128) @@ -425,12 +425,13 @@ memstat_kvm_uma(struct memory_type_list *list, void *k (unsigned long )uz.uz_frees); mtp->mt_failures = kvm_counter_u64_fetch(kvm, (unsigned long )uz.uz_fails); + mtp->mt_xdomain = kvm_counter_u64_fetch(kvm, + (unsigned long )uz.uz_xdomain); mtp->mt_sleeps = uz.uz_sleeps; /* See comment above in memstat_sysctl_uma(). */ if (mtp->mt_numallocs < mtp->mt_numfrees) mtp->mt_numallocs = mtp->mt_numfrees; - mtp->mt_xdomain = uz.uz_xdomain; if (kz.uk_flags & UMA_ZFLAG_INTERNAL) goto skip_percpu; for (i = 0; i < mp_maxid + 1; i++) { @@ -454,8 +455,9 @@ skip_percpu: mtp->mt_byteslimit = mtp->mt_countlimit * mtp->mt_size; mtp->mt_count = mtp->mt_numallocs - mtp->mt_numfrees; for (i = 0; i < ndomains; i++) { - ret = kread(kvm, _domain[i], , - sizeof(uzd), 0); + ret = kread(kvm, + _cpu[mp_maxid + 1] + i * sizeof(uzd), + , sizeof(uzd), 0); if (ret != 0) continue; for (ubp = Modified: head/sys/vm/uma_core.c == --- head/sys/vm/uma_core.c Wed Feb 19 17:09:08 2020(r358127) +++ head/sys/vm/uma_core.c Wed Feb 19 18:48:46 2020(r358128) @@ -285,6 +285,8 @@ static void zone_dtor(void *, int, void *); static inline void item_dtor(uma_zone_t zone, void *item, int size, void *udata, enum zfreeskip skip); static int zero_init(void *, int, int); +static void zone_free_bucket(uma_zone_t zone, uma_bucket_t bucket, void *udata, +int itemdomain, bool ws); static void zone_foreach(void (*zfunc)(uma_zone_t, void *), void *); static void zone_foreach_unlocked(void (*zfunc)(uma_zone_t, void *), void *); static void zone_timeout(uma_zone_t zone, void *); @@ -518,6 +520,9 @@ bucket_free(uma_zone_t zone, uma_bucket_t bucket, void { struct uma_bucket_zone *ubz; + if (bucket->ub_cnt != 0) + bucket_drain(zone, bucket); + KASSERT(bucket->ub_cnt == 0, ("bucket_free: Freeing a non free bucket.")); KASSERT(bucket->ub_seq == SMR_SEQ_INVALID, @@ -538,17 +543,122 @@ bucket_zone_drain(void) } /* + * Acquire the domain lock and record contention. + */ +static uma_zone_domain_t +zone_domain_lock(uma_zone_t zone, int domain) +{ + uma_zone_domain_t zdom; + bool lockfail; + + zdom = ZDOM_GET(zone, domain); + lockfail = false; + if (ZDOM_OWNED(zdom)) + lockfail = true; + ZDOM_LOCK(zdom); + /* This is unsynchronized. The counter does not need to be precise. */ + if (lockfail && zone->uz_bucket_size < zone->uz_bucket_size_max) + zone->uz_bucket_size++; + return (zdom); +} + +/* + * Search for the domain with the least cached items and return it, breaking + * ties with a preferred domain by returning it. + */ +static __noinline int +zone_domain_lowest(uma_zone_t zone, int pref) +{ + long least, nitems; + int domain; + int i; + + least = LONG_MAX; + domain = 0; + for (i = 0; i < vm_ndomains; i++) { + nitems = ZDOM_GET(zone, i)->uzd_nitems; + if (nitems < least) { + domain = i; + least = nitems; + } else if (nitems == least && (i == pref || domain == pref)) + domain = pref; + } + +
svn commit: r358127 - in head: contrib/ncurses contrib/ncurses/doc/html contrib/ncurses/form contrib/ncurses/include contrib/ncurses/man contrib/ncurses/menu contrib/ncurses/misc contrib/ncurses/nc...
Author: bapt Date: Wed Feb 19 17:09:08 2020 New Revision: 358127 URL: https://svnweb.freebsd.org/changeset/base/358127 Log: Update to 6.2-20200215 While I didn't plan another upgrade, This version incorporate fixes from kevans@ so let's upgrade to it Modified: head/contrib/ncurses/ANNOUNCE head/contrib/ncurses/AUTHORS head/contrib/ncurses/COPYING head/contrib/ncurses/INSTALL head/contrib/ncurses/MANIFEST head/contrib/ncurses/Makefile.in head/contrib/ncurses/Makefile.os2 head/contrib/ncurses/NEWS head/contrib/ncurses/README head/contrib/ncurses/README.MinGW head/contrib/ncurses/README.emx head/contrib/ncurses/TO-DO head/contrib/ncurses/VERSION head/contrib/ncurses/aclocal.m4 head/contrib/ncurses/announce.html.in head/contrib/ncurses/configure head/contrib/ncurses/configure.in head/contrib/ncurses/convert_configure.pl head/contrib/ncurses/dist.mk head/contrib/ncurses/doc/html/announce.html head/contrib/ncurses/doc/html/hackguide.html head/contrib/ncurses/doc/html/ncurses-intro.html head/contrib/ncurses/form/Makefile.in head/contrib/ncurses/form/READ.ME head/contrib/ncurses/form/f_trace.c head/contrib/ncurses/form/fld_arg.c head/contrib/ncurses/form/fld_attr.c head/contrib/ncurses/form/fld_current.c head/contrib/ncurses/form/fld_def.c head/contrib/ncurses/form/fld_dup.c head/contrib/ncurses/form/fld_ftchoice.c head/contrib/ncurses/form/fld_ftlink.c head/contrib/ncurses/form/fld_info.c head/contrib/ncurses/form/fld_just.c head/contrib/ncurses/form/fld_link.c head/contrib/ncurses/form/fld_max.c head/contrib/ncurses/form/fld_move.c head/contrib/ncurses/form/fld_newftyp.c head/contrib/ncurses/form/fld_opts.c head/contrib/ncurses/form/fld_pad.c head/contrib/ncurses/form/fld_page.c head/contrib/ncurses/form/fld_stat.c head/contrib/ncurses/form/fld_type.c head/contrib/ncurses/form/fld_user.c head/contrib/ncurses/form/form.h head/contrib/ncurses/form/form.priv.h head/contrib/ncurses/form/frm_cursor.c head/contrib/ncurses/form/frm_data.c head/contrib/ncurses/form/frm_def.c head/contrib/ncurses/form/frm_driver.c head/contrib/ncurses/form/frm_hook.c head/contrib/ncurses/form/frm_opts.c head/contrib/ncurses/form/frm_page.c head/contrib/ncurses/form/frm_post.c head/contrib/ncurses/form/frm_req_name.c head/contrib/ncurses/form/frm_scale.c head/contrib/ncurses/form/frm_sub.c head/contrib/ncurses/form/frm_user.c head/contrib/ncurses/form/frm_win.c head/contrib/ncurses/form/fty_alnum.c head/contrib/ncurses/form/fty_alpha.c head/contrib/ncurses/form/fty_enum.c head/contrib/ncurses/form/fty_generic.c head/contrib/ncurses/form/fty_int.c head/contrib/ncurses/form/fty_ipv4.c head/contrib/ncurses/form/fty_num.c head/contrib/ncurses/form/fty_regex.c head/contrib/ncurses/form/headers head/contrib/ncurses/form/llib-lform head/contrib/ncurses/form/llib-lformt head/contrib/ncurses/form/llib-lformtw head/contrib/ncurses/form/llib-lformw head/contrib/ncurses/form/modules head/contrib/ncurses/include/Caps head/contrib/ncurses/include/Caps-ncurses head/contrib/ncurses/include/Caps.aix4 head/contrib/ncurses/include/Caps.hpux11 head/contrib/ncurses/include/Caps.keys head/contrib/ncurses/include/Caps.osf1r5 head/contrib/ncurses/include/Caps.uwin head/contrib/ncurses/include/MKhashsize.sh head/contrib/ncurses/include/MKkey_defs.sh head/contrib/ncurses/include/MKncurses_def.sh head/contrib/ncurses/include/MKparametrized.sh head/contrib/ncurses/include/MKterm.h.awk.in head/contrib/ncurses/include/Makefile.in head/contrib/ncurses/include/capdefaults.c head/contrib/ncurses/include/curses.h.in head/contrib/ncurses/include/edit_cfg.sh head/contrib/ncurses/include/hashed_db.h head/contrib/ncurses/include/headers head/contrib/ncurses/include/nc_alloc.h head/contrib/ncurses/include/nc_mingw.h head/contrib/ncurses/include/nc_panel.h head/contrib/ncurses/include/nc_string.h head/contrib/ncurses/include/nc_termios.h head/contrib/ncurses/include/nc_tparm.h head/contrib/ncurses/include/ncurses_cfg.hin head/contrib/ncurses/include/ncurses_defs head/contrib/ncurses/include/ncurses_dll.h.in head/contrib/ncurses/include/ncurses_mingw.h head/contrib/ncurses/include/term_entry.h head/contrib/ncurses/include/termcap.h.in head/contrib/ncurses/include/tic.h head/contrib/ncurses/include/unctrl.h.in head/contrib/ncurses/man/MKada_config.in head/contrib/ncurses/man/MKncu_config.in head/contrib/ncurses/man/MKterminfo.sh head/contrib/ncurses/man/Makefile.in head/contrib/ncurses/man/captoinfo.1m head/contrib/ncurses/man/clear.1 head/contrib/ncurses/man/curs_add_wch.3x head/contrib/ncurses/man/curs_add_wchstr.3x head/contrib/ncurses/man/curs_addch.3x head/contrib/ncurses/man/curs_addchstr.3x head/contrib/ncurses/man/curs_addstr.3x head/contrib/ncurses/man/curs_addwstr.3x head/contrib/ncurses/man/curs_attr.3x
svn commit: r358125 - in vendor/ncurses/dist: . Ada95 Ada95/doc Ada95/gen Ada95/include Ada95/samples Ada95/src c++ doc/html doc/html/ada doc/html/ada/funcs doc/html/man form include man menu misc ...
Author: bapt Date: Wed Feb 19 16:58:06 2020 New Revision: 358125 URL: https://svnweb.freebsd.org/changeset/base/358125 Log: import ncurses 6.2-20200215 Added: vendor/ncurses/dist/Ada95/samples/split-path.awk (contents, props changed) Modified: vendor/ncurses/dist/ANNOUNCE vendor/ncurses/dist/AUTHORS vendor/ncurses/dist/Ada95/Makefile.in vendor/ncurses/dist/Ada95/README vendor/ncurses/dist/Ada95/TODO vendor/ncurses/dist/Ada95/aclocal.m4 vendor/ncurses/dist/Ada95/configure vendor/ncurses/dist/Ada95/configure.in vendor/ncurses/dist/Ada95/doc/Makefile.in vendor/ncurses/dist/Ada95/gen/Makefile.in vendor/ncurses/dist/Ada95/gen/adacurses-config.in vendor/ncurses/dist/Ada95/gen/gen.c vendor/ncurses/dist/Ada95/gen/html.m4 vendor/ncurses/dist/Ada95/gen/normal.m4 vendor/ncurses/dist/Ada95/gen/table.m4 vendor/ncurses/dist/Ada95/gen/terminal_interface-curses-aux.ads.m4 vendor/ncurses/dist/Ada95/gen/terminal_interface-curses-forms-field_types.ads.m4 vendor/ncurses/dist/Ada95/gen/terminal_interface-curses-forms-field_user_data.ads.m4 vendor/ncurses/dist/Ada95/gen/terminal_interface-curses-forms-form_user_data.ads.m4 vendor/ncurses/dist/Ada95/gen/terminal_interface-curses-forms.ads.m4 vendor/ncurses/dist/Ada95/gen/terminal_interface-curses-menus-item_user_data.ads.m4 vendor/ncurses/dist/Ada95/gen/terminal_interface-curses-menus-menu_user_data.ads.m4 vendor/ncurses/dist/Ada95/gen/terminal_interface-curses-menus.ads.m4 vendor/ncurses/dist/Ada95/gen/terminal_interface-curses-mouse.ads.m4 vendor/ncurses/dist/Ada95/gen/terminal_interface-curses-panels-user_data.ads.m4 vendor/ncurses/dist/Ada95/gen/terminal_interface-curses-panels.ads.m4 vendor/ncurses/dist/Ada95/gen/terminal_interface-curses-trace.ads.m4 vendor/ncurses/dist/Ada95/gen/terminal_interface-curses.adb.m4 vendor/ncurses/dist/Ada95/gen/terminal_interface-curses.ads.m4 vendor/ncurses/dist/Ada95/include/MKncurses_def.sh vendor/ncurses/dist/Ada95/include/Makefile.in vendor/ncurses/dist/Ada95/include/ncurses_cfg.hin vendor/ncurses/dist/Ada95/include/ncurses_defs vendor/ncurses/dist/Ada95/make-tar.sh vendor/ncurses/dist/Ada95/mk-1st.awk vendor/ncurses/dist/Ada95/samples/Makefile.in vendor/ncurses/dist/Ada95/samples/README vendor/ncurses/dist/Ada95/samples/ncurses.adb vendor/ncurses/dist/Ada95/samples/ncurses2-acs_and_scroll.adb vendor/ncurses/dist/Ada95/samples/ncurses2-acs_and_scroll.ads vendor/ncurses/dist/Ada95/samples/ncurses2-acs_display.adb vendor/ncurses/dist/Ada95/samples/ncurses2-acs_display.ads vendor/ncurses/dist/Ada95/samples/ncurses2-attr_test.adb vendor/ncurses/dist/Ada95/samples/ncurses2-attr_test.ads vendor/ncurses/dist/Ada95/samples/ncurses2-color_edit.adb vendor/ncurses/dist/Ada95/samples/ncurses2-color_edit.ads vendor/ncurses/dist/Ada95/samples/ncurses2-color_test.adb vendor/ncurses/dist/Ada95/samples/ncurses2-color_test.ads vendor/ncurses/dist/Ada95/samples/ncurses2-demo_forms.adb vendor/ncurses/dist/Ada95/samples/ncurses2-demo_forms.ads vendor/ncurses/dist/Ada95/samples/ncurses2-demo_pad.adb vendor/ncurses/dist/Ada95/samples/ncurses2-demo_pad.ads vendor/ncurses/dist/Ada95/samples/ncurses2-demo_panels.adb vendor/ncurses/dist/Ada95/samples/ncurses2-demo_panels.ads vendor/ncurses/dist/Ada95/samples/ncurses2-flushinp_test.adb vendor/ncurses/dist/Ada95/samples/ncurses2-flushinp_test.ads vendor/ncurses/dist/Ada95/samples/ncurses2-genericputs.adb vendor/ncurses/dist/Ada95/samples/ncurses2-genericputs.ads vendor/ncurses/dist/Ada95/samples/ncurses2-getch.ads vendor/ncurses/dist/Ada95/samples/ncurses2-getch_test.adb vendor/ncurses/dist/Ada95/samples/ncurses2-getch_test.ads vendor/ncurses/dist/Ada95/samples/ncurses2-getopt.adb vendor/ncurses/dist/Ada95/samples/ncurses2-getopt.ads vendor/ncurses/dist/Ada95/samples/ncurses2-m.adb vendor/ncurses/dist/Ada95/samples/ncurses2-m.ads vendor/ncurses/dist/Ada95/samples/ncurses2-menu_test.adb vendor/ncurses/dist/Ada95/samples/ncurses2-menu_test.ads vendor/ncurses/dist/Ada95/samples/ncurses2-overlap_test.adb vendor/ncurses/dist/Ada95/samples/ncurses2-overlap_test.ads vendor/ncurses/dist/Ada95/samples/ncurses2-slk_test.adb vendor/ncurses/dist/Ada95/samples/ncurses2-slk_test.ads vendor/ncurses/dist/Ada95/samples/ncurses2-test_sgr_attributes.adb vendor/ncurses/dist/Ada95/samples/ncurses2-test_sgr_attributes.ads vendor/ncurses/dist/Ada95/samples/ncurses2-trace_set.adb vendor/ncurses/dist/Ada95/samples/ncurses2-trace_set.ads vendor/ncurses/dist/Ada95/samples/ncurses2-util.adb vendor/ncurses/dist/Ada95/samples/ncurses2-util.ads vendor/ncurses/dist/Ada95/samples/ncurses2.ads vendor/ncurses/dist/Ada95/samples/rain.adb vendor/ncurses/dist/Ada95/samples/rain.ads vendor/ncurses/dist/Ada95/samples/sample-curses_demo-attributes.adb vendor/ncurses/dist/Ada95/samples/sample-curses_demo-attributes.ads
svn commit: r358124 - head/tests/sys/net
Author: kp Date: Wed Feb 19 16:44:16 2020 New Revision: 358124 URL: https://svnweb.freebsd.org/changeset/base/358124 Log: bridge tests: Remove unneeded 'All rights reserved.' The FreeBSD foundation no longer requires this, as per https://lists.freebsd.org/pipermail/svn-src-all/2019-February/177215.html and private communications. Sponsored by: The FreeBSD Foundation Modified: head/tests/sys/net/if_bridge_test.sh Modified: head/tests/sys/net/if_bridge_test.sh == --- head/tests/sys/net/if_bridge_test.shWed Feb 19 16:23:21 2020 (r358123) +++ head/tests/sys/net/if_bridge_test.shWed Feb 19 16:44:16 2020 (r358124) @@ -3,7 +3,6 @@ # SPDX-License-Identifier: BSD-2-Clause-FreeBSD # # Copyright (c) 2020 The FreeBSD Foundation -# All rights reserved. # # This software was developed by Kristof Provost under sponsorship # from the FreeBSD Foundation. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r358123 - head/tools/tools/nanobsd/dhcpd
Author: emaste Date: Wed Feb 19 16:23:21 2020 New Revision: 358123 URL: https://svnweb.freebsd.org/changeset/base/358123 Log: nanobsd: add WITHOUT_LLVM_COV, akin to WITHOUT_GCOV Another case, missed in r358105 Modified: head/tools/tools/nanobsd/dhcpd/common Modified: head/tools/tools/nanobsd/dhcpd/common == --- head/tools/tools/nanobsd/dhcpd/common Wed Feb 19 16:18:27 2020 (r358122) +++ head/tools/tools/nanobsd/dhcpd/common Wed Feb 19 16:23:21 2020 (r358123) @@ -111,6 +111,7 @@ WITHOUT_GAMES=true WITHOUT_GCOV=true WITHOUT_HTML=true WITHOUT_IPFILTER=true +WITHOUT_LLVM_COV=true WITHOUT_LOCALES=true WITHOUT_LPR=true WITHOUT_MAN=true ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r358122 - stable/11/lib/libc/rpc
Author: markj Date: Wed Feb 19 16:18:27 2020 New Revision: 358122 URL: https://svnweb.freebsd.org/changeset/base/358122 Log: MFC r357576: Fix a use of an uninitialized pointer in xdr_rpcbs_rmtcalllist(). PR: 243759 Modified: stable/11/lib/libc/rpc/rpcb_st_xdr.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/rpc/rpcb_st_xdr.c == --- stable/11/lib/libc/rpc/rpcb_st_xdr.cWed Feb 19 16:17:51 2020 (r358121) +++ stable/11/lib/libc/rpc/rpcb_st_xdr.cWed Feb 19 16:18:27 2020 (r358122) @@ -52,29 +52,28 @@ xdr_rpcbs_addrlist(XDR *xdrs, rpcbs_addrlist *objp) { struct rpcbs_addrlist **pnext; - if (!xdr_rpcprog(xdrs, >prog)) { + if (!xdr_rpcprog(xdrs, >prog)) { return (FALSE); - } - if (!xdr_rpcvers(xdrs, >vers)) { + } + if (!xdr_rpcvers(xdrs, >vers)) { return (FALSE); - } - if (!xdr_int(xdrs, >success)) { + } + if (!xdr_int(xdrs, >success)) { return (FALSE); - } - if (!xdr_int(xdrs, >failure)) { + } + if (!xdr_int(xdrs, >failure)) { return (FALSE); - } - if (!xdr_string(xdrs, >netid, RPC_MAXDATASIZE)) { + } + if (!xdr_string(xdrs, >netid, RPC_MAXDATASIZE)) { return (FALSE); - } + } - pnext = >next; - - if (!xdr_pointer(xdrs, (char **) pnext, + pnext = >next; + if (!xdr_pointer(xdrs, (char **) pnext, sizeof (rpcbs_addrlist), (xdrproc_t)xdr_rpcbs_addrlist)) { return (FALSE); - } + } return (TRUE); } @@ -84,86 +83,86 @@ xdr_rpcbs_addrlist(XDR *xdrs, rpcbs_addrlist *objp) bool_t xdr_rpcbs_rmtcalllist(XDR *xdrs, rpcbs_rmtcalllist *objp) { - int32_t *buf; struct rpcbs_rmtcalllist **pnext; + int32_t *buf; + pnext = >next; if (xdrs->x_op == XDR_ENCODE) { - buf = XDR_INLINE(xdrs, 6 * BYTES_PER_XDR_UNIT); - if (buf == NULL) { - if (!xdr_rpcprog(xdrs, >prog)) { - return (FALSE); + buf = XDR_INLINE(xdrs, 6 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_rpcprog(xdrs, >prog)) { + return (FALSE); + } + if (!xdr_rpcvers(xdrs, >vers)) { + return (FALSE); + } + if (!xdr_rpcproc(xdrs, >proc)) { + return (FALSE); + } + if (!xdr_int(xdrs, >success)) { + return (FALSE); + } + if (!xdr_int(xdrs, >failure)) { + return (FALSE); + } + if (!xdr_int(xdrs, >indirect)) { + return (FALSE); + } + } else { + IXDR_PUT_U_INT32(buf, objp->prog); + IXDR_PUT_U_INT32(buf, objp->vers); + IXDR_PUT_U_INT32(buf, objp->proc); + IXDR_PUT_INT32(buf, objp->success); + IXDR_PUT_INT32(buf, objp->failure); + IXDR_PUT_INT32(buf, objp->indirect); } - if (!xdr_rpcvers(xdrs, >vers)) { + if (!xdr_string(xdrs, >netid, RPC_MAXDATASIZE)) { return (FALSE); } - if (!xdr_rpcproc(xdrs, >proc)) { + if (!xdr_pointer(xdrs, (char **) pnext, + sizeof (rpcbs_rmtcalllist), + (xdrproc_t)xdr_rpcbs_rmtcalllist)) { return (FALSE); } - if (!xdr_int(xdrs, >success)) { - return (FALSE); - } - if (!xdr_int(xdrs, >failure)) { - return (FALSE); - } - if (!xdr_int(xdrs, >indirect)) { - return (FALSE); - } - } else { - IXDR_PUT_U_INT32(buf, objp->prog); - IXDR_PUT_U_INT32(buf, objp->vers); - IXDR_PUT_U_INT32(buf, objp->proc); - IXDR_PUT_INT32(buf, objp->success); - IXDR_PUT_INT32(buf, objp->failure); - IXDR_PUT_INT32(buf, objp->indirect); - } - if (!xdr_string(xdrs, >netid, RPC_MAXDATASIZE)) { - return (FALSE); - } - pnext = >next; - if (!xdr_pointer(xdrs, (char **) pnext, - sizeof (rpcbs_rmtcalllist), - (xdrproc_t)xdr_rpcbs_rmtcalllist)) { -
svn commit: r358121 - stable/12/lib/libc/rpc
Author: markj Date: Wed Feb 19 16:17:51 2020 New Revision: 358121 URL: https://svnweb.freebsd.org/changeset/base/358121 Log: MFC r357576: Fix a use of an uninitialized pointer in xdr_rpcbs_rmtcalllist(). PR: 243759 Modified: stable/12/lib/libc/rpc/rpcb_st_xdr.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/rpc/rpcb_st_xdr.c == --- stable/12/lib/libc/rpc/rpcb_st_xdr.cWed Feb 19 15:56:40 2020 (r358120) +++ stable/12/lib/libc/rpc/rpcb_st_xdr.cWed Feb 19 16:17:51 2020 (r358121) @@ -54,29 +54,28 @@ xdr_rpcbs_addrlist(XDR *xdrs, rpcbs_addrlist *objp) { struct rpcbs_addrlist **pnext; - if (!xdr_rpcprog(xdrs, >prog)) { + if (!xdr_rpcprog(xdrs, >prog)) { return (FALSE); - } - if (!xdr_rpcvers(xdrs, >vers)) { + } + if (!xdr_rpcvers(xdrs, >vers)) { return (FALSE); - } - if (!xdr_int(xdrs, >success)) { + } + if (!xdr_int(xdrs, >success)) { return (FALSE); - } - if (!xdr_int(xdrs, >failure)) { + } + if (!xdr_int(xdrs, >failure)) { return (FALSE); - } - if (!xdr_string(xdrs, >netid, RPC_MAXDATASIZE)) { + } + if (!xdr_string(xdrs, >netid, RPC_MAXDATASIZE)) { return (FALSE); - } + } - pnext = >next; - - if (!xdr_pointer(xdrs, (char **) pnext, + pnext = >next; + if (!xdr_pointer(xdrs, (char **) pnext, sizeof (rpcbs_addrlist), (xdrproc_t)xdr_rpcbs_addrlist)) { return (FALSE); - } + } return (TRUE); } @@ -86,86 +85,86 @@ xdr_rpcbs_addrlist(XDR *xdrs, rpcbs_addrlist *objp) bool_t xdr_rpcbs_rmtcalllist(XDR *xdrs, rpcbs_rmtcalllist *objp) { - int32_t *buf; struct rpcbs_rmtcalllist **pnext; + int32_t *buf; + pnext = >next; if (xdrs->x_op == XDR_ENCODE) { - buf = XDR_INLINE(xdrs, 6 * BYTES_PER_XDR_UNIT); - if (buf == NULL) { - if (!xdr_rpcprog(xdrs, >prog)) { - return (FALSE); + buf = XDR_INLINE(xdrs, 6 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_rpcprog(xdrs, >prog)) { + return (FALSE); + } + if (!xdr_rpcvers(xdrs, >vers)) { + return (FALSE); + } + if (!xdr_rpcproc(xdrs, >proc)) { + return (FALSE); + } + if (!xdr_int(xdrs, >success)) { + return (FALSE); + } + if (!xdr_int(xdrs, >failure)) { + return (FALSE); + } + if (!xdr_int(xdrs, >indirect)) { + return (FALSE); + } + } else { + IXDR_PUT_U_INT32(buf, objp->prog); + IXDR_PUT_U_INT32(buf, objp->vers); + IXDR_PUT_U_INT32(buf, objp->proc); + IXDR_PUT_INT32(buf, objp->success); + IXDR_PUT_INT32(buf, objp->failure); + IXDR_PUT_INT32(buf, objp->indirect); } - if (!xdr_rpcvers(xdrs, >vers)) { + if (!xdr_string(xdrs, >netid, RPC_MAXDATASIZE)) { return (FALSE); } - if (!xdr_rpcproc(xdrs, >proc)) { + if (!xdr_pointer(xdrs, (char **) pnext, + sizeof (rpcbs_rmtcalllist), + (xdrproc_t)xdr_rpcbs_rmtcalllist)) { return (FALSE); } - if (!xdr_int(xdrs, >success)) { - return (FALSE); - } - if (!xdr_int(xdrs, >failure)) { - return (FALSE); - } - if (!xdr_int(xdrs, >indirect)) { - return (FALSE); - } - } else { - IXDR_PUT_U_INT32(buf, objp->prog); - IXDR_PUT_U_INT32(buf, objp->vers); - IXDR_PUT_U_INT32(buf, objp->proc); - IXDR_PUT_INT32(buf, objp->success); - IXDR_PUT_INT32(buf, objp->failure); - IXDR_PUT_INT32(buf, objp->indirect); - } - if (!xdr_string(xdrs, >netid, RPC_MAXDATASIZE)) { - return (FALSE); - } - pnext = >next; - if (!xdr_pointer(xdrs, (char **) pnext, - sizeof (rpcbs_rmtcalllist), - (xdrproc_t)xdr_rpcbs_rmtcalllist)) { -
svn commit: r358120 - head
Author: emaste Date: Wed Feb 19 15:56:40 2020 New Revision: 358120 URL: https://svnweb.freebsd.org/changeset/base/358120 Log: Cirrus-CI: increase timeout to 120m For some reason build+package+test time went from about 1h10 to over 1h30 (killed due to timeout prior to completion). The reason for the increase still needs investigation. Modified: head/.cirrus.yml Modified: head/.cirrus.yml == --- head/.cirrus.ymlWed Feb 19 15:30:13 2020(r358119) +++ head/.cirrus.ymlWed Feb 19 15:56:40 2020(r358120) @@ -9,7 +9,7 @@ env: CIRRUS_CLONE_DEPTH: 1 task: - timeout_in: 90m + timeout_in: 120m install_script: - pkg install -y qemu-devel uefi-edk2-qemu-x86_64 script: ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r358062 - in head: contrib/ncurses contrib/ncurses/doc contrib/ncurses/doc/html contrib/ncurses/form contrib/ncurses/include contrib/ncurses/man contrib/ncurses/menu contrib/ncurses/mi
On Wed, Feb 19, 2020 at 05:18:25PM +0200, Konstantin Belousov wrote: > On Wed, Feb 19, 2020 at 10:41:27AM +0100, Baptiste Daroussin wrote: > > On Wed, Feb 19, 2020 at 11:02:11AM +0300, Yuri Pankov wrote: > > > On 18 Feb 2020, at 11:11, Baptiste Daroussin wrote: > > > > > > > > Author: bapt > > > > Date: Tue Feb 18 08:11:52 2020 > > > > New Revision: 358062 > > > > URL: https://svnweb.freebsd.org/changeset/base/358062 > > > > > > > > Log: > > > > Update ncurses to 20200118 > > > > > > > > Among the changes from before: > > > > - Add support for extended colors on widechar version > > > > - Enable ncurses extended functions > > > > - Enable version 2 of the extended mouse support > > > > - Enable SCREEN extensions > > > > > > > > Modification that differs from upstream: > > > > - _nc_delink_entries used to be exposed and was turn static, > > > >turn it back as dynamic to not break abi > > > > - Adapt our old termcap.c to modern ncurses > > > > > > > > MFC after: 3 weeks > > > > > > Somewhat confusingly, I had to rebuild e.g. dialog4ports after this > > > change as it was displaying garbage. May be a brief headsup is in order > > > (or am I the only one seeing it)? > > > > I will add a not in UPDATING > > Does this mean that the ABI of the libraries changed ? > If yes, that means that the dso version bump is needed (curses seems to be > not versioned). That is what I do not understand yet, according to abi lab, no it hasn't changed. but the reality if that some unicode caracters are not properly rendered when using that new library without having been rebuilt with it. Best regards, Bapt signature.asc Description: PGP signature
svn commit: r358119 - stable/10/release/doc/en_US.ISO8859-1/hardware
Author: gjb Date: Wed Feb 19 15:30:13 2020 New Revision: 358119 URL: https://svnweb.freebsd.org/changeset/base/358119 Log: Remove reference to the freebsd-mobile mailing list to fix the build. This is a direct commit to stable/10 as part of an ongoing investigation regarding transient and silent build failures. Sponsored by: Rubicon Communications, LLC (netgate.com) Modified: stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml == --- stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml Wed Feb 19 15:12:01 2020(r358118) +++ stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml Wed Feb 19 15:30:13 2020(r358119) @@ -205,9 +205,7 @@ as sound, graphics, power management, and PCCARD expansion slots. These features tend to vary in idiosyncratic ways between machines, and frequently require special-case support - in to work around hardware bugs or other oddities. When - in doubt, a search of the archives of the may be - useful. + in to work around hardware bugs or other oddities. Most modern laptops (as well as many desktops) use the Advanced Configuration and Power Management (ACPI) standard. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r358062 - in head: contrib/ncurses contrib/ncurses/doc contrib/ncurses/doc/html contrib/ncurses/form contrib/ncurses/include contrib/ncurses/man contrib/ncurses/menu contrib/ncurses/mi
On Wed, Feb 19, 2020 at 10:41:27AM +0100, Baptiste Daroussin wrote: > On Wed, Feb 19, 2020 at 11:02:11AM +0300, Yuri Pankov wrote: > > On 18 Feb 2020, at 11:11, Baptiste Daroussin wrote: > > > > > > Author: bapt > > > Date: Tue Feb 18 08:11:52 2020 > > > New Revision: 358062 > > > URL: https://svnweb.freebsd.org/changeset/base/358062 > > > > > > Log: > > > Update ncurses to 20200118 > > > > > > Among the changes from before: > > > - Add support for extended colors on widechar version > > > - Enable ncurses extended functions > > > - Enable version 2 of the extended mouse support > > > - Enable SCREEN extensions > > > > > > Modification that differs from upstream: > > > - _nc_delink_entries used to be exposed and was turn static, > > >turn it back as dynamic to not break abi > > > - Adapt our old termcap.c to modern ncurses > > > > > > MFC after: 3 weeks > > > > Somewhat confusingly, I had to rebuild e.g. dialog4ports after this change > > as it was displaying garbage. May be a brief headsup is in order (or am I > > the only one seeing it)? > > I will add a not in UPDATING Does this mean that the ABI of the libraries changed ? If yes, that means that the dso version bump is needed (curses seems to be not versioned). ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r358118 - head/usr.bin/truss
Author: kevans Date: Wed Feb 19 15:12:01 2020 New Revision: 358118 URL: https://svnweb.freebsd.org/changeset/base/358118 Log: truss: fix shm_open2 oversight (BinString -> Name) BinString assumes a length in the next argument; Name is more appropriate for the final argument. Modified: head/usr.bin/truss/syscalls.c Modified: head/usr.bin/truss/syscalls.c == --- head/usr.bin/truss/syscalls.c Wed Feb 19 14:55:59 2020 (r358117) +++ head/usr.bin/truss/syscalls.c Wed Feb 19 15:12:01 2020 (r358118) @@ -473,7 +473,7 @@ static struct syscall decoded_syscalls[] = { .args = { { ShmName | IN, 0 }, { Open, 1 }, { Octal, 2 } } }, { .name = "shm_open2", .ret_type = 1, .nargs = 5, .args = { { ShmName | IN, 0 }, { Open, 1 }, { Octal, 2 }, - { ShmFlags, 3 }, { BinString | IN, 4 } } }, + { ShmFlags, 3 }, { Name | IN, 4 } } }, { .name = "shm_rename", .ret_type = 1, .nargs = 3, .args = { { Name | IN, 0 }, { Name | IN, 1 }, { Hex, 2 } } }, { .name = "shm_unlink", .ret_type = 1, .nargs = 1, ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r358117 - head/usr.bin/kdump
Author: kevans Date: Wed Feb 19 14:55:59 2020 New Revision: 358117 URL: https://svnweb.freebsd.org/changeset/base/358117 Log: kdump: decode shm_open2 This is the kdump counterpart of the truss support added in r358116, and also a part of D23733. shm_open2 is the successor to shm_open. Reviewed by: kaktus Modified: head/usr.bin/kdump/kdump.c Modified: head/usr.bin/kdump/kdump.c == --- head/usr.bin/kdump/kdump.c Wed Feb 19 14:54:33 2020(r358116) +++ head/usr.bin/kdump/kdump.c Wed Feb 19 14:55:59 2020(r358117) @@ -1263,6 +1263,22 @@ ktrsyscall(struct ktr_syscall *ktr, u_int sv_flags) narg -= 2; break; #endif + case SYS_shm_open2: + if (ip[0] == (uintptr_t)SHM_ANON) { + printf("(SHM_ANON"); + ip++; + } else { + print_number(ip, narg, c); + } + putchar(','); + print_mask_arg(sysdecode_open_flags, ip[0]); + putchar(','); + decode_filemode(ip[1]); + putchar(','); + print_mask_arg(sysdecode_shmflags, ip[2]); + ip += 3; + narg -= 3; + break; case SYS_minherit: print_number(ip, narg, c); print_number(ip, narg, c); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r358116 - head/usr.bin/truss
Author: kevans Date: Wed Feb 19 14:54:33 2020 New Revision: 358116 URL: https://svnweb.freebsd.org/changeset/base/358116 Log: truss: decode shm_open2 shm_open2 is similar to shm_open, except it also takes shmflags and optional name to label the anonymous region for, e.g., debugging purposes. The appropriate support for decoding shmflags was added to libsysdecode in r358115. This is a part of D23733. Reviewed by: kaktus Modified: head/usr.bin/truss/syscall.h head/usr.bin/truss/syscalls.c Modified: head/usr.bin/truss/syscall.h == --- head/usr.bin/truss/syscall.hWed Feb 19 14:52:32 2020 (r358115) +++ head/usr.bin/truss/syscall.hWed Feb 19 14:54:33 2020 (r358116) @@ -122,6 +122,7 @@ enum Argtype { Rtpriofunc, RusageWho, Schedpolicy, + ShmFlags, Shutdown, Signal, Sigprocmask, Modified: head/usr.bin/truss/syscalls.c == --- head/usr.bin/truss/syscalls.c Wed Feb 19 14:52:32 2020 (r358115) +++ head/usr.bin/truss/syscalls.c Wed Feb 19 14:54:33 2020 (r358116) @@ -471,6 +471,9 @@ static struct syscall decoded_syscalls[] = { { Ptr | IN, 3 }, { Socklent, 4 } } }, { .name = "shm_open", .ret_type = 1, .nargs = 3, .args = { { ShmName | IN, 0 }, { Open, 1 }, { Octal, 2 } } }, + { .name = "shm_open2", .ret_type = 1, .nargs = 5, + .args = { { ShmName | IN, 0 }, { Open, 1 }, { Octal, 2 }, + { ShmFlags, 3 }, { BinString | IN, 4 } } }, { .name = "shm_rename", .ret_type = 1, .nargs = 3, .args = { { Name | IN, 0 }, { Name | IN, 1 }, { Hex, 2 } } }, { .name = "shm_unlink", .ret_type = 1, .nargs = 1, @@ -2008,6 +2011,9 @@ print_arg(struct syscall_args *sc, unsigned long *args break; case Whence: print_integer_arg(sysdecode_whence, fp, args[sc->offset]); + break; + case ShmFlags: + print_mask_arg(sysdecode_shmflags, fp, args[sc->offset]); break; case Sockdomain: print_integer_arg(sysdecode_socketdomain, fp, args[sc->offset]); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r358115 - head/lib/libsysdecode
Author: kevans Date: Wed Feb 19 14:52:32 2020 New Revision: 358115 URL: https://svnweb.freebsd.org/changeset/base/358115 Log: libsysdecode: grab shmflags from sys/mman.h, add decode method Any SHM_* flag here is (and likely will continue to be) a shmflag that may be passed to shm_open2(), with exception to SHM_ANON. This is a prereq to adding appropriate support to truss/kdump. Reviewed by: kaktus (slightly earlier version) Differential Revision:https://reviews.freebsd.org/D23733 Modified: head/lib/libsysdecode/flags.c head/lib/libsysdecode/mktables head/lib/libsysdecode/sysdecode.h Modified: head/lib/libsysdecode/flags.c == --- head/lib/libsysdecode/flags.c Wed Feb 19 14:51:39 2020 (r358114) +++ head/lib/libsysdecode/flags.c Wed Feb 19 14:52:32 2020 (r358115) @@ -1277,3 +1277,10 @@ sysdecode_sctp_sinfo_flags(FILE *fp, int sinfo_flags) } } } + +bool +sysdecode_shmflags(FILE *fp, int flags, int *rem) +{ + + return (print_mask_0(fp, shmflags, flags, rem)); +} Modified: head/lib/libsysdecode/mktables == --- head/lib/libsysdecode/mktables Wed Feb 19 14:51:39 2020 (r358114) +++ head/lib/libsysdecode/mktables Wed Feb 19 14:52:32 2020 (r358115) @@ -165,6 +165,7 @@ if [ -e "${include_dir}/x86/sysarch.h" ]; then else gen_table "sysarchnum" "[A-Z_]+[[:space:]]+[0-9]+" "machine/sysarch.h" fi +gen_table "shmflags" "SHM_[A-Z_]+[[:space:]]+0x[0-9]+" "sys/mman.h" "SHM_ANON" # Generate a .depend file for our output file if [ -n "$output_file" ]; then Modified: head/lib/libsysdecode/sysdecode.h == --- head/lib/libsysdecode/sysdecode.h Wed Feb 19 14:51:39 2020 (r358114) +++ head/lib/libsysdecode/sysdecode.h Wed Feb 19 14:52:32 2020 (r358115) @@ -128,5 +128,6 @@ const char *sysdecode_vmresult(int _result); bool sysdecode_wait4_options(FILE *_fp, int _options, int *_rem); bool sysdecode_wait6_options(FILE *_fp, int _options, int *_rem); const char *sysdecode_whence(int _whence); +bool sysdecode_shmflags(FILE *_fp, int _flags, int *_rem); #endif /* !__SYSDECODE_H__ */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r358114 - stable/12/bin/sh
Author: bapt Date: Wed Feb 19 14:51:39 2020 New Revision: 358114 URL: https://svnweb.freebsd.org/changeset/base/358114 Log: MFC r352385: Do not use our custom completion function, it is not needed anymore Modified: stable/12/bin/sh/histedit.c Directory Properties: stable/12/ (props changed) Modified: stable/12/bin/sh/histedit.c == --- stable/12/bin/sh/histedit.c Wed Feb 19 14:49:32 2020(r358113) +++ stable/12/bin/sh/histedit.c Wed Feb 19 14:51:39 2020(r358114) @@ -124,7 +124,7 @@ histedit(void) el_set(el, EL_PROMPT, getprompt); el_set(el, EL_ADDFN, "sh-complete", "Filename completion", - _el_fn_sh_complete); + _el_fn_complete); } else { bad: out2fmt_flush("sh: can't initialize editing\n"); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r358113 - in stable/12: contrib/libedit lib/libedit lib/libedit/TEST lib/libedit/edit lib/libedit/readline
Author: bapt Date: Wed Feb 19 14:49:32 2020 New Revision: 358113 URL: https://svnweb.freebsd.org/changeset/base/358113 Log: MFC r352136, r352204, r352275, r352341 r352136: Import libedit 2019-09-10 Compared to current version in base: - great improvements on the Unicode support - full support for filename completion including quoting which means we do not need anymore our custom addition) - Improved readline compatiblity Upgrading libedit has been a pain in the past, because somehow we never managed to properly cleanup the tree in lib/libedit and each merge has always been very painful. After years of fighting give up and refresh a merge from scrarch properly in contrib. Note that the switch to this version will be done in another commit. r352204: Readd _el_fn_sh_complete for backward compatibility This function is not needed anymore, it allows old sh binary to continue to run and avoid breaking backward compatibility. Note that is now just calls the regular _el_fn_complete which does a proper job at quoting. Discussed with: jilles r352275: Update libedit to a snapshot from 2019-09-10 This version bring many fixes regarding unicode support It also adds proper support for filename completion (we do not need our custom patches anymore) Improves the libreadline compatibility Note that the same work was done by Yuichiro Naito in https://reviews.freebsd.org/D21196 the main difference is in this case we have reimported libedit in contrib to fix a long standing mess in the previous merges which prevented a proper update workflow. (discussed long ago with pfg@) The only difference with upstream libedit is we have added a compatibility shim for the _elf_fn_sh_complete function which we previously added to support quoting in filename completion and is not needed anymore. This was added to continue supported old /bin/sh binaries and not break backward compatibility (as discussed with jilles@) Reviewed by: Yuichiro Naito Differential Revision: https://reviews.freebsd.org/D21584 r352341: Fix arm and aarch64 builds of libedit after r352275 On arm and arm64, where chars are unsigned by default, buildworld dies with: --- terminal.o --- /usr/src/contrib/libedit/terminal.c:569:41: error: comparison of integers of different signs: 'wint_t' (aka 'int') and 'wchar_t' (aka 'unsigned int') [-Werror,-Wsign-compare] el->el_cursor.v][where & 0370] != ~~ ^ /usr/src/contrib/libedit/terminal.c:659:28: error: comparison of integers of different signs: 'wint_t' (aka 'int') and 'wchar_t' (aka 'unsigned int') [-Werror,-Wsign-compare] [el->el_cursor.h] == MB_FILL_CHAR) ~ ^ Fix this by making MB_FILL_CHAR a wint_t, so no casting is needed. Note that in https://reviews.freebsd.org/D21584 this was also proposed by Yuichiro Naito . Reviewed by: bapt Subscribers: naito.yuichiro_gmail.com, ml_vishwin.info X-MFC-With: r352275 Differential Revision: https://reviews.freebsd.org/D21657 Added: stable/12/contrib/libedit/ - copied from r352136, head/contrib/libedit/ stable/12/lib/libedit/readline/ - copied from r352275, head/lib/libedit/readline/ Deleted: stable/12/lib/libedit/Makefile.depend stable/12/lib/libedit/TEST/ stable/12/lib/libedit/chared.c stable/12/lib/libedit/chared.h stable/12/lib/libedit/chartype.c stable/12/lib/libedit/chartype.h stable/12/lib/libedit/common.c stable/12/lib/libedit/config.h stable/12/lib/libedit/edit/ stable/12/lib/libedit/editline.3 stable/12/lib/libedit/editrc.5 stable/12/lib/libedit/el.c stable/12/lib/libedit/el.h stable/12/lib/libedit/eln.c stable/12/lib/libedit/emacs.c stable/12/lib/libedit/filecomplete.c stable/12/lib/libedit/filecomplete.h stable/12/lib/libedit/hist.c stable/12/lib/libedit/hist.h stable/12/lib/libedit/histedit.h stable/12/lib/libedit/history.c stable/12/lib/libedit/keymacro.c stable/12/lib/libedit/keymacro.h stable/12/lib/libedit/makelist stable/12/lib/libedit/map.c stable/12/lib/libedit/map.h stable/12/lib/libedit/parse.c stable/12/lib/libedit/parse.h stable/12/lib/libedit/prompt.c stable/12/lib/libedit/prompt.h stable/12/lib/libedit/read.c stable/12/lib/libedit/read.h stable/12/lib/libedit/readline.c stable/12/lib/libedit/refresh.c stable/12/lib/libedit/refresh.h stable/12/lib/libedit/search.c stable/12/lib/libedit/search.h stable/12/lib/libedit/sig.c stable/12/lib/libedit/sig.h stable/12/lib/libedit/sys.h stable/12/lib/libedit/terminal.c stable/12/lib/libedit/terminal.h stable/12/lib/libedit/tokenizer.c stable/12/lib/libedit/tty.c stable/12/lib/libedit/tty.h stable/12/lib/libedit/vi.c Modified:
svn commit: r358112 - in stable/12: contrib/gdb/gdb contrib/gdb/gdb/cli gnu/usr.bin/gdb gnu/usr.bin/gdb/kgdb
Author: bapt Date: Wed Feb 19 14:42:21 2020 New Revision: 358112 URL: https://svnweb.freebsd.org/changeset/base/358112 Log: MFC r352242, r352249 r352242: Remove usesless readline compat includes which will reinclude readline.h itself. This simplifies the upcoming update to newer libedit. r352249: Get the readline header from the installed header instead of the from the source location. Modified: stable/12/contrib/gdb/gdb/cli/cli-cmds.c stable/12/contrib/gdb/gdb/cli/cli-setshow.c stable/12/contrib/gdb/gdb/event-top.c stable/12/contrib/gdb/gdb/top.c stable/12/contrib/gdb/gdb/tracepoint.c stable/12/gnu/usr.bin/gdb/Makefile.inc stable/12/gnu/usr.bin/gdb/kgdb/trgt.c Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/gdb/gdb/cli/cli-cmds.c == --- stable/12/contrib/gdb/gdb/cli/cli-cmds.cWed Feb 19 14:40:53 2020 (r358111) +++ stable/12/contrib/gdb/gdb/cli/cli-cmds.cWed Feb 19 14:42:21 2020 (r358112) @@ -21,7 +21,6 @@ #include "defs.h" #include "readline/readline.h" -#include "readline/tilde.h" #include "completer.h" #include "target.h" /* For baud_rate, remote_debug and remote_timeout */ #include "gdb_wait.h" /* For shell escape implementation */ Modified: stable/12/contrib/gdb/gdb/cli/cli-setshow.c == --- stable/12/contrib/gdb/gdb/cli/cli-setshow.c Wed Feb 19 14:40:53 2020 (r358111) +++ stable/12/contrib/gdb/gdb/cli/cli-setshow.c Wed Feb 19 14:42:21 2020 (r358112) @@ -18,7 +18,6 @@ Boston, MA 02111-1307, USA. */ #include "defs.h" -#include "readline/tilde.h" #include "value.h" #include #include "gdb_string.h" Modified: stable/12/contrib/gdb/gdb/event-top.c == --- stable/12/contrib/gdb/gdb/event-top.c Wed Feb 19 14:40:53 2020 (r358111) +++ stable/12/contrib/gdb/gdb/event-top.c Wed Feb 19 14:42:21 2020 (r358112) @@ -34,7 +34,6 @@ /* readline include files */ #include "readline/readline.h" -#include "readline/history.h" /* readline defines this. */ #undef savestring Modified: stable/12/contrib/gdb/gdb/top.c == --- stable/12/contrib/gdb/gdb/top.c Wed Feb 19 14:40:53 2020 (r358111) +++ stable/12/contrib/gdb/gdb/top.c Wed Feb 19 14:42:21 2020 (r358112) @@ -48,7 +48,6 @@ /* readline include files */ #include "readline/readline.h" -#include "readline/history.h" /* readline defines this. */ #undef savestring Modified: stable/12/contrib/gdb/gdb/tracepoint.c == --- stable/12/contrib/gdb/gdb/tracepoint.c Wed Feb 19 14:40:53 2020 (r358111) +++ stable/12/contrib/gdb/gdb/tracepoint.c Wed Feb 19 14:42:21 2020 (r358112) @@ -45,7 +45,6 @@ /* readline include files */ #include "readline/readline.h" -#include "readline/history.h" /* readline defines this. */ #undef savestring Modified: stable/12/gnu/usr.bin/gdb/Makefile.inc == --- stable/12/gnu/usr.bin/gdb/Makefile.inc Wed Feb 19 14:40:53 2020 (r358111) +++ stable/12/gnu/usr.bin/gdb/Makefile.inc Wed Feb 19 14:42:21 2020 (r358112) @@ -45,7 +45,7 @@ CFLAGS+= -I${CNTRB_GDB}/gdb/config CFLAGS+= -I${CNTRB_BU}/include CFLAGS+= -I${CNTRB_GDB}/include CFLAGS+= -I${CNTRB_BU}/bfd -CFLAGS+= -I${SRCTOP}/lib/libedit/edit +CFLAGS+= -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/edit GENSRCS+= nm.h tm.h Modified: stable/12/gnu/usr.bin/gdb/kgdb/trgt.c == --- stable/12/gnu/usr.bin/gdb/kgdb/trgt.c Wed Feb 19 14:40:53 2020 (r358111) +++ stable/12/gnu/usr.bin/gdb/kgdb/trgt.c Wed Feb 19 14:42:21 2020 (r358112) @@ -37,7 +37,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r358111 - head/usr.bin/whereis
Author: emaste Date: Wed Feb 19 14:40:53 2020 New Revision: 358111 URL: https://svnweb.freebsd.org/changeset/base/358111 Log: whereis: remove gnu/libexec from source search paths The last subdirectory of gnu/libexec was removed in r85742. Modified: head/usr.bin/whereis/pathnames.h Modified: head/usr.bin/whereis/pathnames.h == --- head/usr.bin/whereis/pathnames.hWed Feb 19 14:37:56 2020 (r358110) +++ head/usr.bin/whereis/pathnames.hWed Feb 19 14:40:53 2020 (r358111) @@ -36,7 +36,7 @@ "/usr/src/usr.sbin:/usr/src/libexec:" \ "/usr/src/gnu/bin:/usr/src/gnu/usr.bin:" \ "/usr/src/gnu/sbin:/usr/src/gnu/usr.sbin:" \ -"/usr/src/gnu/libexec:/usr/src/contrib:" \ +"/usr/src/contrib:"\ "/usr/src/secure/bin:/usr/src/secure/usr.bin:" \ "/usr/src/secure/sbin:/usr/src/secure/usr.sbin:" \ "/usr/src/secure/libexec:/usr/src/crypto:" \ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r358110 - in stable/12/usr.sbin/ntp: libntp ntpdc ntpq
Author: bapt Date: Wed Feb 19 14:37:56 2020 New Revision: 358110 URL: https://svnweb.freebsd.org/changeset/base/358110 Log: MFC r352247-r352248 r352247: Remove useless extra definition of libedit flags Note that all the line editor part is done in the libntp r352248: Get the readline header from the installed header instead of the from the source location. With newer import of libedit, the path to be able to access readline/readline.h will also include header which name will conflict with some expected by ntp in another path and end up breaking the build. Modified: stable/12/usr.sbin/ntp/libntp/Makefile stable/12/usr.sbin/ntp/ntpdc/Makefile stable/12/usr.sbin/ntp/ntpq/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/ntp/libntp/Makefile == --- stable/12/usr.sbin/ntp/libntp/Makefile Wed Feb 19 14:32:55 2020 (r358109) +++ stable/12/usr.sbin/ntp/libntp/Makefile Wed Feb 19 14:37:56 2020 (r358110) @@ -79,7 +79,7 @@ CFLAGS+= -I${SRCTOP}/contrib/ntp/include \ -I${SRCTOP}/contrib/ntp/lib/isc/pthreads/include \ -I${SRCTOP}/contrib/ntp/sntp/libopts \ -I${SRCTOP}/lib/libc/${MACHINE_ARCH} \ - -I${SRCTOP}/lib/libedit/edit \ + -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/edit \ -I${.CURDIR:H} \ -I${.CURDIR}/ Modified: stable/12/usr.sbin/ntp/ntpdc/Makefile == --- stable/12/usr.sbin/ntp/ntpdc/Makefile Wed Feb 19 14:32:55 2020 (r358109) +++ stable/12/usr.sbin/ntp/ntpdc/Makefile Wed Feb 19 14:37:56 2020 (r358110) @@ -18,8 +18,6 @@ CFLAGS+= -I${SRCTOP}/contrib/ntp/include \ -I${.CURDIR:H} -I${.CURDIR} LIBADD=edit ntp m opts pthread -CFLAGS+= -DHAVE_LIBEDIT -DHAVE_READLINE_READLINE_H \ - -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/edit .if ${MK_OPENSSL} != "no" LIBADD+= crypto Modified: stable/12/usr.sbin/ntp/ntpq/Makefile == --- stable/12/usr.sbin/ntp/ntpq/MakefileWed Feb 19 14:32:55 2020 (r358109) +++ stable/12/usr.sbin/ntp/ntpq/MakefileWed Feb 19 14:37:56 2020 (r358110) @@ -28,9 +28,6 @@ LIBADD+= crypto LIBADD+= md .endif -CFLAGS+= -DHAVE_LIBEDIT -DHAVE_READLINE_READLINE_H \ - -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/edit - CLEANFILES+= .version version.c version.c: ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r358109 - head/usr.bin/kdump
Author: kevans Date: Wed Feb 19 14:32:55 2020 New Revision: 358109 URL: https://svnweb.freebsd.org/changeset/base/358109 Log: kdump: decode SHM_ANON as first arg to legacy shm_open(2) The first argument to shm_open(2) as well as shm_open2(2) may be a path or SHM_ANON. Decode SHM_ANON, at least- paths will show up as namei results in kdump output, which may be sufficient; in those cases, we'll have printed an address. Future commits will add support for shm_open2() to libsysdecode/truss/kdump. Reported by: kaktus MFC after:3 days Modified: head/usr.bin/kdump/kdump.c Modified: head/usr.bin/kdump/kdump.c == --- head/usr.bin/kdump/kdump.c Wed Feb 19 14:29:47 2020(r358108) +++ head/usr.bin/kdump/kdump.c Wed Feb 19 14:32:55 2020(r358109) @@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -1248,7 +1249,12 @@ ktrsyscall(struct ktr_syscall *ktr, u_int sv_flags) break; #ifdef SYS_freebsd12_shm_open case SYS_freebsd12_shm_open: - print_number(ip, narg, c); + if (ip[0] == (uintptr_t)SHM_ANON) { + printf("(SHM_ANON"); + ip++; + } else { + print_number(ip, narg, c); + } putchar(','); print_mask_arg(sysdecode_open_flags, ip[0]); putchar(','); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r358108 - stable/12/tools/tools/locale/tools
Author: bapt Date: Wed Feb 19 14:29:47 2020 New Revision: 358108 URL: https://svnweb.freebsd.org/changeset/base/358108 Log: MFC r352274: Insert proper copyright/license headers Those scripts are without copyright and license assignement since their creation After grabbing information from The various authors and contributors assign proper license header and copyrights. This has been reported by yuripv in his work on integrating those in Illumos! Reported by: yuripv Discussed with: marino, edwin Modified: stable/12/tools/tools/locale/tools/charmaps.pm stable/12/tools/tools/locale/tools/cldr2def.pl stable/12/tools/tools/locale/tools/extract-colldef.awk stable/12/tools/tools/locale/tools/finalize stable/12/tools/tools/locale/tools/utf8-rollup.pl Directory Properties: stable/12/ (props changed) Modified: stable/12/tools/tools/locale/tools/charmaps.pm == --- stable/12/tools/tools/locale/tools/charmaps.pm Wed Feb 19 14:27:22 2020(r358107) +++ stable/12/tools/tools/locale/tools/charmaps.pm Wed Feb 19 14:29:47 2020(r358108) @@ -1,5 +1,29 @@ #!/usr/local/bin/perl -w +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright 2009 Edwin Groothuis +# +# 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$ # Modified: stable/12/tools/tools/locale/tools/cldr2def.pl == --- stable/12/tools/tools/locale/tools/cldr2def.pl Wed Feb 19 14:27:22 2020(r358107) +++ stable/12/tools/tools/locale/tools/cldr2def.pl Wed Feb 19 14:29:47 2020(r358108) @@ -1,4 +1,31 @@ #!/usr/local/bin/perl -wC + +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright 2009 Edwin Groothuis +# Copyright 2015 John Marino +# +# 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$ use strict; Modified: stable/12/tools/tools/locale/tools/extract-colldef.awk == --- stable/12/tools/tools/locale/tools/extract-colldef.awk Wed Feb 19 14:27:22 2020(r358107) +++ stable/12/tools/tools/locale/tools/extract-colldef.awk Wed Feb 19 14:29:47 2020(r358108) @@ -1,3 +1,29 @@ +# +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright 2016 Baptiste Daroussin +# +# Redistribution and use in source and binary forms, with or without +# modification,
svn commit: r358107 - stable/11/share/man/man7
Author: bapt Date: Wed Feb 19 14:27:22 2020 New Revision: 358107 URL: https://svnweb.freebsd.org/changeset/base/358107 Log: MFC r356918: The ports tree now accepts /usr/local/share/man as a directory for manpage and will slowly transition from /usr/local/man to it. To reflect this remove the documentation of the manpages being an exception in the layout of /usr/local Reported by: Dan Nelson (via IRC) Modified: stable/11/share/man/man7/hier.7 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man7/hier.7 == --- stable/11/share/man/man7/hier.7 Wed Feb 19 14:26:27 2020 (r358106) +++ stable/11/share/man/man7/hier.7 Wed Feb 19 14:27:22 2020 (r358107) @@ -28,7 +28,7 @@ .\"@(#)hier.7 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd September 10, 2019 +.Dd January 20, 2020 .Dt HIER 7 .Os .Sh NAME @@ -435,12 +435,6 @@ for .Pa /usr should be used. Exceptions are the -.Pa man -directory -.Po directly under -.Pa local/ -rather than under -.Pa local/share/ Ns Pc , ports documentation .Po in .Pa share/doc// Ns Pc , ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r358106 - stable/12/share/man/man7
Author: bapt Date: Wed Feb 19 14:26:27 2020 New Revision: 358106 URL: https://svnweb.freebsd.org/changeset/base/358106 Log: MFC r356918: The ports tree now accepts /usr/local/share/man as a directory for manpage and will slowly transition from /usr/local/man to it. To reflect this remove the documentation of the manpages being an exception in the layout of /usr/local Reported by: Dan Nelson (via IRC) Modified: stable/12/share/man/man7/hier.7 Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man7/hier.7 == --- stable/12/share/man/man7/hier.7 Wed Feb 19 14:26:27 2020 (r358105) +++ stable/12/share/man/man7/hier.7 Wed Feb 19 14:26:27 2020 (r358106) @@ -28,7 +28,7 @@ .\"@(#)hier.7 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd September 10, 2019 +.Dd January 20, 2020 .Dt HIER 7 .Os .Sh NAME @@ -414,12 +414,6 @@ for .Pa /usr should be used. Exceptions are the -.Pa man -directory -.Po directly under -.Pa local/ -rather than under -.Pa local/share/ Ns Pc , ports documentation .Po in .Pa share/doc// Ns Pc , ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r358105 - head/tools/tools/nanobsd/embedded
Author: emaste Date: Wed Feb 19 14:26:27 2020 New Revision: 358105 URL: https://svnweb.freebsd.org/changeset/base/358105 Log: nanobsd: add WITHOUT_LLVM_COV, akin to WITHOUT_GCOV Modified: head/tools/tools/nanobsd/embedded/common Modified: head/tools/tools/nanobsd/embedded/common == --- head/tools/tools/nanobsd/embedded/commonWed Feb 19 14:24:05 2020 (r358104) +++ head/tools/tools/nanobsd/embedded/commonWed Feb 19 14:26:27 2020 (r358105) @@ -142,6 +142,7 @@ WITHOUT_GAMES=true WITHOUT_GCOV=true WITHOUT_HTML=true WITHOUT_IPFILTER=true +WITHOUT_LLVM_COV=true WITHOUT_LOCALES=true WITHOUT_LPR=true WITHOUT_MAN=true ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r358104 - stable/12/tools/build/mk
Author: bapt Date: Wed Feb 19 14:24:05 2020 New Revision: 358104 URL: https://svnweb.freebsd.org/changeset/base/358104 Log: MFC r353100: Do not remove the locale directory when building a system without locales This directory is actually needed during make installworld and will prevent to reinstall a system after make delete-old is done. PR: 226137 Reported by: rakuco Modified: stable/12/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/12/ (props changed) Modified: stable/12/tools/build/mk/OptionalObsoleteFiles.inc == --- stable/12/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 19 14:18:17 2020(r358103) +++ stable/12/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 19 14:24:05 2020(r358104) @@ -4849,7 +4849,6 @@ OLD_FILES+=usr/share/man/man1/lldb.1.gz .endif .if ${MK_LOCALES} == no -OLD_DIRS+=usr/share/locale OLD_DIRS+=usr/share/locale/af_ZA.ISO8859-15 OLD_FILES+=usr/share/locale/af_ZA.ISO8859-15/LC_COLLATE OLD_FILES+=usr/share/locale/af_ZA.ISO8859-15/LC_CTYPE ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r358103 - head
Author: bapt Date: Wed Feb 19 14:18:17 2020 New Revision: 358103 URL: https://svnweb.freebsd.org/changeset/base/358103 Log: Add a note about some fallouts due to the ncurses update Modified: head/UPDATING Modified: head/UPDATING == --- head/UPDATING Wed Feb 19 14:16:48 2020(r358102) +++ head/UPDATING Wed Feb 19 14:18:17 2020(r358103) @@ -26,6 +26,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20200218: + ncurses has been updated to a newer version (6.1-20200118). After an + update some applications using ncurses may results have some rendering + problems and would need to be rebuilt. + 20200217: The size of struct vnet and the magic cookie have changed. Users need to recompile libkvm and all modules using VIMAGE ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r358102 - head/share/man/man5
Author: emaste Date: Wed Feb 19 14:16:48 2020 New Revision: 358102 URL: https://svnweb.freebsd.org/changeset/base/358102 Log: src.conf.5: regen after r358101, WITHOUT_GCOV default Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 == --- head/share/man/man5/src.conf.5 Wed Feb 19 14:12:59 2020 (r358101) +++ head/share/man/man5/src.conf.5 Wed Feb 19 14:16:48 2020 (r358102) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd February 6, 2020 +.Dd February 19, 2020 .Dt SRC.CONF 5 .Os .Sh NAME @@ -705,8 +705,8 @@ This option is deprecated and will be removed before Set to build gcc and g++ as part of the bootstrap process. This option is deprecated and will be removed before .Fx 13 . -.It Va WITHOUT_GCOV -Set to not build the +.It Va WITH_GCOV +Build and install the GNU .Xr gcov 1 tool. .It Va WITHOUT_GDB @@ -747,6 +747,17 @@ Set to neither build nor install .Lb libgmock , .Lb libgtest , and dependent tests. +.Pp +This is a default setting on +mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf and mips/mips64hf. +.It Va WITH_GOOGLETEST +Set to build and install +.Lb libgmock , +.Lb libgtest , +and dependent tests. +.Pp +This is a default setting on +amd64/amd64, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, powerpc/powerpc, powerpc/powerpc64, riscv/riscv64 and riscv/riscv64sf. .It Va WITHOUT_GPIO Set to not build .Xr gpioctl 8 ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r358101 - head/share/mk
Author: emaste Date: Wed Feb 19 14:12:59 2020 New Revision: 358101 URL: https://svnweb.freebsd.org/changeset/base/358101 Log: Move GCOV option to default NO GNU gcov will be removed along with GCC 4.2.1 at the end of the month. Change the default to NO in preparation. Modified: head/share/mk/src.opts.mk Modified: head/share/mk/src.opts.mk == --- head/share/mk/src.opts.mk Wed Feb 19 14:09:15 2020(r358100) +++ head/share/mk/src.opts.mk Wed Feb 19 14:12:59 2020(r358101) @@ -102,7 +102,6 @@ __DEFAULT_YES_OPTIONS = \ FREEBSD_UPDATE \ FTP \ GAMES \ -GCOV \ GDB \ GNU_DIFF \ GNU_GREP \ @@ -201,6 +200,7 @@ __DEFAULT_NO_OPTIONS = \ EXPERIMENTAL \ GCC \ GCC_BOOTSTRAP \ +GCOV \ GNUCXX \ GNU_GREP_COMPAT \ GPL_DTC \ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r358100 - head/lib/ncurses/ncurses
Author: bapt Date: Wed Feb 19 14:09:15 2020 New Revision: 358100 URL: https://svnweb.freebsd.org/changeset/base/358100 Log: lib_gen.c now also depends on ncurses_dll.h specify it to prevent some breakage if ncurses_dll.h is already present in base while building Modified: head/lib/ncurses/ncurses/Makefile Modified: head/lib/ncurses/ncurses/Makefile == --- head/lib/ncurses/ncurses/Makefile Wed Feb 19 12:49:49 2020 (r358099) +++ head/lib/ncurses/ncurses/Makefile Wed Feb 19 14:09:15 2020 (r358100) @@ -345,7 +345,7 @@ names.c: MKnames.awk codes.c: MKcodes.awk ${AWK} -f ${NCURSES_DIR}/ncurses/tinfo/MKcodes.awk bigstrings=${USE_BIG_STRINGS} ${NCURSES_DIR}/include/Caps > codes.c -lib_gen.c: MKlib_gen.sh curses.h +lib_gen.c: MKlib_gen.sh curses.h ncurses_dll.h LC_ALL=C sh ${NCURSES_DIR}/ncurses/base/MKlib_gen.sh "${CPP:N${CCACHE_BIN}} ${CPPFLAGS}" \ "${AWK}" generated < curses.h >$@ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r358062 - in head: contrib/ncurses contrib/ncurses/doc contrib/ncurses/doc/html contrib/ncurses/form contrib/ncurses/include contrib/ncurses/man contrib/ncurses/menu contrib/ncurses/mi
On Wed, Feb 19, 2020 at 04:45:27AM -0800, Rodney W. Grimes wrote: > > On 18 Feb 2020, at 11:11, Baptiste Daroussin wrote: > > > > > > Author: bapt > > > Date: Tue Feb 18 08:11:52 2020 > > > New Revision: 358062 > > > URL: https://svnweb.freebsd.org/changeset/base/358062 > > > > > > Log: > > > Update ncurses to 20200118 > > > > > > Among the changes from before: > > > - Add support for extended colors on widechar version > > > - Enable ncurses extended functions > > > - Enable version 2 of the extended mouse support > > > - Enable SCREEN extensions > > > > > > Modification that differs from upstream: > > > - _nc_delink_entries used to be exposed and was turn static, > > >turn it back as dynamic to not break abi > > > - Adapt our old termcap.c to modern ncurses > > > > > > MFC after: 3 weeks > > > > Somewhat confusingly, I had to rebuild e.g. dialog4ports after this change > > as it was displaying garbage. May be a brief headsup is in order (or am I > > the only one seeing it)? > > If this is infact found to cause those types of dependency breakage I would > wonder about MFC: status. > Yes I don't plan to MFC without a fix on this, if any. Best regards, Bapt signature.asc Description: PGP signature
svn commit: r358099 - in head: lib/msun/man share/man/man7 usr.sbin/ac usr.sbin/sa
Author: carlavilla (doc committer) Date: Wed Feb 19 12:49:49 2020 New Revision: 358099 URL: https://svnweb.freebsd.org/changeset/base/358099 Log: Add some HISTORY sections to manpages environ(7) was in AT Version 7 ac(8): Add a HISTORY section sa(8): Add a HISTORY section sqrt(3): Add the actual sqrt function to the HISTORY section Obtained from: OpenBSD Submitted by: gbergl...@gmail.com Approved by: bcr@(mentor) MFC after:1 week Differential Revision:https://reviews.freebsd.org/D23693 Modified: head/lib/msun/man/sqrt.3 head/share/man/man7/environ.7 head/usr.sbin/ac/ac.8 head/usr.sbin/sa/sa.8 Modified: head/lib/msun/man/sqrt.3 == --- head/lib/msun/man/sqrt.3Wed Feb 19 09:10:11 2020(r358098) +++ head/lib/msun/man/sqrt.3Wed Feb 19 12:49:49 2020(r358099) @@ -28,7 +28,7 @@ .\" from: @(#)sqrt.3 6.4 (Berkeley) 5/6/91 .\" $FreeBSD$ .\" -.Dd March 5, 2011 +.Dd February 15, 2020 .Dt SQRT 3 .Os .Sh NAME @@ -113,6 +113,9 @@ The function appeared in .Bx 4.3 . The +.Fn sqrt +function appeared in +.At v2 . .Fn sqrtl function appeared in .Fx 8.0 . Modified: head/share/man/man7/environ.7 == --- head/share/man/man7/environ.7 Wed Feb 19 09:10:11 2020 (r358098) +++ head/share/man/man7/environ.7 Wed Feb 19 12:49:49 2020 (r358099) @@ -28,7 +28,7 @@ .\"@(#)environ.7 8.3 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd April 12, 2003 +.Dd February 14, 2020 .Dt ENVIRON 7 .Os .Sh NAME @@ -261,4 +261,4 @@ built-in command in The .Nm manual page appeared in -.Bx 4.2 . +.At v7 . Modified: head/usr.sbin/ac/ac.8 == --- head/usr.sbin/ac/ac.8 Wed Feb 19 09:10:11 2020(r358098) +++ head/usr.sbin/ac/ac.8 Wed Feb 19 12:49:49 2020(r358099) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 21, 2010 +.Dd February 14, 2020 .Dt AC 8 .Os .Sh NAME @@ -126,6 +126,16 @@ ac -p -t "!ttyd*" > other .Xr getutxent 3 , .Xr init 8 , .Xr sa 8 +.Sh HISTORY +An +.Nm +command appeared in +.At v5 . +This version of +.Nm +was written for +.Nx 0.9a +from the specification provided by various systems' manual pages. .\" .Sh NOTES .\" If COMPAT_SUNOS is defined .\" .Nm ac Modified: head/usr.sbin/sa/sa.8 == --- head/usr.sbin/sa/sa.8 Wed Feb 19 09:10:11 2020(r358098) +++ head/usr.sbin/sa/sa.8 Wed Feb 19 12:49:49 2020(r358099) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 18, 2007 +.Dd February 14, 2020 .Dt SA 8 .Os .Sh NAME @@ -234,6 +234,14 @@ per-user accounting summary database .Xr acct 5 , .Xr ac 8 , .Xr accton 8 +.Sh HISTORY +.Nm +first appeared in +.At v5 . +.Nm +was rewritten for +.Nx 0.9a +from the specification provided by various systems' manual pages. .Sh AUTHORS .An Chris G. Demetriou Aq Mt c...@postgres.berkeley.edu .Sh CAVEATS ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r358062 - in head: contrib/ncurses contrib/ncurses/doc contrib/ncurses/doc/html contrib/ncurses/form contrib/ncurses/include contrib/ncurses/man contrib/ncurses/menu contrib/ncurses/mi
> On 18 Feb 2020, at 11:11, Baptiste Daroussin wrote: > > > > Author: bapt > > Date: Tue Feb 18 08:11:52 2020 > > New Revision: 358062 > > URL: https://svnweb.freebsd.org/changeset/base/358062 > > > > Log: > > Update ncurses to 20200118 > > > > Among the changes from before: > > - Add support for extended colors on widechar version > > - Enable ncurses extended functions > > - Enable version 2 of the extended mouse support > > - Enable SCREEN extensions > > > > Modification that differs from upstream: > > - _nc_delink_entries used to be exposed and was turn static, > >turn it back as dynamic to not break abi > > - Adapt our old termcap.c to modern ncurses > > > > MFC after: 3 weeks > > Somewhat confusingly, I had to rebuild e.g. dialog4ports after this change as > it was displaying garbage. May be a brief headsup is in order (or am I the > only one seeing it)? If this is infact found to cause those types of dependency breakage I would wonder about MFC: status. -- Rod Grimes rgri...@freebsd.org ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r358062 - in head: contrib/ncurses contrib/ncurses/doc contrib/ncurses/doc/html contrib/ncurses/form contrib/ncurses/include contrib/ncurses/man contrib/ncurses/menu contrib/ncurses/mi
On Wed, Feb 19, 2020 at 5:04 PM Dimitry Andric wrote: > > On 2020-02-18 09:11, Baptiste Daroussin wrote: > > Author: bapt > > Date: Tue Feb 18 08:11:52 2020 > > New Revision: 358062 > > URL: https://svnweb.freebsd.org/changeset/base/358062 > > > > Log: > >Update ncurses to 20200118 > > Apparently this breaks the gcc builds, because it can't find the > function "box" anymore: > > --- all_subdir_usr.bin/clang/lldb --- > /usr/local/bin/x86_64-unknown-freebsd12.0-ld: > /tmp/obj/workspace/src/amd64.amd64/lib/clang/liblldb/liblldb.a(IOHandler.o): > in function `curses::Window::Box(unsigned int, unsigned int)': > /workspace/src/contrib/llvm-project/lldb/source/Core/IOHandler.cpp:926: > undefined reference to `box' > /usr/local/bin/x86_64-unknown-freebsd12.0-ld: > /workspace/src/contrib/llvm-project/lldb/source/Core/IOHandler.cpp:926: > undefined reference to `box' > collect2: error: ld returned 1 exit status > *** [lldb.full] Error code 1 > > See also: https://ci.freebsd.org/job/FreeBSD-head-amd64-gcc/13322/ For more information, currently the FreeBSD-head-amd64-gcc is using amd64-gcc package via amd64-xtoolchain-gcc, which is 6.4 A test build with amd64-gcc6, which is 6.5, just completed and it's fine. I haven't checked this failure is due to our code itself, gcc versions or the difference in the configuration of two gcc ports. I think I will create FreeBSD-head-amd64-gcc6 job uses newer and preferred external tool chain, then the experimental ones like FreeBSD-head-amd64-gcc9, 10 and llvm-devel. Best, Li-Wen ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r358062 - in head: contrib/ncurses contrib/ncurses/doc contrib/ncurses/doc/html contrib/ncurses/form contrib/ncurses/include contrib/ncurses/man contrib/ncurses/menu contrib/ncurses/mi
On Wed, Feb 19, 2020 at 11:02:11AM +0300, Yuri Pankov wrote: > On 18 Feb 2020, at 11:11, Baptiste Daroussin wrote: > > > > Author: bapt > > Date: Tue Feb 18 08:11:52 2020 > > New Revision: 358062 > > URL: https://svnweb.freebsd.org/changeset/base/358062 > > > > Log: > > Update ncurses to 20200118 > > > > Among the changes from before: > > - Add support for extended colors on widechar version > > - Enable ncurses extended functions > > - Enable version 2 of the extended mouse support > > - Enable SCREEN extensions > > > > Modification that differs from upstream: > > - _nc_delink_entries used to be exposed and was turn static, > >turn it back as dynamic to not break abi > > - Adapt our old termcap.c to modern ncurses > > > > MFC after: 3 weeks > > Somewhat confusingly, I had to rebuild e.g. dialog4ports after this change as > it was displaying garbage. May be a brief headsup is in order (or am I the > only one seeing it)? I will add a not in UPDATING Best regards, Bapt signature.asc Description: PGP signature
svn commit: r358098 - head/sys/vm
Author: jeff Date: Wed Feb 19 09:10:11 2020 New Revision: 358098 URL: https://svnweb.freebsd.org/changeset/base/358098 Log: Don't release xbusy on kmem pages. After lockless page lookup we will not be able to guarantee that they can be racquired without blocking. Reviewed by: kib Discussed with: markj Differential Revision:https://reviews.freebsd.org/D23506 Modified: head/sys/vm/vm_glue.c head/sys/vm/vm_kern.c head/sys/vm/vm_page.h head/sys/vm/vm_swapout.c Modified: head/sys/vm/vm_glue.c == --- head/sys/vm/vm_glue.c Wed Feb 19 08:17:27 2020(r358097) +++ head/sys/vm/vm_glue.c Wed Feb 19 09:10:11 2020(r358098) @@ -342,10 +342,8 @@ vm_thread_stack_create(struct domainset *ds, vm_object VM_OBJECT_WLOCK(ksobj); (void)vm_page_grab_pages(ksobj, 0, VM_ALLOC_NORMAL | VM_ALLOC_WIRED, ma, pages); - for (i = 0; i < pages; i++) { + for (i = 0; i < pages; i++) vm_page_valid(ma[i]); - vm_page_xunbusy(ma[i]); - } VM_OBJECT_WUNLOCK(ksobj); pmap_qenter(ks, ma, pages); *ksobjp = ksobj; @@ -365,7 +363,7 @@ vm_thread_stack_dispose(vm_object_t ksobj, vm_offset_t m = vm_page_lookup(ksobj, i); if (m == NULL) panic("%s: kstack already missing?", __func__); - vm_page_busy_acquire(m, 0); + vm_page_xbusy_claim(m); vm_page_unwire_noq(m); vm_page_free(m); } Modified: head/sys/vm/vm_kern.c == --- head/sys/vm/vm_kern.c Wed Feb 19 08:17:27 2020(r358097) +++ head/sys/vm/vm_kern.c Wed Feb 19 09:10:11 2020(r358098) @@ -224,7 +224,6 @@ retry: if ((flags & M_ZERO) && (m->flags & PG_ZERO) == 0) pmap_zero_page(m); vm_page_valid(m); - vm_page_xunbusy(m); pmap_enter(kernel_pmap, addr + i, m, prot, prot | PMAP_ENTER_WIRED, 0); } @@ -317,7 +316,6 @@ retry: if ((flags & M_ZERO) && (m->flags & PG_ZERO) == 0) pmap_zero_page(m); vm_page_valid(m); - vm_page_xunbusy(m); pmap_enter(kernel_pmap, tmp, m, VM_PROT_RW, VM_PROT_RW | PMAP_ENTER_WIRED, 0); tmp += PAGE_SIZE; @@ -501,7 +499,6 @@ retry: KASSERT((m->oflags & VPO_UNMANAGED) != 0, ("kmem_malloc: page %p is managed", m)); vm_page_valid(m); - vm_page_xunbusy(m); pmap_enter(kernel_pmap, addr + i, m, prot, prot | PMAP_ENTER_WIRED, 0); #if VM_NRESERVLEVEL > 0 @@ -591,7 +588,7 @@ _kmem_unback(vm_object_t object, vm_offset_t addr, vm_ #endif for (; offset < end; offset += PAGE_SIZE, m = next) { next = vm_page_next(m); - vm_page_busy_acquire(m, 0); + vm_page_xbusy_claim(m); vm_page_unwire_noq(m); vm_page_free(m); } Modified: head/sys/vm/vm_page.h == --- head/sys/vm/vm_page.h Wed Feb 19 08:17:27 2020(r358097) +++ head/sys/vm/vm_page.h Wed Feb 19 09:10:11 2020(r358098) @@ -764,9 +764,14 @@ void vm_page_object_busy_assert(vm_page_t m); void vm_page_assert_pga_writeable(vm_page_t m, uint16_t bits); #defineVM_PAGE_ASSERT_PGA_WRITEABLE(m, bits) \ vm_page_assert_pga_writeable(m, bits) +#definevm_page_xbusy_claim(m) do { \ + vm_page_assert_xbusied_unchecked((m)); \ + (m)->busy_lock = VPB_CURTHREAD_EXCLUSIVE; \ +} while (0) #else #defineVM_PAGE_OBJECT_BUSY_ASSERT(m) (void)0 #defineVM_PAGE_ASSERT_PGA_WRITEABLE(m, bits) (void)0 +#definevm_page_xbusy_claim(m) #endif #if BYTE_ORDER == BIG_ENDIAN Modified: head/sys/vm/vm_swapout.c == --- head/sys/vm/vm_swapout.cWed Feb 19 08:17:27 2020(r358097) +++ head/sys/vm/vm_swapout.cWed Feb 19 09:10:11 2020(r358098) @@ -540,6 +540,7 @@ vm_thread_swapout(struct thread *td) if (m == NULL) panic("vm_thread_swapout: kstack already missing?"); vm_page_dirty(m); + vm_page_xunbusy_unchecked(m); vm_page_unwire(m, PQ_LAUNDRY); } VM_OBJECT_WUNLOCK(ksobj); @@ -564,7 +565,6 @@ vm_thread_swapin(struct thread *td, int oom_alloc) for (i = 0; i < pages;) { vm_page_assert_xbusied(ma[i]); if
Re: svn commit: r358062 - in head: contrib/ncurses contrib/ncurses/doc contrib/ncurses/doc/html contrib/ncurses/form contrib/ncurses/include contrib/ncurses/man contrib/ncurses/menu contrib/ncurses/mi
On 2020-02-18 09:11, Baptiste Daroussin wrote: Author: bapt Date: Tue Feb 18 08:11:52 2020 New Revision: 358062 URL: https://svnweb.freebsd.org/changeset/base/358062 Log: Update ncurses to 20200118 Apparently this breaks the gcc builds, because it can't find the function "box" anymore: --- all_subdir_usr.bin/clang/lldb --- /usr/local/bin/x86_64-unknown-freebsd12.0-ld: /tmp/obj/workspace/src/amd64.amd64/lib/clang/liblldb/liblldb.a(IOHandler.o): in function `curses::Window::Box(unsigned int, unsigned int)': /workspace/src/contrib/llvm-project/lldb/source/Core/IOHandler.cpp:926: undefined reference to `box' /usr/local/bin/x86_64-unknown-freebsd12.0-ld: /workspace/src/contrib/llvm-project/lldb/source/Core/IOHandler.cpp:926: undefined reference to `box' collect2: error: ld returned 1 exit status *** [lldb.full] Error code 1 See also: https://ci.freebsd.org/job/FreeBSD-head-amd64-gcc/13322/ -Dimitry ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r358097 - in head/sys: kern vm
Author: jeff Date: Wed Feb 19 08:17:27 2020 New Revision: 358097 URL: https://svnweb.freebsd.org/changeset/base/358097 Log: Eliminate some unnecessary uses of UMA_ZONE_VM. Only zones involved in virtual address or physical page allocation need to be marked with this flag. Reviewed by: markj Tested by:pho Differential Revision:https://reviews.freebsd.org/D23712 Modified: head/sys/kern/subr_vmem.c head/sys/kern/vfs_subr.c head/sys/vm/swap_pager.c head/sys/vm/vm_page.c head/sys/vm/vm_pager.c Modified: head/sys/kern/subr_vmem.c == --- head/sys/kern/subr_vmem.c Wed Feb 19 08:15:20 2020(r358096) +++ head/sys/kern/subr_vmem.c Wed Feb 19 08:17:27 2020(r358097) @@ -561,8 +561,7 @@ qc_init(vmem_t *vm, vmem_size_t qcache_max) qc->qc_vmem = vm; qc->qc_size = size; qc->qc_cache = uma_zcache_create(qc->qc_name, size, - NULL, NULL, NULL, NULL, qc_import, qc_release, qc, - UMA_ZONE_VM); + NULL, NULL, NULL, NULL, qc_import, qc_release, qc, 0); MPASS(qc->qc_cache); } } @@ -668,10 +667,10 @@ vmem_startup(void) mtx_init(_list_lock, "vmem list lock", NULL, MTX_DEF); vmem_zone = uma_zcreate("vmem", sizeof(struct vmem), NULL, NULL, NULL, NULL, - UMA_ALIGN_PTR, UMA_ZONE_VM); + UMA_ALIGN_PTR, 0); vmem_bt_zone = uma_zcreate("vmem btag", sizeof(struct vmem_btag), NULL, NULL, NULL, NULL, - UMA_ALIGN_PTR, UMA_ZONE_VM | UMA_ZONE_NOFREE); + UMA_ALIGN_PTR, UMA_ZONE_VM); #ifndef UMA_MD_SMALL_ALLOC mtx_init(_bt_lock, "btag lock", NULL, MTX_DEF); uma_prealloc(vmem_bt_zone, BT_MAXALLOC); Modified: head/sys/kern/vfs_subr.c == --- head/sys/kern/vfs_subr.cWed Feb 19 08:15:20 2020(r358096) +++ head/sys/kern/vfs_subr.cWed Feb 19 08:17:27 2020(r358097) @@ -671,7 +671,7 @@ vntblinit(void *dummy __unused) */ buf_trie_zone = uma_zcreate("BUF TRIE", pctrie_node_size(), NULL, NULL, pctrie_zone_init, NULL, UMA_ALIGN_PTR, - UMA_ZONE_NOFREE | UMA_ZONE_VM); + UMA_ZONE_NOFREE); uma_prealloc(buf_trie_zone, nbuf); vnodes_created = counter_u64_alloc(M_WAITOK); Modified: head/sys/vm/swap_pager.c == --- head/sys/vm/swap_pager.cWed Feb 19 08:15:20 2020(r358096) +++ head/sys/vm/swap_pager.cWed Feb 19 08:17:27 2020(r358097) @@ -585,11 +585,11 @@ swap_pager_swap_init(void) n = maxswzone != 0 ? maxswzone / sizeof(struct swblk) : vm_cnt.v_page_count / 2; swpctrie_zone = uma_zcreate("swpctrie", pctrie_node_size(), NULL, NULL, - pctrie_zone_init, NULL, UMA_ALIGN_PTR, UMA_ZONE_VM); + pctrie_zone_init, NULL, UMA_ALIGN_PTR, 0); if (swpctrie_zone == NULL) panic("failed to create swap pctrie zone."); swblk_zone = uma_zcreate("swblk", sizeof(struct swblk), NULL, NULL, - NULL, NULL, _Alignof(struct swblk) - 1, UMA_ZONE_VM); + NULL, NULL, _Alignof(struct swblk) - 1, 0); if (swblk_zone == NULL) panic("failed to create swap blk zone."); n2 = n; Modified: head/sys/vm/vm_page.c == --- head/sys/vm/vm_page.c Wed Feb 19 08:15:20 2020(r358096) +++ head/sys/vm/vm_page.c Wed Feb 19 08:17:27 2020(r358097) @@ -202,7 +202,7 @@ vm_page_init(void *dummy) { fakepg_zone = uma_zcreate("fakepg", sizeof(struct vm_page), NULL, NULL, - NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE | UMA_ZONE_VM); + NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); bogus_page = vm_page_alloc(NULL, 0, VM_ALLOC_NOOBJ | VM_ALLOC_NORMAL | VM_ALLOC_WIRED); } @@ -2022,7 +2022,7 @@ again: #endif vmd = VM_DOMAIN(domain); if (vmd->vmd_pgcache[pool].zone != NULL) { - m = uma_zalloc(vmd->vmd_pgcache[pool].zone, M_NOWAIT); + m = uma_zalloc(vmd->vmd_pgcache[pool].zone, M_NOWAIT | M_NOVM); if (m != NULL) { flags |= PG_PCPU_CACHE; goto found; Modified: head/sys/vm/vm_pager.c == --- head/sys/vm/vm_pager.c Wed Feb 19 08:15:20 2020(r358096) +++ head/sys/vm/vm_pager.c Wed Feb 19 08:17:27 2020(r358097) @@ -185,7 +185,7 @@ vm_pager_bufferinit(void) /* Main zone for paging bufs. */ pbuf_zone = uma_zcreate("pbuf", sizeof(struct buf), pbuf_ctor, pbuf_dtor, pbuf_init, NULL, UMA_ALIGN_CACHE, -
svn commit: r358096 - head/sys/sys
Author: jeff Date: Wed Feb 19 08:15:20 2020 New Revision: 358096 URL: https://svnweb.freebsd.org/changeset/base/358096 Log: Type validating smr protected pointer accessors. This API is intended to provide some measure of safety with SMR protected pointers. A struct wrapper provides type checking and a guarantee that all access is mediated by the API unless abused. All modifying functions take an assert as an argument to guarantee that the required synchronization is present. Reviewed by: kib, markj, mjg Differential Revision:https://reviews.freebsd.org/D23711 Modified: head/sys/sys/smr.h Modified: head/sys/sys/smr.h == --- head/sys/sys/smr.h Wed Feb 19 06:28:55 2020(r358095) +++ head/sys/sys/smr.h Wed Feb 19 08:15:20 2020(r358096) @@ -77,6 +77,98 @@ struct smr { #defineSMR_ASSERT_NOT_ENTERED(smr) \ KASSERT(!SMR_ENTERED(smr), ("In smr section.")); +#define SMR_ASSERT(ex, fn) \ +KASSERT((ex), (fn ": Assertion " #ex " failed at %s:%d", __FILE__, __LINE__)) + +/* + * SMR Accessors are meant to provide safe access to SMR protected + * pointers and prevent misuse and accidental access. + * + * Accessors are grouped by type: + * entered - Use while in a read section (between smr_enter/smr_exit()) + * serialized - Use while holding a lock that serializes writers. Updates + * are synchronized with readers via included barriers. + * unserialized- Use after the memory is out of scope and not visible to + * readers. + * + * All acceses include a parameter for an assert to verify the required + * synchronization. For example, a writer might use: + * + * smr_serilized_store(pointer, value, mtx_owned()); + * + * These are only enabled in INVARIANTS kernels. + */ + +/* Type restricting pointer access to force smr accessors. */ +#defineSMR_TYPE_DECLARE(smrtype, type) \ +typedef struct { \ + type__ptr; /* Do not access directly */\ +} smrtype + +/* + * Read from an SMR protected pointer while in a read section. + */ +#definesmr_entered_load(p, smr) ({ \ + SMR_ASSERT(SMR_ENTERED((smr)), "smr_entered_load"); \ + (__typeof((p)->__ptr))atomic_load_acq_ptr((uintptr_t *)&(p)->__ptr); \ +}) + +/* + * Read from an SMR protected pointer while serialized by an + * external mechanism. 'ex' should contain an assert that the + * external mechanism is held. i.e. mtx_owned() + */ +#definesmr_serialized_load(p, ex) ({ \ + SMR_ASSERT(ex, "smr_serialized_load"); \ + (__typeof((p)->__ptr))atomic_load_ptr((uintptr_t *)&(p)->__ptr);\ +}) + +/* + * Store 'v' to an SMR protected pointer while serialized by an + * external mechanism. 'ex' should contain an assert that the + * external mechanism is held. i.e. mtx_owned() + */ +#definesmr_serialized_store(p, v, ex) do { \ + SMR_ASSERT(ex, "smr_serialized_store"); \ + __typeof((p)->__ptr) _v = (v); \ + atomic_store_rel_ptr((uintptr_t *)&(p)->__ptr, (uintptr_t)_v); \ +} while (0) + +/* + * swap 'v' with an SMR protected pointer and return the old value + * while serialized by an external mechanism. 'ex' should contain + * an assert that the external mechanism is provided. i.e. mtx_owned() + */ +#definesmr_serialized_swap(p, v, ex) ({ \ + SMR_ASSERT(ex, "smr_serialized_swap"); \ + __typeof((p)->__ptr) _v = (v); \ + /* Release barrier guarantees contents are visible to reader */ \ + atomic_thread_fence_rel(); \ + (__typeof((p)->__ptr))atomic_swap_ptr( \ + (uintptr_t *)&(p)->__ptr, (uintptr_t)_v); \ +}) + +/* + * Read from an SMR protected pointer when no serialization is required + * such as in the destructor callback or when the caller guarantees other + * synchronization. + */ +#definesmr_unserialized_load(p, ex) ({ \ + SMR_ASSERT(ex, "smr_unserialized_load");\ + (__typeof((p)->__ptr))atomic_load_ptr((uintptr_t *)&(p)->__ptr);\ +}) + +/* + * Store to an SMR protected pointer when no serialiation is required + * such as in the destructor callback or when the caller guarantees other + * synchronization. + */ +#definesmr_unserialized_store(p, v, ex) do { \ + SMR_ASSERT(ex, "smr_unserialized_store");
Re: svn commit: r358062 - in head: contrib/ncurses contrib/ncurses/doc contrib/ncurses/doc/html contrib/ncurses/form contrib/ncurses/include contrib/ncurses/man contrib/ncurses/menu contrib/ncurses/mi
On 18 Feb 2020, at 11:11, Baptiste Daroussin wrote: > > Author: bapt > Date: Tue Feb 18 08:11:52 2020 > New Revision: 358062 > URL: https://svnweb.freebsd.org/changeset/base/358062 > > Log: > Update ncurses to 20200118 > > Among the changes from before: > - Add support for extended colors on widechar version > - Enable ncurses extended functions > - Enable version 2 of the extended mouse support > - Enable SCREEN extensions > > Modification that differs from upstream: > - _nc_delink_entries used to be exposed and was turn static, >turn it back as dynamic to not break abi > - Adapt our old termcap.c to modern ncurses > > MFC after: 3 weeks Somewhat confusingly, I had to rebuild e.g. dialog4ports after this change as it was displaying garbage. May be a brief headsup is in order (or am I the only one seeing it)? ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"