svn commit: r364983 - stable/12/sys/kern
Author: mckusick Date: Mon Aug 31 05:25:13 2020 New Revision: 364983 URL: https://svnweb.freebsd.org/changeset/base/364983 Log: MFC of 364895 Comment on when and why pathnames are deleted from the name cache. Modified: stable/12/sys/kern/vfs_lookup.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/vfs_lookup.c == --- stable/12/sys/kern/vfs_lookup.c Mon Aug 31 01:45:48 2020 (r364982) +++ stable/12/sys/kern/vfs_lookup.c Mon Aug 31 05:25:13 2020 (r364983) @@ -663,6 +663,16 @@ lookup(struct nameidata *ndp) wantparent = cnp->cn_flags & (LOCKPARENT | WANTPARENT); KASSERT(cnp->cn_nameiop == LOOKUP || wantparent, ("CREATE, DELETE, RENAME require LOCKPARENT or WANTPARENT.")); + /* +* When set to zero, docache causes the last component of the +* pathname to be deleted from the cache and the full lookup +* of the name to be done (via VOP_CACHEDLOOKUP()). Often +* filesystems need some pre-computed values that are made +* during the full lookup, for instance UFS sets dp->i_offset. +* +* The docache variable is set to zero when requested by the +* NOCACHE flag and for all modifying operations except CREATE. +*/ docache = (cnp->cn_flags & NOCACHE) ^ NOCACHE; if (cnp->cn_nameiop == DELETE || (wantparent && cnp->cn_nameiop != CREATE && ___ 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: r364982 - head/sys/netinet6
Author: kevans Date: Mon Aug 31 01:45:48 2020 New Revision: 364982 URL: https://svnweb.freebsd.org/changeset/base/364982 Log: ipv6: quit dropping packets looping back on p2p interfaces To paraphrase the below-referenced PR: This logic originated in the KAME project, and was even controversial when it was enabled there by default in 2001. No such equivalent logic exists in the IPv4 stack, and it turns out that this leads to us dropping valid traffic when the "point to point" interface is actually a 1:many tun interface, e.g. with the wireguard userland stack. Even in the case of true point-to-point links, this logic only avoids transient looping of packets sent by misconfigured applications or attackers, which can be subverted by proper route configuration rather than hardcoded logic in the kernel to drop packets. In the review, melifaro goes on to note that the kernel can't fix it, so it perhaps shouldn't try to be 'smart' about it. Additionally, that TTL will still kick in even with incorrect route configuration. PR: 247718 Reviewed by: melifaro, rgrimes MFC after:1 week Differential Revision:https://reviews.freebsd.org/D25567 Modified: head/sys/netinet6/ip6_forward.c Modified: head/sys/netinet6/ip6_forward.c == --- head/sys/netinet6/ip6_forward.c Mon Aug 31 00:59:02 2020 (r364981) +++ head/sys/netinet6/ip6_forward.c Mon Aug 31 01:45:48 2020 (r364982) @@ -260,24 +260,8 @@ again: * modified by a redirect. */ if (V_ip6_sendredirects && nh->nh_ifp == m->m_pkthdr.rcvif && !srcrt && - (nh->nh_flags & NHF_REDIRECT) == 0) { - if ((nh->nh_ifp->if_flags & IFF_POINTOPOINT) != 0) { - /* -* If the incoming interface is equal to the outgoing -* one, and the link attached to the interface is -* point-to-point, then it will be highly probable -* that a routing loop occurs. Thus, we immediately -* drop the packet and send an ICMPv6 error message. -* -* type/code is based on suggestion by Rich Draves. -* not sure if it is the best pick. -*/ - icmp6_error(mcopy, ICMP6_DST_UNREACH, - ICMP6_DST_UNREACH_ADDR, 0); - goto bad; - } + (nh->nh_flags & NHF_REDIRECT) == 0) type = ND_REDIRECT; - } /* * Fake scoped addresses. Note that even link-local source or ___ 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: r364321 - head/sbin/ipfw
Hrm, it seems this reply ended up in my spam folder; sorry for not replying until now. > > *strchr(timestr, '\n') = '\0'; > > bprintf(bp, "%s ", timestr); >^ Isnt this the +1 space? > > > } else { > > - bprintf(bp, "%*s", twidth, " "); > > + bprintf(bp, "%*s", twidth + 1, " "); > ^missing from this string? Inserting an extra space in the format string would also work, sure. I considered doing it that way but in the end decided it's not materially more clear one way or another, so used the patch as submitted. ___ 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: r364981 - stable/12/sys/cam/scsi
Author: mav Date: Mon Aug 31 00:59:02 2020 New Revision: 364981 URL: https://svnweb.freebsd.org/changeset/base/364981 Log: MFC r364309: Extend EIIOE field handling according to ses4r5 draft. It should not affect any existing systems. Modified: stable/12/sys/cam/scsi/scsi_enc_ses.c stable/12/sys/cam/scsi/scsi_ses.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cam/scsi/scsi_enc_ses.c == --- stable/12/sys/cam/scsi/scsi_enc_ses.c Sun Aug 30 21:46:29 2020 (r364980) +++ stable/12/sys/cam/scsi/scsi_enc_ses.c Mon Aug 31 00:59:02 2020 (r364981) @@ -1797,7 +1797,7 @@ ses_process_elm_addlstatus(enc_softc_t *enc, struct en ses_elem_index_type_t index_type; eip_hdr = (struct ses_elm_addlstatus_eip_hdr *)elm_hdr; - if (eip_hdr->byte2 & SES_ADDL_EIP_EIIOE) { + if (SES_ADDL_EIP_EIIOE_EI_GLOB(eip_hdr->byte2)) { index_type = SES_ELEM_INDEX_GLOBAL; expected_index = iter.global_element_index; } else { @@ -1807,8 +1807,8 @@ ses_process_elm_addlstatus(enc_softc_t *enc, struct en if (eip_hdr->element_index < expected_index) { ENC_VLOG(enc, "%s: provided %selement index " "%d is lower then expected %d\n", - __func__, (eip_hdr->byte2 & - SES_ADDL_EIP_EIIOE) ? "global " : "", + __func__, SES_ADDL_EIP_EIIOE_EI_GLOB( + eip_hdr->byte2) ? "global " : "", eip_hdr->element_index, expected_index); goto badindex; } @@ -1818,7 +1818,7 @@ ses_process_elm_addlstatus(enc_softc_t *enc, struct en if (telement == NULL) { ENC_VLOG(enc, "%s: provided %selement index " "%d does not exist\n", __func__, - (eip_hdr->byte2 & SES_ADDL_EIP_EIIOE) ? + SES_ADDL_EIP_EIIOE_EI_GLOB(eip_hdr->byte2) ? "global " : "", eip_hdr->element_index); goto badindex; } @@ -1827,7 +1827,7 @@ ses_process_elm_addlstatus(enc_softc_t *enc, struct en ENC_VLOG(enc, "%s: provided %selement index " "%d can't have additional status\n", __func__, - (eip_hdr->byte2 & SES_ADDL_EIP_EIIOE) ? + SES_ADDL_EIP_EIIOE_EI_GLOB(eip_hdr->byte2) ? "global " : "", eip_hdr->element_index); badindex: /* @@ -1843,7 +1843,7 @@ badindex: element = telement; } - if (eip_hdr->byte2 & SES_ADDL_EIP_EIIOE) + if (SES_ADDL_EIP_EIIOE_EI_GLOB(eip_hdr->byte2)) index = iter.global_element_index; else index = iter.individual_element_index; @@ -1852,8 +1852,8 @@ badindex: ENC_VLOG(enc, "%s: provided %s element" "index %d skips mandatory status " " element at index %d\n", - __func__, (eip_hdr->byte2 & - SES_ADDL_EIP_EIIOE) ? "global " : "", + __func__, SES_ADDL_EIP_EIIOE_EI_GLOB( + eip_hdr->byte2) ? "global " : "", index, expected_index); } } Modified: stable/12/sys/cam/scsi/scsi_ses.h == --- stable/12/sys/cam/scsi/scsi_ses.h Sun Aug 30 21:46:29 2020 (r364980) +++ stable/12/sys/cam/scsi/scsi_ses.h Mon Aug 31 00:59:02 2020 (r364981) @@ -2439,7 +2439,13 @@ int ses_elm_addlstatus_invalid(struct ses_elm_addlstat struct ses_elm_addlstatus_eip_hdr { struct ses_elm_addlstatus_base_hdr base; uint8_t byte2; -#defineSES_ADDL_EIP_EIIOE 1 +#defineSES_ADDL_EIP_EIIOE_MASK 3 +#defineSES_ADDL_EIP_EIIOE_SES2 0 +#defineSES_ADDL_EIP_EIIOE_GLOB 1 +#defineSES_ADDL_EIP_EIIOE_IND 2 +#defineSES_ADDL_EIP_EIIOE_MIX 3 +#defineSES_ADDL_EIP_EIIOE_EI_GLOB(x) \ +(((x) & SES_ADDL_EIP_EIIOE_MASK) ==
svn commit: r364980 - head
Author: rmacklem Date: Sun Aug 30 21:46:29 2020 New Revision: 364980 URL: https://svnweb.freebsd.org/changeset/base/364980 Log: Add an entry to RELNOTES for the NFS over TLS kernel support. Modified: head/RELNOTES Modified: head/RELNOTES == --- head/RELNOTES Sun Aug 30 21:21:58 2020(r364979) +++ head/RELNOTES Sun Aug 30 21:46:29 2020(r364980) @@ -10,6 +10,17 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. +r364896: + A series of commits ending with r364896 added NFS over TLS + to the kernel. This is believed to be compatible with + the Internet Draft titled "Towards Remote Procedure Call Encryption + By Default" (expected to soon become an RFC). + The mount_nfs(8) and exports(5) man pages describe the mount and + export option(s) related to NFS over TLS. + For NFS over TLS to work, the rpctlscd(8) { client } or rpctlssd(8) + { server } must be running on a kernel built with "options KERN_TLS" + on an architecture where PMAP_HAS_DMAP != 0. + r364725: Changes to one obscure devd event generated on resume need to be documented. The old form will still be generated in 13, but not ___ 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: r364979 - head/usr.sbin/mountd
Author: rmacklem Date: Sun Aug 30 21:21:58 2020 New Revision: 364979 URL: https://svnweb.freebsd.org/changeset/base/364979 Log: Add support for the NFS over TLS exports to mountd. Three new export flags are added to mountd that will restrict exported file system mounts to use TLS. Without these flags, TLS is allowed, but not required. The exports(5) man page will be updated in a future commit. Modified: head/usr.sbin/mountd/mountd.c Modified: head/usr.sbin/mountd/mountd.c == --- head/usr.sbin/mountd/mountd.c Sun Aug 30 18:21:54 2020 (r364978) +++ head/usr.sbin/mountd/mountd.c Sun Aug 30 21:21:58 2020 (r364979) @@ -2795,6 +2795,13 @@ do_opt(char **cpp, char **endcpp, struct exportlist *e return (1); opt_flags |= OP_SEC; usedarg++; + } else if (!strcmp(cpopt, "tls")) { + *exflagsp |= MNT_EXTLS; + } else if (!strcmp(cpopt, "tlscert")) { + *exflagsp |= (MNT_EXTLS | MNT_EXTLSCERT); + } else if (!strcmp(cpopt, "tlscertuser")) { + *exflagsp |= (MNT_EXTLS | MNT_EXTLSCERT | + MNT_EXTLSCERTUSER); } else { syslog(LOG_ERR, "bad opt %s", cpopt); return (1); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r364927 - head/sys/arm/allwinner/clkng
On 28/08/2020 21:25, Emmanuel Vadot wrote: > Author: manu > Date: Fri Aug 28 18:25:45 2020 > New Revision: 364927 > URL: https://svnweb.freebsd.org/changeset/base/364927 > > Log: > arm: allwinner: clk: Add printfs when we cannot set the correct freq > > For some unknown reason this seems to fix this function when we printf > the best variable. This isn't a delay problem as doing a printf without > it doesn't solve this problem. > This is way above my pay grade so add some printf that shouldn't be printed > in 99% of the case anyway. > Fix booting on most Allwinner boards as the mmc IP uses a NM clock. Just so that our IRC conversation does not get lost to time. I think that the real problem with the code is that it passes a difference between two uint64_t-s, which is uint64_t itself, to abs() which takes an int and returns an int. I am not sure what liberties compilers (especially, clang) can take with that incorrect code -- and they have some options, because abs() is an inline function -- and how the magic printf-s affect those liberties, but I think that it is better to make the code correct. I think that abs(x - y) can be replaced with a local function like: static inline uint64_t distance(uint64_t x, uint64_t y) { return (x >= y ? x - y : y - x); } > Reported by:Alexander Mishin > MFC after: 3 days > X-MFC-With: 363887 > > Modified: > head/sys/arm/allwinner/clkng/aw_clk_nm.c > > Modified: head/sys/arm/allwinner/clkng/aw_clk_nm.c > == > --- head/sys/arm/allwinner/clkng/aw_clk_nm.c Fri Aug 28 17:55:54 2020 > (r364926) > +++ head/sys/arm/allwinner/clkng/aw_clk_nm.c Fri Aug 28 18:25:45 2020 > (r364927) > @@ -221,11 +221,15 @@ aw_clk_nm_set_freq(struct clknode *clk, uint64_t fpare > if ((best < *fout) && > ((flags & CLK_SET_ROUND_DOWN) == 0)) { > *stop = 1; > + printf("best freq (%llu) < requested freq(%llu)\n", > + best, *fout); > return (ERANGE); > } > if ((best > *fout) && > ((flags & CLK_SET_ROUND_UP) == 0)) { > *stop = 1; > + printf("best freq (%llu) > requested freq(%llu)\n", > + best, *fout); > return (ERANGE); > } > > -- Andriy Gapon ___ 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: r364978 - stable/11/cddl/contrib/opensolaris/lib/libzfs/common
Author: asomers Date: Sun Aug 30 18:21:54 2020 New Revision: 364978 URL: https://svnweb.freebsd.org/changeset/base/364978 Log: MFC r364412: zfs: fix EIO accessing dataset after resuming interrupted receive ZFS unmounts a dataset while receiving into it and remounts it afterwards. But if ZFS is resuming an incomplete receive, it screws up and ends up with a dataset that is mounted, but returns EIO for every access. This commit fixes that condition. While the vulnerable code also exists in OpenZFS, the problem is not reproducible there. Apparently OpenZFS doesn't unmount the destination dataset during receive, like FreeBSD does. PR: 248606 Reviewed by: mmacy Sponsored by: Axcient Differential Revision:https://reviews.freebsd.org/D26034 Modified: stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c == --- stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Sun Aug 30 17:40:59 2020(r364977) +++ stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Sun Aug 30 18:21:54 2020(r364978) @@ -3415,7 +3415,7 @@ zfs_receive_one(libzfs_handle_t *hdl, int infd, const } if (!flags->dryrun && zhp->zfs_type == ZFS_TYPE_FILESYSTEM && - stream_wantsnewfs) { + (stream_wantsnewfs || resuming)) { /* We can't do online recv in this case */ clp = changelist_gather(zhp, ZFS_PROP_NAME, 0, 0); if (clp == NULL) { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r353419 - head/sys/net
On Fri, Aug 28, 2020 at 02:31:30PM -0700, Oleksandr Tymoshenko wrote: O> Gleb Smirnoff (gleb...@freebsd.org) wrote: O> > Author: glebius O> > Date: Thu Oct 10 23:42:55 2019 O> > New Revision: 353419 O> > URL: https://svnweb.freebsd.org/changeset/base/353419 O> > O> > Log: O> > Provide new KPI for network drivers to access lists of interface O> > addresses. The KPI doesn't reveal neither how addresses are stored, O> > how the access to them is synchronized, neither reveal struct ifaddr O> > and struct ifmaddr. O> > O> > Reviewed by: gallatin, erj, hselasky, philip, stevek O> > Differential Revision: https://reviews.freebsd.org/D21943 O> O> Hi Gleb, O> O> Are there any plans to MFC this change and the subsequent API consumer changes? O> Lack of this API in 12 makes MFCing unrelated eth driver fixes hard. I don't plan to MFC it, but there is nothing that would blocks such MFC. Of course internals of the functions would be different - using mutex instead of the epoch to sync access to address lists. I can provide patch for you, but you would be responsive for MFC. I don't have any 12-based systems to test changes. -- Gleb Smirnoff ___ 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: r364977 - head/usr.bin/who
Author: fernape (ports committer) Date: Sun Aug 30 17:40:59 2020 New Revision: 364977 URL: https://svnweb.freebsd.org/changeset/base/364977 Log: who(1): Add EXAMPLES section Add EXAMPLES section covering all the flags except -m and -bTu covered by other flags. Approved by: manpages (bcr@) Differential Revision:https://reviews.freebsd.org/D26219 Modified: head/usr.bin/who/who.1 Modified: head/usr.bin/who/who.1 == --- head/usr.bin/who/who.1 Sun Aug 30 17:37:56 2020(r364976) +++ head/usr.bin/who/who.1 Sun Aug 30 17:40:59 2020(r364977) @@ -28,7 +28,7 @@ .\" @(#)who.1 8.2 (Berkeley) 12/30/93 .\" $FreeBSD$ .\" -.Dd February 11, 2012 +.Dd August 30, 2020 .Dt WHO 1 .Os .Sh NAME @@ -80,7 +80,7 @@ An error occurred. .El .It Fl u Show idle time for each user in hours and minutes as -.Ar hh Ns : Ns Ar mm , +.Ar hh : Ns Ar mm , .Ql \&. if the user has been idle less than a minute, and .Dq Li old @@ -140,6 +140,47 @@ as described in .El .Sh EXIT STATUS .Ex -std +.Sh EXAMPLES +Show a brief summary of who is logged in: +.Bd -literal -offset indent +$ who -q +fernape root root +# users = 3 +.Ed +.Pp +Show who is logged in along with the line and time fields (without the headers): +.Bd -literal -offset indent +$ who -s +fernape ttyv0Aug 26 16:23 +root ttyv1Aug 26 16:23 +root ttyv2Aug 26 16:23 +.Ed +.Pp +Show information about the terminal attached to standard input: +.Bd -literal -offset indent +$ who am i +fernape Aug 26 16:24 +.Ed +.Pp +Show time and date of the last system reboot, whether the users accept messages +and the idle time for each of them: +.Bd -literal -offset indent +$ who -a + - system boot Aug 26 16:23 . +fernape - ttyv0Aug 26 16:23 . +root - ttyv1Aug 26 16:23 . +root - ttyv2Aug 26 16:23 . +.Ed +.Pp +Same as above but showing headers: +.Bd -literal -offset indent +$ who -aH +NAME S LINE TIME IDLE FROM + - system boot Aug 26 16:23 . +fernape - ttyv0Aug 26 16:23 . +root - ttyv1Aug 26 16:23 00:01 +root - ttyv2Aug 26 16:23 00:01 +.Ed .Sh SEE ALSO .Xr last 1 , .Xr users 1 , ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r364976 - head/usr.bin/tsort
Author: fernape (ports committer) Date: Sun Aug 30 17:37:56 2020 New Revision: 364976 URL: https://svnweb.freebsd.org/changeset/base/364976 Log: tsort(1): Add EXAMPLES section Add a couple of simple examples to the man page Approved by: manpages (gbe@) Differential Revision:https://reviews.freebsd.org/D25883 Modified: head/usr.bin/tsort/tsort.1 Modified: head/usr.bin/tsort/tsort.1 == --- head/usr.bin/tsort/tsort.1 Sun Aug 30 17:13:04 2020(r364975) +++ head/usr.bin/tsort/tsort.1 Sun Aug 30 17:37:56 2020(r364976) @@ -31,7 +31,7 @@ .\" @(#)tsort.18.3 (Berkeley) 4/1/94 .\" $FreeBSD$ .\" -.Dd December 27, 2006 +.Dd August 30, 2020 .Dt TSORT 1 .Os .Sh NAME @@ -75,6 +75,71 @@ This is primarily intended for building libraries, where optimal ordering is not critical, and cycles occur often. .El +.Sh EXAMPLES +Assuming a file named +.Pa dag +with the following contents representing a directed acyclic graph: +.Bd -literal -offset indent +A B +A F +B C +B D +D E +.Ed +.Pp +Sort the nodes of the graph: +.Bd -literal -offset indent +$ tsort dag +A +F +B +D +C +E +.Ed +.Pp +White spaces and new line characters are considered equal. +This file for example is considered equal to the one we defined before: +.Bd -literal -offset indent +$ cat dga +A B A F B C B D D E +.Ed +.Pp +Assume we add a new directed arc from D to A creating a cycle: +.Bd -literal -offset indent +A B +A F +B C +B D +D E +D A +.Ed +.Pp +Ordering the graph detects the cycle: +.Bd -literal -offset indent +$ tsort dag +tsort: cycle in data +tsort: A +tsort: B +tsort: D +D +E +A +F +B +C +.Ed +.Pp +Same as above but silencing the warning about the cycle: +.Bd -literal -offset indent +$ tsort -q dag +D +E +A +F +B +C +.Ed .Sh SEE ALSO .Xr ar 1 .Sh HISTORY ___ 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: r364975 - head/sys/dev/mn
Author: glebius Date: Sun Aug 30 17:13:04 2020 New Revision: 364975 URL: https://svnweb.freebsd.org/changeset/base/364975 Log: Followup on r364922. Old comment said that the only reason to put the hook at queue mode was that mn_rx_intr() doesn't run at splnet level. In today's netgraph the only legitimate reason for queue mode is recursion avoidance. So I see no reason for queue mode here. Not tested! Modified: head/sys/dev/mn/if_mn.c Modified: head/sys/dev/mn/if_mn.c == --- head/sys/dev/mn/if_mn.c Sun Aug 30 16:27:58 2020(r364974) +++ head/sys/dev/mn/if_mn.c Sun Aug 30 17:13:04 2020(r364975) @@ -743,8 +743,6 @@ ngmn_connect(hook_p hook) if (!(u & 1)) printf("%s: init chan %d stat %08x\n", sc->name, chan, u); sc->m32x->stat = 1; - /* force outward queueing */ - NG_HOOK_FORCE_QUEUE(NG_HOOK_PEER(hook)); return (0); } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r364974 - stable/12/cddl/contrib/opensolaris/lib/libzfs/common
Author: asomers Date: Sun Aug 30 16:27:58 2020 New Revision: 364974 URL: https://svnweb.freebsd.org/changeset/base/364974 Log: MFC r364412: zfs: fix EIO accessing dataset after resuming interrupted receive ZFS unmounts a dataset while receiving into it and remounts it afterwards. But if ZFS is resuming an incomplete receive, it screws up and ends up with a dataset that is mounted, but returns EIO for every access. This commit fixes that condition. While the vulnerable code also exists in OpenZFS, the problem is not reproducible there. Apparently OpenZFS doesn't unmount the destination dataset during receive, like FreeBSD does. PR: 248606 Reviewed by: mmacy Sponsored by: Axcient Differential Revision:https://reviews.freebsd.org/D26034 Modified: stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Directory Properties: stable/12/ (props changed) Modified: stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c == --- stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Sun Aug 30 07:34:32 2020(r364973) +++ stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Sun Aug 30 16:27:58 2020(r364974) @@ -3433,7 +3433,7 @@ zfs_receive_one(libzfs_handle_t *hdl, int infd, const } if (!flags->dryrun && zhp->zfs_type == ZFS_TYPE_FILESYSTEM && - stream_wantsnewfs) { + (stream_wantsnewfs || resuming)) { /* We can't do online recv in this case */ clp = changelist_gather(zhp, ZFS_PROP_NAME, 0, 0); if (clp == NULL) { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r364973 - in head: share/man/man4 sys/conf sys/dev/sume sys/modules sys/modules/sume
On Sun, 30 Aug 2020 07:34:32 + (UTC) Marko Zec wrote: > Author: zec > Date: Sun Aug 30 07:34:32 2020 > New Revision: 364973 > URL: https://svnweb.freebsd.org/changeset/base/364973 > > Log: > Driver for 4x10Gb Ethernet reference NIC FPGA design for NetFPGA > SUME development board. > > Submitted by: Denis Salopek > Reported by:zec, bz (src); rgrimes, bcr (manpages) Should have been "Reviewed by:", sorry... Marko > MFC after: 7 days > Sponsored by: Google Summer of Code 2020 > Differential Revision: https://reviews.freebsd.org/D26074 > > Added: > head/share/man/man4/sume.4 (contents, props changed) > head/sys/dev/sume/ > head/sys/dev/sume/adapter.h (contents, props changed) > head/sys/dev/sume/if_sume.c (contents, props changed) > head/sys/modules/sume/ > head/sys/modules/sume/Makefile (contents, props changed) > Modified: > head/share/man/man4/Makefile > head/sys/conf/files.amd64 > head/sys/modules/Makefile ___ 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: r364973 - in head: share/man/man4 sys/conf sys/dev/sume sys/modules sys/modules/sume
Author: zec Date: Sun Aug 30 07:34:32 2020 New Revision: 364973 URL: https://svnweb.freebsd.org/changeset/base/364973 Log: Driver for 4x10Gb Ethernet reference NIC FPGA design for NetFPGA SUME development board. Submitted by: Denis Salopek Reported by: zec, bz (src); rgrimes, bcr (manpages) MFC after:7 days Sponsored by: Google Summer of Code 2020 Differential Revision:https://reviews.freebsd.org/D26074 Added: head/share/man/man4/sume.4 (contents, props changed) head/sys/dev/sume/ head/sys/dev/sume/adapter.h (contents, props changed) head/sys/dev/sume/if_sume.c (contents, props changed) head/sys/modules/sume/ head/sys/modules/sume/Makefile (contents, props changed) Modified: head/share/man/man4/Makefile head/sys/conf/files.amd64 head/sys/modules/Makefile Modified: head/share/man/man4/Makefile == --- head/share/man/man4/MakefileSun Aug 30 02:26:43 2020 (r364972) +++ head/share/man/man4/MakefileSun Aug 30 07:34:32 2020 (r364973) @@ -514,6 +514,7 @@ MAN=aac.4 \ ste.4 \ stf.4 \ stge.4 \ + ${_sume.4} \ ${_superio.4} \ sym.4 \ syncache.4 \ @@ -851,6 +852,7 @@ _qlxgbe.4= qlxgbe.4 _qlnxe.4= qlnxe.4 _sfxge.4= sfxge.4 _smartpqi.4= smartpqi.4 +_sume.4= sume.4 _vmd.4=vmd.4 MLINKS+=qlxge.4 if_qlxge.4 @@ -858,6 +860,7 @@ MLINKS+=qlxgb.4 if_qlxgb.4 MLINKS+=qlxgbe.4 if_qlxgbe.4 MLINKS+=qlnxe.4 if_qlnxe.4 MLINKS+=sfxge.4 if_sfxge.4 +MLINKS+=sume.4 if_sume.4 .if ${MK_BHYVE} != "no" _bhyve.4= bhyve.4 Added: head/share/man/man4/sume.4 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/sume.4 Sun Aug 30 07:34:32 2020(r364973) @@ -0,0 +1,98 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" +.\" Copyright (c) 2020 Denis Salopek +.\" +.\" 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 COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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$ +.\" +.Dd August 30, 2020 +.Dt SUME 4 +.Os +.Sh NAME +.Nm sume +.Nd "NetFPGA SUME 4x10Gb Ethernet driver" +.Sh SYNOPSIS +To compile this driver into the kernel, place the following lines +in your kernel configuration file: +.Bd -ragged -offset indent +.Cd "device sume" +.Ed +.Pp +Alternatively, to load the driver as a module at boot time, place +the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_sume_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for NetFPGA SUME Virtex-7 FPGA Development Board +with the reference NIC bitstream loaded onto it. +The HDL design for the reference NIC project uses the RIFFA based DMA +engine to communicate with the host machine over PCIe. +Every packet is transmitted to / from the board via a single DMA +transaction, taking up to two or three interrupts per one transaction +which yields low performance. +.Pp +There is no support for Jumbo frames as the hardware is capable of +dealing only with frames with maximum size of 1514 bytes. +The hardware does not support multicast filtering, provides no checksums, +and offers no other offloading. +.Sh SEE ALSO +.Xr arp 4 , +.Xr netgraph 4 , +.Xr netintro 4 , +.Xr ng_ether 4 , +.Xr vlan 4 , +.Xr ifconfig 8 +.Sh AUTHORS +The Linux +.Nm +driver was originally written by +.An -nosplit +.An Bjoern A. Zeeb . +The +.Fx version and this manual page were written by +.An Denis Salopek +as a GSoC project. +More information about the project can be found here: +.Pa https://wiki.freebsd.org/SummerOfCode2020Projects/NetFPGA_SUME_Driver +.Sh