svn commit: r366924 - head/sys/arm64/include
Author: gonzo Date: Thu Oct 22 05:07:25 2020 New Revision: 366924 URL: https://svnweb.freebsd.org/changeset/base/366924 Log: [hwpmc] Fix call chain capture for ARM64 Use ELR register value instead of LR for PMC_TRAPFRAME_TO_PC macro since it's the former that indicates PC if the interrupted execution thread. This fixes a bug where pmcstat lost the leaf function of the call chain and started with the second function in the chain. Although this change is an improvement over the previous logic there is still posibility for incomplete data: if the leaf function does not have stack variables and does not call any other functions compiler would not generate a stack frame for it and the FP value would point to the caller's frame, so instead of the actual "caller1 -> caller2 -> leaf" chain only "caller1 -> leaf" would be captured. Sponsored by: Ampere Computing Submitted by: Klara, Inc. Modified: head/sys/arm64/include/pmc_mdep.h Modified: head/sys/arm64/include/pmc_mdep.h == --- head/sys/arm64/include/pmc_mdep.h Thu Oct 22 04:49:14 2020 (r366923) +++ head/sys/arm64/include/pmc_mdep.h Thu Oct 22 05:07:25 2020 (r366924) @@ -54,7 +54,7 @@ union pmc_md_pmc { ((S) >= (START) && (S) < (END)) #definePMC_IN_KERNEL(va) INKERNEL((va)) #definePMC_IN_USERSPACE(va) ((va) <= VM_MAXUSER_ADDRESS) -#definePMC_TRAPFRAME_TO_PC(TF) ((TF)->tf_lr) +#definePMC_TRAPFRAME_TO_PC(TF) ((TF)->tf_elr) #definePMC_TRAPFRAME_TO_FP(TF) ((TF)->tf_x[29]) /* ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r366923 - head/sys/crypto/armv8
Author: gonzo Date: Thu Oct 22 04:49:14 2020 New Revision: 366923 URL: https://svnweb.freebsd.org/changeset/base/366923 Log: [armv8crypto] Fix cryptodev probe logic in armv8crypto Add missing break to prevent falling through to the default case statement and returning EINVAL for all session configs. Sponsored by: Ampere Computing Submitted by: Klara, Inc. Modified: head/sys/crypto/armv8/armv8_crypto.c Modified: head/sys/crypto/armv8/armv8_crypto.c == --- head/sys/crypto/armv8/armv8_crypto.cThu Oct 22 03:30:39 2020 (r366922) +++ head/sys/crypto/armv8/armv8_crypto.cThu Oct 22 04:49:14 2020 (r366923) @@ -207,6 +207,7 @@ armv8_crypto_probesession(device_t dev, default: return (EINVAL); } + break; default: return (EINVAL); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r366922 - in head/sys/dev: ahci mvs siis
Author: mav Date: Thu Oct 22 03:30:39 2020 New Revision: 366922 URL: https://svnweb.freebsd.org/changeset/base/366922 Log: Pass lower 3 bits of sector_count for FPDMA commands. When this code was written those bits were N/A, but now the lowest bit is Rebuild Assist Recovery Control (RARC). MFC after:1 month Modified: head/sys/dev/ahci/ahci.c head/sys/dev/mvs/mvs.c head/sys/dev/siis/siis.c Modified: head/sys/dev/ahci/ahci.c == --- head/sys/dev/ahci/ahci.cThu Oct 22 01:05:34 2020(r366921) +++ head/sys/dev/ahci/ahci.cThu Oct 22 03:30:39 2020(r366922) @@ -2578,10 +2578,10 @@ ahci_setup_fis(struct ahci_channel *ch, struct ahci_cm fis[9] = ccb->ataio.cmd.lba_mid_exp; fis[10] = ccb->ataio.cmd.lba_high_exp; fis[11] = ccb->ataio.cmd.features_exp; + fis[12] = ccb->ataio.cmd.sector_count; if (ccb->ataio.cmd.flags & CAM_ATAIO_FPDMA) { - fis[12] = tag << 3; - } else { - fis[12] = ccb->ataio.cmd.sector_count; + fis[12] &= 0xf8; + fis[12] |= tag << 3; } fis[13] = ccb->ataio.cmd.sector_count_exp; fis[15] = ATA_A_4BIT; Modified: head/sys/dev/mvs/mvs.c == --- head/sys/dev/mvs/mvs.c Thu Oct 22 01:05:34 2020(r366921) +++ head/sys/dev/mvs/mvs.c Thu Oct 22 03:30:39 2020(r366922) @@ -1493,7 +1493,8 @@ mvs_execute_transaction(struct mvs_slot *slot) crqb->cmd[i++] = ccb->ataio.cmd.features; crqb->cmd[i++] = 0x11; if (ccb->ataio.cmd.flags & CAM_ATAIO_FPDMA) { - crqb->cmd[i++] = slot->tag << 3; + crqb->cmd[i++] = (slot->tag << 3) | + (ccb->ataio.cmd.sector_count & 0x07); crqb->cmd[i++] = 0x12; } else { crqb->cmd[i++] = ccb->ataio.cmd.sector_count_exp; Modified: head/sys/dev/siis/siis.c == --- head/sys/dev/siis/siis.cThu Oct 22 01:05:34 2020(r366921) +++ head/sys/dev/siis/siis.cThu Oct 22 03:30:39 2020(r366922) @@ -1723,13 +1723,12 @@ siis_setup_fis(device_t dev, struct siis_cmd *ctp, uni fis[9] = ccb->ataio.cmd.lba_mid_exp; fis[10] = ccb->ataio.cmd.lba_high_exp; fis[11] = ccb->ataio.cmd.features_exp; + fis[12] = ccb->ataio.cmd.sector_count; if (ccb->ataio.cmd.flags & CAM_ATAIO_FPDMA) { - fis[12] = tag << 3; - fis[13] = 0; - } else { - fis[12] = ccb->ataio.cmd.sector_count; - fis[13] = ccb->ataio.cmd.sector_count_exp; + fis[12] &= 0xf8; + fis[12] |= tag << 3; } + fis[13] = ccb->ataio.cmd.sector_count_exp; fis[15] = ATA_A_4BIT; if (ccb->ataio.ata_flags & ATA_FLAG_AUX) { fis[16] = ccb->ataio.aux& 0xff; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r366921 - head/contrib/tzdata
On 2020-10-22 01:05:35 (+), Philip Paeps wrote: Author: philip Date: Thu Oct 22 01:05:34 2020 New Revision: 366921 URL: https://svnweb.freebsd.org/changeset/base/366921 Log: Import tzdata 2020c Changes: https://github.com/eggert/tz/blob/2020d/NEWS Argh. Import tzdata 2020d of course. I got the link right at least. While it feels like a lot of churn in tzdata land recently, the actual changes are very small. Philip -- Philip Paeps Senior Reality Engineer Alternative Enterprises ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r366921 - head/contrib/tzdata
Author: philip Date: Thu Oct 22 01:05:34 2020 New Revision: 366921 URL: https://svnweb.freebsd.org/changeset/base/366921 Log: Import tzdata 2020c Changes: https://github.com/eggert/tz/blob/2020d/NEWS MFC after:1 day Modified: head/contrib/tzdata/Makefile head/contrib/tzdata/NEWS head/contrib/tzdata/asia head/contrib/tzdata/europe head/contrib/tzdata/version Directory Properties: head/contrib/tzdata/ (props changed) Modified: head/contrib/tzdata/Makefile == --- head/contrib/tzdata/MakefileThu Oct 22 01:04:02 2020 (r366920) +++ head/contrib/tzdata/MakefileThu Oct 22 01:05:34 2020 (r366921) @@ -1023,7 +1023,7 @@ tzdata$(VERSION)-rearguard.tar.gz: rearguard.zi set-ti sed '1s/$$/-rearguard/' \ tzdata$(VERSION)-rearguard.dir/version : The dummy pacificnew pacifies TZUpdater 2.3.1 and earlier. - touch -md 2020-10-12T22:53:00Z \ + TZ=UTC0 touch -mt 202010122253.00 \ tzdata$(VERSION)-rearguard.dir/pacificnew touch -cmr version tzdata$(VERSION)-rearguard.dir/version LC_ALL=C && export LC_ALL && \ Modified: head/contrib/tzdata/NEWS == --- head/contrib/tzdata/NEWSThu Oct 22 01:04:02 2020(r366920) +++ head/contrib/tzdata/NEWSThu Oct 22 01:05:34 2020(r366921) @@ -1,5 +1,23 @@ News for the tz database +Release 2020d - 2020-10-21 11:24:13 -0700 + + Briefly: +Palestine ends DST earlier than predicted, on 2020-10-24. + + Changes to past and future timestamps + +Palestine ends DST on 2020-10-24 at 01:00, instead of 2020-10-31 +as previously predicted (thanks to Sharef Mustafa.) Its +2019-10-26 fall-back was at 00:00, not 01:00 (thanks to Steffen +Thorsen.) Its 2015-10-23 transition was at 01:00 not 00:00, and +its spring 2020 transition was on March 28 at 00:00, not March 27 +(thanks to Pierre Cashon.) This affects Asia/Gaza and +Asia/Hebron. Assume future spring and fall transitions will be on +the Saturday preceding the last Sunday of March and October, +respectively. + + Release 2020c - 2020-10-16 11:15:53 -0700 Briefly: Modified: head/contrib/tzdata/asia == --- head/contrib/tzdata/asiaThu Oct 22 01:04:02 2020(r366920) +++ head/contrib/tzdata/asiaThu Oct 22 01:05:34 2020(r366921) @@ -3221,14 +3221,41 @@ ZoneAsia/Karachi4:28:12 - LMT 1907 # From Sharef Mustafa (2019-10-18): # Palestine summer time will end on midnight Oct 26th 2019 ... -# http://www.palestinecabinet.gov.ps/website/ar/ViewDetails?ID=43948 # -# From Paul Eggert (2019-04-10): -# For now, guess spring-ahead transitions are March's last Friday at 00:00. +# From Steffen Thorsen (2020-10-20): +# Some sources such as these say, and display on clocks, that DST ended at +# midnight last year... +# https://www.amad.ps/ar/post/320006 # -# From Tim Parenti (2016-10-19): -# Predict fall transitions on October's last Saturday at 01:00 from now on. +# From Tim Parenti (2020-10-20): +# The report of the Palestinian Cabinet meeting of 2019-10-14 confirms +# a decision on (translated): "The start of the winter time in Palestine, by +# delaying the clock by sixty minutes, starting from midnight on Friday / +# Saturday corresponding to 26/10/2019." +# http://www.palestinecabinet.gov.ps/portal/meeting/details/43948 +# From Sharef Mustafa (2020-10-20): +# As per the palestinian cabinet announcement yesterday , the day light saving +# shall [end] on Oct 24th 2020 at 01:00AM by delaying the clock by 60 minutes. +# http://www.palestinecabinet.gov.ps/portal/Meeting/Details/51584 + +# From Tim Parenti (2020-10-20): +# Predict future fall transitions at 01:00 on the Saturday preceding October's +# last Sunday (i.e., Sat>=24). This is consistent with our predictions since +# 2016, although the time of the change differed slightly in 2019. + +# From Pierre Cashon (2020-10-20): +# The summer time this year started on March 28 at 00:00. +# https://wafa.ps/ar_page.aspx?id=GveQNZa872839351758aGveQNZ +# http://www.palestinecabinet.gov.ps/portal/meeting/details/50284 +# The winter time in 2015 started on October 23 at 01:00. +# https://wafa.ps/ar_page.aspx?id=CgpCdYa670694628582aCgpCdY +# http://www.palestinecabinet.gov.ps/portal/meeting/details/27583 +# +# From Paul Eggert (2019-04-10): +# For now, guess spring-ahead transitions are at 00:00 on the Saturday +# preceding March's last Sunday (i.e., Sat>=24). + # Rule NAMEFROMTO - IN ON AT SAVELETTER/S Rule EgyptAsia 1957only- May 10 0:001:00S Rule EgyptAsia 19571958- Oct 1 0:000 - @@ -3243,10 +327
svn commit: r366918 - head/lib/libc/sys
Author: kib Date: Wed Oct 21 21:40:33 2020 New Revision: 366918 URL: https://svnweb.freebsd.org/changeset/base/366918 Log: mmap(2): Document guard size for MAP_STACK and related EINVAL. Based on submission by: emaste Reviewed by: emaste, markj Sponsored by: The FreeBSD Foundation MFC after:1 week Differential revision:https://reviews.freebsd.org/D26894 Modified: head/lib/libc/sys/mmap.2 Modified: head/lib/libc/sys/mmap.2 == --- head/lib/libc/sys/mmap.2Wed Oct 21 21:28:20 2020(r366917) +++ head/lib/libc/sys/mmap.2Wed Oct 21 21:40:33 2020(r366918) @@ -28,7 +28,7 @@ .\"@(#)mmap.2 8.4 (Berkeley) 5/11/95 .\" $FreeBSD$ .\" -.Dd February 26, 2020 +.Dd October 21, 2020 .Dt MMAP 2 .Os .Sh NAME @@ -351,6 +351,8 @@ Stacks created with automatically grow. Guards prevent inadvertent use of the regions into which those stacks can grow without requiring mapping the whole stack in advance. +The size of the guard, in pages, is specified by sysctl +.Dv security.bsd.stack_guard_page . .El .Pp The @@ -451,6 +453,11 @@ or .Dv MAP_STACK was specified. At least one of these flags must be included. +.It Bq Er EINVAL +.Dv MAP_STACK +was specified and +.Va len +is less than or equal to the guard size. .It Bq Er EINVAL .Dv MAP_FIXED was specified and the ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r366917 - in head: sbin/ifconfig sys/net tests/sys/net
Author: melifaro Date: Wed Oct 21 21:28:20 2020 New Revision: 366917 URL: https://svnweb.freebsd.org/changeset/base/366917 Log: Add support for stacked VLANs (IEEE 802.1ad, AKA Q-in-Q). 802.1ad interfaces are created with ifconfig using the "vlanproto" parameter. Eg., the following creates a 802.1Q VLAN (id #42) over a 802.1ad S-VLAN (id #5) over a physical Ethernet interface (em0). ifconfig vlan5 create vlandev em0 vlan 5 vlanproto 802.1ad up ifconfig vlan42 create vlandev vlan5 vlan 42 inet 10.5.42.1/24 VLAN_MTU, VLAN_HWCSUM and VLAN_TSO capabilities should be properly supported. VLAN_HWTAGGING is only partially supported, as there is currently no IFCAP_VLAN_* denoting the possibility to set the VLAN EtherType to anything else than 0x8100 (802.1ad uses 0x88A8). Submitted by: Olivier Piras Sponsored by: RG Nets Differential Revision:https://reviews.freebsd.org/D26436 Modified: head/sbin/ifconfig/ifclone.c head/sbin/ifconfig/ifconfig.8 head/sbin/ifconfig/ifconfig.h head/sbin/ifconfig/ifieee80211.c head/sbin/ifconfig/ifvlan.c head/sbin/ifconfig/ifvxlan.c head/sys/net/ethernet.h head/sys/net/if_clone.c head/sys/net/if_ethersubr.c head/sys/net/if_vlan.c head/sys/net/if_vlan_var.h head/tests/sys/net/if_vlan.sh Modified: head/sbin/ifconfig/ifclone.c == --- head/sbin/ifconfig/ifclone.cWed Oct 21 20:42:29 2020 (r366916) +++ head/sbin/ifconfig/ifclone.cWed Oct 21 21:28:20 2020 (r366917) @@ -49,6 +49,11 @@ static const char rcsid[] = #include "ifconfig.h" +typedef enum { + MT_PREFIX, + MT_FILTER, +} clone_match_type; + static void list_cloners(void) { @@ -76,7 +81,11 @@ list_cloners(void) } struct clone_defcb { - char ifprefix[IFNAMSIZ]; + union { + char ifprefix[IFNAMSIZ]; + clone_match_func *ifmatch; + }; + clone_match_type clone_mt; clone_callback_func *clone_cb; SLIST_ENTRY(clone_defcb) next; }; @@ -85,16 +94,29 @@ static SLIST_HEAD(, clone_defcb) clone_defcbh = SLIST_HEAD_INITIALIZER(clone_defcbh); void -clone_setdefcallback(const char *ifprefix, clone_callback_func *p) +clone_setdefcallback_prefix(const char *ifprefix, clone_callback_func *p) { struct clone_defcb *dcp; dcp = malloc(sizeof(*dcp)); strlcpy(dcp->ifprefix, ifprefix, IFNAMSIZ-1); + dcp->clone_mt = MT_PREFIX; dcp->clone_cb = p; SLIST_INSERT_HEAD(&clone_defcbh, dcp, next); } +void +clone_setdefcallback_filter(clone_match_func *filter, clone_callback_func *p) +{ + struct clone_defcb *dcp; + + dcp = malloc(sizeof(*dcp)); + dcp->ifmatch = filter; + dcp->clone_mt = MT_FILTER; + dcp->clone_cb = p; + SLIST_INSERT_HEAD(&clone_defcbh, dcp, next); +} + /* * Do the actual clone operation. Any parameters must have been * setup by now. If a callback has been setup to do the work @@ -114,8 +136,14 @@ ifclonecreate(int s, void *arg) if (clone_cb == NULL) { /* Try to find a default callback */ SLIST_FOREACH(dcp, &clone_defcbh, next) { - if (strncmp(dcp->ifprefix, ifr.ifr_name, - strlen(dcp->ifprefix)) == 0) { + if ((dcp->clone_mt == MT_PREFIX) && + (strncmp(dcp->ifprefix, ifr.ifr_name, +strlen(dcp->ifprefix)) == 0)) { + clone_cb = dcp->clone_cb; + break; + } + if ((dcp->clone_mt == MT_FILTER) && + dcp->ifmatch(ifr.ifr_name)) { clone_cb = dcp->clone_cb; break; } Modified: head/sbin/ifconfig/ifconfig.8 == --- head/sbin/ifconfig/ifconfig.8 Wed Oct 21 20:42:29 2020 (r366916) +++ head/sbin/ifconfig/ifconfig.8 Wed Oct 21 21:28:20 2020 (r366917) @@ -582,7 +582,7 @@ they support in their capabilities. is a synonym for enabling all available WOL mechanisms. To disable WOL use .Fl wol . -.It Cm vlanmtu , vlanhwtag, vlanhwfilter, vlanhwcsum, vlanhwtso +.It Cm vlanmtu , vlanhwtag , vlanhwfilter , vlanhwcsum , vlanhwtso If the driver offers user-configurable VLAN support, enable reception of extended frames, tag processing in hardware, frame filtering in hardware, checksum offloading, or TSO on VLAN, @@ -592,7 +592,7 @@ Note that this must be configured on a physical interf not on a .Xr vlan 4 interface itself. -.It Fl vlanmtu , vlanhwtag , vlanhwfilter , vlanhwtso +.It Fl vlanmtu , vlanhwtag, vlanhwfilter, vlanhwtso If the driver offers user-configurable VLAN support, disable reception of extended frames
svn commit: r366916 - head/sys/dev/cxgbe
Author: np Date: Wed Oct 21 20:42:29 2020 New Revision: 366916 URL: https://svnweb.freebsd.org/changeset/base/366916 Log: cxgbe(4): display correct tid range for T6 based -SO cards. Reported by: Chelsio QA MFC after:1 week Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c == --- head/sys/dev/cxgbe/t4_main.cWed Oct 21 18:45:48 2020 (r366915) +++ head/sys/dev/cxgbe/t4_main.cWed Oct 21 20:42:29 2020 (r366916) @@ -9325,8 +9325,10 @@ sysctl_tids(SYSCTL_HANDLER_ARGS) if (b) sbuf_printf(sb, "%u-%u, ", t->tid_base, b - 1); sbuf_printf(sb, "%u-%u", hb, t->ntids - 1); - } else - sbuf_printf(sb, "%u-%u", t->tid_base, t->ntids - 1); + } else { + sbuf_printf(sb, "%u-%u", t->tid_base, t->tid_base + + t->ntids - 1); + } sbuf_printf(sb, ", in use: %u\n", atomic_load_acq_int(&t->tids_in_use)); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r366915 - head/sys/compat/linux
Author: trasz Date: Wed Oct 21 18:45:48 2020 New Revision: 366915 URL: https://svnweb.freebsd.org/changeset/base/366915 Log: Make linux(4) warn about unsupported socket(2) types. MFC after:2 weeks Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D25680 Modified: head/sys/compat/linux/linux_socket.c Modified: head/sys/compat/linux/linux_socket.c == --- head/sys/compat/linux/linux_socket.cWed Oct 21 17:11:57 2020 (r366914) +++ head/sys/compat/linux/linux_socket.cWed Oct 21 18:45:48 2020 (r366915) @@ -513,8 +513,11 @@ linux_socket(struct thread *td, struct linux_socket_ar if (retval_socket != 0) return (retval_socket); domain = linux_to_bsd_domain(args->domain); - if (domain == -1) + if (domain == -1) { + linux_msg(curthread, "unsupported socket domain %d, type %d, protocol %d", + args->domain, args->type & LINUX_SOCK_TYPE_MASK, args->protocol); return (EAFNOSUPPORT); + } retval_socket = kern_socket(td, domain, type, args->protocol); if (retval_socket) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r366914 - head/sys/dev/ntb/test
Author: vangyzen Date: Wed Oct 21 17:11:57 2020 New Revision: 366914 URL: https://svnweb.freebsd.org/changeset/base/366914 Log: ntb_tool: ubuf is too small to hold a human readable 64 bit value ubuf buffer is too small. It should be 18 if a NULL is not needed, or 19 to hold the NULL terminator for the full 64-BIT value plus the 0x prefix. Submitted by: bret_ketc...@dell.com Reviewed by: markj mav MFC after:2 weeks Sponsored by: Dell EMC Isilon Differential Revision:https://reviews.freebsd.org/D26893 Modified: head/sys/dev/ntb/test/ntb_tool.c Modified: head/sys/dev/ntb/test/ntb_tool.c == --- head/sys/dev/ntb/test/ntb_tool.cWed Oct 21 16:30:34 2020 (r366913) +++ head/sys/dev/ntb/test/ntb_tool.cWed Oct 21 17:11:57 2020 (r366914) @@ -384,7 +384,7 @@ get_ubuf(struct sysctl_req *req, char *ubuf) static int read_out(struct sysctl_req *req, uint64_t val) { - char ubuf[16]; + char ubuf[19]; memset((void *)ubuf, 0, sizeof(ubuf)); snprintf(ubuf, sizeof(ubuf), "0x%jx", val); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r366913 - head/usr.bin/col
Author: fernape (ports committer) Date: Wed Oct 21 16:30:34 2020 New Revision: 366913 URL: https://svnweb.freebsd.org/changeset/base/366913 Log: col(1): Add EXAMPLES section Add a small example. Cross reference clean up for colcrt, nroff and tbl. Reviewed by: gbe@, bcr@ Approved by: gbe@ Differential Revision:https://reviews.freebsd.org/D26864 Modified: head/usr.bin/col/col.1 Modified: head/usr.bin/col/col.1 == --- head/usr.bin/col/col.1 Wed Oct 21 16:04:57 2020(r366912) +++ head/usr.bin/col/col.1 Wed Oct 21 16:30:34 2020(r366913) @@ -31,7 +31,7 @@ .\" @(#)col.1 8.1 (Berkeley) 6/29/93 .\" $FreeBSD$ .\" -.Dd May 10, 2015 +.Dd October 21, 2020 .Dt COL 1 .Os .Sh NAME @@ -47,10 +47,6 @@ The utility filters out reverse (and half reverse) line feeds so that the output is in the correct order with only forward and half forward line feeds, and replaces white-space characters with tabs where possible. -This can be useful in processing the output of -.Xr nroff 1 -and -.Xr tbl 1 . .Pp The .Nm @@ -149,11 +145,19 @@ as described in .Xr environ 7 . .Sh EXIT STATUS .Ex -std +.Sh EXAMPLES +We can use +.Nm +to filter the output of +.Xr man 1 +and remove the backspace characters ( +.Em ^H +) before searching for some text: +.Bd -literal -offset indent +man ls | col -b | grep HISTORY +.Ed .Sh SEE ALSO -.Xr colcrt 1 , -.Xr expand 1 , -.Xr nroff 1 , -.Xr tbl 1 +.Xr expand 1 .Sh STANDARDS The .Nm ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r366911 - in head/sys: cam dev/nvme kern sys ufs/ffs
Author: brooks Date: Wed Oct 21 16:00:15 2020 New Revision: 366911 URL: https://svnweb.freebsd.org/changeset/base/366911 Log: vmapbuf: don't smuggle address or length in buf Instead, add arguments to vmapbuf. Since this argument is always a pointer use a type of void * and cast to vm_offset_t in vmapbuf. (In CheriBSD we've altered vm_fault_quick_hold_pages to take a pointer and check its bounds.) In no other situtation does b_data contain a user pointer and vmapbuf replaces b_data with the actual mapping. Suggested by: jhb Reviewed by: imp, jhb Obtained from:CheriBSD MFC after:1 week Sponsored by: DARPA Differential Revision:https://reviews.freebsd.org/D26784 Modified: head/sys/cam/cam_periph.c head/sys/dev/nvme/nvme_ctrlr.c head/sys/kern/vfs_bio.c head/sys/sys/buf.h head/sys/ufs/ffs/ffs_rawread.c Modified: head/sys/cam/cam_periph.c == --- head/sys/cam/cam_periph.c Wed Oct 21 15:06:44 2020(r366910) +++ head/sys/cam/cam_periph.c Wed Oct 21 16:00:15 2020(r366911) @@ -955,18 +955,12 @@ cam_periph_mapmem(union ccb *ccb, struct cam_periph_ma */ mapinfo->bp[i] = uma_zalloc(pbuf_zone, M_WAITOK); - /* put our pointer in the data slot */ - mapinfo->bp[i]->b_data = *data_ptrs[i]; - - /* set the transfer length, we know it's < MAXPHYS */ - mapinfo->bp[i]->b_bufsize = lengths[i]; - /* set the direction */ mapinfo->bp[i]->b_iocmd = (dirs[i] == CAM_DIR_OUT) ? BIO_WRITE : BIO_READ; /* Map the buffer into kernel memory. */ - if (vmapbuf(mapinfo->bp[i], 1) < 0) { + if (vmapbuf(mapinfo->bp[i], *data_ptrs[i], lengths[i], 1) < 0) { uma_zfree(pbuf_zone, mapinfo->bp[i]); goto fail; } Modified: head/sys/dev/nvme/nvme_ctrlr.c == --- head/sys/dev/nvme/nvme_ctrlr.c Wed Oct 21 15:06:44 2020 (r366910) +++ head/sys/dev/nvme/nvme_ctrlr.c Wed Oct 21 16:00:15 2020 (r366911) @@ -1268,10 +1268,8 @@ nvme_ctrlr_passthrough_cmd(struct nvme_controller *ctr */ PHOLD(curproc); buf = uma_zalloc(pbuf_zone, M_WAITOK); - buf->b_data = pt->buf; - buf->b_bufsize = pt->len; buf->b_iocmd = pt->is_read ? BIO_READ : BIO_WRITE; - if (vmapbuf(buf, 1) < 0) { + if (vmapbuf(buf, pt->buf, pt->len, 1) < 0) { ret = EFAULT; goto err; } Modified: head/sys/kern/vfs_bio.c == --- head/sys/kern/vfs_bio.c Wed Oct 21 15:06:44 2020(r366910) +++ head/sys/kern/vfs_bio.c Wed Oct 21 16:00:15 2020(r366911) @@ -4907,22 +4907,21 @@ vm_hold_free_pages(struct buf *bp, int newbsize) * This function only works with pager buffers. */ int -vmapbuf(struct buf *bp, int mapbuf) +vmapbuf(struct buf *bp, void *uaddr, size_t len, int mapbuf) { vm_prot_t prot; int pidx; - if (bp->b_bufsize < 0) - return (-1); prot = VM_PROT_READ; if (bp->b_iocmd == BIO_READ) prot |= VM_PROT_WRITE; /* Less backwards than it looks */ if ((pidx = vm_fault_quick_hold_pages(&curproc->p_vmspace->vm_map, - (vm_offset_t)bp->b_data, bp->b_bufsize, prot, bp->b_pages, + (vm_offset_t)uaddr, len, prot, bp->b_pages, btoc(MAXPHYS))) < 0) return (-1); + bp->b_bufsize = len; bp->b_npages = pidx; - bp->b_offset = ((vm_offset_t)bp->b_data) & PAGE_MASK; + bp->b_offset = ((vm_offset_t)uaddr) & PAGE_MASK; if (mapbuf || !unmapped_buf_allowed) { pmap_qenter((vm_offset_t)bp->b_kvabase, bp->b_pages, pidx); bp->b_data = bp->b_kvabase + bp->b_offset; Modified: head/sys/sys/buf.h == --- head/sys/sys/buf.h Wed Oct 21 15:06:44 2020(r366910) +++ head/sys/sys/buf.h Wed Oct 21 16:00:15 2020(r366911) @@ -575,7 +575,7 @@ voidvfs_bio_set_flags(struct buf *bp, int ioflags); void vfs_bio_set_valid(struct buf *, int base, int size); void vfs_busy_pages(struct buf *, int clear_modify); void vfs_unbusy_pages(struct buf *); -intvmapbuf(struct buf *, int); +intvmapbuf(struct buf *, void *, size_t, int); void vunmapbuf(struct buf *); void brelvp(struct buf *); void bgetvp(struct vnode *, struct buf *); Modified: head/sys/ufs/ffs/ffs_rawread.c ===
svn commit: r366908 - in head: share/dtrace sys/netpfil/ipfw
Author: ae Date: Wed Oct 21 15:01:33 2020 New Revision: 366908 URL: https://svnweb.freebsd.org/changeset/base/366908 Log: Add dtrace SDT probe ipfw:::rule-matched. It helps to reduce complexity with debugging of large ipfw rulesets. Also define several constants and translators, that can by used by dtrace scripts with this probe. Reviewed by: gnn Obtained from:Yandex LLC MFC after:2 weeks Sponsored by: Yandex LLC Differential Revision:https://reviews.freebsd.org/D26879 Added: head/share/dtrace/ipfw.d (contents, props changed) Modified: head/share/dtrace/Makefile head/sys/netpfil/ipfw/ip_fw2.c Modified: head/share/dtrace/Makefile == --- head/share/dtrace/Makefile Wed Oct 21 05:57:25 2020(r366907) +++ head/share/dtrace/Makefile Wed Oct 21 15:01:33 2020(r366908) @@ -21,7 +21,7 @@ SCRIPTS= blocking \ SCRIPTSDIR= ${SHAREDIR}/dtrace -DSRCS= mbuf.d +DSRCS= mbuf.d ipfw.d FILES= ${DSRCS} FILESDIR= /usr/lib/dtrace Added: head/share/dtrace/ipfw.d == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/dtrace/ipfw.dWed Oct 21 15:01:33 2020(r366908) @@ -0,0 +1,219 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2020 Yandex LLC + * Copyright (c) 2020 Andrey V. Elsukov + * + * 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 AUTHORS 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 AUTHORS 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$ + */ + +#pragma D depends_on provider ipfw + +/* ipfw_chk() return values */ +#pragma D binding "1.0" IP_FW_PASS +inline int IP_FW_PASS =0; +#pragma D binding "1.0" IP_FW_DENY +inline int IP_FW_DENY =1; +#pragma D binding "1.0" IP_FW_DIVERT +inline int IP_FW_DIVERT = 2; +#pragma D binding "1.0" IP_FW_TEE +inline int IP_FW_TEE = 3; +#pragma D binding "1.0" IP_FW_DUMMYNET +inline int IP_FW_DUMMYNET =4; +#pragma D binding "1.0" IP_FW_NETGRAPH +inline int IP_FW_NETGRAPH =5; +#pragma D binding "1.0" IP_FW_NGTEE +inline int IP_FW_NGTEE = 6; +#pragma D binding "1.0" IP_FW_NAT +inline int IP_FW_NAT = 7; +#pragma D binding "1.0" IP_FW_REASS +inline int IP_FW_REASS = 8; +#pragma D binding "1.0" IP_FW_NAT64 +inline int IP_FW_NAT64 = 9; + +#pragma D binding "1.0" ipfw_retcodes +inline string ipfw_retcodes[int ret] = + ret == IP_FW_PASS ? "PASS" : + ret == IP_FW_DENY ? "DENY" : + ret == IP_FW_DIVERT ? "DIVERT" : + ret == IP_FW_TEE ? "TEE" : + ret == IP_FW_DUMMYNET ? "DUMMYNET" : + ret == IP_FW_NETGRAPH ? "NETGRAPH" : + ret == IP_FW_NGTEE ? "NGTEE" : + ret == IP_FW_NAT ? "NAT" : + ret == IP_FW_REASS ? "REASS" : + ret == IP_FW_NAT64 ? "NAT64" : + ""; + +/* ip_fw_args flags */ +#pragma D binding "1.0" IPFW_ARGS_ETHER +inline int IPFW_ARGS_ETHER = 0x0001; /* valid ethernet header */ +#pragma D binding "1.0" IPFW_ARGS_NH4 +inline int IPFW_ARGS_NH4 = 0x0002; /* IPv4 next hop in hopstore */ +#pragma D binding "1.0" IPFW_ARGS_NH6 +inline int IPFW_ARGS_NH6 = 0x0004; /* IPv6 next hop in hopstore */ +#pragma D binding "1.0" IPFW_ARGS_NH4PTR +inline int IPFW_ARGS_NH4PTR = 0x0008; /* IPv4 next hop in next_hop */ +#pragma D binding "1.0" IPFW_ARGS_NH6PTR +inline int IPFW_ARGS_NH6PTR = 0x0010; /* IPv6 next hop in next_hop6 */ +#pragma D binding "1.0" IPFW_ARGS_REF +inline int IPFW_ARGS_REF = 0x0020; /* valid ipfw_rule_ref */ +#pragma D binding "1.0" IPFW_ARGS_IN +inline int IPFW_ARGS_IN = 0x0040; /* called on input */ +#pragma D binding "1.0" IPFW_ARGS_OUT +inl