svn commit: r358870 - stable/12/usr.sbin/services_mkdb
Author: pfg Date: Wed Mar 11 05:45:33 2020 New Revision: 358870 URL: https://svnweb.freebsd.org/changeset/base/358870 Log: MFC r358154 (by delphij) Bump PROTOMAX: this matches the value on NetBSD and will be necessary for future updates. MFC r r358448; /etc/services: attempt to bring the database to this century. This is the result of splitting r358153 in two, in order to avoid a build system bug and being able to merge the change to previous releases.. 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. 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. Leave for now smtps, even though it conflicts with IANA's submissions. The change should have very little visibility, if any, but should be a step closer to the current IANA database. [1] https://web.mit.edu/kerberos/krb4-end-of-life.html Modified: stable/12/usr.sbin/services_mkdb/services stable/12/usr.sbin/services_mkdb/services_mkdb.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/services_mkdb/services == --- stable/12/usr.sbin/services_mkdb/services Wed Mar 11 04:55:20 2020 (r358869) +++ stable/12/usr.sbin/services_mkdb/services Wed Mar 11 05:45:33 2020 (r358870) @@ -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
svn commit: r358869 - vendor/misc-GNU/patch
Author: pfg Date: Wed Mar 11 04:55:20 2020 New Revision: 358869 URL: https://svnweb.freebsd.org/changeset/base/358869 Log: Remove GNU patch. This was actually dead and buried in 2004 (r128777), around 2013 I bogusly resurected it in case BSD patch didn't work out as planned. It did work out acceptably and we never used it all, so send it back to hades again. Of course newer incarnations live in the ports tree. Deleted: vendor/misc-GNU/patch/ ___ 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: r358868 - vendor/OpenBSD/dist/usr.bin/rcs
Author: pfg Date: Wed Mar 11 04:45:10 2020 New Revision: 358868 URL: https://svnweb.freebsd.org/changeset/base/358868 Log: Delete OpenBSD's variant of RCS. I mistakenly borught this on r282572 but it was never used. There was some interest for a replacement of the GNU version but unfortunately the code never passed the tests in the GNU testsuite and seemed to be poorly maintained. Eventually we moved the GNU version to the ports tree and ovided carerying RCS in base. Deleted: vendor/OpenBSD/dist/usr.bin/rcs/ ___ 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: r358867 - in head: sys/fs/fuse tests/sys/fs/fusefs
Author: asomers Date: Wed Mar 11 04:29:45 2020 New Revision: 358867 URL: https://svnweb.freebsd.org/changeset/base/358867 Log: fusefs: avoid cache corruption with buggy fuse servers The FUSE protocol allows the client (kernel) to cache a file's size, if the server (userspace daemon) allows it. A well-behaved daemon obviously should not change a file's size while a client has it cached. But a buggy daemon might. If the kernel ever detects that that has happened, then it should invalidate the entire cache for that file. Previously, we would not only cache stale data, but in the case of a file extension while we had the size cached, we accidentally extended the cache with zeros. PR: 244178 Reported by: Ben RUBSON Reviewed by: cem MFC after:2 weeks Differential Revision:https://reviews.freebsd.org/D24012 Added: head/tests/sys/fs/fusefs/cache.cc (contents, props changed) Modified: head/sys/fs/fuse/fuse_internal.c head/sys/fs/fuse/fuse_node.c head/sys/fs/fuse/fuse_node.h head/sys/fs/fuse/fuse_vnops.c head/tests/sys/fs/fusefs/Makefile head/tests/sys/fs/fusefs/getattr.cc head/tests/sys/fs/fusefs/io.cc head/tests/sys/fs/fusefs/utils.cc head/tests/sys/fs/fusefs/utils.hh Modified: head/sys/fs/fuse/fuse_internal.c == --- head/sys/fs/fuse/fuse_internal.cWed Mar 11 03:45:32 2020 (r358866) +++ head/sys/fs/fuse/fuse_internal.cWed Mar 11 04:29:45 2020 (r358867) @@ -857,6 +857,9 @@ fuse_internal_forget_send(struct mount *mp, fdisp_destroy(); } +SDT_PROBE_DEFINE2(fusefs, , internal, getattr_cache_incoherent, + "struct vnode*", "struct fuse_attr_out*"); + /* Fetch the vnode's attributes from the daemon*/ int fuse_internal_do_getattr(struct vnode *vp, struct vattr *vap, @@ -898,6 +901,24 @@ fuse_internal_do_getattr(struct vnode *vp, struct vatt if (fvdat->flag & FN_MTIMECHANGE) { fao->attr.mtime = old_mtime.tv_sec; fao->attr.mtimensec = old_mtime.tv_nsec; + } + if (vnode_isreg(vp) && + fvdat->cached_attrs.va_size != VNOVAL && + fao->attr.size != fvdat->cached_attrs.va_size) { + /* +* The server changed the file's size even though we had it +* cached! That's a server bug. +*/ + SDT_PROBE2(fusefs, , internal, getattr_cache_incoherent, vp, + fao); + printf("%s: cache incoherent on %s! " + "Buggy FUSE server detected. To prevent data corruption, " + "disable the data cache by mounting with -o direct_io, or " + "as directed otherwise by your FUSE server's " + "documentation\n", __func__, + vnode_mount(vp)->mnt_stat.f_mntonname); + int iosize = fuse_iosize(vp); + v_inval_buf_range(vp, 0, INT64_MAX, iosize); } fuse_internal_cache_attrs(vp, >attr, fao->attr_valid, fao->attr_valid_nsec, vap); Modified: head/sys/fs/fuse/fuse_node.c == --- head/sys/fs/fuse/fuse_node.cWed Mar 11 03:45:32 2020 (r358866) +++ head/sys/fs/fuse/fuse_node.cWed Mar 11 04:29:45 2020 (r358867) @@ -450,7 +450,8 @@ fuse_vnode_size(struct vnode *vp, off_t *filesize, str int error = 0; if (!(fvdat->flag & FN_SIZECHANGE) && - (VTOVA(vp) == NULL || fvdat->cached_attrs.va_size == VNOVAL)) + (!fuse_vnode_attr_cache_valid(vp) || + fvdat->cached_attrs.va_size == VNOVAL)) error = fuse_internal_do_getattr(vp, NULL, cred, td); if (!error) Modified: head/sys/fs/fuse/fuse_node.h == --- head/sys/fs/fuse/fuse_node.hWed Mar 11 03:45:32 2020 (r358866) +++ head/sys/fs/fuse/fuse_node.hWed Mar 11 04:29:45 2020 (r358867) @@ -134,13 +134,19 @@ struct fuse_fid { #define VTOFUD(vp) \ ((struct fuse_vnode_data *)((vp)->v_data)) #define VTOI(vp)(VTOFUD(vp)->nid) -static inline struct vattr* -VTOVA(struct vnode *vp) +static inline bool +fuse_vnode_attr_cache_valid(struct vnode *vp) { struct bintime now; getbinuptime(); - if (bintime_cmp(&(VTOFUD(vp)->attr_cache_timeout), , >)) + return (bintime_cmp(&(VTOFUD(vp)->attr_cache_timeout), , >)); +} + +static inline struct vattr* +VTOVA(struct vnode *vp) +{ + if (fuse_vnode_attr_cache_valid(vp)) return &(VTOFUD(vp)->cached_attrs); else return NULL; Modified: head/sys/fs/fuse/fuse_vnops.c == --- head/sys/fs/fuse/fuse_vnops.c Wed Mar 11 03:45:32 2020
svn commit: r358866 - svnadmin/conf
Author: philip Date: Wed Mar 11 03:45:32 2020 New Revision: 358866 URL: https://svnweb.freebsd.org/changeset/base/358866 Log: Welcome Nick O'Brien as a src committer. Nick's work on RISC-V should not go unpunished. kp and I will be his mentors. Approved by: core Modified: svnadmin/conf/access svnadmin/conf/mentors Modified: svnadmin/conf/access == --- svnadmin/conf/accessWed Mar 11 00:00:03 2020(r358865) +++ svnadmin/conf/accessWed Mar 11 03:45:32 2020(r358866) @@ -154,6 +154,7 @@ mw n_hibmadevnull netchild ngie +nick np nwhitehorn nyan Modified: svnadmin/conf/mentors == --- svnadmin/conf/mentors Wed Mar 11 00:00:03 2020(r358865) +++ svnadmin/conf/mentors Wed Mar 11 03:45:32 2020(r358866) @@ -26,6 +26,7 @@ leitaojhibbitsCo-mentor: nwhitehorn mahrensmckusick miwi araujo mjoras rstone +nick philip Co-mentor: kp ramken Co-mentor: mav scottphscottl Co-mentor: emaste, jhb thjjtl Co-mentor: bz ___ 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: r326052 - head/usr.bin/gzip
Hi Xin Li, Sorry to reply to an old commit. On Tue, Nov 21, 2017 at 12:14 AM Xin LI wrote: > > Author: delphij > Date: Tue Nov 21 08:14:30 2017 > New Revision: 326052 > URL: https://svnweb.freebsd.org/changeset/base/326052 > > Log: > Support SIGINFO. > ... > --- head/usr.bin/gzip/unpack.c Tue Nov 21 07:35:29 2017(r326051) > +++ head/usr.bin/gzip/unpack.c Tue Nov 21 08:14:30 2017(r326052) > ... > @@ -152,6 +155,9 @@ unpack_parse_header(int in, int out, char *pre, size_t > ssize_t bytesread; /* Bytes read from the file */ > int i, j, thisbyte; > > + if (prelen > sizeof hdr) > + maybe_err("prelen too long"); This check should perhaps be >=, rather than >. > + > /* Prepend the header buffer if we already read some data */ > if (prelen != 0) > memcpy(hdr, pre, prelen); > @@ -160,6 +166,7 @@ unpack_parse_header(int in, int out, char *pre, size_t > bytesread = read(in, hdr + prelen, PACK_HEADER_LENGTH - prelen); In the case where prelen == sizeof(hdr), we invoke read(, pointer past end of hdr, 0) above. This should have no effect, but looks unintended, and tickles Coverity (CID 1383554). > if (bytesread < 0) > maybe_err("Error reading pack header"); 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: r358865 - head/sys/cam
Author: imp Date: Wed Mar 11 00:00:03 2020 New Revision: 358865 URL: https://svnweb.freebsd.org/changeset/base/358865 Log: Eliminate camq_alloc() and camq_free() These are no longer needed now that it's embedded in cam_ccbq. They are also unused. Reviewed by: ken, chuck Differential Revision:https://reviews.freebsd.org/D24008 Modified: head/sys/cam/cam_queue.c head/sys/cam/cam_queue.h Modified: head/sys/cam/cam_queue.c == --- head/sys/cam/cam_queue.cTue Mar 10 23:59:58 2020(r358864) +++ head/sys/cam/cam_queue.cWed Mar 11 00:00:03 2020(r358865) @@ -54,21 +54,6 @@ static void heap_up(cam_pinfo **queue_array, int new_i static voidheap_down(cam_pinfo **queue_array, int index, int last_index); -struct camq * -camq_alloc(int size) -{ - struct camq *camq; - - camq = (struct camq *)malloc(sizeof(*camq), M_CAMQ, M_NOWAIT); - if (camq != NULL) { - if (camq_init(camq, size) != 0) { - free(camq, M_CAMQ); - camq = NULL; - } - } - return (camq); -} - int camq_init(struct camq *camq, int size) { @@ -96,15 +81,6 @@ camq_init(struct camq *camq, int size) * obtained a camq structure. The XPT should ensure that the queue * is empty before calling this routine. */ -void -camq_free(struct camq *queue) -{ - if (queue != NULL) { - camq_fini(queue); - free(queue, M_CAMQ); - } -} - void camq_fini(struct camq *queue) { Modified: head/sys/cam/cam_queue.h == --- head/sys/cam/cam_queue.hTue Mar 10 23:59:58 2020(r358864) +++ head/sys/cam/cam_queue.hWed Mar 11 00:00:03 2020(r358865) @@ -102,11 +102,6 @@ void cam_ccbq_free(struct cam_ccbq *ccbq); void cam_ccbq_fini(struct cam_ccbq *ccbq); /* - * Allocate and initialize a cam_queue structure. - */ -struct camq*camq_alloc(int size); - -/* * Resize a cam queue */ u_int32_t camq_resize(struct camq *queue, int new_size); @@ -115,13 +110,6 @@ u_int32_t camq_resize(struct camq *queue, int new_size * Initialize a camq structure. Return 0 on success, 1 on failure. */ intcamq_init(struct camq *camq, int size); - -/* - * Free a cam_queue structure. This should only be called if a controller - * driver failes somehow during its attach routine or is unloaded and has - * obtained a cam_queue structure. - */ -void camq_free(struct camq *queue); /* * Finialize any internal storage or state of a cam_queue. ___ 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: r358864 - head/sys/cam
Author: imp Date: Tue Mar 10 23:59:58 2020 New Revision: 358864 URL: https://svnweb.freebsd.org/changeset/base/358864 Log: Eliminate xpt_copy_path. It's used in exactly one place. In that place it's used so we can hold the lock on the device associated with the path (since we do a xpt_path_lock and unlock pair around the callback). Instead, inline taking and dropping the reference to the device so we can ensure we can unlock the mutex after the callback finishes if the path in the ccb that's queued to be processed by xpt_scanner_thread is destroyed while being processed. We don't actually need the path itself for anything other than dereferencing it to get the device to do the lock and unlock. This also makes the locking / use model for cam_path a little cleaner by eliminating a case where we needlessly copy the object. Reviewed by: chuck, chs, ken Differential Revision:https://reviews.freebsd.org/D24008 Modified: head/sys/cam/cam_xpt.c head/sys/cam/cam_xpt.h Modified: head/sys/cam/cam_xpt.c == --- head/sys/cam/cam_xpt.c Tue Mar 10 23:58:41 2020(r358863) +++ head/sys/cam/cam_xpt.c Tue Mar 10 23:59:58 2020(r358864) @@ -803,7 +803,8 @@ static void xpt_scanner_thread(void *dummy) { union ccb *ccb; - struct cam_path path; + struct mtx *mtx; + struct cam_ed *device; xpt_lock_buses(); for (;;) { @@ -815,15 +816,22 @@ xpt_scanner_thread(void *dummy) xpt_unlock_buses(); /* -* Since lock can be dropped inside and path freed -* by completion callback even before return here, -* take our own path copy for reference. +* We need to lock the device's mutex which we use as +* the path mutex. We can't do it directly because the +* cam_path in the ccb may wind up going away because +* the path lock may be dropped and the path retired in +* the completion callback. We do this directly to keep +* the reference counts in cam_path sane. We also have +* to copy the device pointer because ccb_h.path may +* be freed in the callback. */ - xpt_copy_path(, ccb->ccb_h.path); - xpt_path_lock(); + mtx = xpt_path_mtx(ccb->ccb_h.path); + device = ccb->ccb_h.path->device; + xpt_acquire_device(device); + mtx_lock(mtx); xpt_action(ccb); - xpt_path_unlock(); - xpt_release_path(); + mtx_unlock(mtx); + xpt_release_device(device); xpt_lock_buses(); } @@ -3686,15 +3694,6 @@ xpt_clone_path(struct cam_path **new_path_ptr, struct new_path = (struct cam_path *)malloc(sizeof(*path), M_CAMPATH, M_NOWAIT); if (new_path == NULL) return(CAM_RESRC_UNAVAIL); - xpt_copy_path(new_path, path); - *new_path_ptr = new_path; - return (CAM_REQ_CMP); -} - -void -xpt_copy_path(struct cam_path *new_path, struct cam_path *path) -{ - *new_path = *path; if (path->bus != NULL) xpt_acquire_bus(path->bus); @@ -3702,6 +3701,8 @@ xpt_copy_path(struct cam_path *new_path, struct cam_pa xpt_acquire_target(path->target); if (path->device != NULL) xpt_acquire_device(path->device); + *new_path_ptr = new_path; + return (CAM_REQ_CMP); } void Modified: head/sys/cam/cam_xpt.h == --- head/sys/cam/cam_xpt.h Tue Mar 10 23:58:41 2020(r358863) +++ head/sys/cam/cam_xpt.h Tue Mar 10 23:59:58 2020(r358864) @@ -140,8 +140,6 @@ cam_status xpt_compile_path(struct cam_path *new_path lun_id_t lun_id); cam_status xpt_clone_path(struct cam_path **new_path, struct cam_path *path); -void xpt_copy_path(struct cam_path *new_path, - struct cam_path *path); void xpt_release_path(struct cam_path *path); ___ 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: r358617 - vendor/ntp/4.2.8p14
so@ merges from stable to release. They might have this on their todo list. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. In message <1eae9570-af83-47c1-9a12-b1356de98...@www.fastmail.com>, "Dan Langil le" writes: > Hello, > > Is this likely to be merged into 12.1? > > I ask because it's tagged as vuln: > > https://vuxml.FreeBSD.org/freebsd/591a706b-5cdc-11ea-9a0a-206a8a720317.html > > I note 4.2.8p14 is available via the net/ntp port. My goal is to stop the al > ert. > > Thank you. > > On Wed, Mar 4, 2020, at 9:03 AM, Cy Schubert wrote: > > Author: cy > > Date: Wed Mar 4 14:03:53 2020 > > New Revision: 358617 > > URL: https://svnweb.freebsd.org/changeset/base/358617 > > > > Log: > > Tag ntp-4.2.8p14. > > > > Added: > > vendor/ntp/4.2.8p14/ > > - copied from r358616, vendor/ntp/dist/ > > ___ > > svn-src-ven...@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/svn-src-vendor > > To unsubscribe, send any mail to "svn-src-vendor-unsubscr...@freebsd.org" > > > > -- > Dan Langille > d...@langille.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"
svn commit: r358863 - in head: lib/libcam sys/cam sys/cam/ctl
Author: imp Date: Tue Mar 10 23:58:41 2020 New Revision: 358863 URL: https://svnweb.freebsd.org/changeset/base/358863 Log: Remove unused cam ccb flags These flags have been unused for some time. Some of them were in the CAM2 specification, but CAM has moved on a bit from that. Some were used in the old Pluto VideoSpace (and AirSpace) systems which had the video playback I/O scheduler in userspace, but have been unused since then. Reviewed by: chuck, ken Differential Revision: https://reviews.freebsd.org/D24008 Modified: head/lib/libcam/cam_cdbparse.3 head/sys/cam/cam_ccb.h head/sys/cam/ctl/ctl_frontend_cam_sim.c Modified: head/lib/libcam/cam_cdbparse.3 == --- head/lib/libcam/cam_cdbparse.3 Tue Mar 10 23:12:55 2020 (r358862) +++ head/lib/libcam/cam_cdbparse.3 Tue Mar 10 23:58:41 2020 (r358863) @@ -212,8 +212,6 @@ are the flags defined in /* CAM CCB flags */ typedef enum { CAM_CDB_POINTER = 0x0001,/* The CDB field is a pointer*/ - CAM_QUEUE_ENABLE = 0x0002,/* SIM queue actions are enabled */ - CAM_CDB_LINKED= 0x0004,/* CCB contains a linked CDB */ CAM_SCATTER_VALID = 0x0010,/* Scatter/gather list is valid */ CAM_DIS_AUTOSENSE = 0x0020,/* Disable autosense feature */ CAM_DIR_RESV = 0x,/* Data direction (00:reserved) */ @@ -221,8 +219,6 @@ typedef enum { CAM_DIR_OUT = 0x0080,/* Data direction (10:DATA OUT) */ CAM_DIR_NONE = 0x00C0,/* Data direction (11:no data) */ CAM_DIR_MASK = 0x00C0,/* Data direction Mask */ - CAM_SOFT_RST_OP = 0x0100,/* Use Soft reset alternative*/ - CAM_ENG_SYNC = 0x0200,/* Flush resid bytes on complete */ CAM_DEV_QFRZDIS = 0x0400,/* Disable DEV Q freezing */ CAM_DEV_QFREEZE = 0x0800,/* Freeze DEV Q on execution */ CAM_HIGH_POWER= 0x1000,/* Command takes a lot of power */ @@ -232,24 +228,11 @@ typedef enum { CAM_PASS_ERR_RECOVER = 0x0001,/* Pass driver does err. recovery*/ CAM_DIS_DISCONNECT= 0x0002,/* Disable disconnect */ CAM_SG_LIST_PHYS = 0x0004,/* SG list has physical addrs. */ - CAM_MSG_BUF_PHYS = 0x0008,/* Message buffer ptr is physical*/ - CAM_SNS_BUF_PHYS = 0x0010,/* Autosense data ptr is physical*/ CAM_DATA_PHYS = 0x0020,/* SG/Buffer data ptrs are phys. */ CAM_CDB_PHYS = 0x0040,/* CDB pointer is physical */ - CAM_ENG_SGLIST= 0x0080,/* SG list is for the HBA engine */ -/* Phase cognizant mode flags */ - CAM_DIS_AUTOSRP = 0x0100,/* Disable autosave/restore ptrs */ - CAM_DIS_AUTODISC = 0x0200,/* Disable auto disconnect */ - CAM_TGT_CCB_AVAIL = 0x0400,/* Target CCB available */ - CAM_TGT_PHASE_MODE= 0x0800,/* The SIM runs in phase mode */ - CAM_MSGB_VALID= 0x2000,/* Message buffer valid */ - CAM_STATUS_VALID = 0x4000,/* Status buffer valid */ - CAM_DATAB_VALID = 0x8000,/* Data buffer valid*/ - /* Host target Mode flags */ - CAM_TERM_IO = 0x2000,/* Terminate I/O Message sup.*/ - CAM_DISCONNECT= 0x4000,/* Disconnects are mandatory */ + CAM_SEND_SENSE= 0x0800,/* Send sense data with status */ CAM_SEND_STATUS = 0x8000,/* Send status after data phase */ } ccb_flags; .Ed Modified: head/sys/cam/cam_ccb.h == --- head/sys/cam/cam_ccb.h Tue Mar 10 23:12:55 2020(r358862) +++ head/sys/cam/cam_ccb.h Tue Mar 10 23:58:41 2020(r358863) @@ -61,8 +61,8 @@ /* CAM CCB flags */ typedef enum { CAM_CDB_POINTER = 0x0001,/* The CDB field is a pointer*/ - CAM_QUEUE_ENABLE= 0x0002,/* SIM queue actions are enabled */ - CAM_CDB_LINKED = 0x0004,/* CCB contains a linked CDB */ + CAM_unused1 = 0x0002, + CAM_unused2 = 0x0004, CAM_NEGOTIATE = 0x0008,/* * Perform transport negotiation * with this command. @@ -80,8 +80,8 @@ typedef enum { CAM_DATA_SG_PADDR = 0x00040010,/* Data type (011:sglist phys) */ CAM_DATA_BIO= 0x0020,/* Data type (100:bio) */ CAM_DATA_MASK = 0x00240010,/* Data type mask*/ - CAM_SOFT_RST_OP = 0x0100,/* Use Soft reset alternative*/ - CAM_ENG_SYNC= 0x0200,/* Flush resid bytes on
svn commit: r358862 - in head/share: examples/etc mk
Author: jkim Date: Tue Mar 10 23:12:55 2020 New Revision: 358862 URL: https://svnweb.freebsd.org/changeset/base/358862 Log: Add "tigerlake" CPUTYPE for x86 to catch up with Clang 10.0. Modified: head/share/examples/etc/make.conf head/share/mk/bsd.cpu.mk Modified: head/share/examples/etc/make.conf == --- head/share/examples/etc/make.conf Tue Mar 10 22:59:01 2020 (r358861) +++ head/share/examples/etc/make.conf Tue Mar 10 23:12:55 2020 (r358862) @@ -35,13 +35,14 @@ # k8-sse3, opteron, athlon64, athlon-fx, k8, athlon-mp, # athlon-xp, athlon-4, athlon-tbird, athlon, k7, geode, # k6-3, k6-2, k6 -# (Intel CPUs) cooperlake, cascadelake, tremont, goldmont-plus, -# icelake-server, icelake-client, cannonlake, knm, -# skylake-avx512, knl, goldmont, skylake, broadwell, -# haswell, ivybridge, sandybridge, westmere, nehalem, -# silvermont, bonnell, core2, core, nocona, pentium4m, -# pentium4, prescott, pentium3m, pentium3, pentium-m, -# pentium2, pentiumpro, pentium-mmx, pentium, i486 +# (Intel CPUs) tigerlake, cooperlake, cascadelake, tremont, +# goldmont-plus, icelake-server, icelake-client, +# cannonlake, knm, skylake-avx512, knl, goldmont, +# skylake, broadwell, haswell, ivybridge, sandybridge, +# westmere, nehalem, silvermont, bonnell, core2, core, +# nocona, pentium4m, pentium4, prescott, pentium3m, +# pentium3, pentium-m, pentium2, pentiumpro, pentium-mmx, +# pentium, i486 # (VIA CPUs) c7, c3-2, c3 # ARM architecture: armv5, armv5te, armv6, armv6t2, arm1176jzf-s, armv7, # armv7-a, armv7ve, generic-armv7-a, cortex-a5, Modified: head/share/mk/bsd.cpu.mk == --- head/share/mk/bsd.cpu.mkTue Mar 10 22:59:01 2020(r358861) +++ head/share/mk/bsd.cpu.mkTue Mar 10 23:12:55 2020(r358862) @@ -183,10 +183,10 @@ MACHINE_CPU = 3dnow mmx k6 k5 i586 MACHINE_CPU = mmx k6 k5 i586 . elif ${CPUTYPE} == "k5" MACHINE_CPU = k5 i586 -. elif ${CPUTYPE} == "cooperlake" || ${CPUTYPE} == "cascadelake" || \ -${CPUTYPE} == "icelake-server" || ${CPUTYPE} == "icelake-client" || \ -${CPUTYPE} == "cannonlake" || ${CPUTYPE} == "knm" || \ -${CPUTYPE} == "skylake-avx512" || ${CPUTYPE} == "knl" +. elif ${CPUTYPE} == "tigerlake" || ${CPUTYPE} == "cooperlake" || \ +${CPUTYPE} == "cascadelake" || ${CPUTYPE} == "icelake-server" || \ +${CPUTYPE} == "icelake-client" || ${CPUTYPE} == "cannonlake" || \ +${CPUTYPE} == "knm" || ${CPUTYPE} == "skylake-avx512" || ${CPUTYPE} == "knl" MACHINE_CPU = avx512 avx2 avx sse42 sse41 ssse3 sse3 sse2 sse i686 mmx i586 . elif ${CPUTYPE} == "skylake" || ${CPUTYPE} == "broadwell" || \ ${CPUTYPE} == "haswell" @@ -249,10 +249,10 @@ MACHINE_CPU = k8 3dnow sse3 . elif ${CPUTYPE} == "opteron" || ${CPUTYPE} == "athlon64" || \ ${CPUTYPE} == "athlon-fx" || ${CPUTYPE} == "k8" MACHINE_CPU = k8 3dnow -. elif ${CPUTYPE} == "cooperlake" || ${CPUTYPE} == "cascadelake" || \ -${CPUTYPE} == "icelake-server" || ${CPUTYPE} == "icelake-client" || \ -${CPUTYPE} == "cannonlake" || ${CPUTYPE} == "knm" || \ -${CPUTYPE} == "skylake-avx512" || ${CPUTYPE} == "knl" +. elif ${CPUTYPE} == "tigerlake" || ${CPUTYPE} == "cooperlake" || \ +${CPUTYPE} == "cascadelake" || ${CPUTYPE} == "icelake-server" || \ +${CPUTYPE} == "icelake-client" || ${CPUTYPE} == "cannonlake" || \ +${CPUTYPE} == "knm" || ${CPUTYPE} == "skylake-avx512" || ${CPUTYPE} == "knl" MACHINE_CPU = avx512 avx2 avx sse42 sse41 ssse3 sse3 . elif ${CPUTYPE} == "skylake" || ${CPUTYPE} == "broadwell" || \ ${CPUTYPE} == "haswell" ___ 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: r358861 - head/share/examples/etc
Author: jkim Date: Tue Mar 10 22:59:01 2020 New Revision: 358861 URL: https://svnweb.freebsd.org/changeset/base/358861 Log: - Remove CPUTYPE examples for sparc64. It is not supported since r358345. - Clean up CPUTYPE examples for x86. GCC 4.2.1 was removed by r358454. Modified: head/share/examples/etc/make.conf Modified: head/share/examples/etc/make.conf == --- head/share/examples/etc/make.conf Tue Mar 10 21:49:56 2020 (r358860) +++ head/share/examples/etc/make.conf Tue Mar 10 22:59:01 2020 (r358861) @@ -30,27 +30,19 @@ # NO_CPU_CFLAGS variable below. # Currently the following CPU types are recognized: # Intel x86 architecture: -# (AMD CPUs) amdfam10, opteron-sse3, athlon64-sse3, k8-sse3, -# opteron, athlon64, athlon-fx, k8, athlon-mp, -# athlon-xp, athlon-4, athlon-tbird, athlon, k7, -# geode, k6-3, k6-2, k6 -# (Intel CPUs) core2, core, nocona, pentium4m, pentium4, prescott, -# pentium3m, pentium3, pentium-m, pentium2, -# pentiumpro, pentium-mmx, pentium, i486 -# (VIA CPUs) c7, c3-2, c3 -# AMD64 architecture:amdfam10, opteron-sse3, athlon64-sse3, k8-sse3, -# opteron, athlon64, k8, core2, nocona -# SPARC-V9 architecture: v9 (generic 64-bit V9), ultrasparc (default -# if omitted), ultrasparc3 -# Additionally the following CPU types are recognized by clang: -# Intel x86 architecture (for both amd64 and i386): # (AMD CPUs) znver2, znver1, bdver4, bdver3, bdver2, bdver1, -# btver2, btver1 +# btver2, btver1, amdfam10, opteron-sse3, athlon64-sse3, +# k8-sse3, opteron, athlon64, athlon-fx, k8, athlon-mp, +# athlon-xp, athlon-4, athlon-tbird, athlon, k7, geode, +# k6-3, k6-2, k6 # (Intel CPUs) cooperlake, cascadelake, tremont, goldmont-plus, # icelake-server, icelake-client, cannonlake, knm, # skylake-avx512, knl, goldmont, skylake, broadwell, # haswell, ivybridge, sandybridge, westmere, nehalem, -# silvermont, bonnell +# silvermont, bonnell, core2, core, nocona, pentium4m, +# pentium4, prescott, pentium3m, pentium3, pentium-m, +# pentium2, pentiumpro, pentium-mmx, pentium, i486 +# (VIA CPUs) c7, c3-2, c3 # ARM architecture: armv5, armv5te, armv6, armv6t2, arm1176jzf-s, armv7, # armv7-a, armv7ve, generic-armv7-a, cortex-a5, # cortex-a7, cortex-a8, cortex-a9, cortex-a12, ___ 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: r358860 - head/sys/dev/cxgbe/tom
Author: np Date: Tue Mar 10 21:49:56 2020 New Revision: 358860 URL: https://svnweb.freebsd.org/changeset/base/358860 Log: cxgbe/t4_tom: The MSS in a FLOWC work request must not be 0. Submitted by: jhb@ MFC after:1 week Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/tom/t4_cpl_io.c Modified: head/sys/dev/cxgbe/tom/t4_cpl_io.c == --- head/sys/dev/cxgbe/tom/t4_cpl_io.c Tue Mar 10 21:44:20 2020 (r358859) +++ head/sys/dev/cxgbe/tom/t4_cpl_io.c Tue Mar 10 21:49:56 2020 (r358860) @@ -135,11 +135,12 @@ send_flowc_wr(struct toepcb *toep, struct tcpcb *tp) FLOWC_PARAM(PORT, pi->tx_chan); FLOWC_PARAM(IQID, toep->ofld_rxq->iq.abs_id); FLOWC_PARAM(SNDBUF, toep->params.sndbuf); - FLOWC_PARAM(MSS, toep->params.emss); if (tp) { + FLOWC_PARAM(MSS, toep->params.emss); FLOWC_PARAM(SNDNXT, tp->snd_nxt); FLOWC_PARAM(RCVNXT, tp->rcv_nxt); - } + } else + FLOWC_PARAM(MSS, 512); CTR6(KTR_CXGBE, "%s: tid %u, mss %u, sndbuf %u, snd_nxt 0x%x, rcv_nxt 0x%x", __func__, toep->tid, toep->params.emss, toep->params.sndbuf, ___ 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: r358859 - head/sys/dev/cxgbe
Author: np Date: Tue Mar 10 21:44:20 2020 New Revision: 358859 URL: https://svnweb.freebsd.org/changeset/base/358859 Log: cxgbe(4): Do not try to use 0 as an rx buffer address when the driver is already allocating from the safe zone and the allocation fails. This bug was introduced in r357481. MFC after:3 days Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/t4_sge.c == --- head/sys/dev/cxgbe/t4_sge.c Tue Mar 10 20:30:21 2020(r358858) +++ head/sys/dev/cxgbe/t4_sge.c Tue Mar 10 21:44:20 2020(r358859) @@ -4382,10 +4382,12 @@ refill_fl(struct adapter *sc, struct sge_fl *fl, int n MPASS(sd->cl == NULL); rxb = >sge.rx_buf_info[fl->zidx]; cl = uma_zalloc(rxb->zone, M_NOWAIT); - if (__predict_false(cl == NULL) && fl->zidx != fl->safe_zidx) { - rxb = >sge.rx_buf_info[fl->safe_zidx]; - cl = uma_zalloc(rxb->zone, M_NOWAIT); - if (__predict_false(cl == NULL)) + if (__predict_false(cl == NULL)) { + if (fl->zidx != fl->safe_zidx) { + rxb = >sge.rx_buf_info[fl->safe_zidx]; + cl = uma_zalloc(rxb->zone, M_NOWAIT); + } + if (cl == NULL) break; } fl->cl_allocated++; ___ 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: r358617 - vendor/ntp/4.2.8p14
Hello, Is this likely to be merged into 12.1? I ask because it's tagged as vuln: https://vuxml.FreeBSD.org/freebsd/591a706b-5cdc-11ea-9a0a-206a8a720317.html I note 4.2.8p14 is available via the net/ntp port. My goal is to stop the alert. Thank you. On Wed, Mar 4, 2020, at 9:03 AM, Cy Schubert wrote: > Author: cy > Date: Wed Mar 4 14:03:53 2020 > New Revision: 358617 > URL: https://svnweb.freebsd.org/changeset/base/358617 > > Log: > Tag ntp-4.2.8p14. > > Added: > vendor/ntp/4.2.8p14/ > - copied from r358616, vendor/ntp/dist/ > ___ > svn-src-ven...@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-vendor > To unsubscribe, send any mail to "svn-src-vendor-unsubscr...@freebsd.org" > -- Dan Langille d...@langille.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"
svn commit: r358858 - head/sbin/ipfw
Author: melifaro Date: Tue Mar 10 20:30:21 2020 New Revision: 358858 URL: https://svnweb.freebsd.org/changeset/base/358858 Log: Don't assume !IPv6 is IPv4 in ipfw(8) add_src() and add_dst(). Submitted by: Neel Chauhan MFC after:2 weeks Differential Revision:https://reviews.freebsd.org/D21812 Modified: head/sbin/ipfw/ipfw2.c Modified: head/sbin/ipfw/ipfw2.c == --- head/sbin/ipfw/ipfw2.c Tue Mar 10 20:25:36 2020(r358857) +++ head/sbin/ipfw/ipfw2.c Tue Mar 10 20:30:21 2020(r358858) @@ -3717,11 +3717,10 @@ add_src(ipfw_insn *cmd, char *av, u_char proto, int cb if (proto == IPPROTO_IPV6 || strcmp(av, "me6") == 0 || inet_pton(AF_INET6, host, ) == 1) ret = add_srcip6(cmd, av, cblen, tstate); - /* XXX: should check for IPv4, not !IPv6 */ - if (ret == NULL && (proto == IPPROTO_IP || strcmp(av, "me") == 0 || - inet_pton(AF_INET6, host, ) != 1)) + else if (proto == IPPROTO_IP || strcmp(av, "me") == 0 || + inet_pton(AF_INET, host, ) == 1) ret = add_srcip(cmd, av, cblen, tstate); - if (ret == NULL && strcmp(av, "any") != 0) + else if (ret == NULL && strcmp(av, "any") != 0) ret = cmd; return ret; @@ -3748,11 +3747,10 @@ add_dst(ipfw_insn *cmd, char *av, u_char proto, int cb if (proto == IPPROTO_IPV6 || strcmp(av, "me6") == 0 || inet_pton(AF_INET6, host, ) == 1) ret = add_dstip6(cmd, av, cblen, tstate); - /* XXX: should check for IPv4, not !IPv6 */ - if (ret == NULL && (proto == IPPROTO_IP || strcmp(av, "me") == 0 || - inet_pton(AF_INET6, host, ) != 1)) + else if (proto == IPPROTO_IP || strcmp(av, "me") == 0 || + inet_pton(AF_INET, host, ) == 1) ret = add_dstip(cmd, av, cblen, tstate); - if (ret == NULL && strcmp(av, "any") != 0) + else if (ret == NULL && strcmp(av, "any") != 0) ret = cmd; return ret; ___ 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: r358857 - head/lib/clang/libllvm
Author: dim Date: Tue Mar 10 20:25:36 2020 New Revision: 358857 URL: https://svnweb.freebsd.org/changeset/base/358857 Log: Move another file in libllvm from sources required for world, to sources required for bootstrap, as the PowerPC builds need this. Reported by: bdragon PR: 244251 MFC after:6 weeks X-MFC-With: 358851 Modified: head/lib/clang/libllvm/Makefile Modified: head/lib/clang/libllvm/Makefile == --- head/lib/clang/libllvm/Makefile Tue Mar 10 20:25:03 2020 (r358856) +++ head/lib/clang/libllvm/Makefile Tue Mar 10 20:25:36 2020 (r358857) @@ -842,7 +842,7 @@ SRCS_MIN+= Support/BranchProbability.cpp SRCS_MIN+= Support/BuryPointer.cpp SRCS_MIN+= Support/CachePruning.cpp SRCS_MIW+= Support/COM.cpp -SRCS_MIW+= Support/CRC.cpp +SRCS_MIN+= Support/CRC.cpp SRCS_MIN+= Support/Chrono.cpp SRCS_MIN+= Support/CodeGenCoverage.cpp SRCS_MIN+= Support/CommandLine.cpp ___ 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: r358856 - head/sys/kern
Author: kib Date: Tue Mar 10 20:25:03 2020 New Revision: 358856 URL: https://svnweb.freebsd.org/changeset/base/358856 Log: Fix signal delivery might be on sigfastblock clearing. When clearing sigfastblock, either by sigfastblock(UNSETPTR) call or implicitly on execve(2), kernel must check for pending signals and reschedule them if needed. E.g. on execve, all other threads are terminated, and current thread fast block pointer is cleaned. If any signal was left pending, it can now be delivered to the current thread, and we should prepare for ast() on return to userspace to notice the signals. Reported and tested by: pho Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/kern_sig.c Modified: head/sys/kern/kern_sig.c == --- head/sys/kern/kern_sig.cTue Mar 10 20:04:38 2020(r358855) +++ head/sys/kern/kern_sig.cTue Mar 10 20:25:03 2020(r358856) @@ -4107,7 +4107,8 @@ sigfastblock_clear(struct thread *td) if ((td->td_pflags & TDP_SIGFASTBLOCK) == 0) return; td->td_sigblock_val = 0; - resched = (td->td_pflags & TDP_SIGFASTPENDING) != 0; + resched = (td->td_pflags & TDP_SIGFASTPENDING) != 0 || + SIGPENDING(td); td->td_pflags &= ~(TDP_SIGFASTBLOCK | TDP_SIGFASTPENDING); if (resched) { p = td->td_proc; ___ 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: r358855 - in head/sys: kern sys
Author: kib Date: Tue Mar 10 20:04:38 2020 New Revision: 358855 URL: https://svnweb.freebsd.org/changeset/base/358855 Log: Return reschedule_signals() to being static again. It was used after sigfastblock_setpend() call in in ast() when current thread fast-blocks signals. Add a flag to sigfastblock_setpend() to request reschedule, and remove the direct use of the function from subr_trap.c Tested by:pho Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/kern_sig.c head/sys/kern/subr_trap.c head/sys/sys/signalvar.h Modified: head/sys/kern/kern_sig.c == --- head/sys/kern/kern_sig.cTue Mar 10 20:01:52 2020(r358854) +++ head/sys/kern/kern_sig.cTue Mar 10 20:04:38 2020(r358855) @@ -108,6 +108,7 @@ static int coredump(struct thread *); static int killpg1(struct thread *td, int sig, int pgid, int all, ksiginfo_t *ksi); static int issignal(struct thread *td); +static voidreschedule_signals(struct proc *p, sigset_t block, int flags); static int sigprop(int sig); static voidtdsigwakeup(struct thread *, int, sig_t, int); static int sig_suspend_threads(struct thread *, struct proc *, int); @@ -2683,7 +2684,7 @@ stopme: return (td->td_xsig); } -void +static void reschedule_signals(struct proc *p, sigset_t block, int flags) { struct sigacts *ps; @@ -4124,8 +4125,8 @@ sigfastblock_fetch(struct thread *td) (void)sigfastblock_fetch_sig(td, true, ); } -void -sigfastblock_setpend(struct thread *td) +static void +sigfastblock_setpend1(struct thread *td) { int res; uint32_t oldval; @@ -4152,5 +4153,19 @@ sigfastblock_setpend(struct thread *td) MPASS(res == 1); if (thread_check_susp(td, false) != 0) break; + } +} + +void +sigfastblock_setpend(struct thread *td, bool resched) +{ + struct proc *p; + + sigfastblock_setpend1(td); + if (resched) { + p = td->td_proc; + PROC_LOCK(p); + reschedule_signals(p, fastblock_mask, SIGPROCMASK_FASTBLK); + PROC_UNLOCK(p); } } Modified: head/sys/kern/subr_trap.c == --- head/sys/kern/subr_trap.c Tue Mar 10 20:01:52 2020(r358854) +++ head/sys/kern/subr_trap.c Tue Mar 10 20:04:38 2020(r358855) @@ -328,11 +328,7 @@ ast(struct trapframe *framep) sigfastblock_fetch(td); if ((td->td_pflags & TDP_SIGFASTBLOCK) != 0 && td->td_sigblock_val != 0) { - sigfastblock_setpend(td); - PROC_LOCK(p); - reschedule_signals(p, fastblock_mask, - SIGPROCMASK_FASTBLK); - PROC_UNLOCK(p); + sigfastblock_setpend(td, true); } else { PROC_LOCK(p); mtx_lock(>p_sigacts->ps_mtx); @@ -350,7 +346,7 @@ ast(struct trapframe *framep) * the postsig() loop was performed. */ if (td->td_pflags & TDP_SIGFASTPENDING) - sigfastblock_setpend(td); + sigfastblock_setpend(td, false); /* * We need to check to see if we have to exit or wait due to a Modified: head/sys/sys/signalvar.h == --- head/sys/sys/signalvar.hTue Mar 10 20:01:52 2020(r358854) +++ head/sys/sys/signalvar.hTue Mar 10 20:04:38 2020(r358855) @@ -393,7 +393,6 @@ voidpgsignal(struct pgrp *pgrp, int sig, int checkctt intpostsig(int sig); void kern_psignal(struct proc *p, int sig); intptracestop(struct thread *td, int sig, ksiginfo_t *si); -void reschedule_signals(struct proc *p, sigset_t block, int flags); void sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *retmask); struct sigacts *sigacts_alloc(void); void sigacts_copy(struct sigacts *dest, struct sigacts *src); @@ -406,7 +405,7 @@ int sigev_findtd(struct proc *p, struct sigevent *sige intsig_ffs(sigset_t *set); void sigfastblock_clear(struct thread *td); void sigfastblock_fetch(struct thread *td); -void sigfastblock_setpend(struct thread *td); +void sigfastblock_setpend(struct thread *td, bool resched); void siginit(struct proc *p); void signotify(struct thread *td); void sigqueue_delete(struct sigqueue *queue, int sig); ___ 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: r358854 - head/lib/clang/libllvmminimal
Author: dim Date: Tue Mar 10 20:01:52 2020 New Revision: 358854 URL: https://svnweb.freebsd.org/changeset/base/358854 Log: Add one additional file to libllvmminimal, to help the ppc64 bootstrap. Reported by: bdragon PR: 244251 MFC after:6 weeks X-MFC-With: 358851 Modified: head/lib/clang/libllvmminimal/Makefile Modified: head/lib/clang/libllvmminimal/Makefile == --- head/lib/clang/libllvmminimal/Makefile Tue Mar 10 19:52:19 2020 (r358853) +++ head/lib/clang/libllvmminimal/Makefile Tue Mar 10 20:01:52 2020 (r358854) @@ -58,6 +58,7 @@ SRCS+=Support/Unicode.cpp SRCS+= Support/VirtualFileSystem.cpp SRCS+= Support/Watchdog.cpp SRCS+= Support/WithColor.cpp +SRCS+= Support/YAMLParser.cpp SRCS+= Support/circular_raw_ostream.cpp SRCS+= Support/raw_ostream.cpp SRCS+= Support/regcomp.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: r358853 - in head/tests/sys: common netinet netinet6
Author: melifaro Date: Tue Mar 10 19:52:19 2020 New Revision: 358853 URL: https://svnweb.freebsd.org/changeset/base/358853 Log: Add basic IPv4/IPv6 forwarding tests. MFC after:2 weeks Differential Revision:https://reviews.freebsd.org/D24002 Added: head/tests/sys/common/sender.py (contents, props changed) head/tests/sys/netinet/forward.sh (contents, props changed) head/tests/sys/netinet6/forward6.sh (contents, props changed) Modified: head/tests/sys/common/Makefile head/tests/sys/netinet/Makefile head/tests/sys/netinet6/Makefile Modified: head/tests/sys/common/Makefile == --- head/tests/sys/common/Makefile Tue Mar 10 19:18:24 2020 (r358852) +++ head/tests/sys/common/Makefile Tue Mar 10 19:52:19 2020 (r358853) @@ -4,7 +4,9 @@ PACKAGE=tests TESTSDIR= ${TESTSBASE}/sys/common ${PACKAGE}FILES+= vnet.subr ${PACKAGE}FILES+= divert.py +${PACKAGE}FILES+= sender.py ${PACKAGE}FILESMODE_divert.py=0555 +${PACKAGE}FILESMODE_sender.py=0555 .include Added: head/tests/sys/common/sender.py == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/common/sender.py Tue Mar 10 19:52:19 2020 (r358853) @@ -0,0 +1,201 @@ +#!/usr/bin/env python +# - +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2020 Alexander V. Chernikov +# +# 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$ +# + + +from functools import partial +import socket +import scapy.all as sc +import argparse +import time + + +def parse_args(): +parser = argparse.ArgumentParser(description='divert socket tester') +parser.add_argument('--dip', type=str, help='destination packet IP') +parser.add_argument('--sip', type=str, help='source packet IP') +parser.add_argument('--dmac', type=str, help='packet dst mac') +parser.add_argument('--smac', type=str, help='packet src mac') +parser.add_argument('--iface', type=str, help='interface to use') +parser.add_argument('--test_name', type=str, required=True, +help='test name to run') +return parser.parse_args() + + +def send_packet(args, pkt): +sc.sendp(pkt, iface=args.iface, verbose=False) + + +def is_icmp6_echo_request(pkt): +return pkt.type == 0x86DD and pkt.payload.nh == 58 and \ +pkt.payload.payload.type == 128 + + +def check_forwarded_ip_packet(orig_pkt, fwd_pkt): +""" +Checks that forwarded ICMP packet @fwd_ptk is the same as +@orig_pkt. Assumes router-on-the-stick forwarding behaviour: + * src/dst macs are swapped + * TTL is decremented +""" +# Check ether fields +assert orig_pkt.src == fwd_pkt.dst +assert orig_pkt.dst == fwd_pkt.src +assert len(orig_pkt) == len(fwd_pkt) +# Check IP +fwd_ip = fwd_pkt[sc.IP] +orig_ip = orig_pkt[sc.IP] +assert orig_ip.src == orig_ip.src +assert orig_ip.dst == fwd_ip.dst +assert orig_ip.ttl == fwd_ip.ttl + 1 +# Check ICMP +fwd_icmp = fwd_ip[sc.ICMP] +orig_icmp = orig_ip[sc.ICMP] +assert bytes(orig_ip.payload) == bytes(fwd_ip.payload) + + +def fwd_ip_icmp_fast(args): +""" +Sends ICMP packet via args.iface interface. +Receives and checks the forwarded packet. +Assumes forwarding router decrements TTL +""" + +def filter_f(x): +return x.src == args.dmac and x.type == 0x0800 + +e = sc.Ether(src=args.smac, dst=args.dmac) +ip = sc.IP(src=args.sip, dst=args.dip) +icmp = sc.ICMP(type='echo-request') +pkt = e / ip / icmp + +send_cb =
Re: svn commit: r358733 - head/sys/sys
On Tue, Mar 10, 2020 at 12:22:09AM +0100, Mateusz Guzik wrote: > On 3/9/20, Konstantin Belousov wrote: > > On Mon, Mar 09, 2020 at 01:56:17AM +0100, Mateusz Guzik wrote: > >> On 3/8/20, Mateusz Guzik wrote: > >> > Author: mjg > >> > Date: Sun Mar 8 00:22:32 2020 > >> > New Revision: 358733 > >> > URL: https://svnweb.freebsd.org/changeset/base/358733 > >> > > >> > Log: > >> > seqc: tidy up > >> > > >> > - avoid hand-rolled read > >> > - match begin/end in terms of fence style > >> > > >> > >> There were off lists questions about this so let me clarify. > >> > >> The first bit is a cosmetic change, but the second one is not. > >> > >> > Modified: > >> > head/sys/sys/seqc.h > >> > > >> > Modified: head/sys/sys/seqc.h > >> > == > >> > --- head/sys/sys/seqc.h Sat Mar 7 15:37:23 2020(r358732) > >> > +++ head/sys/sys/seqc.h Sun Mar 8 00:22:32 2020(r358733) > >> > @@ -66,7 +66,8 @@ static __inline void > >> > seqc_write_end(seqc_t *seqcp) > >> > { > >> > > >> > -atomic_store_rel_int(seqcp, *seqcp + 1); > >> > +atomic_thread_fence_rel(); > >> > +*seqcp += 1; > >> > MPASS(!seqc_in_modify(*seqcp)); > >> > critical_exit(); > >> > } > >> > >> For correct operation the counter has to be modified *before* any work > >> is done and *after* it is completed. > >> > >> Consider a trivial case: > >> seqc++; > >> foo[0] = 0; > >> foo[1] = 1; > >> seqc++; > >> > >> There are 2 ways in which this can be mucked with: > >> - the compiler can be looking at reordering or reworking the increment > >> (e.g., to collapse it to just += 2 instead). a compiler barrier > >> prevents that. > >> - even with generated machine code which increments in correct places > >> the cpu can be looking at reordering the operation (which is heavily > >> dependent on architecture), in particular it could end up issuing > >> seqc++; foo[1] = 1; which would defeat the point. This is where > >> release fences come in. > >> > >> With the patched code there is: > >> seqc++; > >> atomic_thread_fence_rel(); /* make sure seqc++ is issued before foo > >> starts getting modified */ > >> foo[0] = 0; > >> foo[1] = 1; > >> atomic_thread_fence_rel(); /* make sure modifications to foo don't > >> leak past this spot */ > >> seqc++; > >> > >> In comparison, the previous code was: > >> seqc++; > >> atomic_thread_fence_rel(); /* make sure seqc++ is issued before foo > >> starts getting modified */ > >> foo[0] = 0; > >> foo[1] = 1; > >> atomic_store_rel_int(seqcp, *seqcp + 1); /* make sure modifications to > >> too don't leak past this spot and update seqc immediately */ > >> > >> There are 2 differences here -- one is an improvement and second one > >> does not matter: > >> the win is: the previous code forces the compiler to compute an > >> incremented value and then store it. On amd64 this translates to the > >> following (with rdx holding the address of the counter): > >> > >> mov(%rdx),%eax /* load the value */ > >> add$0x1,%eax/* add 1 */ > >> mov%eax,(%rdx) /* store it */ > >> > >> On patched kernel this is: > >> addl $0x1,(%rdx) > >> > >> which is clearly much nicer. > > I am not sure that the new code on amd64 is much nicer. > > > > But the point was that on non-amd64, i.e. armv8 and potentially on > > powerpc 3.0, the patch substitutes release store with full barrier. The > > later is (much) slower. > > > > If an arch performs something significantly more expensive here it's > probably a performance bug in the port. It is a question of how much hardware support for fine-grained fences. Relaxed architectures add some optimized operations already, but did not (yet) implemented complete C11 optimized set. I think they eventually converge. Until they did not, I think it is more important to not pessimize to-be Tier1 arches than to collapse three fast integer instructions on amd64 into one rw op. > But perhaps more importantly > there are significantly more frequent users of > atomic_thread_fence_rel, like refcount(9). If the issue is real that > should be looked at. For refcount(9) use of release fence removal, we would need atomic_fetchadd_rel_int(). > > >> > >> the not a problem: the code does not issue the release fence after > >> incrementing the counter the second time, meaning that in principle it > >> can happen arbitrarily late, possibly disturbing code which waits for > >> the counter to become even. This is not a problem because in whoever > >> modifies it is supposed to have a lock and release it shortly after, > >> which also posts the release fence and consequently makes sure the > >> counter update is visible. Also note these routines come with > >> preemption disablement around the modification -- if the thread gets > >> preempted as a result of critical_exit from seqc_write_end, it will > >> also publish the updated counter. If the updater never does anything > >> which
svn commit: r358852 - head/tests/sys/netpfil/pf
Author: lwhsu Date: Tue Mar 10 19:18:24 2020 New Revision: 358852 URL: https://svnweb.freebsd.org/changeset/base/358852 Log: Skip sys.netpfil.pf.nat.exhaust on amd64 in CI as it sometimes panics kernel PR: 244703 Sponsored by: The FreeBSD Foundation Modified: head/tests/sys/netpfil/pf/nat.sh Modified: head/tests/sys/netpfil/pf/nat.sh == --- head/tests/sys/netpfil/pf/nat.shTue Mar 10 18:17:17 2020 (r358851) +++ head/tests/sys/netpfil/pf/nat.shTue Mar 10 19:18:24 2020 (r358852) @@ -36,6 +36,11 @@ exhaust_head() exhaust_body() { + if [ "$(atf_config_get ci false)" = "true" ] && \ + [ "$(uname -p)" = "amd64" ]; then + atf_skip "https://bugs.freebsd.org/244703; + fi + pft_init epair_nat=$(vnet_mkepair) ___ 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: r358848 - in head/sys/amd64/vmm: intel io
On 3/10/20 9:53 AM, Michael Reifenberger wrote: > Author: mr > Date: Tue Mar 10 16:53:49 2020 > New Revision: 358848 > URL: https://svnweb.freebsd.org/changeset/base/358848 > > Log: > Untangle TPR shadowing and APIC virtualization. > This speeds up Windows guests tremendously. > > The patch does: > Add a new tuneable 'hw.vmm.vmx.use_tpr_shadowing' to disable TLP shadowing. > Also add 'hw.vmm.vmx.cap.tpr_shadowing' to be able to query if TPR > shadowing is used. > > Detach the initialization of TPR shadowing from the initialization of APIC > virtualization. > APIC virtualization still needs TPR shadowing, but not vice versa. > Any CPU that supports APIC virtualization should also support TPR shadowing. > > When TPR shadowing is used, the APIC page of each vCPU is written to the > VMCS_VIRTUAL_APIC field of the VMCS > so that the CPU can write directly to the page without intercept. > > On vm exit, vlapic_update_ppr() is called to update the PPR. > > Submitted by: Yamagi Burmeister > MFC after: 2 weeks > Differential Revision: https://reviews.freebsd.org/D22942 Reviewed by:grehan Also, it is still good form to wrap the commit logs to fit in 80 cols. -- John Baldwin ___ 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: r358848 - in head/sys/amd64/vmm: intel io
Author: mr Date: Tue Mar 10 16:53:49 2020 New Revision: 358848 URL: https://svnweb.freebsd.org/changeset/base/358848 Log: Untangle TPR shadowing and APIC virtualization. This speeds up Windows guests tremendously. The patch does: Add a new tuneable 'hw.vmm.vmx.use_tpr_shadowing' to disable TLP shadowing. Also add 'hw.vmm.vmx.cap.tpr_shadowing' to be able to query if TPR shadowing is used. Detach the initialization of TPR shadowing from the initialization of APIC virtualization. APIC virtualization still needs TPR shadowing, but not vice versa. Any CPU that supports APIC virtualization should also support TPR shadowing. When TPR shadowing is used, the APIC page of each vCPU is written to the VMCS_VIRTUAL_APIC field of the VMCS so that the CPU can write directly to the page without intercept. On vm exit, vlapic_update_ppr() is called to update the PPR. Submitted by: Yamagi Burmeister MFC after:2 weeks Differential Revision:https://reviews.freebsd.org/D22942 Modified: head/sys/amd64/vmm/intel/vmx.c head/sys/amd64/vmm/io/vlapic.c head/sys/amd64/vmm/io/vlapic.h Modified: head/sys/amd64/vmm/intel/vmx.c == --- head/sys/amd64/vmm/intel/vmx.c Tue Mar 10 16:36:07 2020 (r358847) +++ head/sys/amd64/vmm/intel/vmx.c Tue Mar 10 16:53:49 2020 (r358848) @@ -175,6 +175,10 @@ static int cap_invpcid; SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, invpcid, CTLFLAG_RD, _invpcid, 0, "Guests are allowed to use INVPCID"); +static int tpr_shadowing; +SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, tpr_shadowing, CTLFLAG_RD, +_shadowing, 0, "TPR shadowing support"); + static int virtual_interrupt_delivery; SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, virtual_interrupt_delivery, CTLFLAG_RD, _interrupt_delivery, 0, "APICv virtual interrupt delivery support"); @@ -630,7 +634,7 @@ vmx_restore(void) static int vmx_init(int ipinum) { - int error, use_tpr_shadow; + int error; uint64_t basic, fixed0, fixed1, feature_control; uint32_t tmp, procbased2_vid_bits; @@ -754,6 +758,24 @@ vmx_init(int ipinum) ) == 0); /* +* Check support for TPR shadow. +*/ + error = vmx_set_ctlreg(MSR_VMX_PROCBASED_CTLS, + MSR_VMX_TRUE_PROCBASED_CTLS, PROCBASED_USE_TPR_SHADOW, 0, + ); + if (error == 0) { + tpr_shadowing = 1; + TUNABLE_INT_FETCH("hw.vmm.vmx.use_tpr_shadowing", + _shadowing); + } + + if (tpr_shadowing) { + procbased_ctls |= PROCBASED_USE_TPR_SHADOW; + procbased_ctls &= ~PROCBASED_CR8_LOAD_EXITING; + procbased_ctls &= ~PROCBASED_CR8_STORE_EXITING; + } + + /* * Check support for virtual interrupt delivery. */ procbased2_vid_bits = (PROCBASED2_VIRTUALIZE_APIC_ACCESSES | @@ -761,13 +783,9 @@ vmx_init(int ipinum) PROCBASED2_APIC_REGISTER_VIRTUALIZATION | PROCBASED2_VIRTUAL_INTERRUPT_DELIVERY); - use_tpr_shadow = (vmx_set_ctlreg(MSR_VMX_PROCBASED_CTLS, - MSR_VMX_TRUE_PROCBASED_CTLS, PROCBASED_USE_TPR_SHADOW, 0, - ) == 0); - error = vmx_set_ctlreg(MSR_VMX_PROCBASED_CTLS2, MSR_VMX_PROCBASED_CTLS2, procbased2_vid_bits, 0, ); - if (error == 0 && use_tpr_shadow) { + if (error == 0 && tpr_shadowing) { virtual_interrupt_delivery = 1; TUNABLE_INT_FETCH("hw.vmm.vmx.use_apic_vid", _interrupt_delivery); @@ -779,13 +797,6 @@ vmx_init(int ipinum) procbased_ctls2 &= ~PROCBASED2_VIRTUALIZE_X2APIC_MODE; /* -* No need to emulate accesses to %CR8 if virtual -* interrupt delivery is enabled. -*/ - procbased_ctls &= ~PROCBASED_CR8_LOAD_EXITING; - procbased_ctls &= ~PROCBASED_CR8_STORE_EXITING; - - /* * Check for Posted Interrupts only if Virtual Interrupt * Delivery is enabled. */ @@ -1054,10 +1065,13 @@ vmx_vminit(struct vm *vm, pmap_t pmap) vmx->ctx[i].guest_dr6 = DBREG_DR6_RESERVED1; error += vmwrite(VMCS_GUEST_DR7, DBREG_DR7_RESERVED1); - if (virtual_interrupt_delivery) { - error += vmwrite(VMCS_APIC_ACCESS, APIC_ACCESS_ADDRESS); + if (tpr_shadowing) { error += vmwrite(VMCS_VIRTUAL_APIC, vtophys(>apic_page[i])); + } + + if (virtual_interrupt_delivery) { + error += vmwrite(VMCS_APIC_ACCESS, APIC_ACCESS_ADDRESS); error += vmwrite(VMCS_EOI_EXIT0, 0); error += vmwrite(VMCS_EOI_EXIT1, 0); error += vmwrite(VMCS_EOI_EXIT2,
Re: svn commit: r358821 - in head: . contrib/amd libexec/rc/rc.d release tools/build/mk tools/build/options usr.sbin usr.sbin/amd usr.sbin/newsyslog/newsyslog.conf.d
In message <202003101608.02ag8dek065...@gndrsh.dnsmgr.net>, "Rodney W. Grimes" writes: > > In message <202003101541.02affpiy065...@gndrsh.dnsmgr.net>, "Rodney W. > > Grimes" > > writes: > > > > On March 10, 2020 6:42:30 AM PDT, Ed Maste wrote: > > > > >> Sorry for being snippy. It's a bad day here, client-wise, and it's > > > > >spilling > > > > >> over here. > > > > > > > > > >No apology necessary, I'm sorry I didn't coordinate more closely with > > > > >you on the actual svn commit. I had this change in my WIP tree since > > > > >November and just got back to it. Given the elapsed time since we last > > > > >discussed it I ought to have sent a reminder/refreshed the discussion. > > > > > > > > I think a FreeBSD version bump might still be needed. Though ports or o > ther > > > software might simply check for the existence of /usr/sbin/amd instead. > > > > > > > > I should put a deprecation flag into the port though I haven't thought > abou > > > t the expiry date yet. Probably at 12 EOL. > > > > > > Since 13 is not going to include amd that would be ending both the base a > nd p > > > ort version at the same time, perhaps keep the port to 13.0 EOL to give a > sli > > > ght window when someone upgrades to 13 and finds out amd is gone they can > go > > > to the port for a quick but short lived fixed. > > > > > > Perhaps big giant warnings all over the port too that it is about to EOL? > > > > Does adding DEPRECATED= without EXPIRATION_DATE= and a comment to add > > EXPIRATION_DATE for 13 EOL date sound ok? > > Sounds ok, but I was thinking 13.0 EOL, vs 13 EOL, unless you want > to support it for 5 more years?? Or even 13.1 EOL if it is desirable > to give them just a wee bit more time. Gotcha. 13.0 is better. > > > DEPRECATED prints warnings. > Ok > > > -- > Rod Grimes rgri...@freebsd.or > g -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. ___ 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: r358847 - vendor/tre
Author: kevans Date: Tue Mar 10 16:36:07 2020 New Revision: 358847 URL: https://svnweb.freebsd.org/changeset/base/358847 Log: Remove tre from the vendor tree This was brought in and used in a user branch for a GSoC 2011 project; ultimately, we've not moved in this direction and I suspect that we'll likely instead move towards onigmo or something similar for a regex(3) replacement that can also double as a speedy libregex with support for GNU extensions. The version of tre that was imported separately with bsdgrep was removed in r333236 due to it ultimately being fairly buggy and no obvious gain on modern-ish machines. Further, bsdgrep will instead want libregex for its GNU extensions ocne that project has finished. Deleted: vendor/tre/ ___ 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: r358846 - vendor/groff
Author: bapt Date: Tue Mar 10 16:34:40 2020 New Revision: 358846 URL: https://svnweb.freebsd.org/changeset/base/358846 Log: groff has been removed from the tree for freebsd 12.0 Deleted: vendor/groff/ ___ 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: r358845 - vendor/libyaml
Author: bapt Date: Tue Mar 10 16:28:02 2020 New Revision: 358845 URL: https://svnweb.freebsd.org/changeset/base/358845 Log: Remove libyaml from the vendor tree libyaml was only used for a short time by usr.sbin/pkg and since was switched to libucl Deleted: vendor/libyaml/ ___ 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: r358789 - head/share/man/man7
On 3/8/20 2:30 PM, Ed Maste wrote: > Author: emaste > Date: Sun Mar 8 21:30:55 2020 > New Revision: 358789 > URL: https://svnweb.freebsd.org/changeset/base/358789 > > Log: > arch.7: remove note about GCC 4.2.1 removal date > > GCC 4.2.1 was removed in r358454. > > Sponsored by: The FreeBSD Foundation Can you update the platforms page on the website as well? -- John Baldwin ___ 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: r358844 - vendor/libgmp
Author: emaste Date: Tue Mar 10 16:16:20 2020 New Revision: 358844 URL: https://svnweb.freebsd.org/changeset/base/358844 Log: Remove libgmp vendor tree It hasn't been used since 2001 it seems, long before the cvs->svn migration. Deleted: vendor/libgmp/ ___ 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: r358843 - vendor/libreadline
Author: emaste Date: Tue Mar 10 16:13:06 2020 New Revision: 358843 URL: https://svnweb.freebsd.org/changeset/base/358843 Log: Remove libreadline vendor tree The only user was gdb, which bapt changed to use libedit some time ago. It was not updated since the cvs to svn migration, and never flattened. Deleted: vendor/libreadline/ ___ 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: r358821 - in head: . contrib/amd libexec/rc/rc.d release tools/build/mk tools/build/options usr.sbin usr.sbin/amd usr.sbin/newsyslog/newsyslog.conf.d
> In message <202003101541.02affpiy065...@gndrsh.dnsmgr.net>, "Rodney W. > Grimes" > writes: > > > On March 10, 2020 6:42:30 AM PDT, Ed Maste wrote: > > > >> Sorry for being snippy. It's a bad day here, client-wise, and it's > > > >spilling > > > >> over here. > > > > > > > >No apology necessary, I'm sorry I didn't coordinate more closely with > > > >you on the actual svn commit. I had this change in my WIP tree since > > > >November and just got back to it. Given the elapsed time since we last > > > >discussed it I ought to have sent a reminder/refreshed the discussion. > > > > > > I think a FreeBSD version bump might still be needed. Though ports or > > > other > > software might simply check for the existence of /usr/sbin/amd instead. > > > > > > I should put a deprecation flag into the port though I haven't thought > > > abou > > t the expiry date yet. Probably at 12 EOL. > > > > Since 13 is not going to include amd that would be ending both the base and > > p > > ort version at the same time, perhaps keep the port to 13.0 EOL to give a > > sli > > ght window when someone upgrades to 13 and finds out amd is gone they can > > go > > to the port for a quick but short lived fixed. > > > > Perhaps big giant warnings all over the port too that it is about to EOL? > > Does adding DEPRECATED= without EXPIRATION_DATE= and a comment to add > EXPIRATION_DATE for 13 EOL date sound ok? Sounds ok, but I was thinking 13.0 EOL, vs 13 EOL, unless you want to support it for 5 more years?? Or even 13.1 EOL if it is desirable to give them just a wee bit more time. > DEPRECATED prints warnings. Ok -- 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"
svn commit: r358842 - vendor/libiberty
Author: emaste Date: Tue Mar 10 16:08:39 2020 New Revision: 358842 URL: https://svnweb.freebsd.org/changeset/base/358842 Log: Remove libiberty vendor tree Our only libiberty consumer is binutils, which includes its own copy (and will be removed before too long). Deleted: vendor/libiberty/ ___ 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: r358841 - head/lib/libusb
Author: hselasky Date: Tue Mar 10 15:59:20 2020 New Revision: 358841 URL: https://svnweb.freebsd.org/changeset/base/358841 Log: Fix for building libusb under Linux. MFC after:3 days Sponsored by: Mellanox Technologies Modified: head/lib/libusb/libusb_global_linux.h Modified: head/lib/libusb/libusb_global_linux.h == --- head/lib/libusb/libusb_global_linux.h Tue Mar 10 15:57:41 2020 (r358840) +++ head/lib/libusb/libusb_global_linux.h Tue Mar 10 15:59:20 2020 (r358841) @@ -77,4 +77,11 @@ } while (0) #endif +#ifndef TAILQ_FOREACH_SAFE +#defineTAILQ_FOREACH_SAFE(var, head, field, tvar) \ + for ((var) = TAILQ_FIRST((head)); \ + (var) && ((tvar) = TAILQ_NEXT((var), field), 1);\ + (var) = (tvar)) +#endif + #endif /* _LIBUSB_GLOBAL_LINUX_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: r358821 - in head: . contrib/amd libexec/rc/rc.d release tools/build/mk tools/build/options usr.sbin usr.sbin/amd usr.sbin/newsyslog/newsyslog.conf.d
In message <202003101541.02affpiy065...@gndrsh.dnsmgr.net>, "Rodney W. Grimes" writes: > > On March 10, 2020 6:42:30 AM PDT, Ed Maste wrote: > > >> Sorry for being snippy. It's a bad day here, client-wise, and it's > > >spilling > > >> over here. > > > > > >No apology necessary, I'm sorry I didn't coordinate more closely with > > >you on the actual svn commit. I had this change in my WIP tree since > > >November and just got back to it. Given the elapsed time since we last > > >discussed it I ought to have sent a reminder/refreshed the discussion. > > > > I think a FreeBSD version bump might still be needed. Though ports or other > software might simply check for the existence of /usr/sbin/amd instead. > > > > I should put a deprecation flag into the port though I haven't thought abou > t the expiry date yet. Probably at 12 EOL. > > Since 13 is not going to include amd that would be ending both the base and p > ort version at the same time, perhaps keep the port to 13.0 EOL to give a sli > ght window when someone upgrades to 13 and finds out amd is gone they can go > to the port for a quick but short lived fixed. > > Perhaps big giant warnings all over the port too that it is about to EOL? Does adding DEPRECATED= without EXPIRATION_DATE= and a comment to add EXPIRATION_DATE for 13 EOL date sound ok? DEPRECATED prints warnings. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. ___ 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: r358840 - vendor/tcl
Author: emaste Date: Tue Mar 10 15:57:41 2020 New Revision: 358840 URL: https://svnweb.freebsd.org/changeset/base/358840 Log: Remove tcl vendor tree tcl was removed from FreeBSD in 1998, r38858, long before the migration from cvs to svn. Deleted: vendor/tcl/ ___ 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: r358839 - vendor/perl5
Author: emaste Date: Tue Mar 10 15:56:55 2020 New Revision: 358839 URL: https://svnweb.freebsd.org/changeset/base/358839 Log: Remove perl5 vendor tree It was removed from FreeBSD in 2002, r96723, long before the migration from cvs to svn. Deleted: vendor/perl5/ ___ 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: r358838 - head/sys/compat/linux
Author: hselasky Date: Tue Mar 10 15:56:49 2020 New Revision: 358838 URL: https://svnweb.freebsd.org/changeset/base/358838 Log: Add support for the device statistics IOCTL, needed by the coming linux_libusb upgrade. MFC after:3 days Sponsored by: Mellanox Technologies Modified: head/sys/compat/linux/linux_ioctl.c head/sys/compat/linux/linux_ioctl.h Modified: head/sys/compat/linux/linux_ioctl.c == --- head/sys/compat/linux/linux_ioctl.c Tue Mar 10 15:51:33 2020 (r358837) +++ head/sys/compat/linux/linux_ioctl.c Tue Mar 10 15:56:49 2020 (r358838) @@ -3488,6 +3488,9 @@ linux_ioctl_fbsd_usb(struct thread *td, struct linux_i case FBSD_LUSB_GET_POWER_USAGE: args->cmd = USB_GET_POWER_USAGE; break; + case FBSD_LUSB_DEVICESTATS: + args->cmd = USB_DEVICESTATS; + break; default: error = ENOIOCTL; } Modified: head/sys/compat/linux/linux_ioctl.h == --- head/sys/compat/linux/linux_ioctl.h Tue Mar 10 15:51:33 2020 (r358837) +++ head/sys/compat/linux/linux_ioctl.h Tue Mar 10 15:56:49 2020 (r358838) @@ -743,9 +743,10 @@ #defineFBSD_LUSB_FS_OPEN_STREAM0xffdf #defineFBSD_LUSB_GET_DEV_PORT_PATH 0xffde #defineFBSD_LUSB_GET_POWER_USAGE 0xffdd +#defineFBSD_LUSB_DEVICESTATS 0xffdc #defineFBSD_LUSB_MAX 0x -#defineFBSD_LUSB_MIN 0xffdd +#defineFBSD_LUSB_MIN 0xffdc /* * Linux btrfs clone operation ___ 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: r358837 - vendor/csup
Author: emaste Date: Tue Mar 10 15:51:33 2020 New Revision: 358837 URL: https://svnweb.freebsd.org/changeset/base/358837 Log: Remove csup vendor tree It was not updated since the switch to svn, and the vendor tree was never flattened. It was removed from FreeBSD in 2014, r267863. Deleted: vendor/csup/ ___ 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: r358821 - in head: . contrib/amd libexec/rc/rc.d release tools/build/mk tools/build/options usr.sbin usr.sbin/amd usr.sbin/newsyslog/newsyslog.conf.d
> On March 10, 2020 6:42:30 AM PDT, Ed Maste wrote: > >> Sorry for being snippy. It's a bad day here, client-wise, and it's > >spilling > >> over here. > > > >No apology necessary, I'm sorry I didn't coordinate more closely with > >you on the actual svn commit. I had this change in my WIP tree since > >November and just got back to it. Given the elapsed time since we last > >discussed it I ought to have sent a reminder/refreshed the discussion. > > I think a FreeBSD version bump might still be needed. Though ports or other > software might simply check for the existence of /usr/sbin/amd instead. > > I should put a deprecation flag into the port though I haven't thought about > the expiry date yet. Probably at 12 EOL. Since 13 is not going to include amd that would be ending both the base and port version at the same time, perhaps keep the port to 13.0 EOL to give a slight window when someone upgrades to 13 and finds out amd is gone they can go to the port for a quick but short lived fixed. Perhaps big giant warnings all over the port too that it is about to EOL? -- 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"
svn commit: r358835 - stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: mav Date: Tue Mar 10 15:18:53 2020 New Revision: 358835 URL: https://svnweb.freebsd.org/changeset/base/358835 Log: MFC r358580: Increase number of write completion threads, matching ZoL. Our iSCSI benchmarks on a large 80-core system show that previous limit of 8 threads can be a bottleneck. At some points this change increases write IOPS by as much as 50%. I am still not sure that so many threads is really required, but we tested lower amounts and got no significant benefits, while latencies were a bit worse, so decided to not diverge. Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c == --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Tue Mar 10 13:39:05 2020(r358834) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Tue Mar 10 15:18:53 2020(r358835) @@ -155,7 +155,7 @@ const zio_taskq_info_t zio_taskqs[ZIO_TYPES][ZIO_TASKQ /* ISSUEISSUE_HIGH INTRINTR_HIGH */ { ZTI_ONE, ZTI_NULL, ZTI_ONE,ZTI_NULL }, /* NULL */ { ZTI_N(8), ZTI_NULL, ZTI_P(12, 8), ZTI_NULL }, /* READ */ - { ZTI_BATCH,ZTI_N(5), ZTI_N(8), ZTI_N(5) }, /* WRITE */ + { ZTI_BATCH,ZTI_N(5), ZTI_P(12, 8), ZTI_N(5) }, /* WRITE */ { ZTI_P(12, 8), ZTI_NULL, ZTI_ONE,ZTI_NULL }, /* FREE */ { ZTI_ONE, ZTI_NULL, ZTI_ONE,ZTI_NULL }, /* CLAIM */ { ZTI_ONE, ZTI_NULL, ZTI_ONE,ZTI_NULL }, /* IOCTL */ ___ 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: r358836 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: mav Date: Tue Mar 10 15:19:15 2020 New Revision: 358836 URL: https://svnweb.freebsd.org/changeset/base/358836 Log: MFC r358580: Increase number of write completion threads, matching ZoL. Our iSCSI benchmarks on a large 80-core system show that previous limit of 8 threads can be a bottleneck. At some points this change increases write IOPS by as much as 50%. I am still not sure that so many threads is really required, but we tested lower amounts and got no significant benefits, while latencies were a bit worse, so decided to not diverge. Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c == --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Tue Mar 10 15:18:53 2020(r358835) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Tue Mar 10 15:19:15 2020(r358836) @@ -155,7 +155,7 @@ const zio_taskq_info_t zio_taskqs[ZIO_TYPES][ZIO_TASKQ /* ISSUEISSUE_HIGH INTRINTR_HIGH */ { ZTI_ONE, ZTI_NULL, ZTI_ONE,ZTI_NULL }, /* NULL */ { ZTI_N(8), ZTI_NULL, ZTI_P(12, 8), ZTI_NULL }, /* READ */ - { ZTI_BATCH,ZTI_N(5), ZTI_N(8), ZTI_N(5) }, /* WRITE */ + { ZTI_BATCH,ZTI_N(5), ZTI_P(12, 8), ZTI_N(5) }, /* WRITE */ { ZTI_P(12, 8), ZTI_NULL, ZTI_ONE,ZTI_NULL }, /* FREE */ { ZTI_ONE, ZTI_NULL, ZTI_ONE,ZTI_NULL }, /* CLAIM */ { ZTI_ONE, ZTI_NULL, ZTI_ONE,ZTI_NULL }, /* IOCTL */ ___ 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: r358821 - in head: . contrib/amd libexec/rc/rc.d release tools/build/mk tools/build/options usr.sbin usr.sbin/amd usr.sbin/newsyslog/newsyslog.conf.d
On Tue, 10 Mar 2020 at 11:04, Cy Schubert wrote: > > I think a FreeBSD version bump might still be needed. Yeah, I did it in r358834. Integers are cheap :) (And even if rebuilding everything isn't, that's going to happen shortly with a Clang update anyway.) ___ 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: r358821 - in head: . contrib/amd libexec/rc/rc.d release tools/build/mk tools/build/options usr.sbin usr.sbin/amd usr.sbin/newsyslog/newsyslog.conf.d
On March 10, 2020 6:42:30 AM PDT, Ed Maste wrote: >> Sorry for being snippy. It's a bad day here, client-wise, and it's >spilling >> over here. > >No apology necessary, I'm sorry I didn't coordinate more closely with >you on the actual svn commit. I had this change in my WIP tree since >November and just got back to it. Given the elapsed time since we last >discussed it I ought to have sent a reminder/refreshed the discussion. I think a FreeBSD version bump might still be needed. Though ports or other software might simply check for the existence of /usr/sbin/amd instead. I should put a deprecation flag into the port though I haven't thought about the expiry date yet. Probably at 12 EOL. -- Pardon the typos and autocorrect, small keyboard in use. Cy Schubert FreeBSD UNIX: Web: https://www.FreeBSD.org The need of the many outweighs the greed of the few. Sent from my Android device with K-9 Mail. Please excuse my brevity. ___ 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: r358821 - in head: . contrib/amd libexec/rc/rc.d release tools/build/mk tools/build/options usr.sbin usr.sbin/amd usr.sbin/newsyslog/newsyslog.conf.d
> Sorry for being snippy. It's a bad day here, client-wise, and it's spilling > over here. No apology necessary, I'm sorry I didn't coordinate more closely with you on the actual svn commit. I had this change in my WIP tree since November and just got back to it. Given the elapsed time since we last discussed it I ought to have sent a reminder/refreshed the discussion. ___ 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: r358834 - head/sys/sys
Author: emaste Date: Tue Mar 10 13:39:05 2020 New Revision: 358834 URL: https://svnweb.freebsd.org/changeset/base/358834 Log: Bump __FreeBSD_version after amd(8) removal, r358821 Reported by: cy Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h == --- head/sys/sys/param.hTue Mar 10 07:05:04 2020(r358833) +++ head/sys/sys/param.hTue Mar 10 13:39:05 2020(r358834) @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1300082 /* Master, propagated to newvers */ +#define __FreeBSD_version 1300083 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of 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: r358830 - head/tests/sys/net
Author: kp Date: Tue Mar 10 06:29:59 2020 New Revision: 358830 URL: https://svnweb.freebsd.org/changeset/base/358830 Log: bridge test: adding and removing static addresses Reviewed by: philip Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D23960 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.shTue Mar 10 06:28:45 2020 (r358829) +++ head/tests/sys/net/if_bridge_test.shTue Mar 10 06:29:59 2020 (r358830) @@ -135,8 +135,65 @@ stp_cleanup() vnet_cleanup } +atf_test_case "static" "cleanup" +static_head() +{ + atf_set descr 'Bridge static address test' + atf_set require.user root +} + +static_body() +{ + vnet_init + + epair=$(vnet_mkepair) + bridge=$(vnet_mkbridge) + + vnet_mkjail one ${bridge} ${epair}a + + ifconfig ${epair}b up + + jexec one ifconfig ${bridge} up + jexec one ifconfig ${epair}a up + jexec one ifconfig ${bridge} addm ${epair}a + + # Wrong interface + atf_check -s exit:1 -o ignore -e ignore \ + jexec one ifconfig ${bridge} static ${epair}b 00:01:02:03:04:05 + + # Bad address format + atf_check -s exit:1 -o ignore -e ignore \ + jexec one ifconfig ${bridge} static ${epair}a 00:01:02:03:04 + + # Correct add + atf_check -s exit:0 -o ignore \ + jexec one ifconfig ${bridge} static ${epair}a 00:01:02:03:04:05 + + # List addresses + atf_check -s exit:0 -o ignore \ + jexec one ifconfig ${bridge} addr + + # Delete with bad address format + atf_check -s exit:1 -o ignore -e ignore \ + jexec one ifconfig ${bridge} deladdr 00:01:02:03:04 + + # Delete with unlisted address + atf_check -s exit:1 -o ignore -e ignore \ + jexec one ifconfig ${bridge} deladdr 00:01:02:03:04:06 + + # Correct delete + atf_check -s exit:0 -o ignore \ + jexec one ifconfig ${bridge} deladdr 00:01:02:03:04:05 +} + +static_cleanup() +{ + vnet_cleanup +} + atf_init_test_cases() { atf_add_test_case "bridge_transmit_ipv4_unicast" atf_add_test_case "stp" + atf_add_test_case "static" } ___ 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: r358829 - head/tests/sys/net
Author: kp Date: Tue Mar 10 06:28:45 2020 New Revision: 358829 URL: https://svnweb.freebsd.org/changeset/base/358829 Log: bridge test: spanning tree Basic test case where we create a bridge loop, verify that we really are looping and then enable spanning tree to resolve the loop. Reviewed by: philip Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D23959 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.shTue Mar 10 03:30:11 2020 (r358828) +++ head/tests/sys/net/if_bridge_test.shTue Mar 10 06:28:45 2020 (r358829) @@ -67,7 +67,76 @@ bridge_transmit_ipv4_unicast_cleanup() vnet_cleanup } +atf_test_case "stp" "cleanup" +stp_head() +{ + atf_set descr 'Spanning tree test' + atf_set require.user root + atf_set require.progs jq +} + +stp_body() +{ + vnet_init + + epair_one=$(vnet_mkepair) + epair_two=$(vnet_mkepair) + bridge_a=$(vnet_mkbridge) + bridge_b=$(vnet_mkbridge) + + vnet_mkjail a ${bridge_a} ${epair_one}a ${epair_two}a + vnet_mkjail b ${bridge_b} ${epair_one}b ${epair_two}b + + jexec a ifconfig ${bridge_a} up + jexec a ifconfig ${epair_one}a up + jexec a ifconfig ${epair_two}a up + jexec a ifconfig ${bridge_a} addm ${epair_one}a + jexec a ifconfig ${bridge_a} addm ${epair_two}a + + jexec b ifconfig ${bridge_b} up + jexec b ifconfig ${epair_one}b up + jexec b ifconfig ${epair_two}b up + jexec b ifconfig ${bridge_b} addm ${epair_one}b + jexec b ifconfig ${bridge_b} addm ${epair_two}b + + jexec a ifconfig ${bridge_a} 192.0.2.1/24 + + # Give the interfaces some time to come up and pass some traffic + sleep 5 + + # Confirm that there's looping traffic + nbr=$(jexec a netstat -I ${bridge_a} --libxo json \ + | jq ".statistics.interface[0].\"received-packets\"") + if [ ${nbr} -lt 100 ] + then + atf_fail "Expected bridging loop, but found very few packets." + fi + + # Enable spanning tree + jexec a ifconfig ${bridge_a} stp ${epair_one}a + jexec a ifconfig ${bridge_a} stp ${epair_two}a + jexec b ifconfig ${bridge_b} stp ${epair_one}b + jexec b ifconfig ${bridge_b} stp ${epair_two}b + + # Give STP time to do its thing + sleep 5 + + a_discard=$(jexec a ifconfig ${bridge_a} | grep discarding) + b_discard=$(jexec b ifconfig ${bridge_b} | grep discarding) + + if [ -z "${a_discard}" ] && [ -z "${b_discard}" ] + then + atf_fail "STP failed to detect bridging loop" + fi +} + +stp_cleanup() +{ + vnet_cleanup +} + atf_init_test_cases() { atf_add_test_case "bridge_transmit_ipv4_unicast" + atf_add_test_case "stp" } ___ 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"