Re: svn commit: r363679 - in head: contrib/netbsd-tests/lib/libc/regex/data lib/libc/regex

2020-07-29 Thread Kyle Evans
Sorry, on mobile, so doubling down on bad formatting by top-posting...

The sed/diff tests are easy to fix, will do those in about 8/9 hours.

The Google test failure is interesting- this expression has clearly been
wrong and getting the wrong results, so we've caught a legitimate issue
here. I think the best path forward for that one is to commit my libregex
extensions and link that baby up so that \w works.

Thanks,

Kyle Evans

On Wed, Jul 29, 2020, 22:53 Li-Wen Hsu  wrote:

> On Thu, Jul 30, 2020 at 7:22 AM Kyle Evans  wrote:
> >
> > Author: kevans
> > Date: Wed Jul 29 23:21:56 2020
> > New Revision: 363679
> > URL: https://svnweb.freebsd.org/changeset/base/363679
> >
> > Log:
> >   regex(3): Interpret many escaped ordinary characters as EESCAPE
> >
> >   In IEEE 1003.1-2008 [1] and earlier revisions, BRE/ERE grammar allows
> for
> >   any character to be escaped, but "ORD_CHAR preceded by an unescaped
> >character [gives undefined results]".
> >
> >   Historically, we've interpreted an escaped ordinary character as the
> >   ordinary character itself. This becomes problematic when some
> extensions
> >   give special meanings to an otherwise ordinary character
> >   (e.g. GNU's \b, \s, \w), meaning we may have two different valid
> >   interpretations of the same sequence.
> >
> >   To make this easier to deal with and given that the standard calls this
> >   undefined, we should throw an error (EESCAPE) if we run into this
> scenario
> >   to ease transition into a state where some escaped ordinaries are
> blessed
> >   with a special meaning -- it will either error out or have extended
> >   behavior, rather than have two entirely different versions of undefined
> >   behavior that leave the consumer of regex(3) guessing as to what
> behavior
> >   will be used or leaving them with false impressions.
> >
> >   This change bumps the symbol version of regcomp to FBSD_1.6 and
> provides the
> >   old escape semantics for legacy applications, just in case one has an
> older
> >   application that would immediately turn into a pumpkin because of an
> >   extraneous escape that's embehttps://
> ci.freebsd.org/job/FreeBSD-head-amd64-test/16011/testReport/junit/lib.googletest.gtest_main/googletest-port-test/main/dded
> or otherwise critical to its operation.
> >
> >   This is the final piece needed before enhancing libregex with GNU
> extensions
> >   and flipping the switch on bsdgrep.
> >
> >   [1] http://pubs.opengroup.org/onlinepubs/9699919799.2016edition/
> >
> >   PR:   229925 (exp-run, courtesy of antoine)
> >   Differential Revision:https://reviews.freebsd.org/D10510
> >
> > Modified:
> >   head/contrib/netbsd-tests/lib/libc/regex/data/meta.in
> >   head/contrib/netbsd-tests/lib/libc/regex/data/subexp.in
> >   head/lib/libc/regex/Symbol.map
> >   head/lib/libc/regex/regcomp.c
>
> I think there are 3 test cases need to be modified after this change:
>
>
> https://ci.freebsd.org/job/FreeBSD-head-amd64-test/16011/testReport/junit/lib.googletest.gtest_main/googletest-port-test/main/
>
> https://ci.freebsd.org/job/FreeBSD-head-amd64-test/16011/testReport/junit/usr.bin.diff/diff_test/side_by_side/
>
> https://ci.freebsd.org/job/FreeBSD-head-amd64-test/16011/testReport/junit/usr.bin.sed/sed2_test/hex_subst/
>
> Please help to check them, thanks!
>
> Li-Wen
>
___
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: r363679 - in head: contrib/netbsd-tests/lib/libc/regex/data lib/libc/regex

2020-07-29 Thread Li-Wen Hsu
On Thu, Jul 30, 2020 at 7:22 AM Kyle Evans  wrote:
>
> Author: kevans
> Date: Wed Jul 29 23:21:56 2020
> New Revision: 363679
> URL: https://svnweb.freebsd.org/changeset/base/363679
>
> Log:
>   regex(3): Interpret many escaped ordinary characters as EESCAPE
>
>   In IEEE 1003.1-2008 [1] and earlier revisions, BRE/ERE grammar allows for
>   any character to be escaped, but "ORD_CHAR preceded by an unescaped
>character [gives undefined results]".
>
>   Historically, we've interpreted an escaped ordinary character as the
>   ordinary character itself. This becomes problematic when some extensions
>   give special meanings to an otherwise ordinary character
>   (e.g. GNU's \b, \s, \w), meaning we may have two different valid
>   interpretations of the same sequence.
>
>   To make this easier to deal with and given that the standard calls this
>   undefined, we should throw an error (EESCAPE) if we run into this scenario
>   to ease transition into a state where some escaped ordinaries are blessed
>   with a special meaning -- it will either error out or have extended
>   behavior, rather than have two entirely different versions of undefined
>   behavior that leave the consumer of regex(3) guessing as to what behavior
>   will be used or leaving them with false impressions.
>
>   This change bumps the symbol version of regcomp to FBSD_1.6 and provides the
>   old escape semantics for legacy applications, just in case one has an older
>   application that would immediately turn into a pumpkin because of an
>   extraneous escape that's 
> embehttps://ci.freebsd.org/job/FreeBSD-head-amd64-test/16011/testReport/junit/lib.googletest.gtest_main/googletest-port-test/main/dded
>  or otherwise critical to its operation.
>
>   This is the final piece needed before enhancing libregex with GNU extensions
>   and flipping the switch on bsdgrep.
>
>   [1] http://pubs.opengroup.org/onlinepubs/9699919799.2016edition/
>
>   PR:   229925 (exp-run, courtesy of antoine)
>   Differential Revision:https://reviews.freebsd.org/D10510
>
> Modified:
>   head/contrib/netbsd-tests/lib/libc/regex/data/meta.in
>   head/contrib/netbsd-tests/lib/libc/regex/data/subexp.in
>   head/lib/libc/regex/Symbol.map
>   head/lib/libc/regex/regcomp.c

I think there are 3 test cases need to be modified after this change:

https://ci.freebsd.org/job/FreeBSD-head-amd64-test/16011/testReport/junit/lib.googletest.gtest_main/googletest-port-test/main/
https://ci.freebsd.org/job/FreeBSD-head-amd64-test/16011/testReport/junit/usr.bin.diff/diff_test/side_by_side/
https://ci.freebsd.org/job/FreeBSD-head-amd64-test/16011/testReport/junit/usr.bin.sed/sed2_test/hex_subst/

Please help to check them, thanks!

Li-Wen
___
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: r363683 - in head: . share/man/man4 sys/conf sys/dev/cy sys/dev/rc sys/dev/rp sys/modules/rc sys/modules/rp

2020-07-29 Thread John-Mark Gurney
Author: jmg
Date: Thu Jul 30 00:53:56 2020
New Revision: 363683
URL: https://svnweb.freebsd.org/changeset/base/363683

Log:
  remove some long abandonded serial drivers (cy, rc, rp) since 2008
  
  Reviewed by:  phk (earlier version)
  Reviewed by:  emaste (earlier version)
  Reviewed by:  bcr (earlier version)
  Reviewed by:  zeising (earlier version)
  Differential Revision:https://reviews.freebsd.org/D25874

Deleted:
  head/share/man/man4/cy.4
  head/share/man/man4/rc.4
  head/share/man/man4/rp.4
  head/sys/dev/cy/
  head/sys/dev/rc/
  head/sys/dev/rp/
  head/sys/modules/rc/
  head/sys/modules/rp/
Modified:
  head/ObsoleteFiles.inc
  head/share/man/man4/Makefile
  head/sys/conf/files

Modified: head/ObsoleteFiles.inc
==
--- head/ObsoleteFiles.inc  Thu Jul 30 00:52:37 2020(r363682)
+++ head/ObsoleteFiles.inc  Thu Jul 30 00:53:56 2020(r363683)
@@ -36,6 +36,11 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20200729: remove long expired serial drivers
+OLD_FILES+=usr/share/man/man4/cy.4.gz
+OLD_FILES+=usr/share/man/man4/rc.4.gz
+OLD_FILES+=usr/share/man/man4/rp.4.gz
+
 # 20200715: rework of devstat(9) man page
 OLD_FILES+=usr/share/man/man9/devstat_add_entry.9.gz
 

Modified: head/share/man/man4/Makefile
==
--- head/share/man/man4/MakefileThu Jul 30 00:52:37 2020
(r363682)
+++ head/share/man/man4/MakefileThu Jul 30 00:53:56 2020
(r363683)
@@ -121,7 +121,6 @@ MAN=aac.4 \
cxgb.4 \
cxgbe.4 \
cxgbev.4 \
-   cy.4 \
cyapa.4 \
da.4 \
dc.4 \
@@ -434,7 +433,6 @@ MAN=aac.4 \
${_qlnxe.4} \
ral.4 \
random.4 \
-   rc.4 \
rctl.4 \
re.4 \
rgephy.4 \
@@ -442,7 +440,6 @@ MAN=aac.4 \
rl.4 \
rndtest.4 \
route.4 \
-   rp.4 \
rtwn.4 \
rtwnfw.4 \
rtwn_pci.4 \

Modified: head/sys/conf/files
==
--- head/sys/conf/files Thu Jul 30 00:52:37 2020(r363682)
+++ head/sys/conf/files Thu Jul 30 00:53:56 2020(r363683)
@@ -1541,9 +1541,6 @@ t6fw.fw   optional cxgbe  
\
clean   "t6fw.fw"
 dev/cxgbe/crypto/t4_crypto.c   optional ccr \
compile-with "${NORMAL_C} -I$S/dev/cxgbe"
-dev/cy/cy.coptional cy
-dev/cy/cy_isa.coptional cy isa
-dev/cy/cy_pci.coptional cy pci
 dev/cyapa/cyapa.c  optional cyapa iicbus
 dev/dc/if_dc.c optional dc pci
 dev/dc/dcphy.c optional dc pci
@@ -2775,14 +2772,10 @@ dev/random/random_harvestq.cstandard
 dev/random/randomdev.c optional !random_loadable
 dev/random/fortuna.c   optional !random_loadable
 dev/random/hash.c  optional !random_loadable
-dev/rc/rc.coptional rc
 dev/rccgpio/rccgpio.c  optional rccgpio gpio
 dev/re/if_re.c optional re
 dev/rl/if_rl.c optional rl pci
 dev/rndtest/rndtest.c  optional rndtest
-dev/rp/rp.coptional rp
-dev/rp/rp_isa.coptional rp isa
-dev/rp/rp_pci.coptional rp pci
 #
 dev/rtwn/if_rtwn.c optional rtwn
 dev/rtwn/if_rtwn_beacon.c  optional rtwn
___
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: r363682 - head/sys/kern

2020-07-29 Thread Mark Johnston
Author: markj
Date: Thu Jul 30 00:52:37 2020
New Revision: 363682
URL: https://svnweb.freebsd.org/changeset/base/363682

Log:
  Fix a logic error in uipc_ready_scan().
  
  When processing the last record in a socket buffer, take care to avoid a
  NULL pointer dereference when advancing the record iterator.
  
  Reported by:  syzbot+6a689cc9c27bd2652...@syzkaller.appspotmail.com
  Fixes:r359778
  MFC after:1 week
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/kern/uipc_usrreq.c

Modified: head/sys/kern/uipc_usrreq.c
==
--- head/sys/kern/uipc_usrreq.c Wed Jul 29 23:59:35 2020(r363681)
+++ head/sys/kern/uipc_usrreq.c Thu Jul 30 00:52:37 2020(r363682)
@@ -1279,7 +1279,8 @@ uipc_ready_scan(struct socket *so, struct mbuf *m, int
mb = mb->m_next;
if (mb == NULL) {
mb = n;
-   n = mb->m_nextpkt;
+   if (mb != NULL)
+   n = mb->m_nextpkt;
}
}
}
___
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: r363681 - head

2020-07-29 Thread Kyle Evans
Author: kevans
Date: Wed Jul 29 23:59:35 2020
New Revision: 363681
URL: https://svnweb.freebsd.org/changeset/base/363681

Log:
  UPDATING / RELNOTES: Document new regcomp(3) behavior
  
  This is a breaking change that had a not-insignificant impact in ports, it
  is worth documenting it well.

Modified:
  head/RELNOTES
  head/UPDATING

Modified: head/RELNOTES
==
--- head/RELNOTES   Wed Jul 29 23:24:32 2020(r363680)
+++ head/RELNOTES   Wed Jul 29 23:59:35 2020(r363681)
@@ -10,6 +10,10 @@ newline.  Entries should be separated by a newline.
 
 Changes to this file should not be MFCed.
 
+r363679:
+   Applications using regex(3), e.g. sed/grep, will no longer accept
+   redundant escapes for most ordinary characters.
+
 r363253:
SCTP support has been removed from GENERIC kernel configurations.
The SCTP stack is now built as sctp.ko and can be dynamically loaded.

Modified: head/UPDATING
==
--- head/UPDATING   Wed Jul 29 23:24:32 2020(r363680)
+++ head/UPDATING   Wed Jul 29 23:59:35 2020(r363681)
@@ -26,6 +26,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW:
disable the most expensive debugging functionality run
"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
 
+20200729:
+   r363679 has redefined some undefined behavior in regcomp(3); notably,
+   extraneous escapes of most ordinary characters will no longer be
+   accepted.  An exp-run has identified all of the problems with this in
+   ports, but other non-ports software may need extra escapes removed to
+   continue to function.
+
 20200627:
A new implementation of bc and dc has been imorted in r362681. This
implementation corrects non-conformant behavior of the previous bc
___
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: r363680 - head/sys/kern

2020-07-29 Thread John Baldwin
Author: jhb
Date: Wed Jul 29 23:24:32 2020
New Revision: 363680
URL: https://svnweb.freebsd.org/changeset/base/363680

Log:
  Properly handle a closed TLS socket with pending receive data.
  
  If the remote end closes a TLS socket and the socket buffer still
  contains not-yet-decrypted TLS records but no decrypted TLS records,
  soreceive needs to block or fail with EWOULDBLOCK.  Previously it was
  trying to return data and dereferencing a NULL pointer.
  
  Reviewed by:  np
  Sponsored by: Chelsio
  Differential Revision:https://reviews.freebsd.org/D25838

Modified:
  head/sys/kern/uipc_socket.c

Modified: head/sys/kern/uipc_socket.c
==
--- head/sys/kern/uipc_socket.c Wed Jul 29 23:21:56 2020(r363679)
+++ head/sys/kern/uipc_socket.c Wed Jul 29 23:24:32 2020(r363680)
@@ -1965,12 +1965,17 @@ restart:
}
SOCKBUF_LOCK_ASSERT(>so_rcv);
if (so->so_rcv.sb_state & SBS_CANTRCVMORE) {
-   if (m == NULL && so->so_rcv.sb_tlsdcc == 0 &&
+   if (m != NULL)
+   goto dontblock;
+#ifdef KERN_TLS
+   else if (so->so_rcv.sb_tlsdcc == 0 &&
so->so_rcv.sb_tlscc == 0) {
+#else
+   else {
+#endif
SOCKBUF_UNLOCK(>so_rcv);
goto release;
-   } else
-   goto dontblock;
+   }
}
for (; m != NULL; m = m->m_next)
if (m->m_type == MT_OOBDATA  || (m->m_flags & M_EOR)) {
___
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: r363679 - in head: contrib/netbsd-tests/lib/libc/regex/data lib/libc/regex

2020-07-29 Thread Kyle Evans
Author: kevans
Date: Wed Jul 29 23:21:56 2020
New Revision: 363679
URL: https://svnweb.freebsd.org/changeset/base/363679

Log:
  regex(3): Interpret many escaped ordinary characters as EESCAPE
  
  In IEEE 1003.1-2008 [1] and earlier revisions, BRE/ERE grammar allows for
  any character to be escaped, but "ORD_CHAR preceded by an unescaped
   character [gives undefined results]".
  
  Historically, we've interpreted an escaped ordinary character as the
  ordinary character itself. This becomes problematic when some extensions
  give special meanings to an otherwise ordinary character
  (e.g. GNU's \b, \s, \w), meaning we may have two different valid
  interpretations of the same sequence.
  
  To make this easier to deal with and given that the standard calls this
  undefined, we should throw an error (EESCAPE) if we run into this scenario
  to ease transition into a state where some escaped ordinaries are blessed
  with a special meaning -- it will either error out or have extended
  behavior, rather than have two entirely different versions of undefined
  behavior that leave the consumer of regex(3) guessing as to what behavior
  will be used or leaving them with false impressions.
  
  This change bumps the symbol version of regcomp to FBSD_1.6 and provides the
  old escape semantics for legacy applications, just in case one has an older
  application that would immediately turn into a pumpkin because of an
  extraneous escape that's embedded or otherwise critical to its operation.
  
  This is the final piece needed before enhancing libregex with GNU extensions
  and flipping the switch on bsdgrep.
  
  [1] http://pubs.opengroup.org/onlinepubs/9699919799.2016edition/
  
  PR:   229925 (exp-run, courtesy of antoine)
  Differential Revision:https://reviews.freebsd.org/D10510

Modified:
  head/contrib/netbsd-tests/lib/libc/regex/data/meta.in
  head/contrib/netbsd-tests/lib/libc/regex/data/subexp.in
  head/lib/libc/regex/Symbol.map
  head/lib/libc/regex/regcomp.c

Modified: head/contrib/netbsd-tests/lib/libc/regex/data/meta.in
==
--- head/contrib/netbsd-tests/lib/libc/regex/data/meta.in   Wed Jul 29 
23:17:16 2020(r363678)
+++ head/contrib/netbsd-tests/lib/libc/regex/data/meta.in   Wed Jul 29 
23:21:56 2020(r363679)
@@ -4,7 +4,9 @@ a[bc]d  &   abd abd
 a\*c   &   a*c a*c
 a\\b   &   a\b a\b
 a\\\*b &   a\*ba\*b
-a\bc   &   abc abc
+# Begin FreeBSD
+a\bc EESCAPE
+# End FreeBSD
 a\   EESCAPE
 a\\bc  &   a\bca\bc
 \{ bC  BADRPT

Modified: head/contrib/netbsd-tests/lib/libc/regex/data/subexp.in
==
--- head/contrib/netbsd-tests/lib/libc/regex/data/subexp.in Wed Jul 29 
23:17:16 2020(r363678)
+++ head/contrib/netbsd-tests/lib/libc/regex/data/subexp.in Wed Jul 29 
23:21:56 2020(r363679)
@@ -12,7 +12,7 @@ a(b+)c-   abbbc   abbbc   bbb
 a(b*)c -   ac  ac  @c
 (a|ab)(bc([de]+)f|cde) -   abcdef  abcdef  a,bcdef,de
 # Begin FreeBSD
-a\(b\|c\)d b   ab|cd   ab|cd   b|c
+a\(b|c\)d  b   ab|cd   ab|cd   b|c
 # End FreeBSD
 # the regression tester only asks for 9 subexpressions
 a(b)(c)(d)(e)(f)(g)(h)(i)(j)k  -   abcdefghijk abcdefghijk 
b,c,d,e,f,g,h,i,j

Modified: head/lib/libc/regex/Symbol.map
==
--- head/lib/libc/regex/Symbol.map  Wed Jul 29 23:17:16 2020
(r363678)
+++ head/lib/libc/regex/Symbol.map  Wed Jul 29 23:21:56 2020
(r363679)
@@ -3,8 +3,11 @@
  */
 
 FBSD_1.0 {
-   regcomp;
regerror;
regexec;
regfree;
+};
+
+FBSD_1.6 {
+   regcomp;
 };

Modified: head/lib/libc/regex/regcomp.c
==
--- head/lib/libc/regex/regcomp.c   Wed Jul 29 23:17:16 2020
(r363678)
+++ head/lib/libc/regex/regcomp.c   Wed Jul 29 23:21:56 2020
(r363679)
@@ -102,11 +102,14 @@ struct parse {
sopno pend[NPAREN]; /* -> ) ([0] unused) */
bool allowbranch;   /* can this expression branch? */
bool bre;   /* convenience; is this a BRE? */
+   int pflags; /* other parsing flags -- legacy escapes? */
bool (*parse_expr)(struct parse *, struct branchc *);
void (*pre_parse)(struct parse *, struct branchc *);
void (*post_parse)(struct parse *, struct branchc *);
 };
 
+#define PFLAG_LEGACY_ESC   0x0001
+
 /* = begin header generated by ./mkh = */
 #ifdef __cplusplus
 extern "C" {
@@ -132,6 +135,7 @@ static void p_b_cclass(struct parse *p, cset *cs);
 static void p_b_eclass(struct parse *p, cset *cs);
 

svn commit: r363677 - head/sys/fs/nfsserver

2020-07-29 Thread Rick Macklem
Author: rmacklem
Date: Wed Jul 29 22:58:08 2020
New Revision: 363677
URL: https://svnweb.freebsd.org/changeset/base/363677

Log:
  Add support for ext_pgs mbufs to nfsrvd_readdir() and nfsrvd_readdirplus().
  
  This patch code that optionally (based on ND_TLS, never set yet) generates
  readdir replies in ext_pgs mbufs.
  To trim the list back, a new function that is ext_pgs aware called
  nfsm_trimtrailing() replaces newnfs_trimtrailing().
  newnfs_trimtrailing() is no longer used, but will be removed in a future
  commit, since its removal does modify the internal kpi between the NFS
  modules.
  
  This is another in the series of commits that add support to the NFS client
  and server for building RPC messages in ext_pgs mbufs with anonymous pages.
  This is useful so that the entire mbuf list does not need to be
  copied before calling sosend() when NFS over TLS is enabled.
  
  Use of ext_pgs mbufs will not be enabled until the kernel RPC is updated
  to handle TLS.

Modified:
  head/sys/fs/nfsserver/nfs_nfsdport.c

Modified: head/sys/fs/nfsserver/nfs_nfsdport.c
==
--- head/sys/fs/nfsserver/nfs_nfsdport.cWed Jul 29 22:10:25 2020
(r363676)
+++ head/sys/fs/nfsserver/nfs_nfsdport.cWed Jul 29 22:58:08 2020
(r363677)
@@ -144,6 +144,8 @@ static int nfsrv_dsremove(struct vnode *, char *, stru
 static int nfsrv_dssetacl(struct vnode *, struct acl *, struct ucred *,
 NFSPROC_T *);
 static int nfsrv_pnfsstatfs(struct statfs *, struct mount *);
+static void nfsm_trimtrailing(struct nfsrv_descript *, struct mbuf *,
+char *, int, int);
 
 int nfs_pnfsio(task_fn_t *, void *);
 
@@ -2043,6 +2045,17 @@ again:
vput(vp);
 
/*
+* If cnt > MCLBYTES and the reply will not be saved, use
+* ext_pgs mbufs for TLS.
+* For NFSv4.0, we do not know for sure if the reply will
+* be saved, so do not use ext_pgs mbufs for NFSv4.0.
+*/
+   if (cnt > MCLBYTES && siz > MCLBYTES &&
+   (nd->nd_flag & (ND_TLS | ND_EXTPG | ND_SAVEREPLY)) == ND_TLS &&
+   (nd->nd_flag & (ND_NFSV4 | ND_NFSV41)) != ND_NFSV4)
+   nd->nd_flag |= ND_EXTPG;
+
+   /*
 * dirlen is the size of the reply, including all XDR and must
 * not exceed cnt. For NFSv2, RFC1094 didn't clearly indicate
 * if the XDR should be included in "count", but to be safe, we do.
@@ -2146,6 +2159,7 @@ nfsrvd_readdirplus(struct nfsrv_descript *nd, int isdg
struct mount *mp, *new_mp;
uint64_t mounted_on_fileno;
struct thread *p = curthread;
+   int bextpg0, bextpg1, bextpgsiz0, bextpgsiz1;
 
if (nd->nd_repstat) {
nfsrv_postopattr(nd, getret, );
@@ -2359,11 +2373,27 @@ again:
}
 
/*
+* If the reply is likely to exceed MCLBYTES and the reply will
+* not be saved, use ext_pgs mbufs for TLS.
+* It is difficult to predict how large each entry will be and
+* how many entries have been read, so just assume the directory
+* entries grow by a factor of 4 when attributes are included.
+* For NFSv4.0, we do not know for sure if the reply will
+* be saved, so do not use ext_pgs mbufs for NFSv4.0.
+*/
+   if (cnt > MCLBYTES && siz > MCLBYTES / 4 &&
+   (nd->nd_flag & (ND_TLS | ND_EXTPG | ND_SAVEREPLY)) == ND_TLS &&
+   (nd->nd_flag & (ND_NFSV4 | ND_NFSV41)) != ND_NFSV4)
+   nd->nd_flag |= ND_EXTPG;
+
+   /*
 * Save this position, in case there is an error before one entry
 * is created.
 */
mb0 = nd->nd_mb;
bpos0 = nd->nd_bpos;
+   bextpg0 = nd->nd_bextpg;
+   bextpgsiz0 = nd->nd_bextpgsiz;
 
/*
 * Fill in the first part of the reply.
@@ -2385,6 +2415,8 @@ again:
 */
mb1 = nd->nd_mb;
bpos1 = nd->nd_bpos;
+   bextpg1 = nd->nd_bextpg;
+   bextpgsiz1 = nd->nd_bextpgsiz;
 
/* Loop through the records and build reply */
entrycnt = 0;
@@ -2401,6 +2433,8 @@ again:
 */
mb1 = nd->nd_mb;
bpos1 = nd->nd_bpos;
+   bextpg1 = nd->nd_bextpg;
+   bextpgsiz1 = nd->nd_bextpgsiz;

/*
 * For readdir_and_lookup get the vnode using
@@ -2626,11 +2660,11 @@ invalid:
if (!nd->nd_repstat && entrycnt == 0)
nd->nd_repstat = NFSERR_TOOSMALL;
if (nd->nd_repstat) {
-   newnfs_trimtrailing(nd, mb0, bpos0);
+   nfsm_trimtrailing(nd, mb0, bpos0, bextpg0, bextpgsiz0);
if (nd->nd_flag & ND_NFSV3)
nfsrv_postopattr(nd, getret, );
} else
-   newnfs_trimtrailing(nd, mb1, bpos1);
+  

svn commit: r363675 - in head/sys: dev/iommu dev/ntb/ntb_hw x86/iommu

2020-07-29 Thread Ruslan Bukin
Author: br
Date: Wed Jul 29 22:08:54 2020
New Revision: 363675
URL: https://svnweb.freebsd.org/changeset/base/363675

Log:
  o Don't include headers from iommu.h, include them from the header
consumers instead;
  o Order includes properly.
  
  Reviewed by:  kib
  Sponsored by: DARPA/AFRL
  Differential Revision:https://reviews.freebsd.org/D25878

Modified:
  head/sys/dev/iommu/iommu.h
  head/sys/dev/iommu/iommu_gas.c
  head/sys/dev/ntb/ntb_hw/ntb_hw_intel.c
  head/sys/dev/ntb/ntb_hw/ntb_hw_plx.c
  head/sys/x86/iommu/intel_ctx.c
  head/sys/x86/iommu/intel_drv.c
  head/sys/x86/iommu/intel_idpgtbl.c
  head/sys/x86/iommu/intel_intrmap.c
  head/sys/x86/iommu/intel_qi.c
  head/sys/x86/iommu/intel_quirks.c
  head/sys/x86/iommu/intel_utils.c

Modified: head/sys/dev/iommu/iommu.h
==
--- head/sys/dev/iommu/iommu.h  Wed Jul 29 21:15:06 2020(r363674)
+++ head/sys/dev/iommu/iommu.h  Wed Jul 29 22:08:54 2020(r363675)
@@ -34,14 +34,6 @@
 #ifndef _SYS_IOMMU_H_
 #define _SYS_IOMMU_H_
 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include 
-
 /* Host or physical memory address, after translation. */
 typedef uint64_t iommu_haddr_t;
 /* Guest or bus address, before translation. */

Modified: head/sys/dev/iommu/iommu_gas.c
==
--- head/sys/dev/iommu/iommu_gas.c  Wed Jul 29 21:15:06 2020
(r363674)
+++ head/sys/dev/iommu/iommu_gas.c  Wed Jul 29 22:08:54 2020
(r363675)
@@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -60,6 +59,9 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -67,11 +69,9 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
-#include 
-#include 
 #include 
 #endif
+#include 
 
 /*
  * Guest Address Space management.

Modified: head/sys/dev/ntb/ntb_hw/ntb_hw_intel.c
==
--- head/sys/dev/ntb/ntb_hw/ntb_hw_intel.c  Wed Jul 29 21:15:06 2020
(r363674)
+++ head/sys/dev/ntb/ntb_hw/ntb_hw_intel.c  Wed Jul 29 22:08:54 2020
(r363675)
@@ -50,6 +50,8 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 

Modified: head/sys/dev/ntb/ntb_hw/ntb_hw_plx.c
==
--- head/sys/dev/ntb/ntb_hw/ntb_hw_plx.cWed Jul 29 21:15:06 2020
(r363674)
+++ head/sys/dev/ntb/ntb_hw/ntb_hw_plx.cWed Jul 29 22:08:54 2020
(r363675)
@@ -42,6 +42,8 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 

Modified: head/sys/x86/iommu/intel_ctx.c
==
--- head/sys/x86/iommu/intel_ctx.c  Wed Jul 29 21:15:06 2020
(r363674)
+++ head/sys/x86/iommu/intel_ctx.c  Wed Jul 29 22:08:54 2020
(r363675)
@@ -58,18 +58,18 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
+#include 
 #include 
 #include 
 #include 
 #include 
-#include 
-#include 
 #include 
-#include 
 #include 
-#include 
+#include 
 #include 
-#include 
 
 static MALLOC_DEFINE(M_DMAR_CTX, "dmar_ctx", "Intel DMAR Context");
 static MALLOC_DEFINE(M_DMAR_DOMAIN, "dmar_dom", "Intel DMAR Domain");

Modified: head/sys/x86/iommu/intel_drv.c
==
--- head/sys/x86/iommu/intel_drv.c  Wed Jul 29 21:15:06 2020
(r363674)
+++ head/sys/x86/iommu/intel_drv.c  Wed Jul 29 22:08:54 2020
(r363675)
@@ -54,11 +54,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
-#include 
-#include 
-#include 
-#include 
 #include 
 #include 
 #include 
@@ -66,11 +61,16 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
-#include 
-#include 
+#include 
+#include 
+#include 
 #include 
 #include 
+#include 
+#include 
+#include 
+#include 
+#include 
 #include 
 
 #ifdef DEV_APIC

Modified: head/sys/x86/iommu/intel_idpgtbl.c
==
--- head/sys/x86/iommu/intel_idpgtbl.c  Wed Jul 29 21:15:06 2020
(r363674)
+++ head/sys/x86/iommu/intel_idpgtbl.c  Wed Jul 29 22:08:54 2020
(r363675)
@@ -58,15 +58,15 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
 #include 
 #include 
-#include 
 #include 
-#include 
+#include 
 #include 
 
 static int domain_unmap_buf_locked(struct dmar_domain *domain,

Modified: head/sys/x86/iommu/intel_intrmap.c
==
--- 

svn commit: r363674 - in head/share/man/man4: . man4.aarch64 man4.i386

2020-07-29 Thread John-Mark Gurney
Author: jmg
Date: Wed Jul 29 21:15:06 2020
New Revision: 363674
URL: https://svnweb.freebsd.org/changeset/base/363674

Log:
  add link to crypto(7) page, and drop a link to unrelated crypt(3) page..

Modified:
  head/share/man/man4/aesni.4
  head/share/man/man4/hifn.4
  head/share/man/man4/man4.aarch64/armv8crypto.4
  head/share/man/man4/man4.i386/glxsb.4
  head/share/man/man4/padlock.4
  head/share/man/man4/safe.4
  head/share/man/man4/safexcel.4

Modified: head/share/man/man4/aesni.4
==
--- head/share/man/man4/aesni.4 Wed Jul 29 20:31:11 2020(r363673)
+++ head/share/man/man4/aesni.4 Wed Jul 29 21:15:06 2020(r363674)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd September 26, 2017
+.Dd July 29, 2020
 .Dt AESNI 4
 .Os
 .Sh NAME
@@ -88,6 +88,7 @@ implementations.
 .Xr ipsec 4 ,
 .Xr padlock 4 ,
 .Xr random 4 ,
+.Xr crypto 7 ,
 .Xr crypto 9
 .Sh HISTORY
 The

Modified: head/share/man/man4/hifn.4
==
--- head/share/man/man4/hifn.4  Wed Jul 29 20:31:11 2020(r363673)
+++ head/share/man/man4/hifn.4  Wed Jul 29 21:15:06 2020(r363674)
@@ -26,7 +26,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd May 11, 2020
+.Dd July 29, 2020
 .Dt HIFN 4
 .Os
 .Sh NAME
@@ -101,11 +101,11 @@ See
 Contains a 7955 and supports symmetric and random number operations.
 .El
 .Sh SEE ALSO
-.Xr crypt 3 ,
 .Xr crypto 4 ,
 .Xr intro 4 ,
 .Xr ipsec 4 ,
 .Xr random 4 ,
+.Xr crypto 7 ,
 .Xr crypto 9
 .Sh HISTORY
 The

Modified: head/share/man/man4/man4.aarch64/armv8crypto.4
==
--- head/share/man/man4/man4.aarch64/armv8crypto.4  Wed Jul 29 20:31:11 
2020(r363673)
+++ head/share/man/man4/man4.aarch64/armv8crypto.4  Wed Jul 29 21:15:06 
2020(r363674)
@@ -27,7 +27,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd October 20, 2016
+.Dd July 29, 2020
 .Dt ARMV8CRYPTO 4
 .Os
 .Sh NAME
@@ -69,6 +69,7 @@ driver registers itself to accelerate AES operations f
 .Xr intro 4 ,
 .Xr ipsec 4 ,
 .Xr random 4 ,
+.Xr crypto 7 ,
 .Xr crypto 9
 .Sh HISTORY
 The

Modified: head/share/man/man4/man4.i386/glxsb.4
==
--- head/share/man/man4/man4.i386/glxsb.4   Wed Jul 29 20:31:11 2020
(r363673)
+++ head/share/man/man4/man4.i386/glxsb.4   Wed Jul 29 21:15:06 2020
(r363674)
@@ -16,7 +16,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd June 8, 2008
+.Dd July 29, 2020
 .Dt GLXSB 4 i386
 .Os
 .Sh NAME
@@ -73,6 +73,7 @@ device driver with AES keys of length != 128 bits.
 .Xr ipsec 4 ,
 .Xr pci 4 ,
 .Xr random 4 ,
+.Xr crypto 7 ,
 .Xr crypto 9
 .Sh HISTORY
 The

Modified: head/share/man/man4/padlock.4
==
--- head/share/man/man4/padlock.4   Wed Jul 29 20:31:11 2020
(r363673)
+++ head/share/man/man4/padlock.4   Wed Jul 29 21:15:06 2020
(r363674)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd February 8, 2010
+.Dd July 29, 2020
 .Dt PADLOCK 4
 .Os
 .Sh NAME
@@ -72,6 +72,7 @@ subsystem.
 .Xr intro 4 ,
 .Xr ipsec 4 ,
 .Xr random 4 ,
+.Xr crypto 7 ,
 .Xr crypto 9
 .Sh HISTORY
 The

Modified: head/share/man/man4/safe.4
==
--- head/share/man/man4/safe.4  Wed Jul 29 20:31:11 2020(r363673)
+++ head/share/man/man4/safe.4  Wed Jul 29 21:15:06 2020(r363674)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"/
-.Dd May 11, 2020
+.Dd July 29, 2020
 .Dt SAFE 4
 .Os
 .Sh NAME
@@ -124,6 +124,7 @@ A faster version of the 1141.
 .Xr intro 4 ,
 .Xr ipsec 4 ,
 .Xr random 4 ,
+.Xr crypto 7 ,
 .Xr crypto 9
 .Sh BUGS
 Public key support is not implemented.

Modified: head/share/man/man4/safexcel.4
==
--- head/share/man/man4/safexcel.4  Wed Jul 29 20:31:11 2020
(r363673)
+++ head/share/man/man4/safexcel.4  Wed Jul 29 21:15:06 2020
(r363674)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd June 23, 2020
+.Dd July 29, 2020
 .Dt SAFEXCEL 4
 .Os
 .Sh NAME
@@ -75,6 +75,7 @@ with SHA1-HMAC and SHA2-HMAC for encrypt-then-authenti
 .Xr crypto 4 ,
 .Xr ipsec 4 ,
 .Xr random 4 ,
+.Xr crypto 7 ,
 .Xr geli 8 ,
 .Xr crypto 9
 .Sh HISTORY
___
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: r363671 - head/sys/vm

2020-07-29 Thread Mark Johnston
Author: markj
Date: Wed Jul 29 19:38:49 2020
New Revision: 363671
URL: https://svnweb.freebsd.org/changeset/base/363671

Log:
  Remove the volatile qualifier from busy_lock.
  
  Use atomic(9) to load the lock state.  Some places were doing this
  already, so it was inconsistent.  In initialization code, the lock state
  is still initialized with plain stores.
  
  Reviewed by:  alc, kib
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D25861

Modified:
  head/sys/vm/vm_page.c
  head/sys/vm/vm_page.h

Modified: head/sys/vm/vm_page.c
==
--- head/sys/vm/vm_page.c   Wed Jul 29 19:36:24 2020(r363670)
+++ head/sys/vm/vm_page.c   Wed Jul 29 19:38:49 2020(r363671)
@@ -908,7 +908,7 @@ vm_page_busy_downgrade(vm_page_t m)
 
vm_page_assert_xbusied(m);
 
-   x = m->busy_lock;
+   x = vm_page_busy_fetch(m);
for (;;) {
if (atomic_fcmpset_rel_int(>busy_lock,
, VPB_SHARERS_WORD(1)))
@@ -931,7 +931,7 @@ vm_page_busy_tryupgrade(vm_page_t m)
 
vm_page_assert_sbusied(m);
 
-   x = m->busy_lock;
+   x = vm_page_busy_fetch(m);
ce = VPB_CURTHREAD_EXCLUSIVE;
for (;;) {
if (VPB_SHARERS(x) > 1)
@@ -955,7 +955,7 @@ vm_page_sbusied(vm_page_t m)
 {
u_int x;
 
-   x = m->busy_lock;
+   x = vm_page_busy_fetch(m);
return ((x & VPB_BIT_SHARED) != 0 && x != VPB_UNBUSIED);
 }
 
@@ -971,7 +971,7 @@ vm_page_sunbusy(vm_page_t m)
 
vm_page_assert_sbusied(m);
 
-   x = m->busy_lock;
+   x = vm_page_busy_fetch(m);
for (;;) {
KASSERT(x != VPB_FREED,
("vm_page_sunbusy: Unlocking freed page."));
@@ -1072,7 +1072,7 @@ _vm_page_busy_sleep(vm_object_t obj, vm_page_t m, vm_p
 
xsleep = (allocflags & (VM_ALLOC_SBUSY | VM_ALLOC_IGN_SBUSY)) != 0;
sleepq_lock(m);
-   x = atomic_load_int(>busy_lock);
+   x = vm_page_busy_fetch(m);
do {
/*
 * If the page changes objects or becomes unlocked we can
@@ -1110,7 +1110,7 @@ vm_page_trysbusy(vm_page_t m)
u_int x;
 
obj = m->object;
-   x = m->busy_lock;
+   x = vm_page_busy_fetch(m);
for (;;) {
if ((x & VPB_BIT_SHARED) == 0)
return (0);
@@ -1146,7 +1146,7 @@ vm_page_tryxbusy(vm_page_t m)
 {
vm_object_t obj;
 
-if (atomic_cmpset_acq_int(&(m)->busy_lock, VPB_UNBUSIED,
+if (atomic_cmpset_acq_int(>busy_lock, VPB_UNBUSIED,
 VPB_CURTHREAD_EXCLUSIVE) == 0)
return (0);
 
@@ -1354,7 +1354,7 @@ vm_page_readahead_finish(vm_page_t m)
 * have shown that deactivating the page is usually the best choice,
 * unless the page is wanted by another thread.
 */
-   if ((m->busy_lock & VPB_BIT_WAITERS) != 0)
+   if ((vm_page_busy_fetch(m) & VPB_BIT_WAITERS) != 0)
vm_page_activate(m);
else
vm_page_deactivate(m);
@@ -1719,7 +1719,7 @@ vm_page_busy_release(vm_page_t m)
 {
u_int x;
 
-   x = atomic_load_int(>busy_lock);
+   x = vm_page_busy_fetch(m);
for (;;) {
if (x == VPB_FREED)
break;

Modified: head/sys/vm/vm_page.h
==
--- head/sys/vm/vm_page.h   Wed Jul 29 19:36:24 2020(r363670)
+++ head/sys/vm/vm_page.h   Wed Jul 29 19:38:49 2020(r363671)
@@ -100,7 +100,8 @@
  * field and is described in detail below.
  *
  * The following annotations are possible:
- * (A) the field is atomic and may require additional synchronization.
+ * (A) the field must be accessed using atomic(9) and may require
+ * additional synchronization.
  * (B) the page busy lock.
  * (C) the field is immutable.
  * (F) the per-domain lock for the free queues
@@ -243,8 +244,8 @@ struct vm_page {
vm_paddr_t phys_addr;   /* physical address of page (C) */
struct md_page md;  /* machine dependent stuff */
u_int ref_count;/* page references (A) */
-   volatile u_int busy_lock;   /* busy owners lock */
-   union vm_page_astate a; /* state accessed atomically */
+   u_int busy_lock;/* busy owners lock (A) */
+   union vm_page_astate a; /* state accessed atomically (A) */
uint8_t order;  /* index of the buddy queue (F) */
uint8_t pool;   /* vm_phys freepool index (F) */
uint8_t flags;  /* page PG_* flags (P) */
@@ -701,6 +702,8 @@ void vm_page_assert_locked_KBI(vm_page_t m, const char
 void vm_page_lock_assert_KBI(vm_page_t m, int a, const char *file, int line);
 #endif
 
+#definevm_page_busy_fetch(m)   

svn commit: r363670 - in head/contrib/ipfilter: iplang ipsend

2020-07-29 Thread Cy Schubert
Author: cy
Date: Wed Jul 29 19:36:24 2020
New Revision: 363670
URL: https://svnweb.freebsd.org/changeset/base/363670

Log:
  Continued ipfilter #ifdef cleanup. The r343701 log entry contains a
  complete description.
  
  MFC after:1 week

Modified:
  head/contrib/ipfilter/iplang/iplang_y.y
  head/contrib/ipfilter/ipsend/arp.c
  head/contrib/ipfilter/ipsend/ipresend.c
  head/contrib/ipfilter/ipsend/ipsend.c
  head/contrib/ipfilter/ipsend/iptest.c
  head/contrib/ipfilter/ipsend/iptests.c
  head/contrib/ipfilter/ipsend/sock.c

Modified: head/contrib/ipfilter/iplang/iplang_y.y
==
--- head/contrib/ipfilter/iplang/iplang_y.y Wed Jul 29 19:22:50 2020
(r363669)
+++ head/contrib/ipfilter/iplang/iplang_y.y Wed Jul 29 19:36:24 2020
(r363670)
@@ -45,11 +45,6 @@
 #include "ipf.h"
 #include "iplang.h"
 
-#if !defined(__NetBSD__) && (!defined(__FreeBSD_version) && \
-__FreeBSD_version < 400020) && (!SOLARIS || SOLARIS2 < 10)
-extern struct ether_addr *ether_aton __P((char *));
-#endif
-
 extern int opts;
 extern struct ipopt_names ionames[];
 extern int state, state, lineNum, token;
@@ -58,11 +53,7 @@ extern   charyytext[];
 extern FILE*yyin;
 intyylex   __P((void));
 #defineYYDEBUG 1
-#if !defined(ultrix) && !defined(hpux)
 intyydebug = 1;
-#else
-extern int yydebug;
-#endif
 
 iface_t *iflist = NULL, **iftail = 
 iface_t *cifp = NULL;

Modified: head/contrib/ipfilter/ipsend/arp.c
==
--- head/contrib/ipfilter/ipsend/arp.c  Wed Jul 29 19:22:50 2020
(r363669)
+++ head/contrib/ipfilter/ipsend/arp.c  Wed Jul 29 19:36:24 2020
(r363670)
@@ -11,17 +11,13 @@ static const char rcsid[] = "@(#)$Id$";
 #endif
 #include 
 #include 
-#if !defined(ultrix) && !defined(hpux) && !defined(__hpux) && 
!defined(__osf__) && !defined(_AIX51)
 # include 
-#endif
 #include 
 #include 
 #include 
 #include 
 #include 
-#ifndefultrix
 # include 
-#endif
 #include 
 #include 
 #include 

Modified: head/contrib/ipfilter/ipsend/ipresend.c
==
--- head/contrib/ipfilter/ipsend/ipresend.c Wed Jul 29 19:22:50 2020
(r363669)
+++ head/contrib/ipfilter/ipsend/ipresend.c Wed Jul 29 19:36:24 2020
(r363670)
@@ -38,15 +38,7 @@ int  opts = 0;
 #  ifdef   sun
 char   default_device[] = "le0";
 #  else
-#   ifdef  ultrix
-char   default_device[] = "ln0";
-#   else
-#ifdef __bsdi__
-char   default_device[] = "ef0";
-#else
 char   default_device[] = "lan0";
-#endif
-#   endif
 #  endif
 #else
 char   default_device[] = DEFAULT_DEVICE;

Modified: head/contrib/ipfilter/ipsend/ipsend.c
==
--- head/contrib/ipfilter/ipsend/ipsend.c   Wed Jul 29 19:22:50 2020
(r363669)
+++ head/contrib/ipfilter/ipsend/ipsend.c   Wed Jul 29 19:36:24 2020
(r363670)
@@ -33,15 +33,7 @@ extern   voidiplang __P((FILE *));
 
 char   options[68];
 intopts;
-# ifdef ultrix
-char   default_device[] = "ln0";
-# else
-#  ifdef __bsdi__
-char   default_device[] = "ef0";
-#  else
 char   default_device[] = "le0";
-#  endif /* __bsdi__ */
-# endif /* ultrix */
 
 
 static voidusage __P((char *));

Modified: head/contrib/ipfilter/ipsend/iptest.c
==
--- head/contrib/ipfilter/ipsend/iptest.c   Wed Jul 29 19:22:50 2020
(r363669)
+++ head/contrib/ipfilter/ipsend/iptest.c   Wed Jul 29 19:36:24 2020
(r363670)
@@ -34,15 +34,7 @@ char options[68];
 # ifdefsun
 char   default_device[] = "le0";
 # else
-#  ifdef   ultrix
-char   default_device[] = "ln0";
-#  else
-#   ifdef  __bsdi__
-char   default_device[] = "ef0";
-#   else
 char   default_device[] = "lan0";
-#   endif
-#  endif
 # endif
 
 static voidusage __P((char *));

Modified: head/contrib/ipfilter/ipsend/iptests.c
==
--- head/contrib/ipfilter/ipsend/iptests.c  Wed Jul 29 19:22:50 2020
(r363669)
+++ head/contrib/ipfilter/ipsend/iptests.c  Wed Jul 29 19:36:24 2020
(r363670)
@@ -36,18 +36,13 @@ typedef int boolean_t;
 # endif
 # undef  _KERNEL
 # undef  KERNEL
-#if !defined(solaris) && !defined(linux) && !defined(__sgi)
+#if !defined(solaris)
 # include 
 # include 
 # include 
 #endif
-#if !defined(ultrix) && !defined(hpux) && !defined(linux) && \
-!defined(__sgi) && !defined(__osf__) && !defined(_AIX51)
 # include 
-#endif
-#ifndefultrix
 # include 
-#endif
 #if defined(solaris)
 # include 
 #else
@@ -57,11 +52,9 @@ typedef  int boolean_t;
 #include 
 #include 
 #endif
-#if BSD >= 199103
 # include 
 # include 
 # include 
-#endif
 

svn commit: r363669 - head/sys/x86/x86

2020-07-29 Thread Ruslan Bukin
Author: br
Date: Wed Jul 29 19:22:50 2020
New Revision: 363669
URL: https://svnweb.freebsd.org/changeset/base/363669

Log:
  Fix !ACPI_DMAR build.
  
  Reviewed by:  kib
  Sponsored by: DARPA/AFRL
  Differential Revision:https://reviews.freebsd.org/D25882

Modified:
  head/sys/x86/x86/busdma_machdep.c

Modified: head/sys/x86/x86/busdma_machdep.c
==
--- head/sys/x86/x86/busdma_machdep.c   Wed Jul 29 17:05:31 2020
(r363668)
+++ head/sys/x86/x86/busdma_machdep.c   Wed Jul 29 19:22:50 2020
(r363669)
@@ -300,6 +300,10 @@ bus_dma_tag_destroy(bus_dma_tag_t dmat)
 }
 
 #ifndef ACPI_DMAR
+bool bus_dma_iommu_set_buswide(device_t dev);
+int bus_dma_iommu_load_ident(bus_dma_tag_t dmat, bus_dmamap_t map,   
+vm_paddr_t start, vm_size_t length, int flags);
+
 bool
 bus_dma_iommu_set_buswide(device_t dev)
 {
___
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: r363668 - in head/sys: kern security/mac

2020-07-29 Thread Mateusz Guzik
Author: mjg
Date: Wed Jul 29 17:05:31 2020
New Revision: 363668
URL: https://svnweb.freebsd.org/changeset/base/363668

Log:
  vfs: elide MAC-induced locking on rename if there are no relevant hoooks

Modified:
  head/sys/kern/vfs_syscalls.c
  head/sys/security/mac/mac_framework.c
  head/sys/security/mac/mac_framework.h

Modified: head/sys/kern/vfs_syscalls.c
==
--- head/sys/kern/vfs_syscalls.cWed Jul 29 17:04:33 2020
(r363667)
+++ head/sys/kern/vfs_syscalls.cWed Jul 29 17:05:31 2020
(r363668)
@@ -3541,6 +3541,33 @@ sys_renameat(struct thread *td, struct renameat_args *
UIO_USERSPACE));
 }
 
+#ifdef MAC
+static int
+kern_renameat_mac(struct thread *td, int oldfd, const char *old, int newfd,
+const char *new, enum uio_seg pathseg, struct nameidata *fromnd)
+{
+   int error;
+
+   NDINIT_ATRIGHTS(fromnd, DELETE, LOCKPARENT | LOCKLEAF | SAVESTART |
+   AUDITVNODE1, pathseg, old, oldfd, _renameat_source_rights, td);
+   if ((error = namei(fromnd)) != 0)
+   return (error);
+   error = mac_vnode_check_rename_from(td->td_ucred, fromnd->ni_dvp,
+   fromnd->ni_vp, >ni_cnd);
+   VOP_UNLOCK(fromnd->ni_dvp);
+   if (fromnd->ni_dvp != fromnd->ni_vp)
+   VOP_UNLOCK(fromnd->ni_vp);
+   if (error != 0) {
+   NDFREE(fromnd, NDF_ONLY_PNBUF);
+   vrele(fromnd->ni_dvp);
+   vrele(fromnd->ni_vp);
+   if (fromnd->ni_startdir)
+   vrele(fromnd->ni_startdir);
+   }
+   return (error);
+}
+#endif
+
 int
 kern_renameat(struct thread *td, int oldfd, const char *old, int newfd,
 const char *new, enum uio_seg pathseg)
@@ -3553,30 +3580,19 @@ kern_renameat(struct thread *td, int oldfd, const char
 again:
bwillwrite();
 #ifdef MAC
-   NDINIT_ATRIGHTS(, DELETE, LOCKPARENT | LOCKLEAF | SAVESTART |
-   AUDITVNODE1, pathseg, old, oldfd,
-   _renameat_source_rights, td);
-   if ((error = namei()) != 0)
-   return (error);
-   error = mac_vnode_check_rename_from(td->td_ucred, fromnd.ni_dvp,
-   fromnd.ni_vp, _cnd);
-   VOP_UNLOCK(fromnd.ni_dvp);
-   if (fromnd.ni_dvp != fromnd.ni_vp)
-   VOP_UNLOCK(fromnd.ni_vp);
-   if (error != 0) {
-   NDFREE(, NDF_ONLY_PNBUF);
-   vrele(fromnd.ni_dvp);
-   vrele(fromnd.ni_vp);
-   if (fromnd.ni_startdir)
-   vrele(fromnd.ni_startdir);
-   return (error);
-   }
-#else
+   if (mac_vnode_check_rename_from_enabled()) {
+   error = kern_renameat_mac(td, oldfd, old, newfd, new, pathseg,
+   );
+   if (error != 0)
+   return (error);
+   } else {
+#endif
NDINIT_ATRIGHTS(, DELETE, WANTPARENT | SAVESTART | AUDITVNODE1,
-   pathseg, old, oldfd,
-   _renameat_source_rights, td);
+   pathseg, old, oldfd, _renameat_source_rights, td);
if ((error = namei()) != 0)
return (error);
+#ifdef MAC
+   }
 #endif
fvp = fromnd.ni_vp;
NDINIT_ATRIGHTS(, RENAME, LOCKPARENT | LOCKLEAF | NOCACHE |

Modified: head/sys/security/mac/mac_framework.c
==
--- head/sys/security/mac/mac_framework.c   Wed Jul 29 17:04:33 2020
(r363667)
+++ head/sys/security/mac/mac_framework.c   Wed Jul 29 17:05:31 2020
(r363668)
@@ -139,6 +139,7 @@ FPFLAG(vnode_check_read);
 FPFLAG(vnode_check_write);
 FPFLAG(vnode_check_mmap);
 FPFLAG_RARE(vnode_check_poll);
+FPFLAG_RARE(vnode_check_rename_from);
 
 #undef FPFLAG
 #undef FPFLAG_RARE
@@ -427,6 +428,8 @@ struct mac_policy_fastpath_elem mac_policy_fastpath_ar
.flag = _vnode_check_mmap_fp_flag },
{ .offset = FPO(vnode_check_poll),
.flag = _vnode_check_poll_fp_flag },
+   { .offset = FPO(vnode_check_rename_from),
+   .flag = _vnode_check_rename_from_fp_flag },
 };
 
 static void

Modified: head/sys/security/mac/mac_framework.h
==
--- head/sys/security/mac/mac_framework.h   Wed Jul 29 17:04:33 2020
(r363667)
+++ head/sys/security/mac/mac_framework.h   Wed Jul 29 17:05:31 2020
(r363668)
@@ -482,6 +482,10 @@ mac_vnode_check_poll(struct ucred *active_cred, struct
 #endif
 intmac_vnode_check_readdir(struct ucred *cred, struct vnode *vp);
 intmac_vnode_check_readlink(struct ucred *cred, struct vnode *vp);
+#define mac_vnode_check_rename_from_enabled() 
__predict_false(mac_vnode_check_rename_from_fp_flag)
+#ifdef MAC
+extern bool mac_vnode_check_rename_from_fp_flag;
+#endif
 intmac_vnode_check_rename_from(struct ucred *cred, struct vnode *dvp,
struct vnode *vp, struct 

svn commit: r363667 - head/sys/kern

2020-07-29 Thread Mateusz Guzik
Author: mjg
Date: Wed Jul 29 17:04:33 2020
New Revision: 363667
URL: https://svnweb.freebsd.org/changeset/base/363667

Log:
  vfs: honor error code returned by mac_vnode_check_rename_from
  
  MFC after:3 days

Modified:
  head/sys/kern/vfs_syscalls.c

Modified: head/sys/kern/vfs_syscalls.c
==
--- head/sys/kern/vfs_syscalls.cWed Jul 29 15:46:17 2020
(r363666)
+++ head/sys/kern/vfs_syscalls.cWed Jul 29 17:04:33 2020
(r363667)
@@ -3556,20 +3556,27 @@ again:
NDINIT_ATRIGHTS(, DELETE, LOCKPARENT | LOCKLEAF | SAVESTART |
AUDITVNODE1, pathseg, old, oldfd,
_renameat_source_rights, td);
-#else
-   NDINIT_ATRIGHTS(, DELETE, WANTPARENT | SAVESTART | AUDITVNODE1,
-   pathseg, old, oldfd,
-   _renameat_source_rights, td);
-#endif
-
if ((error = namei()) != 0)
return (error);
-#ifdef MAC
error = mac_vnode_check_rename_from(td->td_ucred, fromnd.ni_dvp,
fromnd.ni_vp, _cnd);
VOP_UNLOCK(fromnd.ni_dvp);
if (fromnd.ni_dvp != fromnd.ni_vp)
VOP_UNLOCK(fromnd.ni_vp);
+   if (error != 0) {
+   NDFREE(, NDF_ONLY_PNBUF);
+   vrele(fromnd.ni_dvp);
+   vrele(fromnd.ni_vp);
+   if (fromnd.ni_startdir)
+   vrele(fromnd.ni_startdir);
+   return (error);
+   }
+#else
+   NDINIT_ATRIGHTS(, DELETE, WANTPARENT | SAVESTART | AUDITVNODE1,
+   pathseg, old, oldfd,
+   _renameat_source_rights, td);
+   if ((error = namei()) != 0)
+   return (error);
 #endif
fvp = fromnd.ni_vp;
NDINIT_ATRIGHTS(, RENAME, LOCKPARENT | LOCKLEAF | NOCACHE |
___
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: r363666 - head/sys/dev/ntb/ntb_hw

2020-07-29 Thread Ruslan Bukin
Author: br
Date: Wed Jul 29 15:46:17 2020
New Revision: 363666
URL: https://svnweb.freebsd.org/changeset/base/363666

Log:
  Fix build.
  
  Reviewed by:  kib
  Sponsored by: DARPA/AFRL
  Differential Revision:https://reviews.freebsd.org/D25879

Modified:
  head/sys/dev/ntb/ntb_hw/ntb_hw_intel.c
  head/sys/dev/ntb/ntb_hw/ntb_hw_plx.c

Modified: head/sys/dev/ntb/ntb_hw/ntb_hw_intel.c
==
--- head/sys/dev/ntb/ntb_hw/ntb_hw_intel.c  Wed Jul 29 14:33:31 2020
(r363665)
+++ head/sys/dev/ntb/ntb_hw/ntb_hw_intel.c  Wed Jul 29 15:46:17 2020
(r363666)
@@ -61,6 +61,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #include "ntb_hw_intel.h"
 #include "../ntb.h"

Modified: head/sys/dev/ntb/ntb_hw/ntb_hw_plx.c
==
--- head/sys/dev/ntb/ntb_hw/ntb_hw_plx.cWed Jul 29 14:33:31 2020
(r363665)
+++ head/sys/dev/ntb/ntb_hw/ntb_hw_plx.cWed Jul 29 15:46:17 2020
(r363666)
@@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #include "../ntb.h"
 
___
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: r363663 - in head/sys: dev/iommu x86/include x86/iommu

2020-07-29 Thread Ruslan Bukin
Author: br
Date: Wed Jul 29 13:23:27 2020
New Revision: 363663
URL: https://svnweb.freebsd.org/changeset/base/363663

Log:
  o Move iommu_set_buswide_ctx, iommu_is_buswide_ctx to
the generic iommu busdma backend;
  o Move bus_dma_iommu_set_buswide, bus_dma_iommu_load_ident
prototypes to iommu.h.
  
  Reviewed by:  kib
  Sponsored by: DARPA, AFRL
  Differential Revision:https://reviews.freebsd.org/D25866

Modified:
  head/sys/dev/iommu/busdma_iommu.c
  head/sys/dev/iommu/iommu.h
  head/sys/x86/include/bus_dma.h
  head/sys/x86/iommu/intel_dmar.h
  head/sys/x86/iommu/intel_drv.c

Modified: head/sys/dev/iommu/busdma_iommu.c
==
--- head/sys/dev/iommu/busdma_iommu.c   Wed Jul 29 11:19:57 2020
(r363662)
+++ head/sys/dev/iommu/busdma_iommu.c   Wed Jul 29 13:23:27 2020
(r363663)
@@ -326,6 +326,26 @@ bus_dma_iommu_set_buswide(device_t dev)
return (true);
 }
 
+void
+iommu_set_buswide_ctx(struct iommu_unit *unit, u_int busno)
+{
+
+   MPASS(busno <= PCI_BUSMAX);
+   IOMMU_LOCK(unit);
+   unit->buswide_ctxs[busno / NBBY / sizeof(uint32_t)] |=
+   1 << (busno % (NBBY * sizeof(uint32_t)));
+   IOMMU_UNLOCK(unit);
+}
+
+bool
+iommu_is_buswide_ctx(struct iommu_unit *unit, u_int busno)
+{
+
+   MPASS(busno <= PCI_BUSMAX);
+   return ((unit->buswide_ctxs[busno / NBBY / sizeof(uint32_t)] &
+   (1U << (busno % (NBBY * sizeof(uint32_t) != 0);
+}
+
 static MALLOC_DEFINE(M_IOMMU_DMAMAP, "iommu_dmamap", "IOMMU DMA Map");
 
 static void iommu_bus_schedule_dmamap(struct iommu_unit *unit,

Modified: head/sys/dev/iommu/iommu.h
==
--- head/sys/dev/iommu/iommu.h  Wed Jul 29 11:19:57 2020(r363662)
+++ head/sys/dev/iommu/iommu.h  Wed Jul 29 13:23:27 2020(r363663)
@@ -221,6 +221,13 @@ int iommu_gas_map_region(struct iommu_domain *domain,
 int iommu_gas_reserve_region(struct iommu_domain *domain, iommu_gaddr_t start,
 iommu_gaddr_t end);
 
+void iommu_set_buswide_ctx(struct iommu_unit *unit, u_int busno);
+bool iommu_is_buswide_ctx(struct iommu_unit *unit, u_int busno);
+
+bool bus_dma_iommu_set_buswide(device_t dev);
+int bus_dma_iommu_load_ident(bus_dma_tag_t dmat, bus_dmamap_t map,
+vm_paddr_t start, vm_size_t length, int flags);
+
 SYSCTL_DECL(_hw_iommu);
 
 #endif /* !_SYS_IOMMU_H_ */

Modified: head/sys/x86/include/bus_dma.h
==
--- head/sys/x86/include/bus_dma.h  Wed Jul 29 11:19:57 2020
(r363662)
+++ head/sys/x86/include/bus_dma.h  Wed Jul 29 13:23:27 2020
(r363663)
@@ -191,11 +191,5 @@ _bus_dmamap_complete(bus_dma_tag_t dmat, bus_dmamap_t 
return (tc->impl->map_complete(dmat, map, segs, nsegs, error));
 }
 
-#ifdef _KERNEL
-bool bus_dma_iommu_set_buswide(device_t dev);
-int bus_dma_iommu_load_ident(bus_dma_tag_t dmat, bus_dmamap_t map,
-vm_paddr_t start, vm_size_t length, int flags);
-#endif
-
 #endif /* !_X86_BUS_DMA_H_ */
 

Modified: head/sys/x86/iommu/intel_dmar.h
==
--- head/sys/x86/iommu/intel_dmar.h Wed Jul 29 11:19:57 2020
(r363662)
+++ head/sys/x86/iommu/intel_dmar.h Wed Jul 29 13:23:27 2020
(r363663)
@@ -281,9 +281,6 @@ void dmar_quirks_pre_use(struct iommu_unit *dmar);
 int dmar_init_irt(struct dmar_unit *unit);
 void dmar_fini_irt(struct dmar_unit *unit);
 
-void iommu_set_buswide_ctx(struct iommu_unit *unit, u_int busno);
-bool iommu_is_buswide_ctx(struct iommu_unit *unit, u_int busno);
-
 extern iommu_haddr_t dmar_high;
 extern int haw;
 extern int dmar_tbl_pagecnt;

Modified: head/sys/x86/iommu/intel_drv.c
==
--- head/sys/x86/iommu/intel_drv.c  Wed Jul 29 11:19:57 2020
(r363662)
+++ head/sys/x86/iommu/intel_drv.c  Wed Jul 29 13:23:27 2020
(r363663)
@@ -592,26 +592,6 @@ static driver_tdmar_driver = {
 DRIVER_MODULE(dmar, acpi, dmar_driver, dmar_devclass, 0, 0);
 MODULE_DEPEND(dmar, acpi, 1, 1, 1);
 
-void
-iommu_set_buswide_ctx(struct iommu_unit *unit, u_int busno)
-{
-
-   MPASS(busno <= PCI_BUSMAX);
-   IOMMU_LOCK(unit);
-   unit->buswide_ctxs[busno / NBBY / sizeof(uint32_t)] |=
-   1 << (busno % (NBBY * sizeof(uint32_t)));
-   IOMMU_UNLOCK(unit);
-}
-
-bool
-iommu_is_buswide_ctx(struct iommu_unit *unit, u_int busno)
-{
-
-   MPASS(busno <= PCI_BUSMAX);
-   return ((unit->buswide_ctxs[busno / NBBY / sizeof(uint32_t)] &
-   (1U << (busno % (NBBY * sizeof(uint32_t) != 0);
-}
-
 static void
 dmar_print_path(int busno, int depth, const ACPI_DMAR_PCI_PATH *path)
 {
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To 

svn commit: r363662 - head/usr.bin/calendar/calendars

2020-07-29 Thread Daniel Ebdrup Jensen
Author: debdrup (doc committer)
Date: Wed Jul 29 11:19:57 2020
New Revision: 363662
URL: https://svnweb.freebsd.org/changeset/base/363662

Log:
  Add my entry to the calendar file
  
  As part of onboarding, ensure that I'm listed in the FreeBSD calendar file,
  while listening to Don't Take Away The Music by Tavares.
  
  Reviewed by:  0mp, bcr
  Approved by:  0mp (mentor), allanjude (mentor)
  Differential Revision:D25856

Modified:
  head/usr.bin/calendar/calendars/calendar.freebsd

Modified: head/usr.bin/calendar/calendars/calendar.freebsd
==
--- head/usr.bin/calendar/calendars/calendar.freebsdWed Jul 29 11:17:44 
2020(r363661)
+++ head/usr.bin/calendar/calendars/calendar.freebsdWed Jul 29 11:19:57 
2020(r363662)
@@ -404,6 +404,7 @@
 10/20  Joel Dahl  born in Bitterna, Skaraborg, Sweden, 1983
 10/20  Dmitry Marakasov  born in Moscow, Russian 
Federation, 1984
 10/21  Ben Smithurst  born in Sheffield, South Yorkshire, 
United Kingdom, 1981
+10/21  Daniel Ebdrup Jensen  born in Aalborg, Denmark, 
19XX
 10/22  Jean-Sebastien Pedron  born in Redon, 
Ille-et-Vilaine, France, 1980
 10/23  Mario Sergio Fujikawa Ferreira  born in Brasilia, 
Distrito Federal, Brazil, 1976
 10/23  Romain Tartière  born in Clermont-Ferrand, France, 
1984
___
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: r363661 - head/share/misc

2020-07-29 Thread Daniel Ebdrup Jensen
Author: debdrup (doc committer)
Date: Wed Jul 29 11:17:44 2020
New Revision: 363661
URL: https://svnweb.freebsd.org/changeset/base/363661

Log:
  Outline mentorship
  
  As part of onboarding and while listening to Holy Ghost by The Bar-Kays, 
outline
  my mentorship. 0mp is mentor, with allanjude and bcr as co-mentor.
  
  Reviewed by:  0mp, allanjude, bcr
  Approved by:  0mp (mentor), allanjude (mentor), bcr (mentor)
  Differential Revision:D25855

Modified:
  head/share/misc/committers-doc.dot

Modified: head/share/misc/committers-doc.dot
==
--- head/share/misc/committers-doc.dot  Wed Jul 29 08:24:40 2020
(r363660)
+++ head/share/misc/committers-doc.dot  Wed Jul 29 11:17:44 2020
(r363661)
@@ -62,6 +62,7 @@ carlavilla [label="Sergio Carlavilla\ncarlavilla@FreeB
 chinsan [label="Chinsan Huang\nchin...@freebsd.org\n2006/09/20"]
 crees [label="Chris Rees\ncr...@freebsd.org\n2013/05/27"]
 danger [label="Daniel Gerzo\ndan...@freebsd.org\n2006/08/20"]
+debdrup [label="Daniel Ebdrup Jensen\ndebd...@freebsd.org\n2020/07/26"]
 delphij [label="Xin Li\ndelp...@freebsd.org\n2004/09/14"]
 dexter [label="Michael Dexter\ndex...@freebsd.org\n2016/11/15"]
 dru [label="Dru Lavigne\n...@freebsd.org\n2013/01/22"]
@@ -103,6 +104,10 @@ zeising [label="Niclas Zeising\nzeis...@freebsd.org\n2
 # Group together all the mentees for a particular mentor.
 # Keep the list sorted by mentor login.
 
+"0mp" -> debdrup
+
+allanjude -> debdrup
+
 bcr -> gavin
 bcr -> wblock
 bcr -> eadler
@@ -117,6 +122,7 @@ bcr -> sg
 bcr -> carlavilla
 bcr -> "0mp"
 bcr -> gbe
+bcr -> debdrup
 
 blackend -> ale
 
___
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: r363657 - head/crypto/openssh

2020-07-29 Thread Tijl Coosemans
On Wed, 29 Jul 2020 00:34:24 + (UTC) Ed Maste 
wrote:
> Author: emaste
> Date: Wed Jul 29 00:34:24 2020
> New Revision: 363657
> URL: https://svnweb.freebsd.org/changeset/base/363657
> 
> Log:
>   sshd: allow UseBlocklist alias for UseBlacklist
>   
>   blacklistd has been renamed to blocklistd upstream, and a future
>   import into FreeBSD will follow that change.  Support the new name
>   as an alias in config files.
>   
>   Reviewed by:bz, delphij
>   MFC after:  1 week
>   Sponsored by:   The FreeBSD Foundation
>   Differential Revision:  https://reviews.freebsd.org/D25865
> 
> Modified:
>   head/crypto/openssh/servconf.c
>   head/crypto/openssh/sshd_config.5
> 
> Modified: head/crypto/openssh/servconf.c
> ==
> --- head/crypto/openssh/servconf.cTue Jul 28 22:32:50 2020
> (r363656)
> +++ head/crypto/openssh/servconf.cWed Jul 29 00:34:24 2020
> (r363657)
> @@ -660,6 +660,7 @@ static struct {
>   { "rdomain", sRDomain, SSHCFG_ALL },
>   { "casignaturealgorithms", sCASignatureAlgorithms, SSHCFG_ALL },
>   { "useblacklist", sUseBlacklist, SSHCFG_GLOBAL },
> + { "useblocklist", sUseBlacklist, SSHCFG_GLOBAL }, /* alias */
>   { "noneenabled", sUnsupported, SSHCFG_ALL },
>   { "hpndisabled", sDeprecated, SSHCFG_ALL },
>   { "hpnbuffersize", sDeprecated, SSHCFG_ALL },
> 
> Modified: head/crypto/openssh/sshd_config.5
> ==
> --- head/crypto/openssh/sshd_config.5 Tue Jul 28 22:32:50 2020
> (r363656)
> +++ head/crypto/openssh/sshd_config.5 Wed Jul 29 00:34:24 2020
> (r363657)
> @@ -35,7 +35,7 @@
>  .\"
>  .\" $OpenBSD: sshd_config.5,v 1.282 2018/09/20 03:28:06 djm Exp $
>  .\" $FreeBSD$
> -.Dd $Mdocdate: September 20 2018 $
> +.Dd $Mdocdate: July 28 2020 $
>  .Dt SSHD_CONFIG 5
>  .Os
>  .Sh NAME
> @@ -1602,6 +1602,11 @@ to the
>  daemon.
>  The default is
>  .Cm no .
> +For forward compatibility with an upcoming
> +.Xr blacklistd
> +rename, the
> +.Cm UseBlocklist

I realise this is very pedantic, but my spell checker says it's
"block list", two words, so if you're using camel case it should
be UseBlockList.
___
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: r363660 - head/sys/arm/broadcom/bcm2835

2020-07-29 Thread Andrew Turner
Author: andrew
Date: Wed Jul 29 08:24:40 2020
New Revision: 363660
URL: https://svnweb.freebsd.org/changeset/base/363660

Log:
  Only try managing the regulator when EXT_RESOURCES is defined
  
  Not all Raspberry Pi kernel configs define EXT_RESOURCES. Check for this
  before trying to manage the regulator.
  
  Sponsored by: Innovate UK

Modified:
  head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c

Modified: head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c
==
--- head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c   Wed Jul 29 05:27:19 
2020(r363659)
+++ head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c   Wed Jul 29 08:24:40 
2020(r363660)
@@ -394,10 +394,13 @@ bcm_sdhci_intr(void *arg)
 static int
 bcm_sdhci_update_ios(device_t bus, device_t child)
 {
+#ifdef EXT_RESOURCES
struct bcm_sdhci_softc *sc;
struct mmc_ios *ios;
+#endif
int rv;
 
+#ifdef EXT_RESOURCES
sc = device_get_softc(bus);
ios = >sc_slot.host.ios;
 
@@ -407,17 +410,20 @@ bcm_sdhci_update_ios(device_t bus, device_t child)
if (sc->sc_mmc_helper.vqmmc_supply)
regulator_enable(sc->sc_mmc_helper.vqmmc_supply);
}
+#endif
 
rv = sdhci_generic_update_ios(bus, child);
if (rv != 0)
return (rv);
 
+#ifdef EXT_RESOURCES
if (ios->power_mode == power_off) {
if (sc->sc_mmc_helper.vmmc_supply)
regulator_disable(sc->sc_mmc_helper.vmmc_supply);
if (sc->sc_mmc_helper.vqmmc_supply)
regulator_disable(sc->sc_mmc_helper.vqmmc_supply);
}
+#endif
 
return (0);
 }
___
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"