svn commit: r352239 - head/contrib/tzdata
Author: philip Date: Thu Sep 12 00:33:01 2019 New Revision: 352239 URL: https://svnweb.freebsd.org/changeset/base/352239 Log: Restore svn:mergeinfo accidentally deleted in r352238 Pointy hat to:philip Modified: Directory Properties: head/contrib/tzdata/ (props changed) ___ 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: r352238 - head/contrib/tzdata
Author: philip Date: Thu Sep 12 00:19:16 2019 New Revision: 352238 URL: https://svnweb.freebsd.org/changeset/base/352238 Log: Import tzdata 2019c Changes: https://github.com/eggert/tz/blob/2019c/NEWS MFC after:3 days Modified: head/contrib/tzdata/NEWS head/contrib/tzdata/asia head/contrib/tzdata/australasia head/contrib/tzdata/backzone head/contrib/tzdata/europe head/contrib/tzdata/leap-seconds.list head/contrib/tzdata/leapseconds head/contrib/tzdata/leapseconds.awk head/contrib/tzdata/northamerica head/contrib/tzdata/southamerica head/contrib/tzdata/theory.html head/contrib/tzdata/version Modified: head/contrib/tzdata/NEWS == --- head/contrib/tzdata/NEWSThu Sep 12 00:15:40 2019(r352237) +++ head/contrib/tzdata/NEWSThu Sep 12 00:19:16 2019(r352238) @@ -1,5 +1,80 @@ News for the tz database +Release 2019c - 2019-09-11 08:59:48 -0700 + + Briefly: +Fiji observes DST from 2019-11-10 to 2020-01-12. +Norfolk Island starts observing Australian-style DST. + + Changes to future timestamps + +Fiji's next DST transitions will be 2019-11-10 and 2020-01-12 +instead of 2019-11-03 and 2020-01-19. (Thanks to Raymond Kumar.) +Adjust future guesses accordingly. + +Norfolk Island will observe Australian-style DST starting in +spring 2019. The first transition is on 2019-10-06. (Thanks to +Kyle Czech and Michael Deckers.) + + Changes to past timestamps + +Many corrections to time in Turkey from 1940 through 1985. +(Thanks to Oya Vulaş via Alois Treindl, and to Kıvanç Yazan.) + +The Norfolk Island 1975-03-02 transition was at 02:00 standard +time, not 02:00 DST. (Thanks to Michael Deckers.) + +South Korea observed DST from 1948 through 1951. Although this +info was supposed to appear in release 2014j, a typo inadvertently +suppressed the change. (Thanks to Alois Treindl.) + +Detroit observed DST in 1967 and 1968 following the US DST rules, +except that its 1967 DST began on June 14 at 00:01. (Thanks to +Alois Treindl for pointing out that the old data entries were +probably wrong.) + +Fix several errors in pre-1970 transitions in Perry County, IN. +(Thanks to Alois Triendl for pointing out the 1967/9 errors.) + +Edmonton did not observe DST in 1967 or 1969. In 1946 Vancouver +ended DST on 09-29 not 10-13, and Vienna ended DST on 10-07 not +10-06. In 1945 Königsberg (now Kaliningrad) switched from +01/+02 +to +02/+03 on 04-10 not 01-01, and its +02/+03 is abbreviated +EET/EEST, not CET/CEST. (Thanks to Alois Triendl.) In 1946 +Königsberg switched to +03 on 04-07 not 01-01. + +In 1946 Louisville switched from CST to CDT on 04-28 at 00:01, not +01-01 at 00:00. (Thanks to Alois Treindl and Michael Deckers.) +Also, it switched from CST to CDT on 1950-04-30, not 1947-04-27. + +The 1892-05-01 transition in Brussels was at 00:17:30, not at noon. +(Thanks to Michael Deckers.) + + Changes to past time zone abbreviations and DST flags + +Hong Kong Winter Time, observed from 1941-10-01 to 1941-12-25, +is now flagged as DST and is abbreviated HKWT not HKT. + + Changes to code + +leapseconds.awk now relies only on its input data, rather than +also relying on its comments. (Inspired by code from Dennis +Ferguson and Chris Woodbury.) + +The code now defends against CRLFs in leap-seconds.list. +(Thanks to Brian Inglis and Chris Woodbury.) + + Changes to documentation and commentary + +theory.html discusses leap seconds. (Thanks to Steve Summit.) + +Nashville's newspapers dueled about the time of day in the 1950s. +(Thanks to John Seigenthaler.) + +Liechtenstein observed Swiss DST in 1941/2. +(Thanks to Alois Treindl.) + + Release 2019b - 2019-07-01 00:09:53 -0700 Briefly: Modified: head/contrib/tzdata/asia == --- head/contrib/tzdata/asiaThu Sep 12 00:15:40 2019(r352237) +++ head/contrib/tzdata/asiaThu Sep 12 00:19:16 2019(r352238) @@ -8,7 +8,7 @@ # t...@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2018-06-19): +# From Paul Eggert (2019-07-11): # # Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), @@ -47,13 +47,13 @@ # 7:00 WIBwest Indonesia (Waktu Indonesia Barat) # 8:00 WITA central Indonesia (Waktu Indonesia Tengah) # 8:00 CSTChina -# 8:00 PST PDT* Philippine Standard Time +# 8:00 HKT HKST Hong Kong (HKWT* for Winter Time in late 1941) +# 8:00 PST PDT* Philippines # 8:30 KST KDT Korea when at +0830 # 9:00 WITeast Indonesia (Waktu
svn commit: r352236 - vendor/tzdata/dist
Author: philip Date: Thu Sep 12 00:15:06 2019 New Revision: 352236 URL: https://svnweb.freebsd.org/changeset/base/352236 Log: Import tzdata 2019c Modified: vendor/tzdata/dist/NEWS vendor/tzdata/dist/asia vendor/tzdata/dist/australasia vendor/tzdata/dist/backzone vendor/tzdata/dist/europe vendor/tzdata/dist/leap-seconds.list vendor/tzdata/dist/leapseconds vendor/tzdata/dist/leapseconds.awk vendor/tzdata/dist/northamerica vendor/tzdata/dist/southamerica vendor/tzdata/dist/theory.html vendor/tzdata/dist/version Modified: vendor/tzdata/dist/NEWS == --- vendor/tzdata/dist/NEWS Wed Sep 11 23:45:58 2019(r352235) +++ vendor/tzdata/dist/NEWS Thu Sep 12 00:15:06 2019(r352236) @@ -1,5 +1,80 @@ News for the tz database +Release 2019c - 2019-09-11 08:59:48 -0700 + + Briefly: +Fiji observes DST from 2019-11-10 to 2020-01-12. +Norfolk Island starts observing Australian-style DST. + + Changes to future timestamps + +Fiji's next DST transitions will be 2019-11-10 and 2020-01-12 +instead of 2019-11-03 and 2020-01-19. (Thanks to Raymond Kumar.) +Adjust future guesses accordingly. + +Norfolk Island will observe Australian-style DST starting in +spring 2019. The first transition is on 2019-10-06. (Thanks to +Kyle Czech and Michael Deckers.) + + Changes to past timestamps + +Many corrections to time in Turkey from 1940 through 1985. +(Thanks to Oya Vulaş via Alois Treindl, and to Kıvanç Yazan.) + +The Norfolk Island 1975-03-02 transition was at 02:00 standard +time, not 02:00 DST. (Thanks to Michael Deckers.) + +South Korea observed DST from 1948 through 1951. Although this +info was supposed to appear in release 2014j, a typo inadvertently +suppressed the change. (Thanks to Alois Treindl.) + +Detroit observed DST in 1967 and 1968 following the US DST rules, +except that its 1967 DST began on June 14 at 00:01. (Thanks to +Alois Treindl for pointing out that the old data entries were +probably wrong.) + +Fix several errors in pre-1970 transitions in Perry County, IN. +(Thanks to Alois Triendl for pointing out the 1967/9 errors.) + +Edmonton did not observe DST in 1967 or 1969. In 1946 Vancouver +ended DST on 09-29 not 10-13, and Vienna ended DST on 10-07 not +10-06. In 1945 Königsberg (now Kaliningrad) switched from +01/+02 +to +02/+03 on 04-10 not 01-01, and its +02/+03 is abbreviated +EET/EEST, not CET/CEST. (Thanks to Alois Triendl.) In 1946 +Königsberg switched to +03 on 04-07 not 01-01. + +In 1946 Louisville switched from CST to CDT on 04-28 at 00:01, not +01-01 at 00:00. (Thanks to Alois Treindl and Michael Deckers.) +Also, it switched from CST to CDT on 1950-04-30, not 1947-04-27. + +The 1892-05-01 transition in Brussels was at 00:17:30, not at noon. +(Thanks to Michael Deckers.) + + Changes to past time zone abbreviations and DST flags + +Hong Kong Winter Time, observed from 1941-10-01 to 1941-12-25, +is now flagged as DST and is abbreviated HKWT not HKT. + + Changes to code + +leapseconds.awk now relies only on its input data, rather than +also relying on its comments. (Inspired by code from Dennis +Ferguson and Chris Woodbury.) + +The code now defends against CRLFs in leap-seconds.list. +(Thanks to Brian Inglis and Chris Woodbury.) + + Changes to documentation and commentary + +theory.html discusses leap seconds. (Thanks to Steve Summit.) + +Nashville's newspapers dueled about the time of day in the 1950s. +(Thanks to John Seigenthaler.) + +Liechtenstein observed Swiss DST in 1941/2. +(Thanks to Alois Treindl.) + + Release 2019b - 2019-07-01 00:09:53 -0700 Briefly: Modified: vendor/tzdata/dist/asia == --- vendor/tzdata/dist/asia Wed Sep 11 23:45:58 2019(r352235) +++ vendor/tzdata/dist/asia Thu Sep 12 00:15:06 2019(r352236) @@ -8,7 +8,7 @@ # t...@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2018-06-19): +# From Paul Eggert (2019-07-11): # # Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), @@ -47,13 +47,13 @@ # 7:00 WIBwest Indonesia (Waktu Indonesia Barat) # 8:00 WITA central Indonesia (Waktu Indonesia Tengah) # 8:00 CSTChina -# 8:00 PST PDT* Philippine Standard Time +# 8:00 HKT HKST Hong Kong (HKWT* for Winter Time in late 1941) +# 8:00 PST PDT* Philippines # 8:30 KST KDT Korea when at +0830 # 9:00 WITeast Indonesia (Waktu Indonesia Timur) # 9:00 JST JDT Japan # 9:00 KST KDT Korea when at +09 -# 9:30
svn commit: r352237 - vendor/tzdata/tzdata2019c
Author: philip Date: Thu Sep 12 00:15:40 2019 New Revision: 352237 URL: https://svnweb.freebsd.org/changeset/base/352237 Log: Tag import of tzdata2019c Added: vendor/tzdata/tzdata2019c/ - copied from r352236, vendor/tzdata/dist/ ___ 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: r352235 - in stable/12/sys: conf crypto/aesni modules/aesni
Author: mav Date: Wed Sep 11 23:45:58 2019 New Revision: 352235 URL: https://svnweb.freebsd.org/changeset/base/352235 Log: MFC r348268 (by sef), r348293 (by cem): Add an AESNI-optimized version of the CCM/CBC cryptographic and authentication code. The primary client of this is probably going to be ZFS encryption. Added: stable/12/sys/crypto/aesni/aesni_ccm.c - copied, changed from r348268, head/sys/crypto/aesni/aesni_ccm.c Modified: stable/12/sys/conf/files.amd64 stable/12/sys/conf/files.i386 stable/12/sys/crypto/aesni/aesni.c stable/12/sys/crypto/aesni/aesni.h stable/12/sys/crypto/aesni/aesni_wrap.c stable/12/sys/modules/aesni/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/conf/files.amd64 == --- stable/12/sys/conf/files.amd64 Wed Sep 11 23:41:09 2019 (r352234) +++ stable/12/sys/conf/files.amd64 Wed Sep 11 23:45:58 2019 (r352235) @@ -175,6 +175,11 @@ aesni_ghash.o optional aesni \ compile-with"${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${NO_WCAST_QUAL} ${PROF} -mmmx -msse -msse4 -maes -mpclmul ${.IMPSRC}" \ no-implicit-rule\ clean "aesni_ghash.o" +aesni_ccm.ooptional aesni \ + dependency "$S/crypto/aesni/aesni_ccm.c" \ + compile-with"${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${NO_WCAST_QUAL} ${PROF} -mmmx -msse -msse4 -maes -mpclmul ${.IMPSRC}" \ + no-implicit-rule\ + clean "aesni_ccm.o" aesni_wrap.o optional aesni \ dependency "$S/crypto/aesni/aesni_wrap.c" \ compile-with"${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${NO_WCAST_QUAL} ${PROF} -mmmx -msse -msse4 -maes ${.IMPSRC}" \ Modified: stable/12/sys/conf/files.i386 == --- stable/12/sys/conf/files.i386 Wed Sep 11 23:41:09 2019 (r352234) +++ stable/12/sys/conf/files.i386 Wed Sep 11 23:45:58 2019 (r352235) @@ -127,6 +127,11 @@ aesni_ghash.o optional aesni \ compile-with"${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${NO_WCAST_QUAL} ${PROF} -mmmx -msse -msse4 -maes -mpclmul ${.IMPSRC}" \ no-implicit-rule\ clean "aesni_ghash.o" +aesni_ccm.ooptional aesni \ + dependency "$S/crypto/aesni/aesni_ccm.c" \ + compile-with"${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${NO_WCAST_QUAL} ${PROF} -mmmx -msse -msse4 -maes -mpclmul ${.IMPSRC}" \ + no-implicit-rule\ + clean "aesni_ccm.o" aesni_wrap.o optional aesni \ dependency "$S/crypto/aesni/aesni_wrap.c" \ compile-with"${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${NO_WCAST_QUAL} ${PROF} -mmmx -msse -msse4 -maes ${.IMPSRC}" \ Modified: stable/12/sys/crypto/aesni/aesni.c == --- stable/12/sys/crypto/aesni/aesni.c Wed Sep 11 23:41:09 2019 (r352234) +++ stable/12/sys/crypto/aesni/aesni.c Wed Sep 11 23:45:58 2019 (r352235) @@ -131,9 +131,10 @@ aesni_probe(device_t dev) return (EINVAL); } else if (has_aes && has_sha) device_set_desc(dev, - "AES-CBC,AES-XTS,AES-GCM,AES-ICM,SHA1,SHA256"); + "AES-CBC,AES-CCM,AES-GCM,AES-ICM,AES-XTS,SHA1,SHA256"); else if (has_aes) - device_set_desc(dev, "AES-CBC,AES-XTS,AES-GCM,AES-ICM"); + device_set_desc(dev, + "AES-CBC,AES-CCM,AES-GCM,AES-ICM,AES-XTS"); else device_set_desc(dev, "SHA1,SHA256"); @@ -193,6 +194,8 @@ aesni_attach(device_t dev) crypto_register(sc->cid, CRYPTO_AES_192_NIST_GMAC, 0, 0); crypto_register(sc->cid, CRYPTO_AES_256_NIST_GMAC, 0, 0); crypto_register(sc->cid, CRYPTO_AES_XTS, 0, 0); + crypto_register(sc->cid, CRYPTO_AES_CCM_16, 0, 0); + crypto_register(sc->cid, CRYPTO_AES_CCM_CBC_MAC, 0, 0); } if (sc->has_sha) { crypto_register(sc->cid, CRYPTO_SHA1, 0, 0); @@ -226,6 +229,7 @@ aesni_newsession(device_t dev, crypto_session_t cses, struct aesni_session *ses; struct cryptoini *encini, *authini; bool gcm_hash, gcm; + bool cbc_hash,
svn commit: r352234 - in stable/12/sys: crypto/aesni opencrypto
Author: mav Date: Wed Sep 11 23:41:09 2019 New Revision: 352234 URL: https://svnweb.freebsd.org/changeset/base/352234 Log: MFC r342024 (by mmacy): Generalize AES iov optimization Right now, aesni_cipher_alloc does a bit of special-casing for CRYPTO_F_IOV, to not do any allocation if the first uio is large enough for the requested size. While working on ZFS crypto port, I ran into horrible performance because the code uses scatter-gather, and many of the times the data to encrypt was in the second entry. This code looks through the list, and tries to see if there is a single uio that can contain the requested data, and, if so, uses that. This has a slight impact on the current consumers, in that the check is a little more complicated for the ones that use CRYPTO_F_IOV -- but none of them meet the criteria for testing more than one. Modified: stable/12/sys/crypto/aesni/aesni.c stable/12/sys/opencrypto/criov.c stable/12/sys/opencrypto/cryptodev.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/crypto/aesni/aesni.c == --- stable/12/sys/crypto/aesni/aesni.c Wed Sep 11 21:24:14 2019 (r352233) +++ stable/12/sys/crypto/aesni/aesni.c Wed Sep 11 23:41:09 2019 (r352234) @@ -403,29 +403,14 @@ static uint8_t * aesni_cipher_alloc(struct cryptodesc *enccrd, struct cryptop *crp, bool *allocated) { - struct mbuf *m; - struct uio *uio; - struct iovec *iov; uint8_t *addr; - if (crp->crp_flags & CRYPTO_F_IMBUF) { - m = (struct mbuf *)crp->crp_buf; - if (m->m_next != NULL) - goto alloc; - addr = mtod(m, uint8_t *); - } else if (crp->crp_flags & CRYPTO_F_IOV) { - uio = (struct uio *)crp->crp_buf; - if (uio->uio_iovcnt != 1) - goto alloc; - iov = uio->uio_iov; - addr = (uint8_t *)iov->iov_base; - } else - addr = (uint8_t *)crp->crp_buf; - *allocated = false; - addr += enccrd->crd_skip; - return (addr); - -alloc: + addr = crypto_contiguous_subsegment(crp->crp_flags, + crp->crp_buf, enccrd->crd_skip, enccrd->crd_len); + if (addr != NULL) { + *allocated = false; + return (addr); + } addr = malloc(enccrd->crd_len, M_AESNI, M_NOWAIT); if (addr != NULL) { *allocated = true; Modified: stable/12/sys/opencrypto/criov.c == --- stable/12/sys/opencrypto/criov.cWed Sep 11 21:24:14 2019 (r352233) +++ stable/12/sys/opencrypto/criov.cWed Sep 11 23:41:09 2019 (r352234) @@ -38,6 +38,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include @@ -239,3 +241,55 @@ crypto_mbuftoiov(struct mbuf *mbuf, struct iovec **iov *cnt = i; return 0; } + +static inline void * +m_contiguous_subsegment(struct mbuf *m, size_t skip, size_t len) +{ + int rel_off; + + MPASS(skip <= INT_MAX); + + m = m_getptr(m, (int)skip, _off); + if (m == NULL) + return (NULL); + + MPASS(rel_off >= 0); + skip = rel_off; + if (skip + len > m->m_len) + return (NULL); + + return (mtod(m, char*) + skip); +} + +static inline void * +cuio_contiguous_segment(struct uio *uio, size_t skip, size_t len) +{ + int rel_off, idx; + + MPASS(skip <= INT_MAX); + idx = cuio_getptr(uio, (int)skip, _off); + if (idx < 0) + return (NULL); + + MPASS(rel_off >= 0); + skip = rel_off; + if (skip + len > uio->uio_iov[idx].iov_len) + return (NULL); + return ((char *)uio->uio_iov[idx].iov_base + skip); +} + +void * +crypto_contiguous_subsegment(int crp_flags, void *crpbuf, +size_t skip, size_t len) +{ + if ((crp_flags & CRYPTO_F_IMBUF) != 0) + return (m_contiguous_subsegment(crpbuf, skip, len)); + else if ((crp_flags & CRYPTO_F_IOV) != 0) + return (cuio_contiguous_segment(crpbuf, skip, len)); + else { + MPASS((crp_flags & (CRYPTO_F_IMBUF | CRYPTO_F_IOV)) != + (CRYPTO_F_IMBUF | CRYPTO_F_IOV)); + return ((char*)crpbuf + skip); + } +} + Modified: stable/12/sys/opencrypto/cryptodev.h == --- stable/12/sys/opencrypto/cryptodev.hWed Sep 11 21:24:14 2019 (r352233) +++ stable/12/sys/opencrypto/cryptodev.hWed Sep 11 23:41:09 2019 (r352234) @@ -571,5 +571,7 @@ extern void crypto_copydata(int flags, caddr_t buf, in extern int crypto_apply(int flags, caddr_t buf, int off, int len, int (*f)(void *, void *, u_int), void *arg);
Re: svn commit: r352231 - head/lib/libc/sys
On Wed, 2019-09-11 at 15:55 -0600, Alan Somers wrote: > On Wed, Sep 11, 2019 at 3:50 PM Ian Lepore wrote: > > > On Wed, 2019-09-11 at 19:48 +, Alan Somers wrote: > > > Author: asomers > > > Date: Wed Sep 11 19:48:32 2019 > > > New Revision: 352231 > > > URL: https://svnweb.freebsd.org/changeset/base/352231 > > > > > > Log: > > > getsockopt.2: clarify that SO_TIMESTAMP is not 100% reliable > > > > > > When SO_TIMESTAMP is set, the kernel will attempt to attach a > > > > timestamp as > > > ancillary data to each IP datagram that is received on the socket. > > > > However, > > > it may fail, for example due to insufficient memory. In that case the > > > packet will still be received but not timestamp will be attached. > > > > > > Reviewed by:kib > > > MFC after: 3 days > > > Differential Revision: https://reviews.freebsd.org/D21607 > > > > > > Modified: > > > head/lib/libc/sys/getsockopt.2 > > > > > > Modified: head/lib/libc/sys/getsockopt.2 > > > > > > > == > > > --- head/lib/libc/sys/getsockopt.2Wed Sep 11 19:29:40 2019 > > > > (r352230) > > > +++ head/lib/libc/sys/getsockopt.2Wed Sep 11 19:48:32 2019 > > > > (r352231) > > > @@ -28,7 +28,7 @@ > > > .\" @(#)getsockopt.2 8.4 (Berkeley) 5/2/95 > > > .\" $FreeBSD$ > > > .\" > > > -.Dd February 10, 2019 > > > +.Dd September 11, 2019 > > > .Dt GETSOCKOPT 2 > > > .Os > > > .Sh NAME > > > @@ -431,7 +431,8 @@ option is enabled on a > > > .Dv SOCK_DGRAM > > > socket, the > > > .Xr recvmsg 2 > > > -call will return a timestamp corresponding to when the datagram was > > > > received. > > > +call may return a timestamp corresponding to when the datagram was > > > > received. > > > +However, it may not, for example due to a resource shortage. > > > The > > > .Va msg_control > > > field in the > > > > > > > So I guess this actually happened to someone... is it a common thing > > for the timestamp to fail? I ask because ntpd relies on SO_TIMESTAMP > > and if this situation really happens and can persist for a long time, > > ntpd would effectively stop working. > > > > -- Ian > > > > pho discovered how to trigger it. If you start 50 ping processes > simultaneously, sometimes a few will fail. Will ntpd be ok with a single > failure, as long as the timestamp is received correctly in a subsequent > packet? > -Alan Yeah, nptd is resilient to missing data and intermittent comms, within reason. If it goes hours without getting a timestamp, system time would start to drift. Running 50 concurrent pings sounds like something that won't come up in the real world. :) -- Ian ___ 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: r352231 - head/lib/libc/sys
On Wed, Sep 11, 2019 at 3:50 PM Ian Lepore wrote: > On Wed, 2019-09-11 at 19:48 +, Alan Somers wrote: > > Author: asomers > > Date: Wed Sep 11 19:48:32 2019 > > New Revision: 352231 > > URL: https://svnweb.freebsd.org/changeset/base/352231 > > > > Log: > > getsockopt.2: clarify that SO_TIMESTAMP is not 100% reliable > > > > When SO_TIMESTAMP is set, the kernel will attempt to attach a > timestamp as > > ancillary data to each IP datagram that is received on the socket. > However, > > it may fail, for example due to insufficient memory. In that case the > > packet will still be received but not timestamp will be attached. > > > > Reviewed by:kib > > MFC after: 3 days > > Differential Revision: https://reviews.freebsd.org/D21607 > > > > Modified: > > head/lib/libc/sys/getsockopt.2 > > > > Modified: head/lib/libc/sys/getsockopt.2 > > > == > > --- head/lib/libc/sys/getsockopt.2Wed Sep 11 19:29:40 2019 > (r352230) > > +++ head/lib/libc/sys/getsockopt.2Wed Sep 11 19:48:32 2019 > (r352231) > > @@ -28,7 +28,7 @@ > > .\" @(#)getsockopt.2 8.4 (Berkeley) 5/2/95 > > .\" $FreeBSD$ > > .\" > > -.Dd February 10, 2019 > > +.Dd September 11, 2019 > > .Dt GETSOCKOPT 2 > > .Os > > .Sh NAME > > @@ -431,7 +431,8 @@ option is enabled on a > > .Dv SOCK_DGRAM > > socket, the > > .Xr recvmsg 2 > > -call will return a timestamp corresponding to when the datagram was > received. > > +call may return a timestamp corresponding to when the datagram was > received. > > +However, it may not, for example due to a resource shortage. > > The > > .Va msg_control > > field in the > > > > So I guess this actually happened to someone... is it a common thing > for the timestamp to fail? I ask because ntpd relies on SO_TIMESTAMP > and if this situation really happens and can persist for a long time, > ntpd would effectively stop working. > > -- Ian > pho discovered how to trigger it. If you start 50 ping processes simultaneously, sometimes a few will fail. Will ntpd be ok with a single failure, as long as the timestamp is received correctly in a subsequent packet? -Alan ___ 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: r352231 - head/lib/libc/sys
On Wed, 2019-09-11 at 19:48 +, Alan Somers wrote: > Author: asomers > Date: Wed Sep 11 19:48:32 2019 > New Revision: 352231 > URL: https://svnweb.freebsd.org/changeset/base/352231 > > Log: > getsockopt.2: clarify that SO_TIMESTAMP is not 100% reliable > > When SO_TIMESTAMP is set, the kernel will attempt to attach a timestamp as > ancillary data to each IP datagram that is received on the socket. However, > it may fail, for example due to insufficient memory. In that case the > packet will still be received but not timestamp will be attached. > > Reviewed by:kib > MFC after: 3 days > Differential Revision: https://reviews.freebsd.org/D21607 > > Modified: > head/lib/libc/sys/getsockopt.2 > > Modified: head/lib/libc/sys/getsockopt.2 > == > --- head/lib/libc/sys/getsockopt.2Wed Sep 11 19:29:40 2019 > (r352230) > +++ head/lib/libc/sys/getsockopt.2Wed Sep 11 19:48:32 2019 > (r352231) > @@ -28,7 +28,7 @@ > .\" @(#)getsockopt.2 8.4 (Berkeley) 5/2/95 > .\" $FreeBSD$ > .\" > -.Dd February 10, 2019 > +.Dd September 11, 2019 > .Dt GETSOCKOPT 2 > .Os > .Sh NAME > @@ -431,7 +431,8 @@ option is enabled on a > .Dv SOCK_DGRAM > socket, the > .Xr recvmsg 2 > -call will return a timestamp corresponding to when the datagram was received. > +call may return a timestamp corresponding to when the datagram was received. > +However, it may not, for example due to a resource shortage. > The > .Va msg_control > field in the > So I guess this actually happened to someone... is it a common thing for the timestamp to fail? I ask because ntpd relies on SO_TIMESTAMP and if this situation really happens and can persist for a long time, ntpd would effectively stop working. -- Ian ___ 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: r352233 - in head: sys/fs/msdosfs sys/kern sys/sys usr.sbin/makefs/msdos
Author: cem Date: Wed Sep 11 21:24:14 2019 New Revision: 352233 URL: https://svnweb.freebsd.org/changeset/base/352233 Log: buf: Add B_INVALONERR flag to discard data Setting the B_INVALONERR flag before a synchronous write causes the buf cache to forcibly invalidate contents if the write fails (BIO_ERROR). This is intended to be used to allow layers above the buffer cache to make more informed decisions about when discarding dirty buffers without successful write is acceptable. As a proof of concept, use in msdosfs to handle failures to mark the on-disk 'dirty' bit during rw mount or ro->rw update. Extending this to other filesystems is left as future work. PR: 210316 Reviewed by: kib (with objections) Sponsored by: Dell EMC Isilon Differential Revision:https://reviews.freebsd.org/D21539 Modified: head/sys/fs/msdosfs/fat.h head/sys/fs/msdosfs/msdosfs_fat.c head/sys/fs/msdosfs/msdosfs_vfsops.c head/sys/kern/vfs_bio.c head/sys/sys/buf.h head/usr.sbin/makefs/msdos/msdosfs_denode.c head/usr.sbin/makefs/msdos/msdosfs_fat.c head/usr.sbin/makefs/msdos/msdosfs_lookup.c head/usr.sbin/makefs/msdos/msdosfs_vfsops.c head/usr.sbin/makefs/msdos/msdosfs_vnops.c Modified: head/sys/fs/msdosfs/fat.h == --- head/sys/fs/msdosfs/fat.h Wed Sep 11 20:13:38 2019(r352232) +++ head/sys/fs/msdosfs/fat.h Wed Sep 11 21:24:14 2019(r352233) @@ -103,7 +103,13 @@ int fatentry(int function, struct msdosfsmount *pmp, u int freeclusterchain(struct msdosfsmount *pmp, u_long startchain); int extendfile(struct denode *dep, u_long count, struct buf **bpp, u_long *ncp, int flags); void fc_purge(struct denode *dep, u_int frcn); -int markvoldirty(struct msdosfsmount *pmp, int dirty); +int markvoldirty_upgrade(struct msdosfsmount *pmp, bool dirty, bool rw_upgrade); + +static inline int +markvoldirty(struct msdosfsmount *pmp, bool dirty) +{ + return (markvoldirty_upgrade(pmp, dirty, false)); +} #endif /* _KERNEL || MAKEFS */ #endif /* !_FS_MSDOSFS_FAT_H_ */ Modified: head/sys/fs/msdosfs/msdosfs_fat.c == --- head/sys/fs/msdosfs/msdosfs_fat.c Wed Sep 11 20:13:38 2019 (r352232) +++ head/sys/fs/msdosfs/msdosfs_fat.c Wed Sep 11 21:24:14 2019 (r352233) @@ -1117,7 +1117,7 @@ extendfile(struct denode *dep, u_long count, struct bu * ? (other errors from called routines) */ int -markvoldirty(struct msdosfsmount *pmp, int dirty) +markvoldirty_upgrade(struct msdosfsmount *pmp, bool dirty, bool rw_upgrade) { struct buf *bp; u_long bn, bo, bsize, byteoffset, fatval; @@ -1130,8 +1130,11 @@ markvoldirty(struct msdosfsmount *pmp, int dirty) if (FAT12(pmp)) return (0); - /* Can't change the bit on a read-only filesystem. */ - if (pmp->pm_flags & MSDOSFSMNT_RONLY) + /* +* Can't change the bit on a read-only filesystem, except as part of +* ro->rw upgrade. +*/ + if ((pmp->pm_flags & MSDOSFSMNT_RONLY) != 0 && !rw_upgrade) return (EROFS); /* @@ -1166,6 +1169,29 @@ markvoldirty(struct msdosfsmount *pmp, int dirty) fatval |= 0x8000; putushort(>b_data[bo], fatval); } + + /* +* The concern here is that a devvp may be readonly, without reporting +* itself as such through the usual channels. In that case, we'd like +* it if attempting to mount msdosfs rw didn't panic the system. +* +* markvoldirty is invoked as the first write on backing devvps when +* either msdosfs is mounted for the first time, or a ro mount is +* upgraded to rw. +* +* In either event, if a write error occurs dirtying the volume: +* - No user data has been permitted to be written to cache yet. +* - We can abort the high-level operation (mount, or ro->rw) safely. +* - We don't derive any benefit from leaving a zombie dirty buf in +* the cache that can not be cleaned or evicted. +* +* So, mark B_INVALONERR to have bwrite() -> brelse() detect that +* condition and force-invalidate our write to the block if it occurs. +* +* PR 210316 provides more context on the discovery and diagnosis of +* the problem, as well as earlier attempts to solve it. +*/ + bp->b_flags |= B_INVALONERR; /* Write out the modified FAT block synchronously. */ return (bwrite(bp)); Modified: head/sys/fs/msdosfs/msdosfs_vfsops.c == --- head/sys/fs/msdosfs/msdosfs_vfsops.cWed Sep 11 20:13:38 2019 (r352232) +++ head/sys/fs/msdosfs/msdosfs_vfsops.cWed Sep 11 21:24:14 2019
Re: svn commit: r352228 - head/sys/netinet
Small nitpick: On Wed, Sep 11, 2019 at 11:48 AM Andrew Gallatin wrote: > Note that on a system under a syn flood attack, arc4random() > becomes quite expensive, and the chacha_poly crypto that it calls arc4random uses chacha20 — there is no "poly" involved. Best, Conrad ___ 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: r352232 - stable/12/sbin/ping6
Author: asomers Date: Wed Sep 11 20:13:38 2019 New Revision: 352232 URL: https://svnweb.freebsd.org/changeset/base/352232 Log: MFC r350993, r350997, r351079-r351080, r351082, r351090, r351101-r351102 r350993: Consistently use the byteorder functions in the correct direction Though ntohs and htons are functionally identical, they have different meanings.Using the correct one helps to document the code. Submitted by: Ján Sučan Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision:https://reviews.freebsd.org/D21219 r350997: ping6: use the monotonic clock to measure durations Submitted by: Ján Sučan Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision:https://reviews.freebsd.org/D21226 r351079: ping6: quiet warning about unused copyright variable Submitted by: Ján Sučan Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision:https://reviews.freebsd.org/D21270 r351080: ping6: quiet an undefined variable warning GCC 4.2 isn't smart enough to know that this variable is already defined by the time it's used. Submitted by: Ján Sučan Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision:https://reviews.freebsd.org/D21269 r351082: ping6: fix uninitialized variable warning for intvl GCC isn't smart enough to realize that this variable was always initialized. Submitted by: Ján Sučan Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision:https://reviews.freebsd.org/D21271 r351090: ping6: Fix data type of the buffer for ancillary data of a received message The old code worked, but wasted some stack space. Submitted by: Ján Sučan Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision:https://reviews.freebsd.org/D21275 r351101: ping6: fix uninitialized variable warnings when MK_CASPER=no Submitted by: Ján Sučan Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision:https://reviews.freebsd.org/D21273 r351102: ping6: Fix alignment errors This fixes -Wcast-align errors when compiled with WARNS=6. Submitted by: Ján Sučan Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision:https://reviews.freebsd.org/D21217 Modified: stable/12/sbin/ping6/ping6.c Modified: stable/12/sbin/ping6/ping6.c == --- stable/12/sbin/ping6/ping6.cWed Sep 11 19:48:32 2019 (r352231) +++ stable/12/sbin/ping6/ping6.cWed Sep 11 20:13:38 2019 (r352232) @@ -65,6 +65,7 @@ * SUCH DAMAGE. */ +#if 0 #ifndef lint static const char copyright[] = "@(#) Copyright (c) 1989, 1993\n\ @@ -72,10 +73,9 @@ static const char copyright[] = #endif /* not lint */ #ifndef lint -#if 0 static char sccsid[] = "@(#)ping.c 8.1 (Berkeley) 6/5/93"; -#endif #endif /* not lint */ +#endif #include __FBSDID("$FreeBSD$"); @@ -107,7 +107,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include @@ -133,6 +132,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #ifdef IPSEC @@ -144,7 +144,7 @@ __FBSDID("$FreeBSD$"); struct tv32 { u_int32_t tv32_sec; - u_int32_t tv32_usec; + u_int32_t tv32_nsec; }; #define MAXPACKETLEN 131072 @@ -288,7 +288,6 @@ static void pr_rthdr(void *, size_t); static int pr_bitrange(u_int32_t, int, int); static void pr_retip(struct ip6_hdr *, u_char *); static void summary(void); -static void tvsub(struct timeval *, struct timeval *); static int setpolicy(int, char *); static char*nigroup(char *, int); static void usage(void); @@ -296,7 +295,7 @@ static void usage(void); int main(int argc, char *argv[]) { - struct timeval last, intvl; + struct timespec last, intvl; struct sockaddr_in6 from, *sin6; struct addrinfo hints, *res; struct sigaction si_sa; @@ -308,13 +307,14 @@ main(int argc, char *argv[]) int ip6optlen = 0; struct cmsghdr *scmsgp = NULL; /* For control (ancillary) data received from recvmsg() */ - struct cmsghdr cm[CONTROLLEN]; + u_char cm[CONTROLLEN]; #if defined(SO_SNDBUF) && defined(SO_RCVBUF) u_long lsockbufsize; int sockbufsize = 0; #endif int usepktinfo = 0; - struct in6_pktinfo *pktinfo = NULL; + struct in6_pktinfo pktinfo; + char *cmsg_pktinfo = NULL; struct ip6_rthdr *rthdr = NULL; #ifdef IPSEC_POLICY_IPSEC char *policy_in = NULL; @@ -333,7 +333,11 @@ main(int argc, char *argv[]) /* just to be sure */ memset(, 0, sizeof(smsghdr)); memset(, 0, sizeof(smsgiov)); + memset(, 0, sizeof(pktinfo)); +
svn commit: r352231 - head/lib/libc/sys
Author: asomers Date: Wed Sep 11 19:48:32 2019 New Revision: 352231 URL: https://svnweb.freebsd.org/changeset/base/352231 Log: getsockopt.2: clarify that SO_TIMESTAMP is not 100% reliable When SO_TIMESTAMP is set, the kernel will attempt to attach a timestamp as ancillary data to each IP datagram that is received on the socket. However, it may fail, for example due to insufficient memory. In that case the packet will still be received but not timestamp will be attached. Reviewed by: kib MFC after:3 days Differential Revision:https://reviews.freebsd.org/D21607 Modified: head/lib/libc/sys/getsockopt.2 Modified: head/lib/libc/sys/getsockopt.2 == --- head/lib/libc/sys/getsockopt.2 Wed Sep 11 19:29:40 2019 (r352230) +++ head/lib/libc/sys/getsockopt.2 Wed Sep 11 19:48:32 2019 (r352231) @@ -28,7 +28,7 @@ .\" @(#)getsockopt.2 8.4 (Berkeley) 5/2/95 .\" $FreeBSD$ .\" -.Dd February 10, 2019 +.Dd September 11, 2019 .Dt GETSOCKOPT 2 .Os .Sh NAME @@ -431,7 +431,8 @@ option is enabled on a .Dv SOCK_DGRAM socket, the .Xr recvmsg 2 -call will return a timestamp corresponding to when the datagram was received. +call may return a timestamp corresponding to when the datagram was received. +However, it may not, for example due to a resource shortage. The .Va msg_control field in the ___ 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: r352230 - in head: sys/fs/fuse tests/sys/fs/fusefs
Author: asomers Date: Wed Sep 11 19:29:40 2019 New Revision: 352230 URL: https://svnweb.freebsd.org/changeset/base/352230 Log: fusefs: Fix iosize for FUSE_WRITE in 7.8 compat mode When communicating with a FUSE server that implements version 7.8 (or older) of the FUSE protocol, the FUSE_WRITE request structure is 16 bytes shorter than normal. The protocol version check wasn't applied universally, leading to an extra 16 bytes being sent to such servers. The extra bytes were allocated and bzero()d, so there was no information disclosure. Reviewed by: emaste MFC after:3 days MFC-With: r350665 Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D21557 Modified: head/sys/fs/fuse/fuse_io.c head/tests/sys/fs/fusefs/mockfs.cc head/tests/sys/fs/fusefs/mockfs.hh Modified: head/sys/fs/fuse/fuse_io.c == --- head/sys/fs/fuse/fuse_io.c Wed Sep 11 18:54:45 2019(r352229) +++ head/sys/fs/fuse/fuse_io.c Wed Sep 11 19:29:40 2019(r352230) @@ -555,9 +555,17 @@ fuse_write_directbackend(struct vnode *vp, struct uio fdisp_init(, 0); while (uio->uio_resid > 0) { + size_t sizeof_fwi; + + if (fuse_libabi_geq(data, 7, 9)) { + sizeof_fwi = sizeof(*fwi); + } else { + sizeof_fwi = FUSE_COMPAT_WRITE_IN_SIZE; + } + chunksize = MIN(uio->uio_resid, data->max_write); - fdi.iosize = sizeof(*fwi) + chunksize; + fdi.iosize = sizeof_fwi + chunksize; fdisp_make_vp(, FUSE_WRITE, vp, uio->uio_td, cred); fwi = fdi.indata; @@ -567,11 +575,8 @@ fuse_write_directbackend(struct vnode *vp, struct uio fwi->write_flags = write_flags; if (fuse_libabi_geq(data, 7, 9)) { fwi->flags = fufh_type_2_fflags(fufh->fufh_type); - fwi_data = (char *)fdi.indata + sizeof(*fwi); - } else { - fwi_data = (char *)fdi.indata + - FUSE_COMPAT_WRITE_IN_SIZE; } + fwi_data = (char *)fdi.indata + sizeof_fwi; if ((err = uiomove(fwi_data, chunksize, uio))) break; @@ -629,7 +634,7 @@ retry: break; } else { /* Resend the unwritten portion of data */ - fdi.iosize = sizeof(*fwi) + diff; + fdi.iosize = sizeof_fwi + diff; /* Refresh fdi without clearing data buffer */ fdisp_refresh_vp(, FUSE_WRITE, vp, uio->uio_td, cred); Modified: head/tests/sys/fs/fusefs/mockfs.cc == --- head/tests/sys/fs/fusefs/mockfs.cc Wed Sep 11 18:54:45 2019 (r352229) +++ head/tests/sys/fs/fusefs/mockfs.cc Wed Sep 11 19:29:40 2019 (r352230) @@ -155,14 +155,15 @@ void sigint_handler(int __unused sig) { // Don't do anything except interrupt the daemon's read(2) call } -void MockFS::debug_request(const mockfs_buf_in ) +void MockFS::debug_request(const mockfs_buf_in , ssize_t buflen) { printf("%-11s ino=%2" PRIu64, opcode2opname(in.header.opcode), in.header.nodeid); if (verbosity > 1) { - printf(" uid=%5u gid=%5u pid=%5u unique=%" PRIu64 " len=%u", + printf(" uid=%5u gid=%5u pid=%5u unique=%" PRIu64 " len=%u" + " buflen=%zd", in.header.uid, in.header.gid, in.header.pid, - in.header.unique, in.header.len); + in.header.unique, in.header.len, buflen); } switch (in.header.opcode) { const char *name, *value; @@ -470,7 +471,7 @@ MockFS::~MockFS() { close(m_kq); } -void MockFS::audit_request(const mockfs_buf_in ) { +void MockFS::audit_request(const mockfs_buf_in , ssize_t buflen) { uint32_t inlen = in.header.len; size_t fih = sizeof(in.header); switch (in.header.opcode) { @@ -478,19 +479,24 @@ void MockFS::audit_request(const mockfs_buf_in ) { case FUSE_RMDIR: case FUSE_SYMLINK: case FUSE_UNLINK: - ASSERT_GT(inlen, fih) << "Missing request filename"; + EXPECT_GT(inlen, fih) << "Missing request filename"; + // No redundant information for checking buflen break; case FUSE_FORGET: - ASSERT_EQ(inlen, fih + sizeof(in.body.forget)); + EXPECT_EQ(inlen, fih + sizeof(in.body.forget)); + EXPECT_EQ((size_t)buflen, inlen); break;
svn commit: r352229 - head/sbin/ping
Author: asomers Date: Wed Sep 11 18:54:45 2019 New Revision: 352229 URL: https://svnweb.freebsd.org/changeset/base/352229 Log: ping: Verify whether a datagram timestamp was actually received. ping(8) uses SO_TIMESTAMP, which attaches a timestamp to each IP datagram at the time it's received by the kernel. Except that occasionally it doesn't. Add a check to see whether such a timestamp was actually set before trying to read it. This fixes segfaults that can happen when the kernel doesn't attach a timestamp. The bug has always existed, but prior to r351461 it manifested as an implausible round-trip-time, not a segfault. Reported by: pho MFC after:3 days MFC-With: 351461 Modified: head/sbin/ping/ping.c Modified: head/sbin/ping/ping.c == --- head/sbin/ping/ping.c Wed Sep 11 18:48:26 2019(r352228) +++ head/sbin/ping/ping.c Wed Sep 11 18:54:45 2019(r352229) @@ -931,7 +931,8 @@ main(int argc, char *const *argv) continue; } #ifdef SO_TIMESTAMP - if (cmsg->cmsg_level == SOL_SOCKET && + if (cmsg != NULL && + cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_TIMESTAMP && cmsg->cmsg_len == CMSG_LEN(sizeof *tv)) { /* Copy to avoid alignment problems: */ ___ 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: r352228 - head/sys/netinet
Author: gallatin Date: Wed Sep 11 18:48:26 2019 New Revision: 352228 URL: https://svnweb.freebsd.org/changeset/base/352228 Log: Avoid unneeded call to arc4random() in syncache_add() Don't call arc4random() unconditionally to initialize sc_iss, and then when syncookies are enabled, just overwrite it with the return value from from syncookie_generate(). Instead, only call arc4random() to initialize sc_iss when syncookies are not enabled. Note that on a system under a syn flood attack, arc4random() becomes quite expensive, and the chacha_poly crypto that it calls is one of the more expensive things happening on the system. Removing this unneeded arc4random() call reduces CPU from about 40% to about 35% in my test scenario (Broadwell Xeon, 6Mpps syn flood attack). Reviewed by: rrs, tuxen, bz Sponsored by: Netflix Differential Revision:https://reviews.freebsd.org/D21591 Modified: head/sys/netinet/tcp_syncache.c Modified: head/sys/netinet/tcp_syncache.c == --- head/sys/netinet/tcp_syncache.c Wed Sep 11 18:40:05 2019 (r352227) +++ head/sys/netinet/tcp_syncache.c Wed Sep 11 18:48:26 2019 (r352228) @@ -1543,7 +1543,6 @@ skip_alloc: sc->sc_todctx = todctx; #endif sc->sc_irs = th->th_seq; - sc->sc_iss = arc4random(); sc->sc_flags = 0; sc->sc_flowlabel = 0; @@ -1617,6 +1616,8 @@ skip_alloc: if (V_tcp_syncookies) sc->sc_iss = syncookie_generate(sch, sc); + else + sc->sc_iss = arc4random(); #ifdef INET6 if (autoflowlabel) { if (V_tcp_syncookies) ___ 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: r352227 - head/contrib/netbsd-tests/lib/libc/regex
Author: lwhsu Date: Wed Sep 11 18:40:05 2019 New Revision: 352227 URL: https://svnweb.freebsd.org/changeset/base/352227 Log: Only skip problematic test in CI env. PR: 237450 Sponsored by: The FreeBSD Foundation Modified: head/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c Modified: head/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c == --- head/contrib/netbsd-tests/lib/libc/regex/t_exhaust.cWed Sep 11 18:08:40 2019(r352226) +++ head/contrib/netbsd-tests/lib/libc/regex/t_exhaust.cWed Sep 11 18:40:05 2019(r352227) @@ -187,7 +187,8 @@ ATF_TC_BODY(regcomp_too_big, tc) struct rlimit limit; #if defined(__i386__) - atf_tc_skip("https://bugs.freebsd.org/237450;); + if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) + atf_tc_skip("https://bugs.freebsd.org/237450;); #endif limit.rlim_cur = limit.rlim_max = 256 * 1024 * 1024; ___ 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: r352226 - head/sbin/ping
Author: asomers Date: Wed Sep 11 18:08:40 2019 New Revision: 352226 URL: https://svnweb.freebsd.org/changeset/base/352226 Log: ping: fix a string in an error message MFC after:3 days Modified: head/sbin/ping/ping.c Modified: head/sbin/ping/ping.c == --- head/sbin/ping/ping.c Wed Sep 11 18:07:15 2019(r352225) +++ head/sbin/ping/ping.c Wed Sep 11 18:08:40 2019(r352226) @@ -719,7 +719,7 @@ main(int argc, char *const *argv) */ caph_cache_catpages(); if (caph_enter_casper() < 0) - err(1, "cap_enter"); + err(1, "caph_enter_casper"); cap_rights_init(, CAP_RECV, CAP_EVENT, CAP_SETSOCKOPT); if (caph_rights_limit(srecv, ) < 0) ___ 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: r352225 - head/sys/riscv/riscv
Author: kp Date: Wed Sep 11 18:07:15 2019 New Revision: 352225 URL: https://svnweb.freebsd.org/changeset/base/352225 Log: riscv: Add missing header r352218 missing an include statement, causing the build to fail. Submitted by: Nicholas O'Brien (nickisobrien_gmail.com) Sponsored by: Axiado Modified: head/sys/riscv/riscv/identcpu.c Modified: head/sys/riscv/riscv/identcpu.c == --- head/sys/riscv/riscv/identcpu.c Wed Sep 11 17:56:48 2019 (r352224) +++ head/sys/riscv/riscv/identcpu.c Wed Sep 11 18:07:15 2019 (r352225) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #ifdef FDT #include #include +#include #endif char machine[] = "riscv"; ___ 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: r352224 - in head/sys: amd64/linux amd64/linux32 arm64/linux i386/linux
Author: emaste Date: Wed Sep 11 17:56:48 2019 New Revision: 352224 URL: https://svnweb.freebsd.org/changeset/base/352224 Log: Update comments and ordering in linux*_dummy.c - sort alphabetically - getcpu arrived in Linux 2.6.19 - fanotify_* arrived in 2.6.36 Modified: head/sys/amd64/linux/linux_dummy.c head/sys/amd64/linux32/linux32_dummy.c head/sys/arm64/linux/linux_dummy.c head/sys/i386/linux/linux_dummy.c Modified: head/sys/amd64/linux/linux_dummy.c == --- head/sys/amd64/linux/linux_dummy.c Wed Sep 11 17:29:44 2019 (r352223) +++ head/sys/amd64/linux/linux_dummy.c Wed Sep 11 17:56:48 2019 (r352224) @@ -99,11 +99,13 @@ DUMMY(migrate_pages); DUMMY(unshare); /* Linux 2.6.17: */ DUMMY(splice); -DUMMY(tee); DUMMY(sync_file_range); +DUMMY(tee); DUMMY(vmsplice); /* Linux 2.6.18: */ DUMMY(move_pages); +/* Linux 2.6.19: */ +DUMMY(getcpu); /* Linux 2.6.22: */ DUMMY(signalfd); /* Linux 2.6.27: */ @@ -111,7 +113,7 @@ DUMMY(signalfd4); DUMMY(inotify_init1); /* Linux 2.6.31: */ DUMMY(perf_event_open); -/* Linux 2.6.38: */ +/* Linux 2.6.36: */ DUMMY(fanotify_init); DUMMY(fanotify_mark); /* Linux 2.6.39: */ @@ -120,7 +122,6 @@ DUMMY(open_by_handle_at); DUMMY(clock_adjtime); /* Linux 3.0: */ DUMMY(setns); -DUMMY(getcpu); /* Linux 3.2: */ DUMMY(process_vm_readv); DUMMY(process_vm_writev); Modified: head/sys/amd64/linux32/linux32_dummy.c == --- head/sys/amd64/linux32/linux32_dummy.c Wed Sep 11 17:29:44 2019 (r352223) +++ head/sys/amd64/linux32/linux32_dummy.c Wed Sep 11 17:56:48 2019 (r352224) @@ -119,7 +119,7 @@ DUMMY(signalfd4); DUMMY(inotify_init1); /* Linux 2.6.31: */ DUMMY(perf_event_open); -/* Linux 2.6.33: */ +/* Linux 2.6.36: */ DUMMY(fanotify_init); DUMMY(fanotify_mark); /* Linux 2.6.39: */ Modified: head/sys/arm64/linux/linux_dummy.c == --- head/sys/arm64/linux/linux_dummy.c Wed Sep 11 17:29:44 2019 (r352223) +++ head/sys/arm64/linux/linux_dummy.c Wed Sep 11 17:56:48 2019 (r352224) @@ -101,17 +101,19 @@ DUMMY(migrate_pages); DUMMY(unshare); /* Linux 2.6.17: */ DUMMY(splice); -DUMMY(tee); DUMMY(sync_file_range); +DUMMY(tee); DUMMY(vmsplice); /* Linux 2.6.18: */ DUMMY(move_pages); +/* Linux 2.6.19: */ +DUMMY(getcpu); /* Linux 2.6.27: */ DUMMY(signalfd4); DUMMY(inotify_init1); /* Linux 2.6.31: */ DUMMY(perf_event_open); -/* Linux 2.6.38: */ +/* Linux 2.6.36: */ DUMMY(fanotify_init); DUMMY(fanotify_mark); /* Linux 2.6.39: */ @@ -120,7 +122,6 @@ DUMMY(open_by_handle_at); DUMMY(clock_adjtime); /* Linux 3.0: */ DUMMY(setns); -DUMMY(getcpu); /* Linux 3.2: */ DUMMY(process_vm_readv); DUMMY(process_vm_writev); Modified: head/sys/i386/linux/linux_dummy.c == --- head/sys/i386/linux/linux_dummy.c Wed Sep 11 17:29:44 2019 (r352223) +++ head/sys/i386/linux/linux_dummy.c Wed Sep 11 17:56:48 2019 (r352224) @@ -115,7 +115,7 @@ DUMMY(signalfd4); DUMMY(inotify_init1); /* Linux 2.6.31: */ DUMMY(perf_event_open); -/* Linux 2.6.33: */ +/* Linux 2.6.36: */ DUMMY(fanotify_init); DUMMY(fanotify_mark); /* Linux 2.6.39: */ ___ 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: r352223 - head/sys/arm64/linux
Author: emaste Date: Wed Sep 11 17:29:44 2019 New Revision: 352223 URL: https://svnweb.freebsd.org/changeset/base/352223 Log: linuxulator: add stub arm64 linux_genassym.c This will be fleshed out in the future but allows us to build the arm64 linuxulator using the same infrastructure as x86. Added: head/sys/arm64/linux/linux_genassym.c (contents, props changed) Added: head/sys/arm64/linux/linux_genassym.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/linux/linux_genassym.c Wed Sep 11 17:29:44 2019 (r352223) @@ -0,0 +1,2 @@ +#include +__FBSDID("$FreeBSD$"); ___ 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: r352222 - in head/sys: amd64/linux amd64/linux32 arm64/linux i386/linux
Author: emaste Date: Wed Sep 11 17:05:49 2019 New Revision: 35 URL: https://svnweb.freebsd.org/changeset/base/35 Log: linuxulator: memfd_create first appeared in Linux 3.17 Reference: http://man7.org/linux/man-pages/man2/memfd_create.2.html Modified: head/sys/amd64/linux/linux_dummy.c head/sys/amd64/linux32/linux32_dummy.c head/sys/arm64/linux/linux_dummy.c head/sys/i386/linux/linux_dummy.c Modified: head/sys/amd64/linux/linux_dummy.c == --- head/sys/amd64/linux/linux_dummy.c Wed Sep 11 17:04:13 2019 (r352221) +++ head/sys/amd64/linux/linux_dummy.c Wed Sep 11 17:05:49 2019 (r35) @@ -131,9 +131,9 @@ DUMMY(finit_module); DUMMY(sched_setattr); DUMMY(sched_getattr); /* Linux 3.15: */ -DUMMY(memfd_create); DUMMY(kexec_file_load); /* Linux 3.17: */ +DUMMY(memfd_create); DUMMY(seccomp); /* Linux 3.18: */ DUMMY(bpf); Modified: head/sys/amd64/linux32/linux32_dummy.c == --- head/sys/amd64/linux32/linux32_dummy.c Wed Sep 11 17:04:13 2019 (r352221) +++ head/sys/amd64/linux32/linux32_dummy.c Wed Sep 11 17:05:49 2019 (r35) @@ -137,9 +137,8 @@ DUMMY(kcmp); DUMMY(finit_module); DUMMY(sched_setattr); DUMMY(sched_getattr); -/* Linux 3.15: */ -DUMMY(memfd_create); /* Linux 3.17: */ +DUMMY(memfd_create); DUMMY(seccomp); /* Linux 3.18: */ DUMMY(bpf); Modified: head/sys/arm64/linux/linux_dummy.c == --- head/sys/arm64/linux/linux_dummy.c Wed Sep 11 17:04:13 2019 (r352221) +++ head/sys/arm64/linux/linux_dummy.c Wed Sep 11 17:05:49 2019 (r35) @@ -130,9 +130,8 @@ DUMMY(kcmp); DUMMY(finit_module); DUMMY(sched_setattr); DUMMY(sched_getattr); -/* Linux 3.15: */ -DUMMY(memfd_create); /* Linux 3.17: */ +DUMMY(memfd_create); DUMMY(seccomp); /* Linux 3.18: */ DUMMY(bpf); Modified: head/sys/i386/linux/linux_dummy.c == --- head/sys/i386/linux/linux_dummy.c Wed Sep 11 17:04:13 2019 (r352221) +++ head/sys/i386/linux/linux_dummy.c Wed Sep 11 17:05:49 2019 (r35) @@ -133,9 +133,8 @@ DUMMY(kcmp); DUMMY(finit_module); DUMMY(sched_setattr); DUMMY(sched_getattr); -/* Linux 3.14: */ -DUMMY(memfd_create); /* Linux 3.17: */ +DUMMY(memfd_create); DUMMY(seccomp); /* Linux 3.18: */ DUMMY(bpf); ___ 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: r352221 - in head/sys: amd64/linux amd64/linux32 arm64/linux i386/linux
Author: emaste Date: Wed Sep 11 17:04:13 2019 New Revision: 352221 URL: https://svnweb.freebsd.org/changeset/base/352221 Log: linuxulator: seccomp syscall first appeared in Linux 3.17 Reference: http://man7.org/linux/man-pages/man2/seccomp.2.html Modified: head/sys/amd64/linux/linux_dummy.c head/sys/amd64/linux32/linux32_dummy.c head/sys/arm64/linux/linux_dummy.c head/sys/i386/linux/linux_dummy.c Modified: head/sys/amd64/linux/linux_dummy.c == --- head/sys/amd64/linux/linux_dummy.c Wed Sep 11 17:01:31 2019 (r352220) +++ head/sys/amd64/linux/linux_dummy.c Wed Sep 11 17:04:13 2019 (r352221) @@ -131,9 +131,10 @@ DUMMY(finit_module); DUMMY(sched_setattr); DUMMY(sched_getattr); /* Linux 3.15: */ -DUMMY(seccomp); DUMMY(memfd_create); DUMMY(kexec_file_load); +/* Linux 3.17: */ +DUMMY(seccomp); /* Linux 3.18: */ DUMMY(bpf); /* Linux 3.19: */ Modified: head/sys/amd64/linux32/linux32_dummy.c == --- head/sys/amd64/linux32/linux32_dummy.c Wed Sep 11 17:01:31 2019 (r352220) +++ head/sys/amd64/linux32/linux32_dummy.c Wed Sep 11 17:04:13 2019 (r352221) @@ -138,8 +138,9 @@ DUMMY(finit_module); DUMMY(sched_setattr); DUMMY(sched_getattr); /* Linux 3.15: */ -DUMMY(seccomp); DUMMY(memfd_create); +/* Linux 3.17: */ +DUMMY(seccomp); /* Linux 3.18: */ DUMMY(bpf); /* Linux 3.19: */ Modified: head/sys/arm64/linux/linux_dummy.c == --- head/sys/arm64/linux/linux_dummy.c Wed Sep 11 17:01:31 2019 (r352220) +++ head/sys/arm64/linux/linux_dummy.c Wed Sep 11 17:04:13 2019 (r352221) @@ -131,8 +131,9 @@ DUMMY(finit_module); DUMMY(sched_setattr); DUMMY(sched_getattr); /* Linux 3.15: */ -DUMMY(seccomp); DUMMY(memfd_create); +/* Linux 3.17: */ +DUMMY(seccomp); /* Linux 3.18: */ DUMMY(bpf); /* Linux 3.19: */ Modified: head/sys/i386/linux/linux_dummy.c == --- head/sys/i386/linux/linux_dummy.c Wed Sep 11 17:01:31 2019 (r352220) +++ head/sys/i386/linux/linux_dummy.c Wed Sep 11 17:04:13 2019 (r352221) @@ -134,8 +134,9 @@ DUMMY(finit_module); DUMMY(sched_setattr); DUMMY(sched_getattr); /* Linux 3.14: */ -DUMMY(seccomp); DUMMY(memfd_create); +/* Linux 3.17: */ +DUMMY(seccomp); /* Linux 3.18: */ DUMMY(bpf); /* Linux 3.19: */ ___ 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: r352220 - head/lib/libbsnmp/libbsnmp
Author: brooks Date: Wed Sep 11 17:01:31 2019 New Revision: 352220 URL: https://svnweb.freebsd.org/changeset/base/352220 Log: Avoid the use of the non-portable -D argument to ls. This was used to store the mtime of the source file in a commment in a generated header file. This is of little-to-no diagnostic value and the result doesn't even end up in the source tree. Reported by: arichardson Reviewed by: arichardson MFC after:1 days Sponsored by: DARPA, AFRL Differential Revision:https://reviews.freebsd.org/D21605 Modified: head/lib/libbsnmp/libbsnmp/Makefile Modified: head/lib/libbsnmp/libbsnmp/Makefile == --- head/lib/libbsnmp/libbsnmp/Makefile Wed Sep 11 16:24:03 2019 (r352219) +++ head/lib/libbsnmp/libbsnmp/Makefile Wed Sep 11 17:01:31 2019 (r352220) @@ -26,9 +26,7 @@ MAN= asn1.3 bsnmpagent.3 bsnmpclient.3 bsnmplib.3 snmptc.h : tc.def (\ - echo -n "/* autogenerated from tc.def; ";\ - ls -l -D "%F %T" ${.ALLSRC} | awk '{printf("%s %s", $$6, $$7)}';\ - echo "*/";\ + echo "/* autogenerated from tc.def */";\ echo "#ifndef snmptc_h_1529923773";\ echo "#define snmptc_h_1529923773";\ gensnmptree -E -f <${.ALLSRC};\ ___ 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: r352219 - head/tests/sys/kern
Author: lwhsu Date: Wed Sep 11 16:24:03 2019 New Revision: 352219 URL: https://svnweb.freebsd.org/changeset/base/352219 Log: Temporarily skip flakey test case sys.kern.ptrace_test.ptrace__getppid PR: 240510 Sponsored by: The FreeBSD Foundation Modified: head/tests/sys/kern/ptrace_test.c Modified: head/tests/sys/kern/ptrace_test.c == --- head/tests/sys/kern/ptrace_test.c Wed Sep 11 16:16:53 2019 (r352218) +++ head/tests/sys/kern/ptrace_test.c Wed Sep 11 16:24:03 2019 (r352219) @@ -1006,6 +1006,10 @@ ATF_TC_BODY(ptrace__getppid, tc) int cpipe[2], dpipe[2], status; char c; + if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) + atf_tc_skip("https://bugs.freebsd.org/240510;); + + ATF_REQUIRE(pipe(cpipe) == 0); ATF_REQUIRE((child = fork()) != -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: r352218 - head/sys/riscv/riscv
Author: kp Date: Wed Sep 11 16:16:53 2019 New Revision: 352218 URL: https://svnweb.freebsd.org/changeset/base/352218 Log: riscv: Small fix to CPU compatibility identification fdt_is_compatible_strict() inspects the first compatible property. We need to inspect the following properties for 'riscv'. ofw_bus_node_is_compatible() does a recursive search. This patch fixes "Can't find CPU" error message when bootverbose = true. Submitted by: Nicholas O'Brien (nickisobrien_gmail.com) Reviewed by: philip, kp Sponsored by: Axiado Differential Revision:https://reviews.freebsd.org/D21576 Modified: head/sys/riscv/riscv/identcpu.c Modified: head/sys/riscv/riscv/identcpu.c == --- head/sys/riscv/riscv/identcpu.c Wed Sep 11 16:06:05 2019 (r352217) +++ head/sys/riscv/riscv/identcpu.c Wed Sep 11 16:16:53 2019 (r352218) @@ -141,7 +141,7 @@ fill_elf_hwcap(void *dummy __unused) * ISAs, keep only the extension bits that are common to all harts. */ for (node = OF_child(node); node > 0; node = OF_peer(node)) { - if (!fdt_is_compatible_strict(node, "riscv")) { + if (!ofw_bus_node_is_compatible(node, "riscv")) { if (bootverbose) printf("fill_elf_hwcap: Can't find cpu\n"); return; ___ 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: r352217 - stable/12/sys/kern
Author: oshogbo Date: Wed Sep 11 16:06:05 2019 New Revision: 352217 URL: https://svnweb.freebsd.org/changeset/base/352217 Log: Fix miss merge in r352179. Modified: stable/12/sys/kern/kern_exit.c Modified: stable/12/sys/kern/kern_exit.c == --- stable/12/sys/kern/kern_exit.c Wed Sep 11 16:00:03 2019 (r352216) +++ stable/12/sys/kern/kern_exit.c Wed Sep 11 16:06:05 2019 (r352217) @@ -437,7 +437,6 @@ exit1(struct thread *td, int rval, int signo) LIST_REMOVE(p, p_hash); sx_xunlock(_lock); - sx_xlock(_lock); PROC_LOCK(p); p->p_flag &= ~(P_TRACED | P_PPWAIT | P_PPTRACE); PROC_UNLOCK(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: r352216 - head/usr.bin/locale
Author: yuripv Date: Wed Sep 11 16:00:03 2019 New Revision: 352216 URL: https://svnweb.freebsd.org/changeset/base/352216 Log: locale: initialize variables to make gcc happy Reported by: jenkins Modified: head/usr.bin/locale/locale.c Modified: head/usr.bin/locale/locale.c == --- head/usr.bin/locale/locale.cWed Sep 11 15:41:36 2019 (r352215) +++ head/usr.bin/locale/locale.cWed Sep 11 16:00:03 2019 (r352216) @@ -745,7 +745,7 @@ kwval_ltime(int id) { char *rval; struct sbuf *kwsbuf; - nl_item i, s_item, e_item; + nl_item i, s_item = 0, e_item = 0; switch (id) { case KW_TIME_DAY: ___ 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: r352215 - head/sys/netinet
Author: rrs Date: Wed Sep 11 15:41:36 2019 New Revision: 352215 URL: https://svnweb.freebsd.org/changeset/base/352215 Log: With the recent commit of ktls, we no longer have a sb_tls_flags, its just the sb_flags. Also the ratelimit code, now that the defintion is in sockbuf.h, does not need the ktls.h file (or its predecessor). Sponsored by: Netflix Inc Modified: head/sys/netinet/tcp_ratelimit.c Modified: head/sys/netinet/tcp_ratelimit.c == --- head/sys/netinet/tcp_ratelimit.cWed Sep 11 15:39:28 2019 (r352214) +++ head/sys/netinet/tcp_ratelimit.cWed Sep 11 15:41:36 2019 (r352215) @@ -45,9 +45,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#ifdef KERN_TLS -#include -#endif #include #include #include @@ -1069,7 +1066,7 @@ tcp_set_pacing_rate(struct tcpcb *tp, struct ifnet *if return (NULL); } #ifdef KERN_TLS - if (tp->t_inpcb->inp_socket->so_snd.sb_tls_flags & SB_TLS_IFNET) { + if (tp->t_inpcb->inp_socket->so_snd.sb_flags & SB_TLS_IFNET) { /* * We currently can't do both TLS and hardware * pacing ___ 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: r352214 - in head/usr.bin/locale: . tests
Author: yuripv Date: Wed Sep 11 15:39:28 2019 New Revision: 352214 URL: https://svnweb.freebsd.org/changeset/base/352214 Log: locale: more output fixes - make abday, day, abmon, mon, am_pm output quoting match linux - workaround localeconv() issue for mon_grouping and grouping (PR172215) - for other values not available in default locale, output -1 instead of 127 (CHAR_MAX) as returned by localeconv() With these changes, output of `locale` and `locale -k` for all keywords specified by POSIX exactly matches the linux one. PR: 237752 Reviewed by: bapt Differential Revision:https://reviews.freebsd.org/D21599 Added: head/usr.bin/locale/tests/no_flags_posix_messages.out (contents, props changed) head/usr.bin/locale/tests/no_flags_posix_monetary.out (contents, props changed) head/usr.bin/locale/tests/no_flags_posix_numeric.out (contents, props changed) head/usr.bin/locale/tests/no_flags_posix_time.out (contents, props changed) Modified: head/usr.bin/locale/locale.c head/usr.bin/locale/tests/Makefile head/usr.bin/locale/tests/k_flag_posix_monetary.out head/usr.bin/locale/tests/k_flag_posix_numeric.out head/usr.bin/locale/tests/k_flag_posix_time.out head/usr.bin/locale/tests/locale_test.sh Modified: head/usr.bin/locale/locale.c == --- head/usr.bin/locale/locale.cWed Sep 11 13:35:22 2019 (r352213) +++ head/usr.bin/locale/locale.cWed Sep 11 15:39:28 2019 (r352214) @@ -54,7 +54,7 @@ #include "setlocale.h" /* Local prototypes */ -char *format_grouping(const char *); +char *format_grouping(char *); void init_locales_list(void); void list_charmaps(void); void list_locales(void); @@ -119,6 +119,12 @@ enum { }; enum { + TYPE_NUM, + TYPE_STR, + TYPE_UNQ +}; + +enum { SRC_LINFO, SRC_LCONV, SRC_LTIME @@ -126,218 +132,218 @@ enum { static const struct _kwinfo { const char *name; - int isstr; /* true - string, false - number */ + int type; int catid; /* LC_* */ int source; int value_ref; const char *comment; } kwinfo [] = { - { "charmap",1, LC_CTYPE,SRC_LINFO, + { "charmap",TYPE_STR, LC_CTYPE, SRC_LINFO, CODESET, "" },/* hack */ /* LC_MONETARY - POSIX */ - { "int_curr_symbol",1, LC_MONETARY, SRC_LCONV, + { "int_curr_symbol",TYPE_STR, LC_MONETARY, SRC_LCONV, KW_INT_CURR_SYMBOL, "" }, - { "currency_symbol",1, LC_MONETARY, SRC_LCONV, + { "currency_symbol",TYPE_STR, LC_MONETARY, SRC_LCONV, KW_CURRENCY_SYMBOL, "" }, - { "mon_decimal_point", 1, LC_MONETARY, SRC_LCONV, + { "mon_decimal_point", TYPE_STR, LC_MONETARY, SRC_LCONV, KW_MON_DECIMAL_POINT, "" }, - { "mon_thousands_sep", 1, LC_MONETARY, SRC_LCONV, + { "mon_thousands_sep", TYPE_STR, LC_MONETARY, SRC_LCONV, KW_MON_THOUSANDS_SEP, "" }, - { "mon_grouping", 1, LC_MONETARY, SRC_LCONV, + { "mon_grouping", TYPE_UNQ, LC_MONETARY, SRC_LCONV, KW_MON_GROUPING, "" }, - { "positive_sign", 1, LC_MONETARY, SRC_LCONV, + { "positive_sign", TYPE_STR, LC_MONETARY, SRC_LCONV, KW_POSITIVE_SIGN, "" }, - { "negative_sign", 1, LC_MONETARY, SRC_LCONV, + { "negative_sign", TYPE_STR, LC_MONETARY, SRC_LCONV, KW_NEGATIVE_SIGN, "" }, - { "int_frac_digits",0, LC_MONETARY, SRC_LCONV, + { "int_frac_digits",TYPE_NUM, LC_MONETARY, SRC_LCONV, KW_INT_FRAC_DIGITS, "" }, - { "frac_digits",0, LC_MONETARY, SRC_LCONV, + { "frac_digits",TYPE_NUM, LC_MONETARY, SRC_LCONV, KW_FRAC_DIGITS, "" }, - { "p_cs_precedes", 0, LC_MONETARY, SRC_LCONV, + { "p_cs_precedes", TYPE_NUM, LC_MONETARY, SRC_LCONV, KW_P_CS_PRECEDES, "" }, - { "p_sep_by_space", 0, LC_MONETARY, SRC_LCONV, + { "p_sep_by_space", TYPE_NUM, LC_MONETARY, SRC_LCONV, KW_P_SEP_BY_SPACE, "" }, - { "n_cs_precedes", 0, LC_MONETARY, SRC_LCONV, + { "n_cs_precedes", TYPE_NUM, LC_MONETARY, SRC_LCONV, KW_N_CS_PRECEDES, "" }, - { "n_sep_by_space", 0, LC_MONETARY, SRC_LCONV, + { "n_sep_by_space", TYPE_NUM, LC_MONETARY, SRC_LCONV, KW_N_SEP_BY_SPACE, "" }, - { "p_sign_posn",0, LC_MONETARY, SRC_LCONV, + { "p_sign_posn",TYPE_NUM, LC_MONETARY, SRC_LCONV, KW_P_SIGN_POSN, "" }, - { "n_sign_posn",0, LC_MONETARY, SRC_LCONV, + { "n_sign_posn",TYPE_NUM, LC_MONETARY, SRC_LCONV, KW_N_SIGN_POSN, "" }, - {
svn commit: r352213 - head/sys/tools
Author: emaste Date: Wed Sep 11 13:35:22 2019 New Revision: 352213 URL: https://svnweb.freebsd.org/changeset/base/352213 Log: fw_stub.awk: use @generated tag in generated files Multiple tools use @generated to identify generated files (for example, in a review Phabricator will by default hide diffs in enerated files). Use the @generated tag in makesyscalls.sh as we've done for other generated files. Modified: head/sys/tools/fw_stub.awk Modified: head/sys/tools/fw_stub.awk == --- head/sys/tools/fw_stub.awk Wed Sep 11 13:34:19 2019(r352212) +++ head/sys/tools/fw_stub.awk Wed Sep 11 13:35:22 2019(r352213) @@ -123,8 +123,10 @@ ctmpfilename = cfilename ".tmp"; modname = opt_m; gsub(/[-\.]/, "_", modname); +# Avoid a literal generated file tag here. +generated = "@" "generated"; printc("/*\ - * Automatically generated by:\ + * Automatically " generated " by:\ * $FreeBSD$\ */"); printc("#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: r352212 - head/sbin/nvmecontrol
Author: imp Date: Wed Sep 11 13:34:19 2019 New Revision: 352212 URL: https://svnweb.freebsd.org/changeset/base/352212 Log: Assume all the short args have optional args so allocate space for the ':'. It's slightly wasteful, but much easier (and the savings in bytes at runtime would be tiny, but the code to do it larger). Submitted by: Sebastian Huber Modified: head/sbin/nvmecontrol/comnd.c Modified: head/sbin/nvmecontrol/comnd.c == --- head/sbin/nvmecontrol/comnd.c Wed Sep 11 13:27:10 2019 (r352211) +++ head/sbin/nvmecontrol/comnd.c Wed Sep 11 13:34:19 2019 (r352212) @@ -189,7 +189,7 @@ arg_parse(int argc, char * const * argv, const struct lopts = malloc((n + 2) * sizeof(struct option)); if (lopts == NULL) err(1, "option memory"); - p = shortopts = malloc((n + 3) * sizeof(char)); + p = shortopts = malloc((2 * n + 3) * sizeof(char)); if (shortopts == NULL) err(1, "shortopts memory"); idx = 0; ___ 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: r352211 - head/sbin/bectl
Author: kevans Date: Wed Sep 11 13:27:10 2019 New Revision: 352211 URL: https://svnweb.freebsd.org/changeset/base/352211 Log: bectl(8): Add a "check" command This command simply returns 0 at the moment and explicitly takes no arguments. This should be used by utilities wanting to see if bectl can operate on the system they're running, or with a specific root (`bectl -r`). It may grow more checks than "will libbe successfully init" in the future, but for now this is enough as that checks for the dataset mounted at "/" and that it looks capable of being a BE root (e.g. it's not a top-level dataset) bectl commands can now specify if they want to be silent, and this will turn off libbe_print_on_error so they can control the output as needed. This is already used in `bectl check`, and may be turned on in the future for some other commands where libbe errors are better suppressed as the failure mode may be obvious. Requested by: David Fullard MFC after:3 days Modified: head/sbin/bectl/bectl.8 head/sbin/bectl/bectl.c Modified: head/sbin/bectl/bectl.8 == --- head/sbin/bectl/bectl.8 Wed Sep 11 13:01:59 2019(r352210) +++ head/sbin/bectl/bectl.8 Wed Sep 11 13:27:10 2019(r352211) @@ -18,7 +18,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 4, 2019 +.Dd September 11, 2019 .Dt BECTL 8 .Os .Sh NAME @@ -30,6 +30,8 @@ .Op Fl t .Ar beName .Nm +.Cm check +.Nm .Cm create .Op Fl r .Op Fl e Brq Ar nonActiveBe | Ar beName Ns Cm @ Ns Ar snapshot @@ -103,6 +105,15 @@ as the default boot filesystem. If the .Op Fl t flag is given, this takes effect only for the next boot. +.It Xo +.Cm check +.Xc +Performs a silent sanity check on the current system. +If boot environments are supported and used, +.Nm +will exit with a status code of 0. +Any other status code is not currently defined and may, in the future, grow +special meaning for different degrees of sanity check failures. .It Xo .Cm create .Op Fl r Modified: head/sbin/bectl/bectl.c == --- head/sbin/bectl/bectl.c Wed Sep 11 13:01:59 2019(r352210) +++ head/sbin/bectl/bectl.c Wed Sep 11 13:27:10 2019(r352211) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include "bectl.h" static int bectl_cmd_activate(int argc, char *argv[]); +static int bectl_cmd_check(int argc, char *argv[]); static int bectl_cmd_create(int argc, char *argv[]); static int bectl_cmd_destroy(int argc, char *argv[]); static int bectl_cmd_export(int argc, char *argv[]); @@ -72,6 +73,7 @@ usage(bool explicit) "\tbectl add (path)*\n" #endif "\tbectl activate [-t] beName\n" + "\tbectl check\n" "\tbectl create [-r] [-e {nonActiveBe | beName@snapshot}] beName\n" "\tbectl create [-r] beName@snapshot\n" "\tbectl destroy [-F] {beName | beName@snapshot}\n" @@ -97,40 +99,40 @@ usage(bool explicit) struct command_map_entry { const char *command; int (*fn)(int argc, char *argv[]); + /* True if libbe_print_on_error should be disabled */ + bool silent; }; static struct command_map_entry command_map[] = { - { "activate", bectl_cmd_activate }, - { "create", bectl_cmd_create }, - { "destroy", bectl_cmd_destroy }, - { "export", bectl_cmd_export }, - { "import", bectl_cmd_import }, + { "activate", bectl_cmd_activate,false }, + { "create", bectl_cmd_create, false }, + { "destroy", bectl_cmd_destroy, false }, + { "export", bectl_cmd_export, false }, + { "import", bectl_cmd_import, false }, #if SOON - { "add", bectl_cmd_add }, + { "add", bectl_cmd_add, false }, #endif - { "jail", bectl_cmd_jail }, - { "list", bectl_cmd_list }, - { "mount",bectl_cmd_mount}, - { "rename", bectl_cmd_rename }, - { "unjail", bectl_cmd_unjail }, - { "unmount", bectl_cmd_unmount }, + { "jail", bectl_cmd_jail,false }, + { "list", bectl_cmd_list,false }, + { "mount",bectl_cmd_mount, false }, + { "rename", bectl_cmd_rename, false }, + { "unjail", bectl_cmd_unjail, false }, + { "unmount", bectl_cmd_unmount, false }, + { "check",bectl_cmd_check, true}, }; -static int -get_cmd_index(const char *cmd, int *idx) +static struct command_map_entry * +get_cmd_info(const char *cmd) { - int map_size; + size_t i; - map_size = nitems(command_map); - for (int i = 0; i < map_size; ++i) { - if (strcmp(cmd, command_map[i].command) == 0) { - *idx = i; - return (0); - } + for (i = 0; i < nitems(command_map); ++i) { +
svn commit: r352210 - in head/sys: amd64/linux amd64/linux32 arm64/linux compat/linux i386/linux
Author: emaste Date: Wed Sep 11 13:01:59 2019 New Revision: 352210 URL: https://svnweb.freebsd.org/changeset/base/352210 Log: linux: add trivial renameat2 implementation Just return EINVAL if flags != 0. The Linux man page documents one case of EINVAL as "The filesystem does not support one of the flags in flags." After r351723 userland binaries will try using new system calls. Reported by: mjg Reviewed by: mjg, trasz Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D21590 Modified: head/sys/amd64/linux/linux_dummy.c head/sys/amd64/linux32/linux32_dummy.c head/sys/arm64/linux/linux_dummy.c head/sys/compat/linux/linux_file.c head/sys/i386/linux/linux_dummy.c Modified: head/sys/amd64/linux/linux_dummy.c == --- head/sys/amd64/linux/linux_dummy.c Wed Sep 11 12:58:53 2019 (r352209) +++ head/sys/amd64/linux/linux_dummy.c Wed Sep 11 13:01:59 2019 (r352210) @@ -130,8 +130,6 @@ DUMMY(kcmp); DUMMY(finit_module); DUMMY(sched_setattr); DUMMY(sched_getattr); -/* Linux 3.14: */ -DUMMY(renameat2); /* Linux 3.15: */ DUMMY(seccomp); DUMMY(memfd_create); Modified: head/sys/amd64/linux32/linux32_dummy.c == --- head/sys/amd64/linux32/linux32_dummy.c Wed Sep 11 12:58:53 2019 (r352209) +++ head/sys/amd64/linux32/linux32_dummy.c Wed Sep 11 13:01:59 2019 (r352210) @@ -137,8 +137,6 @@ DUMMY(kcmp); DUMMY(finit_module); DUMMY(sched_setattr); DUMMY(sched_getattr); -/* Linux 3.14: */ -DUMMY(renameat2); /* Linux 3.15: */ DUMMY(seccomp); DUMMY(memfd_create); Modified: head/sys/arm64/linux/linux_dummy.c == --- head/sys/arm64/linux/linux_dummy.c Wed Sep 11 12:58:53 2019 (r352209) +++ head/sys/arm64/linux/linux_dummy.c Wed Sep 11 13:01:59 2019 (r352210) @@ -130,8 +130,6 @@ DUMMY(kcmp); DUMMY(finit_module); DUMMY(sched_setattr); DUMMY(sched_getattr); -/* Linux 3.14: */ -DUMMY(renameat2); /* Linux 3.15: */ DUMMY(seccomp); DUMMY(memfd_create); Modified: head/sys/compat/linux/linux_file.c == --- head/sys/compat/linux/linux_file.c Wed Sep 11 12:58:53 2019 (r352209) +++ head/sys/compat/linux/linux_file.c Wed Sep 11 13:01:59 2019 (r352210) @@ -686,8 +686,28 @@ linux_rename(struct thread *td, struct linux_rename_ar int linux_renameat(struct thread *td, struct linux_renameat_args *args) { + struct linux_renameat2_args renameat2_args = { + .olddfd = args->olddfd, + .oldname = args->oldname, + .newdfd = args->newdfd, + .newname = args->newname, + .flags = 0 + }; + + return (linux_renameat2(td, _args)); +} + +int +linux_renameat2(struct thread *td, struct linux_renameat2_args *args) +{ char *from, *to; int error, olddfd, newdfd; + + if (args->flags != 0) { + linux_msg(td, "renameat2 unsupported flags 0x%x\n", + args->flags); + return (EINVAL); + } olddfd = (args->olddfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->olddfd; newdfd = (args->newdfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->newdfd; Modified: head/sys/i386/linux/linux_dummy.c == --- head/sys/i386/linux/linux_dummy.c Wed Sep 11 12:58:53 2019 (r352209) +++ head/sys/i386/linux/linux_dummy.c Wed Sep 11 13:01:59 2019 (r352210) @@ -134,8 +134,6 @@ DUMMY(finit_module); DUMMY(sched_setattr); DUMMY(sched_getattr); /* Linux 3.14: */ -DUMMY(renameat2); -/* Linux 3.15: */ DUMMY(seccomp); DUMMY(memfd_create); /* Linux 3.18: */ ___ 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: r352209 - in head/sys: amd64/linux amd64/linux32 arm64/linux i386/linux
Author: emaste Date: Wed Sep 11 12:58:53 2019 New Revision: 352209 URL: https://svnweb.freebsd.org/changeset/base/352209 Log: regen linuxulator sysent after r352208 Modified: head/sys/amd64/linux/linux_proto.h head/sys/amd64/linux/linux_systrace_args.c head/sys/amd64/linux32/linux32_proto.h head/sys/amd64/linux32/linux32_systrace_args.c head/sys/arm64/linux/linux_proto.h head/sys/arm64/linux/linux_systrace_args.c head/sys/i386/linux/linux_proto.h head/sys/i386/linux/linux_systrace_args.c Modified: head/sys/amd64/linux/linux_proto.h == --- head/sys/amd64/linux/linux_proto.h Wed Sep 11 12:58:06 2019 (r352208) +++ head/sys/amd64/linux/linux_proto.h Wed Sep 11 12:58:53 2019 (r352209) @@ -1125,9 +1125,9 @@ struct linux_sched_getattr_args { char flags_l_[PADL_(l_uint)]; l_uint flags; char flags_r_[PADR_(l_uint)]; }; struct linux_renameat2_args { - char oldfd_l_[PADL_(l_int)]; l_int oldfd; char oldfd_r_[PADR_(l_int)]; + char olddfd_l_[PADL_(l_int)]; l_int olddfd; char olddfd_r_[PADR_(l_int)]; char oldname_l_[PADL_(const char *)]; const char * oldname; char oldname_r_[PADR_(const char *)]; - char newfd_l_[PADL_(l_int)]; l_int newfd; char newfd_r_[PADR_(l_int)]; + char newdfd_l_[PADL_(l_int)]; l_int newdfd; char newdfd_r_[PADR_(l_int)]; char newname_l_[PADL_(const char *)]; const char * newname; char newname_r_[PADR_(const char *)]; char flags_l_[PADL_(unsigned int)]; unsigned int flags; char flags_r_[PADR_(unsigned int)]; }; Modified: head/sys/amd64/linux/linux_systrace_args.c == --- head/sys/amd64/linux/linux_systrace_args.c Wed Sep 11 12:58:06 2019 (r352208) +++ head/sys/amd64/linux/linux_systrace_args.c Wed Sep 11 12:58:53 2019 (r352209) @@ -2297,9 +2297,9 @@ systrace_args(int sysnum, void *params, uint64_t *uarg /* linux_renameat2 */ case 316: { struct linux_renameat2_args *p = params; - iarg[0] = p->oldfd; /* l_int */ + iarg[0] = p->olddfd; /* l_int */ uarg[1] = (intptr_t) p->oldname; /* const char * */ - iarg[2] = p->newfd; /* l_int */ + iarg[2] = p->newdfd; /* l_int */ uarg[3] = (intptr_t) p->newname; /* const char * */ uarg[4] = p->flags; /* unsigned int */ *n_args = 5; Modified: head/sys/amd64/linux32/linux32_proto.h == --- head/sys/amd64/linux32/linux32_proto.h Wed Sep 11 12:58:06 2019 (r352208) +++ head/sys/amd64/linux32/linux32_proto.h Wed Sep 11 12:58:53 2019 (r352209) @@ -1199,9 +1199,9 @@ struct linux_sched_getattr_args { char flags_l_[PADL_(l_uint)]; l_uint flags; char flags_r_[PADR_(l_uint)]; }; struct linux_renameat2_args { - char oldfd_l_[PADL_(l_int)]; l_int oldfd; char oldfd_r_[PADR_(l_int)]; + char olddfd_l_[PADL_(l_int)]; l_int olddfd; char olddfd_r_[PADR_(l_int)]; char oldname_l_[PADL_(const char *)]; const char * oldname; char oldname_r_[PADR_(const char *)]; - char newfd_l_[PADL_(l_int)]; l_int newfd; char newfd_r_[PADR_(l_int)]; + char newdfd_l_[PADL_(l_int)]; l_int newdfd; char newdfd_r_[PADR_(l_int)]; char newname_l_[PADL_(const char *)]; const char * newname; char newname_r_[PADR_(const char *)]; char flags_l_[PADL_(unsigned int)]; unsigned int flags; char flags_r_[PADR_(unsigned int)]; }; Modified: head/sys/amd64/linux32/linux32_systrace_args.c == --- head/sys/amd64/linux32/linux32_systrace_args.c Wed Sep 11 12:58:06 2019(r352208) +++ head/sys/amd64/linux32/linux32_systrace_args.c Wed Sep 11 12:58:53 2019(r352209) @@ -2424,9 +2424,9 @@ systrace_args(int sysnum, void *params, uint64_t *uarg /* linux_renameat2 */ case 353: { struct linux_renameat2_args *p = params; - iarg[0] = p->oldfd; /* l_int */ + iarg[0] = p->olddfd; /* l_int */ uarg[1] = (intptr_t) p->oldname; /* const char * */ - iarg[2] = p->newfd; /* l_int */ + iarg[2] = p->newdfd; /* l_int */ uarg[3] = (intptr_t) p->newname; /* const char * */ uarg[4] = p->flags; /* unsigned int */ *n_args = 5; Modified: head/sys/arm64/linux/linux_proto.h == --- head/sys/arm64/linux/linux_proto.h Wed Sep 11 12:58:06 2019 (r352208) +++ head/sys/arm64/linux/linux_proto.h Wed Sep 11 12:58:53 2019 (r352209) @@ -971,9 +971,9 @@ struct linux_sched_getattr_args { char flags_l_[PADL_(l_uint)]; l_uint flags; char
svn commit: r352208 - in head/sys: amd64/linux amd64/linux32 arm64/linux i386/linux
Author: emaste Date: Wed Sep 11 12:58:06 2019 New Revision: 352208 URL: https://svnweb.freebsd.org/changeset/base/352208 Log: make linux_renameat2 args consistent with linux_renameat Use 'dfd' consistently for a directory fd. Modified: head/sys/amd64/linux/syscalls.master head/sys/amd64/linux32/syscalls.master head/sys/arm64/linux/syscalls.master head/sys/i386/linux/syscalls.master Modified: head/sys/amd64/linux/syscalls.master == --- head/sys/amd64/linux/syscalls.masterWed Sep 11 08:24:47 2019 (r352207) +++ head/sys/amd64/linux/syscalls.masterWed Sep 11 12:58:06 2019 (r352208) @@ -550,8 +550,8 @@ 315AUE_NULLSTD { int linux_sched_getattr(l_pid_t pid, \ void *attr, l_uint size, l_uint flags); } ; Linux 3.15: -316AUE_NULLSTD { int linux_renameat2(l_int oldfd, \ - const char *oldname, l_int newfd, \ +316AUE_NULLSTD { int linux_renameat2(l_int olddfd, \ + const char *oldname, l_int newdfd, \ const char *newname, unsigned int flags); } ; Linux 3.17: 317AUE_NULLSTD { int linux_seccomp(l_uint op, l_uint flags, \ Modified: head/sys/amd64/linux32/syscalls.master == --- head/sys/amd64/linux32/syscalls.master Wed Sep 11 08:24:47 2019 (r352207) +++ head/sys/amd64/linux32/syscalls.master Wed Sep 11 12:58:06 2019 (r352208) @@ -610,8 +610,8 @@ 352AUE_NULLSTD { int linux_sched_getattr(l_pid_t pid, \ void *attr, l_uint size, l_uint flags); } ; Linux 3.15: -353AUE_NULLSTD { int linux_renameat2(l_int oldfd, \ - const char *oldname, l_int newfd, \ +353AUE_NULLSTD { int linux_renameat2(l_int olddfd, \ + const char *oldname, l_int newdfd, \ const char *newname, unsigned int flags); } ; Linux 3.17: 354AUE_NULLSTD { int linux_seccomp(l_uint op, l_uint flags, \ Modified: head/sys/arm64/linux/syscalls.master == --- head/sys/arm64/linux/syscalls.masterWed Sep 11 08:24:47 2019 (r352207) +++ head/sys/arm64/linux/syscalls.masterWed Sep 11 12:58:06 2019 (r352208) @@ -1459,9 +1459,9 @@ } 276AUE_NULLSTD { int linux_renameat2( - l_int oldfd, + l_int olddfd, const char *oldname, - l_int newfd, + l_int newdfd, const char *newname, unsigned int flags ); Modified: head/sys/i386/linux/syscalls.master == --- head/sys/i386/linux/syscalls.master Wed Sep 11 08:24:47 2019 (r352207) +++ head/sys/i386/linux/syscalls.master Wed Sep 11 12:58:06 2019 (r352208) @@ -619,8 +619,8 @@ 352AUE_NULLSTD { int linux_sched_getattr(l_pid_t pid, \ void *attr, l_uint size, l_uint flags); } ; Linux 3.15: -353AUE_NULLSTD { int linux_renameat2(l_int oldfd, \ - const char *oldname, l_int newfd, \ +353AUE_NULLSTD { int linux_renameat2(l_int olddfd, \ + const char *oldname, l_int newdfd, \ const char *newname, unsigned int flags); } ; Linux 3.17: 354AUE_NULLSTD { int linux_seccomp(l_uint op, l_uint flags, \ ___ 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: r352207 - head/sys/compat/linuxkpi/common/src
Author: hselasky Date: Wed Sep 11 08:24:47 2019 New Revision: 352207 URL: https://svnweb.freebsd.org/changeset/base/352207 Log: Use true and false when dealing with bool type in the LinuxKPI. No functional change. MFC after:1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/src/linux_work.c Modified: head/sys/compat/linuxkpi/common/src/linux_work.c == --- head/sys/compat/linuxkpi/common/src/linux_work.cWed Sep 11 08:20:13 2019(r352206) +++ head/sys/compat/linuxkpi/common/src/linux_work.cWed Sep 11 08:24:47 2019(r352207) @@ -92,7 +92,7 @@ linux_work_exec_unblock(struct work_struct *work) { struct workqueue_struct *wq; struct work_exec *exec; - bool retval = 0; + bool retval = false; wq = work->work_queue; if (unlikely(wq == NULL)) @@ -102,7 +102,7 @@ linux_work_exec_unblock(struct work_struct *work) TAILQ_FOREACH(exec, >exec_head, entry) { if (exec->target == work) { exec->target = NULL; - retval = 1; + retval = true; break; } } @@ -144,14 +144,14 @@ linux_queue_work_on(int cpu __unused, struct workqueue case WORK_ST_EXEC: case WORK_ST_CANCEL: if (linux_work_exec_unblock(work) != 0) - return (1); + return (true); /* FALLTHROUGH */ case WORK_ST_IDLE: work->work_queue = wq; taskqueue_enqueue(wq->taskqueue, >work_task); - return (1); + return (true); default: - return (0); /* already on a queue */ + return (false); /* already on a queue */ } } @@ -181,7 +181,7 @@ linux_queue_delayed_work_on(int cpu, struct workqueue_ case WORK_ST_CANCEL: if (delay == 0 && linux_work_exec_unblock(>work) != 0) { dwork->timer.expires = jiffies; - return (1); + return (true); } /* FALLTHROUGH */ case WORK_ST_IDLE: @@ -201,9 +201,9 @@ linux_queue_delayed_work_on(int cpu, struct workqueue_ _delayed_work_timer_fn, dwork); mtx_unlock(>timer.mtx); } - return (1); + return (true); default: - return (0); /* already on a queue */ + return (false); /* already on a queue */ } } @@ -391,7 +391,7 @@ linux_cancel_delayed_work(struct delayed_work *dwork) if (linux_cancel_timer(dwork, 0)) { atomic_cmpxchg(>work.state, WORK_ST_CANCEL, WORK_ST_IDLE); - return (1); + return (true); } /* FALLTHROUGH */ case WORK_ST_TASK: @@ -399,11 +399,11 @@ linux_cancel_delayed_work(struct delayed_work *dwork) if (taskqueue_cancel(tq, >work.work_task, NULL) == 0) { atomic_cmpxchg(>work.state, WORK_ST_CANCEL, WORK_ST_IDLE); - return (1); + return (true); } /* FALLTHROUGH */ default: - return (0); + return (false); } } @@ -467,14 +467,14 @@ bool linux_flush_work(struct work_struct *work) { struct taskqueue *tq; - int retval; + bool retval; WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "linux_flush_work() might sleep"); switch (atomic_read(>state)) { case WORK_ST_IDLE: - return (0); + return (false); default: tq = work->work_queue->taskqueue; retval = taskqueue_poll_is_busy(tq, >work_task); @@ -492,14 +492,14 @@ bool linux_flush_delayed_work(struct delayed_work *dwork) { struct taskqueue *tq; - int retval; + bool retval; WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "linux_flush_delayed_work() might sleep"); switch (atomic_read(>work.state)) { case WORK_ST_IDLE: - return (0); + return (false); case WORK_ST_TIMER: if (linux_cancel_timer(dwork, 1)) linux_delayed_work_enqueue(dwork); @@ -523,9 +523,9 @@ linux_work_pending(struct work_struct *work) case WORK_ST_TIMER: case WORK_ST_TASK: case WORK_ST_CANCEL: - return (1); + return (true); default: - return (0); + return (false); } } @@ -539,12 +539,12 @@
svn commit: r352206 - head/sys/compat/linuxkpi/common/src
Author: hselasky Date: Wed Sep 11 08:20:13 2019 New Revision: 352206 URL: https://svnweb.freebsd.org/changeset/base/352206 Log: Fix synchronous work drain issue in the LinuxKPI. A work callback may restart itself. Loop in the drain function to see if the work has been rescheduled and stop the subsequent reschedules, if any. MFC after:1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/src/linux_work.c Modified: head/sys/compat/linuxkpi/common/src/linux_work.c == --- head/sys/compat/linuxkpi/common/src/linux_work.cWed Sep 11 07:53:49 2019(r352205) +++ head/sys/compat/linuxkpi/common/src/linux_work.cWed Sep 11 08:20:13 2019(r352206) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2017 Hans Petter Selasky + * Copyright (c) 2017-2019 Hans Petter Selasky * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -323,24 +323,26 @@ linux_cancel_work_sync(struct work_struct *work) [WORK_ST_CANCEL] = WORK_ST_IDLE,/* cancel and drain */ }; struct taskqueue *tq; + bool retval = false; WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "linux_cancel_work_sync() might sleep"); - +retry: switch (linux_update_state(>state, states)) { case WORK_ST_IDLE: case WORK_ST_TIMER: - return (0); + return (retval); case WORK_ST_EXEC: tq = work->work_queue->taskqueue; if (taskqueue_cancel(tq, >work_task, NULL) != 0) taskqueue_drain(tq, >work_task); - return (0); + goto retry; /* work may have restarted itself */ default: tq = work->work_queue->taskqueue; if (taskqueue_cancel(tq, >work_task, NULL) != 0) taskqueue_drain(tq, >work_task); - return (1); + retval = true; + goto retry; } } @@ -421,18 +423,19 @@ linux_cancel_delayed_work_sync(struct delayed_work *dw [WORK_ST_CANCEL] = WORK_ST_IDLE,/* cancel and drain */ }; struct taskqueue *tq; + bool retval = false; WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "linux_cancel_delayed_work_sync() might sleep"); - +retry: switch (linux_update_state(>work.state, states)) { case WORK_ST_IDLE: - return (0); + return (retval); case WORK_ST_EXEC: tq = dwork->work.work_queue->taskqueue; if (taskqueue_cancel(tq, >work.work_task, NULL) != 0) taskqueue_drain(tq, >work.work_task); - return (0); + goto retry; /* work may have restarted itself */ case WORK_ST_TIMER: case WORK_ST_CANCEL: if (linux_cancel_timer(dwork, 1)) { @@ -442,14 +445,16 @@ linux_cancel_delayed_work_sync(struct delayed_work *dw */ tq = dwork->work.work_queue->taskqueue; taskqueue_drain(tq, >work.work_task); - return (1); + retval = true; + goto retry; } /* FALLTHROUGH */ default: tq = dwork->work.work_queue->taskqueue; if (taskqueue_cancel(tq, >work.work_task, NULL) != 0) taskqueue_drain(tq, >work.work_task); - return (1); + retval = true; + goto retry; } } ___ 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: r352205 - head/sys/compat/linuxkpi/common/include/linux
Author: hselasky Date: Wed Sep 11 07:53:49 2019 New Revision: 352205 URL: https://svnweb.freebsd.org/changeset/base/352205 Log: Fix broken DECLARE_TASKLET() macro after r347852. MFC after:1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/interrupt.h Modified: head/sys/compat/linuxkpi/common/include/linux/interrupt.h == --- head/sys/compat/linuxkpi/common/include/linux/interrupt.h Wed Sep 11 07:03:17 2019(r352204) +++ head/sys/compat/linuxkpi/common/include/linux/interrupt.h Wed Sep 11 07:53:49 2019(r352205) @@ -197,8 +197,8 @@ struct tasklet_struct { unsigned long data; }; -#defineDECLARE_TASKLET(name, func, data) \ -struct tasklet_struct name = { { NULL, NULL }, func, ATOMIC_INIT(0), data } +#defineDECLARE_TASKLET(_name, _func, _data)\ +struct tasklet_struct _name = { .func = (_func), .data = (_data) } #definetasklet_hi_schedule(t) tasklet_schedule(t) ___ 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: r352204 - head/contrib/libedit
Author: bapt Date: Wed Sep 11 07:03:17 2019 New Revision: 352204 URL: https://svnweb.freebsd.org/changeset/base/352204 Log: 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 Modified: head/contrib/libedit/filecomplete.c head/contrib/libedit/histedit.h Modified: head/contrib/libedit/filecomplete.c == --- head/contrib/libedit/filecomplete.c Wed Sep 11 04:59:27 2019 (r352203) +++ head/contrib/libedit/filecomplete.c Wed Sep 11 07:03:17 2019 (r352204) @@ -823,3 +823,13 @@ _el_fn_complete(EditLine *el, int ch __attribute__((__ break_chars, NULL, NULL, (size_t)100, NULL, NULL, NULL, NULL); } + +/* + * el-compatible wrapper around rl_complete; needed for key binding + */ +/* ARGSUSED */ +unsigned char +_el_fn_sh_complete(EditLine *el, int ch) +{ + return _el_fn_complete(el, ch); +} Modified: head/contrib/libedit/histedit.h == --- head/contrib/libedit/histedit.h Wed Sep 11 04:59:27 2019 (r352203) +++ head/contrib/libedit/histedit.h Wed Sep 11 07:03:17 2019 (r352204) @@ -113,6 +113,7 @@ int el_parse(EditLine *, int, const char **); int el_set(EditLine *, int, ...); int el_get(EditLine *, int, ...); unsigned char _el_fn_complete(EditLine *, int); +unsigned char _el_fn_sh_complete(EditLine *, int); /* * el_set/el_get parameters ___ 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"