svn commit: r364855 - head/sys/kern

2020-08-26 Thread Warner Losh
Author: imp
Date: Thu Aug 27 05:11:15 2020
New Revision: 364855
URL: https://svnweb.freebsd.org/changeset/base/364855

Log:
  Implement FLUSHO
  
  Turn FLUSHO on/off with ^O (or whatever VDISCARD is). Honor that to
  throw away output quickly. This tries to remain true to 4.4BSD
  behavior (since that was the origin of this feature), with any
  corrections NetBSD has done. Since the implemenations are a little
  different, though, some edge conditions may be handled differently.
  
  Reviewed by: kib, kevans
  Differential Review: https://reviews.freebsd.org/D26148

Modified:
  head/sys/kern/tty.c
  head/sys/kern/tty_ttydisc.c

Modified: head/sys/kern/tty.c
==
--- head/sys/kern/tty.c Thu Aug 27 03:50:34 2020(r364854)
+++ head/sys/kern/tty.c Thu Aug 27 05:11:15 2020(r364855)
@@ -1467,6 +1467,7 @@ tty_signal_sessleader(struct tty *tp, int sig)
 
/* Make signals start output again. */
tp->t_flags &= ~TF_STOPPED;
+   tp->t_termios.c_lflag &= ~FLUSHO;
 
if (tp->t_session != NULL && tp->t_session->s_leader != NULL) {
p = tp->t_session->s_leader;
@@ -1486,6 +1487,7 @@ tty_signal_pgrp(struct tty *tp, int sig)
 
/* Make signals start output again. */
tp->t_flags &= ~TF_STOPPED;
+   tp->t_termios.c_lflag &= ~FLUSHO;
 
if (sig == SIGINFO && !(tp->t_termios.c_lflag & NOKERNINFO))
tty_info(tp);
@@ -1930,6 +1932,7 @@ tty_generic_ioctl(struct tty *tp, u_long cmd, void *da
return (0);
case TIOCSTART:
tp->t_flags &= ~TF_STOPPED;
+   tp->t_termios.c_lflag &= ~FLUSHO;
ttydevsw_outwakeup(tp);
ttydevsw_pktnotify(tp, TIOCPKT_START);
return (0);

Modified: head/sys/kern/tty_ttydisc.c
==
--- head/sys/kern/tty_ttydisc.c Thu Aug 27 03:50:34 2020(r364854)
+++ head/sys/kern/tty_ttydisc.c Thu Aug 27 05:11:15 2020(r364855)
@@ -95,6 +95,7 @@ ttydisc_close(struct tty *tp)
 
/* Clean up our flags when leaving the discipline. */
tp->t_flags &= ~(TF_STOPPED|TF_HIWAT|TF_ZOMBIE);
+   tp->t_termios.c_lflag &= ~FLUSHO;
 
/*
 * POSIX states that we must drain output and flush input on
@@ -474,6 +475,12 @@ ttydisc_write(struct tty *tp, struct uio *uio, int iof
 
MPASS(oblen == 0);
 
+   if (CMP_FLAG(l, FLUSHO)) {
+   uio->uio_offset += uio->uio_resid;
+   uio->uio_resid = 0;
+   return (0);
+   }
+
/* Step 1: read data. */
obstart = ob;
nlen = MIN(uio->uio_resid, sizeof ob);
@@ -495,6 +502,12 @@ ttydisc_write(struct tty *tp, struct uio *uio, int iof
do {
unsigned int plen, wlen;
 
+   if (CMP_FLAG(l, FLUSHO)) {
+   uio->uio_offset += uio->uio_resid;
+   uio->uio_resid = 0;
+   return (0);
+   }
+
/* Search for special characters for post processing. */
if (CMP_FLAG(o, OPOST)) {
plen = ttydisc_findchar(obstart, oblen);
@@ -629,6 +642,9 @@ static int
 ttydisc_echo_force(struct tty *tp, char c, int quote)
 {
 
+   if (CMP_FLAG(l, FLUSHO))
+   return 0;
+
if (CMP_FLAG(o, OPOST) && CTL_ECHO(c, quote)) {
/*
 * Only perform postprocessing when OPOST is turned on
@@ -879,8 +895,10 @@ ttydisc_rint(struct tty *tp, char c, int flags)
}
 
/* Allow any character to perform a wakeup. */
-   if (CMP_FLAG(i, IXANY))
+   if (CMP_FLAG(i, IXANY)) {
tp->t_flags &= ~TF_STOPPED;
+   tp->t_termios.c_lflag &= ~FLUSHO;
+   }
 
/* Remove the top bit. */
if (CMP_FLAG(i, ISTRIP))
@@ -905,6 +923,18 @@ ttydisc_rint(struct tty *tp, char c, int flags)
}
tp->t_flags |= TF_LITERAL;
return (0);
+   }
+   /* Discard processing */
+   if (CMP_CC(VDISCARD, c)) {
+   if (CMP_FLAG(l, FLUSHO)) {
+   tp->t_termios.c_lflag &= ~FLUSHO;
+   } else {
+   tty_flush(tp, FWRITE);
+   ttydisc_echo(tp, c, 0);
+   if (tp->t_inq.ti_end > 0)
+   ttydisc_reprint(tp);
+   tp->t_termios.c_lflag |= FLUSHO;
+   }
}
}
 
___
svn-src-head@freebsd.org mailing list

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

2020-08-26 Thread Greg Lehey
Author: grog
Date: Thu Aug 27 03:50:34 2020
New Revision: 364854
URL: https://svnweb.freebsd.org/changeset/base/364854

Log:
  Update Hong Kong Liberation Day (hah!)

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

Modified: head/usr.bin/calendar/calendars/calendar.holiday
==
--- head/usr.bin/calendar/calendars/calendar.holidayThu Aug 27 00:33:01 
2020(r364853)
+++ head/usr.bin/calendar/calendars/calendar.holidayThu Aug 27 03:50:34 
2020(r364854)
@@ -350,7 +350,7 @@
 08/25  Independence Day in Uruguay
 08/26  Susan B. Anthony Day in Massachusetts
 08/26* Bank Holiday in England and Wales
-08/27  Liberation Day in Hong Kong
+08/MonLast Liberation Day in Hong Kong
 08/28  Heroes Day in Philippines
 08/30  Huey P. Long Day in Louisiana
 08/30  Victory Day in Turkey
___
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: r364850 - head/usr.sbin/jail

2020-08-26 Thread Jamie Gritton
Author: jamie
Date: Thu Aug 27 00:17:17 2020
New Revision: 364850
URL: https://svnweb.freebsd.org/changeset/base/364850

Log:
  Don't allow jail.conf variables to have the same names as jail parameters.
  It was already not allowed in many cases, but crashed instead of giving an
  error.
  
  PR:   248444

Modified:
  head/usr.sbin/jail/config.c

Modified: head/usr.sbin/jail/config.c
==
--- head/usr.sbin/jail/config.c Wed Aug 26 23:41:46 2020(r364849)
+++ head/usr.sbin/jail/config.c Thu Aug 27 00:17:17 2020(r364850)
@@ -366,8 +366,13 @@ add_param(struct cfjail *j, const struct cfparam *p, e
break;
if (dp != NULL) {
/* Found it - append or replace. */
+   if ((flags ^ dp->flags) & PF_VAR) {
+   jail_warnx(j, "variable \"$%s\" cannot have the same "
+   "name as a parameter.", name);
+   return;
+   }
if (dp->flags & PF_IMMUTABLE) {
-   jail_warnx(j, "cannot redefine variable \"%s\".",
+   jail_warnx(j, "cannot redefine parameter \"%s\".",
dp->name);
return;
}
@@ -394,6 +399,14 @@ add_param(struct cfjail *j, const struct cfparam *p, e
for (ipnum = IP__NULL + 1; ipnum < IP_NPARAM; ipnum++)
if (!(intparams[ipnum].flags & PF_CONV) &&
equalopts(name, intparams[ipnum].name)) {
+   if (flags & PF_VAR) {
+   jail_warnx(j,
+   "variable \"$%s\" "
+   "cannot have the same "
+   "name as a parameter.",
+   name);
+   return;
+   }
j->intparams[ipnum] = np;
np->flags |= intparams[ipnum].flags;
break;
___
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: r364846 - head/sys/opencrypto

2020-08-26 Thread John Baldwin
On 8/26/20 3:36 PM, John Baldwin wrote:
> Author: jhb
> Date: Wed Aug 26 22:36:08 2020
> New Revision: 364846
> URL: https://svnweb.freebsd.org/changeset/base/364846
> 
> Log:
>   Name the on-stack union of compat thunks.
>   
>   C does not permit an anonymous union at a top-level scope.
>   
>   Pointy hat to:  jhb

I thought I had compiled and tested the previous version prior to commit.
While the checkout I had been reset to the reworked version with the
union, the cryptodev.ko in the build dir was from two days ago so I
tested a pre-union version today apparently. :-/

-- 
John Baldwin
___
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: r364846 - head/sys/opencrypto

2020-08-26 Thread John Baldwin
Author: jhb
Date: Wed Aug 26 22:36:08 2020
New Revision: 364846
URL: https://svnweb.freebsd.org/changeset/base/364846

Log:
  Name the on-stack union of compat thunks.
  
  C does not permit an anonymous union at a top-level scope.
  
  Pointy hat to:jhb

Modified:
  head/sys/opencrypto/cryptodev.c

Modified: head/sys/opencrypto/cryptodev.c
==
--- head/sys/opencrypto/cryptodev.c Wed Aug 26 22:11:22 2020
(r364845)
+++ head/sys/opencrypto/cryptodev.c Wed Aug 26 22:36:08 2020
(r364846)
@@ -440,7 +440,7 @@ cryptof_ioctl(
struct crypt_aead aeadc;
struct crypt_kop kopc;
 #endif
-   };
+   } thunk;
 #ifdef COMPAT_FREEBSD32
u_long cmd32;
void *data32;
@@ -452,29 +452,30 @@ cryptof_ioctl(
cmd32 = cmd;
data32 = data;
cmd = CIOCGSESSION;
-   data = 
-   session_op_from_32((struct session_op32 *)data32, );
+   data = 
+   session_op_from_32((struct session_op32 *)data32, );
break;
case CIOCGSESSION232:
cmd32 = cmd;
data32 = data;
cmd = CIOCGSESSION2;
-   data = 
-   session2_op_from_32((struct session2_op32 *)data32, );
+   data = 
+   session2_op_from_32((struct session2_op32 *)data32,
+   );
break;
case CIOCCRYPT32:
cmd32 = cmd;
data32 = data;
cmd = CIOCCRYPT;
-   data = 
-   crypt_op_from_32((struct crypt_op32 *)data32, );
+   data = 
+   crypt_op_from_32((struct crypt_op32 *)data32, );
break;
case CIOCCRYPTAEAD32:
cmd32 = cmd;
data32 = data;
cmd = CIOCCRYPTAEAD;
-   data = 
-   crypt_aead_from_32((struct crypt_aead32 *)data32, );
+   data = 
+   crypt_aead_from_32((struct crypt_aead32 *)data32, );
break;
case CIOCKEY32:
case CIOCKEY232:
@@ -484,8 +485,8 @@ cryptof_ioctl(
cmd = CIOCKEY;
else
cmd = CIOCKEY2;
-   data = 
-   crypt_kop_from_32((struct crypt_kop32 *)data32, );
+   data = 
+   crypt_kop_from_32((struct crypt_kop32 *)data32, );
break;
}
 #endif
@@ -494,8 +495,8 @@ cryptof_ioctl(
case CIOCGSESSION:
case CIOCGSESSION2:
if (cmd == CIOCGSESSION) {
-   session2_op_from_op(data, );
-   sop = 
+   session2_op_from_op(data, );
+   sop = 
} else
sop = (struct session2_op *)data;
 
___
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: r364844 - head/sys/kern

2020-08-26 Thread Rick Macklem
Author: rmacklem
Date: Wed Aug 26 21:49:43 2020
New Revision: 364844
URL: https://svnweb.freebsd.org/changeset/base/364844

Log:
  Fix a "v_seqc_users == 0 not met" panic when VFS_STATFS() fails during mount.
  
  r363210 introduced v_seqc_users to the vnodes.  This change requires
  a vn_seqc_write_end() to match the vn_seqc_write_begin() in
  vfs_cache_root_clear().
  mjg@ provided this patch which seems to fix the panic.
  
  Tested for an NFS mount where the VFS_STATFS() call will fail.
  
  Submitted by: mjg
  Reviewed by:  mjg
  Differential Revision:https://reviews.freebsd.org/D26160

Modified:
  head/sys/kern/vfs_mount.c

Modified: head/sys/kern/vfs_mount.c
==
--- head/sys/kern/vfs_mount.c   Wed Aug 26 21:41:14 2020(r364843)
+++ head/sys/kern/vfs_mount.c   Wed Aug 26 21:49:43 2020(r364844)
@@ -969,11 +969,14 @@ vfs_domount_first(
if ((error = VFS_MOUNT(mp)) != 0 ||
(error1 = VFS_STATFS(mp, >mnt_stat)) != 0 ||
(error1 = VFS_ROOT(mp, LK_EXCLUSIVE, )) != 0) {
+   rootvp = NULL;
if (error1 != 0) {
error = error1;
rootvp = vfs_cache_root_clear(mp);
-   if (rootvp != NULL)
+   if (rootvp != NULL) {
+   vhold(rootvp);
vrele(rootvp);
+   }
if ((error1 = VFS_UNMOUNT(mp, 0)) != 0)
printf("VFS_UNMOUNT returned %d\n", error1);
}
@@ -983,6 +986,10 @@ vfs_domount_first(
VI_LOCK(vp);
vp->v_iflag &= ~VI_MOUNT;
VI_UNLOCK(vp);
+   if (rootvp != NULL) {
+   vn_seqc_write_end(rootvp);
+   vdrop(rootvp);
+   }
vn_seqc_write_end(vp);
vrele(vp);
return (error);
___
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: r364840 - head/sys/opencrypto

2020-08-26 Thread John Baldwin
Author: jhb
Date: Wed Aug 26 21:28:47 2020
New Revision: 364840
URL: https://svnweb.freebsd.org/changeset/base/364840

Log:
  Add freebsd32 compat support for CIOCCRYPTAEAD.
  
  Reviewed by:  markj (earlier version)
  Sponsored by: Netflix
  Differential Revision:https://reviews.freebsd.org/D26179

Modified:
  head/sys/opencrypto/cryptodev.c

Modified: head/sys/opencrypto/cryptodev.c
==
--- head/sys/opencrypto/cryptodev.c Wed Aug 26 21:19:05 2020
(r364839)
+++ head/sys/opencrypto/cryptodev.c Wed Aug 26 21:28:47 2020
(r364840)
@@ -103,6 +103,20 @@ struct crypt_op32 {
u_int32_t   iv;
 };
 
+struct crypt_aead32 {
+   u_int32_t   ses;
+   u_int16_t   op;
+   u_int16_t   flags;
+   u_int   len;
+   u_int   aadlen;
+   u_int   ivlen;
+   u_int32_t   src;
+   u_int32_t   dst;
+   u_int32_t   aad;
+   u_int32_t   tag;
+   u_int32_t   iv;
+};
+
 struct crparam32 {
u_int32_t   crp_p;
u_int   crp_nbits;
@@ -122,6 +136,7 @@ struct crypt_kop32 {
 #defineCIOCKEY32   _IOWR('c', 104, struct crypt_kop32)
 #defineCIOCGSESSION232 _IOWR('c', 106, struct session2_op32)
 #defineCIOCKEY232  _IOWR('c', 107, struct crypt_kop32)
+#defineCIOCCRYPTAEAD32 _IOWR('c', 109, struct crypt_aead32)
 
 static void
 session_op_from_32(const struct session_op32 *from, struct session2_op *to)
@@ -196,6 +211,40 @@ crypt_op_to_32(const struct crypt_op *from, struct cry
 }
 
 static void
+crypt_aead_from_32(const struct crypt_aead32 *from, struct crypt_aead *to)
+{
+
+   CP(*from, *to, ses);
+   CP(*from, *to, op);
+   CP(*from, *to, flags);
+   CP(*from, *to, len);
+   CP(*from, *to, aadlen);
+   CP(*from, *to, ivlen);
+   PTRIN_CP(*from, *to, src);
+   PTRIN_CP(*from, *to, dst);
+   PTRIN_CP(*from, *to, aad);
+   PTRIN_CP(*from, *to, tag);
+   PTRIN_CP(*from, *to, iv);
+}
+
+static void
+crypt_aead_to_32(const struct crypt_aead *from, struct crypt_aead32 *to)
+{
+
+   CP(*from, *to, ses);
+   CP(*from, *to, op);
+   CP(*from, *to, flags);
+   CP(*from, *to, len);
+   CP(*from, *to, aadlen);
+   CP(*from, *to, ivlen);
+   PTROUT_CP(*from, *to, src);
+   PTROUT_CP(*from, *to, dst);
+   PTROUT_CP(*from, *to, aad);
+   PTROUT_CP(*from, *to, tag);
+   PTROUT_CP(*from, *to, iv);
+}
+
+static void
 crparam_from_32(const struct crparam32 *from, struct crparam *to)
 {
 
@@ -388,6 +437,7 @@ cryptof_ioctl(
struct session2_op sopc;
 #ifdef COMPAT_FREEBSD32
struct crypt_op copc;
+   struct crypt_aead aeadc;
struct crypt_kop kopc;
 #endif
};
@@ -419,6 +469,13 @@ cryptof_ioctl(
data = 
crypt_op_from_32((struct crypt_op32 *)data32, );
break;
+   case CIOCCRYPTAEAD32:
+   cmd32 = cmd;
+   data32 = data;
+   cmd = CIOCCRYPTAEAD;
+   data = 
+   crypt_aead_from_32((struct crypt_aead32 *)data32, );
+   break;
case CIOCKEY32:
case CIOCKEY232:
cmd32 = cmd;
@@ -822,6 +879,10 @@ bail:
case CIOCCRYPT32:
if (error == 0)
crypt_op_to_32(data, data32);
+   break;
+   case CIOCCRYPTAEAD32:
+   if (error == 0)
+   crypt_aead_to_32(data, data32);
break;
case CIOCKEY32:
case CIOCKEY232:
___
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: r364838 - head/sys/opencrypto

2020-08-26 Thread John Baldwin
Author: jhb
Date: Wed Aug 26 21:17:18 2020
New Revision: 364838
URL: https://svnweb.freebsd.org/changeset/base/364838

Log:
  Simplify compat shims for /dev/crypto.
  
  - Make session handling always use the CIOGSESSION2 structure.
CIOGSESSION requests use a thunk similar to COMPAT_FREEBSD32 session
requests.  This permits the ioctl handler to use the 'crid' field
unconditionally.
  
  - Move COMPAT_FREEBSD32 handling out of the main ioctl handler body
and instead do conversions in/out of thunk structures in dedicated
blocks at the start and end of the ioctl function.
  
  Reviewed by:  markj (earlier version)
  Sponsored by: Netflix
  Differential Revision:https://reviews.freebsd.org/D26178

Modified:
  head/sys/opencrypto/cryptodev.c

Modified: head/sys/opencrypto/cryptodev.c
==
--- head/sys/opencrypto/cryptodev.c Wed Aug 26 21:13:36 2020
(r364837)
+++ head/sys/opencrypto/cryptodev.c Wed Aug 26 21:17:18 2020
(r364838)
@@ -124,9 +124,10 @@ struct crypt_kop32 {
 #defineCIOCKEY232  _IOWR('c', 107, struct crypt_kop32)
 
 static void
-session_op_from_32(const struct session_op32 *from, struct session_op *to)
+session_op_from_32(const struct session_op32 *from, struct session2_op *to)
 {
 
+   memset(to, 0, sizeof(*to));
CP(*from, *to, cipher);
CP(*from, *to, mac);
CP(*from, *to, keylen);
@@ -134,19 +135,19 @@ session_op_from_32(const struct session_op32 *from, st
CP(*from, *to, mackeylen);
PTRIN_CP(*from, *to, mackey);
CP(*from, *to, ses);
+   to->crid = CRYPTOCAP_F_HARDWARE;
 }
 
 static void
 session2_op_from_32(const struct session2_op32 *from, struct session2_op *to)
 {
 
-   session_op_from_32((const struct session_op32 *)from,
-   (struct session_op *)to);
+   session_op_from_32((const struct session_op32 *)from, to);
CP(*from, *to, crid);
 }
 
 static void
-session_op_to_32(const struct session_op *from, struct session_op32 *to)
+session_op_to_32(const struct session2_op *from, struct session_op32 *to)
 {
 
CP(*from, *to, cipher);
@@ -162,8 +163,7 @@ static void
 session2_op_to_32(const struct session2_op *from, struct session2_op32 *to)
 {
 
-   session_op_to_32((const struct session_op *)from,
-   (struct session_op32 *)to);
+   session_op_to_32(from, (struct session_op32 *)to);
CP(*from, *to, crid);
 }
 
@@ -240,6 +240,22 @@ crypt_kop_to_32(const struct crypt_kop *from, struct c
 }
 #endif
 
+static void
+session2_op_from_op(const struct session_op *from, struct session2_op *to)
+{
+
+   memset(to, 0, sizeof(*to));
+   memcpy(to, from, sizeof(*from));
+   to->crid = CRYPTOCAP_F_HARDWARE;
+}
+
+static void
+session2_op_to_op(const struct session2_op *from, struct session_op *to)
+{
+
+   memcpy(to, from, sizeof(*to));
+}
+
 struct csession {
TAILQ_ENTRY(csession) next;
crypto_session_t cses;
@@ -354,11 +370,10 @@ cryptof_ioctl(
struct ucred *active_cred,
struct thread *td)
 {
-#defineSES2(p) ((struct session2_op *)p)
struct crypto_session_params csp;
struct fcrypt *fcr = fp->f_data;
struct csession *cse;
-   struct session_op *sop;
+   struct session2_op *sop;
struct crypt_op *cop;
struct crypt_aead *caead;
struct enc_xform *txform = NULL;
@@ -369,27 +384,64 @@ cryptof_ioctl(
crypto_session_t cses;
u_int32_t ses;
int error = 0, crid;
+   union {
+   struct session2_op sopc;
 #ifdef COMPAT_FREEBSD32
-   struct session2_op sopc;
-   struct crypt_op copc;
-   struct crypt_kop kopc;
+   struct crypt_op copc;
+   struct crypt_kop kopc;
 #endif
+   };
+#ifdef COMPAT_FREEBSD32
+   u_long cmd32;
+   void *data32;
 
+   cmd32 = 0;
+   data32 = NULL;
switch (cmd) {
-   case CIOCGSESSION:
-   case CIOCGSESSION2:
-#ifdef COMPAT_FREEBSD32
case CIOCGSESSION32:
+   cmd32 = cmd;
+   data32 = data;
+   cmd = CIOCGSESSION;
+   data = 
+   session_op_from_32((struct session_op32 *)data32, );
+   break;
case CIOCGSESSION232:
-   if (cmd == CIOCGSESSION32) {
-   session_op_from_32(data, (struct session_op *));
-   sop = (struct session_op *)
-   } else if (cmd == CIOCGSESSION232) {
-   session2_op_from_32(data, );
-   sop = (struct session_op *)
-   } else
+   cmd32 = cmd;
+   data32 = data;
+   cmd = CIOCGSESSION2;
+   data = 
+   session2_op_from_32((struct session2_op32 *)data32, );
+   break;
+   case CIOCCRYPT32:
+   cmd32 = cmd;
+   data32 = data;

svn commit: r364837 - head/sys/fs/fuse

2020-08-26 Thread Mateusz Guzik
Author: mjg
Date: Wed Aug 26 21:13:36 2020
New Revision: 364837
URL: https://svnweb.freebsd.org/changeset/base/364837

Log:
  fuse: unbreak after r364814
  
  Reported by:  kevans

Modified:
  head/sys/fs/fuse/fuse_vnops.c

Modified: head/sys/fs/fuse/fuse_vnops.c
==
--- head/sys/fs/fuse/fuse_vnops.c   Wed Aug 26 20:56:05 2020
(r364836)
+++ head/sys/fs/fuse/fuse_vnops.c   Wed Aug 26 21:13:36 2020
(r364837)
@@ -1035,8 +1035,9 @@ fuse_vnop_lookup(struct vop_lookup_args *ap)
filesize = 0;
} else {
struct timespec now, timeout;
+   int ncpticks; /* here to accomodate for API contract */
 
-   err = cache_lookup(dvp, vpp, cnp, , NULL);
+   err = cache_lookup(dvp, vpp, cnp, , );
getnanouptime();
SDT_PROBE3(fusefs, , vnops, cache_lookup, err, , );
switch (err) {
___
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: r364836 - head/sys/sys

2020-08-26 Thread Rick Macklem
Author: rmacklem
Date: Wed Aug 26 20:56:05 2020
New Revision: 364836
URL: https://svnweb.freebsd.org/changeset/base/364836

Log:
  Add MNT_EXTLSxxx flags that will be used for NFS over TLS exports.
  
  These flags are not currently used, but will be used by future commits to
  implement export(5) requirements for the use of NFS over TLS by clients.
  
  Reviewed by:  kib
  Differential Revision:https://reviews.freebsd.org/D26180

Modified:
  head/sys/sys/mount.h

Modified: head/sys/sys/mount.h
==
--- head/sys/sys/mount.hWed Aug 26 20:30:00 2020(r364835)
+++ head/sys/sys/mount.hWed Aug 26 20:56:05 2020(r364836)
@@ -365,6 +365,9 @@ struct mntoptnames {
 #defineMNT_EXPORTANON  0x0400ULL   /* anon uid mapping for 
all */
 #defineMNT_EXKERB  0x0800ULL   /* exported with 
Kerberos */
 #defineMNT_EXPUBLIC0x2000ULL   /* public export 
(WebNFS) */
+#defineMNT_EXTLS   0x0040ULL /* require TLS */
+#defineMNT_EXTLSCERT   0x0080ULL /* require TLS with 
client cert */
+#defineMNT_EXTLSCERTUSER 0x0100ULL /* require TLS with 
user cert */
 
 /*
  * Flags set by internal operations,
___
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: r364835 - head/libexec/rc/rc.d

2020-08-26 Thread Cy Schubert
Author: cy
Date: Wed Aug 26 20:30:00 2020
New Revision: 364835
URL: https://svnweb.freebsd.org/changeset/base/364835

Log:
  To avoid breakage for those who build/install without ZFS only
  rely on rc.d/zpool's BEFORE specification.
  
  Reported by:  rpokala

Modified:
  head/libexec/rc/rc.d/mountcritlocal

Modified: head/libexec/rc/rc.d/mountcritlocal
==
--- head/libexec/rc/rc.d/mountcritlocal Wed Aug 26 19:32:28 2020
(r364834)
+++ head/libexec/rc/rc.d/mountcritlocal Wed Aug 26 20:30:00 2020
(r364835)
@@ -4,7 +4,7 @@
 #
 
 # PROVIDE: mountcritlocal
-# REQUIRE: root hostid_save mdconfig zvol
+# REQUIRE: root hostid_save mdconfig
 # KEYWORD: nojail shutdown
 
 . /etc/rc.subr
___
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: r364799 - in head: share/man/man9 sys/crypto/ccp sys/dev/cxgbe/crypto sys/dev/sec sys/kern sys/opencrypto

2020-08-26 Thread John Baldwin
On 8/26/20 12:36 PM, Brandon Bergren wrote:
> My guess as to why universe didn't catch it on powerpc is that MPC85XX is a 
> non GENERIC kernel that is specially built as an alternate kernel -- see 
> https://github.com/freebsd/freebsd-ci/blob/master/jobs/FreeBSD-head-powerpc-build/src.conf

It is also built as part of make universe/tinderbox.  I've tended to
only build a few specific kernel configs to cover crypto drivers not
built in amd64's GENERIC build (i386 GENERIC for glxsb, MPC85XX for
sec, XLP64 and OCTEON for the mips ones, aarch64 GENERIC for armv8crypto).
I believe universe should cover all of those.

-- 
John Baldwin
___
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: r364799 - in head: share/man/man9 sys/crypto/ccp sys/dev/cxgbe/crypto sys/dev/sec sys/kern sys/opencrypto

2020-08-26 Thread Brandon Bergren
My guess as to why universe didn't catch it on powerpc is that MPC85XX is a non 
GENERIC kernel that is specially built as an alternate kernel -- see 
https://github.com/freebsd/freebsd-ci/blob/master/jobs/FreeBSD-head-powerpc-build/src.conf

On Wed, Aug 26, 2020, at 2:32 PM, Brandon Bergren wrote:
> r364833
> 
> On Wed, Aug 26, 2020, at 2:30 PM, Ed Maste wrote:
> > On Wed, 26 Aug 2020 at 15:27, Alan Somers  wrote:
> > >
> > > It probably came copy/pasted from another file :( .  I'll fix it; and 
> > > figure out why my universe build didn't catch this.
> > 
> > IIRC powerpcspe is not included in universe/tinderbox.
> >

-- 
  Brandon Bergren
  bdra...@freebsd.org
___
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: r364833 - head/sys/dev/sec

2020-08-26 Thread Alan Somers
On Wed, Aug 26, 2020 at 1:30 PM Brandon Bergren  wrote:

> Author: bdragon
> Date: Wed Aug 26 19:30:42 2020
> New Revision: 364833
> URL: https://svnweb.freebsd.org/changeset/base/364833
>
> Log:
>   [PowerPC] Fix build failure in sec.c
>
>   Fix a typo in r364799 that was breaking powerpc and powerpcspe build.
>
>   MFC with: 364799
>
> Modified:
>   head/sys/dev/sec/sec.c
>

Thanks Brandon.
___
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: r364799 - in head: share/man/man9 sys/crypto/ccp sys/dev/cxgbe/crypto sys/dev/sec sys/kern sys/opencrypto

2020-08-26 Thread Brandon Bergren
r364833

On Wed, Aug 26, 2020, at 2:30 PM, Ed Maste wrote:
> On Wed, 26 Aug 2020 at 15:27, Alan Somers  wrote:
> >
> > It probably came copy/pasted from another file :( .  I'll fix it; and 
> > figure out why my universe build didn't catch this.
> 
> IIRC powerpcspe is not included in universe/tinderbox.
>

-- 
  Brandon Bergren
  bdra...@freebsd.org
___
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: r364799 - in head: share/man/man9 sys/crypto/ccp sys/dev/cxgbe/crypto sys/dev/sec sys/kern sys/opencrypto

2020-08-26 Thread Alan Somers
On Wed, Aug 26, 2020 at 1:30 PM Ed Maste  wrote:

> On Wed, 26 Aug 2020 at 15:27, Alan Somers  wrote:
> >
> > It probably came copy/pasted from another file :( .  I'll fix it; and
> figure out why my universe build didn't catch this.
>
> IIRC powerpcspe is not included in universe/tinderbox.
>

Oh, it's only for powerpcspe and not for all powerpc?  Now I don't feel so
bad.
-Alan
___
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: r364834 - head

2020-08-26 Thread Warner Losh
Author: imp
Date: Wed Aug 26 19:32:28 2020
New Revision: 364834
URL: https://svnweb.freebsd.org/changeset/base/364834

Log:
  Each entry in UPDATING needs a date
  
  It's rare for there to be two updating entries on the same day (once a
  decade or so), but we have that here. Add the date to the second one
  since devd and zfs are unrelated.

Modified:
  head/UPDATING

Modified: head/UPDATING
==
--- head/UPDATING   Wed Aug 26 19:30:42 2020(r364833)
+++ head/UPDATING   Wed Aug 26 19:32:28 2020(r364834)
@@ -32,7 +32,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW:
'zpool upgrade' for the next few weeks. The change should be transparent
unless you  want to use new features.
 
-
+20200824:
The resume code now notifies devd with the 'kernel' system
rather than the old 'kern' subsystem to be consistent with
other use. The old notification will be created as well, but
___
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: r364799 - in head: share/man/man9 sys/crypto/ccp sys/dev/cxgbe/crypto sys/dev/sec sys/kern sys/opencrypto

2020-08-26 Thread Ed Maste
On Wed, 26 Aug 2020 at 15:27, Alan Somers  wrote:
>
> It probably came copy/pasted from another file :( .  I'll fix it; and figure 
> out why my universe build didn't catch this.

IIRC powerpcspe is not included in universe/tinderbox.
___
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: r364833 - head/sys/dev/sec

2020-08-26 Thread Brandon Bergren
Author: bdragon
Date: Wed Aug 26 19:30:42 2020
New Revision: 364833
URL: https://svnweb.freebsd.org/changeset/base/364833

Log:
  [PowerPC] Fix build failure in sec.c
  
  Fix a typo in r364799 that was breaking powerpc and powerpcspe build.
  
  MFC with: 364799

Modified:
  head/sys/dev/sec/sec.c

Modified: head/sys/dev/sec/sec.c
==
--- head/sys/dev/sec/sec.c  Wed Aug 26 19:28:30 2020(r364832)
+++ head/sys/dev/sec/sec.c  Wed Aug 26 19:30:42 2020(r364833)
@@ -852,7 +852,7 @@ sec_desc_map_dma(struct sec_softc *sc, struct sec_dma_
size = m_length(crp->crp_buf.cb_mbuf, NULL);
break;
case CRYPTO_BUF_VMPAGE:
-   size = PAGE_SIZE - cb->cb_vm_page_offset;
+   size = PAGE_SIZE - crp->crp_buf.cb_vm_page_offset;
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: r364832 - head/usr.bin/lockf

2020-08-26 Thread Colin Percival
Author: cperciva
Date: Wed Aug 26 19:28:30 2020
New Revision: 364832
URL: https://svnweb.freebsd.org/changeset/base/364832

Log:
  Remove whitespace which accidentaly snuck into r364831.

Modified:
  head/usr.bin/lockf/lockf.1

Modified: head/usr.bin/lockf/lockf.1
==
--- head/usr.bin/lockf/lockf.1  Wed Aug 26 19:26:48 2020(r364831)
+++ head/usr.bin/lockf/lockf.1  Wed Aug 26 19:28:30 2020(r364832)
@@ -1,4 +1,4 @@
- .\"
+.\"
 .\" Copyright (C) 1998 John D. Polstra.  All rights reserved.
 .\"
 .\" Redistribution and use in source and binary forms, with or without
___
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: r364799 - in head: share/man/man9 sys/crypto/ccp sys/dev/cxgbe/crypto sys/dev/sec sys/kern sys/opencrypto

2020-08-26 Thread Alan Somers
On Wed, Aug 26, 2020 at 1:23 PM Brandon Bergren  wrote:

>
> > No, I mean literally. What scope is cb coming from? It's not a variable
> > that is in scope for that function as far as I can tell.
> >
>
> Naturally, about two seconds after I sent this, I realized that you meant
> that it was a powerpc-specific driver and that's why the other platforms
> don't catch it.
>
> Will fix it myself.
>
> --
>   Brandon Bergren
>   bdra...@freebsd.org
>

It probably came copy/pasted from another file :( .  I'll fix it; and
figure out why my universe build didn't catch this.
-Alan
___
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: r364831 - head/usr.bin/lockf

2020-08-26 Thread Colin Percival
Author: cperciva
Date: Wed Aug 26 19:26:48 2020
New Revision: 364831
URL: https://svnweb.freebsd.org/changeset/base/364831

Log:
  Add -w option to lockf(1).
  
  By default, lockf(1) opens its lock file O_RDONLY|O_EXLOCK.  On NFS, if the
  file already exists, this is split into opening the file read-only and then
  requesting an exclusive lock -- and the second step fails because NFS does
  not permit exclusive locking on files which are opened read-only.
  
  The new -w option changes the open flags to O_WRONLY|O_EXLOCK, allowing it
  to work on NFS -- at the cost of not working if the file cannot be opened
  for writing.
  
  (Whether the traditional BSD behaviour of allowing exclusive locks to be
  obtained on a file which cannot be opened for writing is a good idea is
  perhaps questionable since it may allow less-privileged users to perform
  a local denial of service; however this behaviour has been present for a
  long time and changing it now seems like it would cause problems.)
  
  Reviewed by:  rmacklem
  Differential Revision:https://reviews.freebsd.org/D26005

Modified:
  head/usr.bin/lockf/lockf.1
  head/usr.bin/lockf/lockf.c

Modified: head/usr.bin/lockf/lockf.1
==
--- head/usr.bin/lockf/lockf.1  Wed Aug 26 19:03:15 2020(r364830)
+++ head/usr.bin/lockf/lockf.1  Wed Aug 26 19:26:48 2020(r364831)
@@ -1,4 +1,4 @@
-.\"
+ .\"
 .\" Copyright (C) 1998 John D. Polstra.  All rights reserved.
 .\"
 .\" Redistribution and use in source and binary forms, with or without
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd June 18, 2020
+.Dd August 26, 2020
 .Dt LOCKF 1
 .Os
 .Sh NAME
@@ -32,7 +32,7 @@
 .Nd execute a command while holding a file lock
 .Sh SYNOPSIS
 .Nm
-.Op Fl kns
+.Op Fl knsw
 .Op Fl t Ar seconds
 .Ar file
 .Ar command
@@ -121,6 +121,14 @@ When a lock times out,
 is
 .Em not
 executed.
+.It Fl w
+Causes
+.Nm
+to open
+.Ar file
+for writing rather than reading.
+This is necessary on filesystems (including NFSv4) where a file which
+has been opened read-only cannot be exclusively locked.
 .El
 .Pp
 In no event will

Modified: head/usr.bin/lockf/lockf.c
==
--- head/usr.bin/lockf/lockf.c  Wed Aug 26 19:03:15 2020(r364830)
+++ head/usr.bin/lockf/lockf.c  Wed Aug 26 19:26:48 2020(r364831)
@@ -62,9 +62,9 @@ main(int argc, char **argv)
pid_t child;
 
silent = keep = 0;
-   flags = O_CREAT;
+   flags = O_CREAT | O_RDONLY;
waitsec = -1;   /* Infinite. */
-   while ((ch = getopt(argc, argv, "sknt:")) != -1) {
+   while ((ch = getopt(argc, argv, "sknt:w")) != -1) {
switch (ch) {
case 'k':
keep = 1;
@@ -84,6 +84,9 @@ main(int argc, char **argv)
"invalid timeout \"%s\"", optarg);
}
break;
+   case 'w':
+   flags = (flags & ~O_RDONLY) | O_WRONLY;
+   break;
default:
usage();
}
@@ -171,7 +174,7 @@ acquire_lock(const char *name, int flags)
 {
int fd;
 
-   if ((fd = open(name, O_RDONLY|O_EXLOCK|flags, 0666)) == -1) {
+   if ((fd = open(name, O_EXLOCK|flags, 0666)) == -1) {
if (errno == EAGAIN || errno == EINTR)
return (-1);
else if (errno == ENOENT && (flags & O_CREAT) == 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"


Re: svn commit: r364799 - in head: share/man/man9 sys/crypto/ccp sys/dev/cxgbe/crypto sys/dev/sec sys/kern sys/opencrypto

2020-08-26 Thread Brandon Bergren


> No, I mean literally. What scope is cb coming from? It's not a variable 
> that is in scope for that function as far as I can tell.
> 

Naturally, about two seconds after I sent this, I realized that you meant that 
it was a powerpc-specific driver and that's why the other platforms don't catch 
it.

Will fix it myself.

-- 
  Brandon Bergren
  bdra...@freebsd.org
___
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: r364799 - in head: share/man/man9 sys/crypto/ccp sys/dev/cxgbe/crypto sys/dev/sec sys/kern sys/opencrypto

2020-08-26 Thread Jessica Clarke
On 26 Aug 2020, at 20:21, Brandon Bergren  wrote:
> On Wed, Aug 26, 2020, at 2:19 PM, Jessica Clarke wrote:
>> On 26 Aug 2020, at 20:16, Brandon Bergren  wrote:
>>> On Tue, Aug 25, 2020, at 9:37 PM, Alan Somers wrote:
 Author: asomers
 Date: Wed Aug 26 02:37:42 2020
 New Revision: 364799
 URL: https://svnweb.freebsd.org/changeset/base/364799
 
 Modified: head/sys/dev/sec/sec.c
 ==
 --- head/sys/dev/sec/sec.c Wed Aug 26 02:13:27 2020(r364798)
 +++ head/sys/dev/sec/sec.c Wed Aug 26 02:37:42 2020(r364799)
 @@ -851,6 +851,9 @@ sec_desc_map_dma(struct sec_softc *sc, struct sec_dma_
case CRYPTO_BUF_MBUF:
size = m_length(crp->crp_buf.cb_mbuf, NULL);
break;
 +  case CRYPTO_BUF_VMPAGE:
 +  size = PAGE_SIZE - cb->cb_vm_page_offset;
 +  break;
default:
return (EINVAL);
}
>>> 
>>> Uh, where is cb coming from? Shouldn't this be using 
>>> crp->crp_buf.cb_vm_page_offset? This is causing a build failure on powerpc 
>>> and powerpcspe. I don't see why other platforms aren't also erroring out 
>>> here.
>> 
>> Because it's PowerPC-specific:
>> 
>> sys/conf/files.powerpc:dev/sec/sec.c optionalsec mpc85xx
>> 
>> Jess
>> 
>> 
> 
> No, I mean literally. What scope is cb coming from? It's not a variable that 
> is in scope for that function as far as I can tell.

Oh no I agree it's wrong and your proposal sounds correct. I was just
explaining why it's only noticed in PowerPC builds.

Jess

___
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: r364799 - in head: share/man/man9 sys/crypto/ccp sys/dev/cxgbe/crypto sys/dev/sec sys/kern sys/opencrypto

2020-08-26 Thread Brandon Bergren
On Wed, Aug 26, 2020, at 2:19 PM, Jessica Clarke wrote:
> On 26 Aug 2020, at 20:16, Brandon Bergren  wrote:
> > On Tue, Aug 25, 2020, at 9:37 PM, Alan Somers wrote:
> >> Author: asomers
> >> Date: Wed Aug 26 02:37:42 2020
> >> New Revision: 364799
> >> URL: https://svnweb.freebsd.org/changeset/base/364799
> >> 
> >> Modified: head/sys/dev/sec/sec.c
> >> ==
> >> --- head/sys/dev/sec/sec.c Wed Aug 26 02:13:27 2020(r364798)
> >> +++ head/sys/dev/sec/sec.c Wed Aug 26 02:37:42 2020(r364799)
> >> @@ -851,6 +851,9 @@ sec_desc_map_dma(struct sec_softc *sc, struct sec_dma_
> >>case CRYPTO_BUF_MBUF:
> >>size = m_length(crp->crp_buf.cb_mbuf, NULL);
> >>break;
> >> +  case CRYPTO_BUF_VMPAGE:
> >> +  size = PAGE_SIZE - cb->cb_vm_page_offset;
> >> +  break;
> >>default:
> >>return (EINVAL);
> >>}
> > 
> > Uh, where is cb coming from? Shouldn't this be using 
> > crp->crp_buf.cb_vm_page_offset? This is causing a build failure on powerpc 
> > and powerpcspe. I don't see why other platforms aren't also erroring out 
> > here.
> 
> Because it's PowerPC-specific:
> 
> sys/conf/files.powerpc:dev/sec/sec.c optionalsec mpc85xx
> 
> Jess
> 
>

No, I mean literally. What scope is cb coming from? It's not a variable that is 
in scope for that function as far as I can tell.

-- 
  Brandon Bergren
  bdra...@freebsd.org
___
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: r364799 - in head: share/man/man9 sys/crypto/ccp sys/dev/cxgbe/crypto sys/dev/sec sys/kern sys/opencrypto

2020-08-26 Thread Jessica Clarke
On 26 Aug 2020, at 20:16, Brandon Bergren  wrote:
> On Tue, Aug 25, 2020, at 9:37 PM, Alan Somers wrote:
>> Author: asomers
>> Date: Wed Aug 26 02:37:42 2020
>> New Revision: 364799
>> URL: https://svnweb.freebsd.org/changeset/base/364799
>> 
>> Modified: head/sys/dev/sec/sec.c
>> ==
>> --- head/sys/dev/sec/sec.c   Wed Aug 26 02:13:27 2020(r364798)
>> +++ head/sys/dev/sec/sec.c   Wed Aug 26 02:37:42 2020(r364799)
>> @@ -851,6 +851,9 @@ sec_desc_map_dma(struct sec_softc *sc, struct sec_dma_
>>  case CRYPTO_BUF_MBUF:
>>  size = m_length(crp->crp_buf.cb_mbuf, NULL);
>>  break;
>> +case CRYPTO_BUF_VMPAGE:
>> +size = PAGE_SIZE - cb->cb_vm_page_offset;
>> +break;
>>  default:
>>  return (EINVAL);
>>  }
> 
> Uh, where is cb coming from? Shouldn't this be using 
> crp->crp_buf.cb_vm_page_offset? This is causing a build failure on powerpc 
> and powerpcspe. I don't see why other platforms aren't also erroring out here.

Because it's PowerPC-specific:

sys/conf/files.powerpc:dev/sec/sec.c optionalsec mpc85xx

Jess

___
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: r364799 - in head: share/man/man9 sys/crypto/ccp sys/dev/cxgbe/crypto sys/dev/sec sys/kern sys/opencrypto

2020-08-26 Thread Brandon Bergren
On Tue, Aug 25, 2020, at 9:37 PM, Alan Somers wrote:
> Author: asomers
> Date: Wed Aug 26 02:37:42 2020
> New Revision: 364799
> URL: https://svnweb.freebsd.org/changeset/base/364799
> 
> Modified: head/sys/dev/sec/sec.c
> ==
> --- head/sys/dev/sec/sec.cWed Aug 26 02:13:27 2020(r364798)
> +++ head/sys/dev/sec/sec.cWed Aug 26 02:37:42 2020(r364799)
> @@ -851,6 +851,9 @@ sec_desc_map_dma(struct sec_softc *sc, struct sec_dma_
>   case CRYPTO_BUF_MBUF:
>   size = m_length(crp->crp_buf.cb_mbuf, NULL);
>   break;
> + case CRYPTO_BUF_VMPAGE:
> + size = PAGE_SIZE - cb->cb_vm_page_offset;
> + break;
>   default:
>   return (EINVAL);
>   }

Uh, where is cb coming from? Shouldn't this be using 
crp->crp_buf.cb_vm_page_offset? This is causing a build failure on powerpc and 
powerpcspe. I don't see why other platforms aren't also erroring out here.
___
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: r364830 - in head/cddl/lib: libzfs libzpool

2020-08-26 Thread Ryan Moeller
Author: freqlabs
Date: Wed Aug 26 19:03:15 2020
New Revision: 364830
URL: https://svnweb.freebsd.org/changeset/base/364830

Log:
  Move zstd sources from libzfs to libzpool
  
  zstd is kernel code that was not supposed to be in libzfs.
  
  libzpool provides userland shims for kernel code and is where the
  zstd code needs to be included.
  
  Reported by:  John Kennedy
  Discussed with:   mmacy
  Sponsored by: iXsystems, Inc.

Modified:
  head/cddl/lib/libzfs/Makefile
  head/cddl/lib/libzpool/Makefile

Modified: head/cddl/lib/libzfs/Makefile
==
--- head/cddl/lib/libzfs/Makefile   Wed Aug 26 19:00:17 2020
(r364829)
+++ head/cddl/lib/libzfs/Makefile   Wed Aug 26 19:03:15 2020
(r364830)
@@ -58,10 +58,6 @@ KERNEL_C = \
 zprop_common.c
 
 
-KERNEL_C+= zstd.c \
-   zfs_zstd.c
-
-
 ARCH_C =
 .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
 ARCH_C +=  zfs_fletcher_intel.c \
@@ -94,8 +90,6 @@ CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/in
 CFLAGS+= -include 
${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h
 CFLAGS+= -DHAVE_ISSETUGID
 CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h
-CFLAGS.zfs_zstd.c= -Wno-cast-qual -Wno-pointer-arith
-CFLAGS.zstd.c= -fno-tree-vectorize
 
 
 .include 

Modified: head/cddl/lib/libzpool/Makefile
==
--- head/cddl/lib/libzpool/Makefile Wed Aug 26 19:00:17 2020
(r364829)
+++ head/cddl/lib/libzpool/Makefile Wed Aug 26 19:03:15 2020
(r364830)
@@ -8,6 +8,9 @@ ZFSTOP= ${SRCTOP}/sys/contrib/openzfs
 .PATH: ${ZFSTOP}/module/unicode
 # LUA_SRCS
 .PATH: ${ZFSTOP}/module/lua
+# ZSTD_SRCS
+.PATH: ${ZFSTOP}/module/zstd
+.PATH: ${ZFSTOP}/module/zstd/lib
 
 .PATH: ${ZFSTOP}/module/os/linux/zfs
 
@@ -44,6 +47,7 @@ KERNEL_C = \
zfs_namecheck.c \
zfs_prop.c \
zfs_uio.c \
+   zfs_zstd.c \
zpool_prop.c \
zprop_common.c \
abd.c \
@@ -167,6 +171,7 @@ KERNEL_C = \
zio_inject.c \
zle.c \
zrlock.c \
+   zstd.c \
zthr.c
 
 ARCH_C =
@@ -251,5 +256,8 @@ CSTD=   c99
 # it without debugging.
 
 CFLAGS+=   -g -DDEBUG=1
+
+CFLAGS.zfs_zstd.c= -Wno-cast-qual -Wno-pointer-arith
+CFLAGS.zstd.c+=-fno-tree-vectorize
 
 .include 
___
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: r364829 - head/cddl/lib/libzpool

2020-08-26 Thread Ryan Moeller
Author: freqlabs
Date: Wed Aug 26 19:00:17 2020
New Revision: 364829
URL: https://svnweb.freebsd.org/changeset/base/364829

Log:
  Tidy up libzpool Makefile
  
  Sponsored by: iXsystems, Inc.

Modified:
  head/cddl/lib/libzpool/Makefile

Modified: head/cddl/lib/libzpool/Makefile
==
--- head/cddl/lib/libzpool/Makefile Wed Aug 26 18:35:32 2020
(r364828)
+++ head/cddl/lib/libzpool/Makefile Wed Aug 26 19:00:17 2020
(r364829)
@@ -1,16 +1,17 @@
 # $FreeBSD$
 
+ZFSTOP=${SRCTOP}/sys/contrib/openzfs
 
 # ZFS_COMMON_SRCS
-.PATH: ${SRCTOP}/sys/contrib/openzfs/module/zfs
-.PATH: ${SRCTOP}/sys/contrib/openzfs/module/zcommon
-.PATH: ${SRCTOP}/sys/contrib/openzfs/module/unicode
+.PATH: ${ZFSTOP}/module/zfs
+.PATH: ${ZFSTOP}/module/zcommon
+.PATH: ${ZFSTOP}/module/unicode
 # LUA_SRCS
-.PATH: ${SRCTOP}/sys/contrib/openzfs/module/lua
+.PATH: ${ZFSTOP}/module/lua
 
-.PATH: ${SRCTOP}/sys/contrib/openzfs/module/os/linux/zfs
+.PATH: ${ZFSTOP}/module/os/linux/zfs
 
-.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libzpool
+.PATH: ${ZFSTOP}/lib/libzpool
 
 .if 
exists(${SRCTOP}/sys/cddl/contrib/opensolaris/common/atomic/${MACHINE_ARCH}/opensolaris_atomic.S)
 .PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/atomic/${MACHINE_ARCH}
@@ -28,8 +29,6 @@ PICFLAG=  -fPIC
 
 LIB=   zpool
 
-
-
 USER_C = \
kernel.c \
taskq.c \
@@ -218,19 +217,19 @@ UNICODE_C = u8_textprep.c uconv.c
 SRCS=  ${USER_C} ${KERNEL_C} ${LUA_C} ${UNICODE_C} ${ARCH_C}
 
 WARNS?=2
-CFLAGS+= -DIN_BASE
-CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include
-CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/
-CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd
-CFLAGS+= -I${SRCTOP}/sys
-CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include
-CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/include
-CFLAGS+= -include 
${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h
-CFLAGS+= -DHAVE_ISSETUGID
-CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h
-CFLAGS+= -I${SRCTOP}/sys/modules/zfs
-CFLAGS+= -DLIB_ZPOOL_BUILD -DZFS_DEBUG
-
+CFLAGS+= \
+   -DIN_BASE \
+   -I${ZFSTOP}/include \
+   -I${ZFSTOP}/lib/libspl/include \
+   -I${ZFSTOP}/lib/libspl/include/os/freebsd \
+   -I${SRCTOP}/sys \
+   -I${SRCTOP}/cddl/compat/opensolaris/include \
+   -I${ZFSTOP}/module/icp/include \
+   -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h \
+   -DHAVE_ISSETUGID \
+   -include ${SRCTOP}/sys/modules/zfs/zfs_config.h \
+   -I${SRCTOP}/sys/modules/zfs \
+   -DLIB_ZPOOL_BUILD -DZFS_DEBUG \
 
 # XXX: pthread doesn't have mutex_owned() equivalent, so we need to look
 #  into libthr private structures. That's sooo evil, but it's only for
___
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: r364822 - in head/crypto/openssl/crypto: aes/asm bn/asm chacha/asm ec/asm modes/asm poly1305/asm sha/asm

2020-08-26 Thread Jung-uk Kim
On 20. 8. 26., Jessica Clarke wrote:
> On 26 Aug 2020, at 19:33, Dimitry Andric  wrote:
>>
>> On 26 Aug 2020, at 19:13, Ian Lepore  wrote:
>>>
>>> On Wed, 2020-08-26 at 19:04 +0200, Mateusz Guzik wrote:
 On 8/26/20, Jung-uk Kim  wrote:
> Author: jkim
> Date: Wed Aug 26 16:55:28 2020
> New Revision: 364822
> URL: https://svnweb.freebsd.org/changeset/base/364822
>
> Log:
> Fix Clang version detection.
>
> We prepend "FreeBSD" to Clang version string.  This broke
> compiler test
> for
> AVX instruction support.
>

 What about other software checking in similar fashion? imo the right
 fix is to stop mucking with the way clang reports itself

>>>
>>> Maybe it would be better to not modify the start of the string.
>>> Instead of
>>>
>>> FreeBSD clang version 9.0.1 (g...@github.com:llvm/llvm-project.git
>>> c1a0a213378a458fbea1a5c77b315c7dce08fd05) (based on LLVM 9.0.1)
>>>
>>> maybe
>>>
>>> clang version 9.0.1 for FreeBSD (g...@github.com:llvm/llvm-project.git
>>> c1a0a213378a458fbea1a5c77b315c7dce08fd05) (based on LLVM 9.0.1)
>>
>> We have been doing this since, well, forever. And this way actually
>> originates from upstream, we only define the CLANG_VENDOR macro. I see
>> no reason to change this after all those years.
>>
>> A better question is, why these perl scripts "suddenly" started failing?
>> Or have they also failed since forever, and it was only noticed now?
> 
> Ah, digging deeper it gets more interesting. All those scripts check
> for "based on LLVM X.Y", a suffix printed for vendor builds. However,
> that was dropped in https://reviews.llvm.org/D69925 as it's redundant,
> thereby breaking this detection. So it's fallout from LLVM 10.

Yes, that's correct.

BTW, they also changed "-dumpversion" format from Clang 9.

% clang80 -dumpversion
4.2.1
% clang90 -dumpversion
9.0.1

Since some do not check whether you are using Clang or GCC, some scripts
may think you are using GCC 9 or newer.

> Also the scripts aren't failing in a sense, they just don't know what
> compiler is in use so they fall back on not enabling AVX.

Also, correct.

Jung-uk Kim
___
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: r364822 - in head/crypto/openssl/crypto: aes/asm bn/asm chacha/asm ec/asm modes/asm poly1305/asm sha/asm

2020-08-26 Thread Jessica Clarke
On 26 Aug 2020, at 19:33, Dimitry Andric  wrote:
> 
> On 26 Aug 2020, at 19:13, Ian Lepore  wrote:
>> 
>> On Wed, 2020-08-26 at 19:04 +0200, Mateusz Guzik wrote:
>>> On 8/26/20, Jung-uk Kim  wrote:
 Author: jkim
 Date: Wed Aug 26 16:55:28 2020
 New Revision: 364822
 URL: https://svnweb.freebsd.org/changeset/base/364822
 
 Log:
 Fix Clang version detection.
 
 We prepend "FreeBSD" to Clang version string.  This broke
 compiler test
 for
 AVX instruction support.
 
>>> 
>>> What about other software checking in similar fashion? imo the right
>>> fix is to stop mucking with the way clang reports itself
>>> 
>> 
>> Maybe it would be better to not modify the start of the string.
>> Instead of
>> 
>> FreeBSD clang version 9.0.1 (g...@github.com:llvm/llvm-project.git
>> c1a0a213378a458fbea1a5c77b315c7dce08fd05) (based on LLVM 9.0.1)
>> 
>> maybe
>> 
>> clang version 9.0.1 for FreeBSD (g...@github.com:llvm/llvm-project.git
>> c1a0a213378a458fbea1a5c77b315c7dce08fd05) (based on LLVM 9.0.1)
> 
> We have been doing this since, well, forever. And this way actually
> originates from upstream, we only define the CLANG_VENDOR macro. I see
> no reason to change this after all those years.
> 
> A better question is, why these perl scripts "suddenly" started failing?
> Or have they also failed since forever, and it was only noticed now?

Ah, digging deeper it gets more interesting. All those scripts check
for "based on LLVM X.Y", a suffix printed for vendor builds. However,
that was dropped in https://reviews.llvm.org/D69925 as it's redundant,
thereby breaking this detection. So it's fallout from LLVM 10.

Also the scripts aren't failing in a sense, they just don't know what
compiler is in use so they fall back on not enabling AVX.

Jess

___
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: r364828 - head/usr.sbin/jail

2020-08-26 Thread Jamie Gritton
Author: jamie
Date: Wed Aug 26 18:35:32 2020
New Revision: 364828
URL: https://svnweb.freebsd.org/changeset/base/364828

Log:
  Back out r364791 to unbreak jails.  Lesson learned: "compile and test" means
  running the test on the same executable that you just compiled.
  
  PR:   248444
  Pointy hat to:jamie

Modified:
  head/usr.sbin/jail/config.c

Modified: head/usr.sbin/jail/config.c
==
--- head/usr.sbin/jail/config.c Wed Aug 26 17:52:32 2020(r364827)
+++ head/usr.sbin/jail/config.c Wed Aug 26 18:35:32 2020(r364828)
@@ -393,8 +393,7 @@ add_param(struct cfjail *j, const struct cfparam *p, e
else
for (ipnum = IP__NULL + 1; ipnum < IP_NPARAM; ipnum++)
if (!(intparams[ipnum].flags & PF_CONV) &&
-   equalopts(name, intparams[ipnum].name) &&
-   !(p->flags & PF_VAR)) {
+   equalopts(name, intparams[ipnum].name)) {
j->intparams[ipnum] = np;
np->flags |= intparams[ipnum].flags;
break;
___
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: r364822 - in head/crypto/openssl/crypto: aes/asm bn/asm chacha/asm ec/asm modes/asm poly1305/asm sha/asm

2020-08-26 Thread Dimitry Andric
On 26 Aug 2020, at 19:13, Ian Lepore  wrote:
> 
> On Wed, 2020-08-26 at 19:04 +0200, Mateusz Guzik wrote:
>> On 8/26/20, Jung-uk Kim  wrote:
>>> Author: jkim
>>> Date: Wed Aug 26 16:55:28 2020
>>> New Revision: 364822
>>> URL: https://svnweb.freebsd.org/changeset/base/364822
>>> 
>>> Log:
>>>  Fix Clang version detection.
>>> 
>>>  We prepend "FreeBSD" to Clang version string.  This broke
>>> compiler test
>>> for
>>>  AVX instruction support.
>>> 
>> 
>> What about other software checking in similar fashion? imo the right
>> fix is to stop mucking with the way clang reports itself
>> 
> 
> Maybe it would be better to not modify the start of the string.
> Instead of
> 
> FreeBSD clang version 9.0.1 (g...@github.com:llvm/llvm-project.git
> c1a0a213378a458fbea1a5c77b315c7dce08fd05) (based on LLVM 9.0.1)
> 
> maybe
> 
> clang version 9.0.1 for FreeBSD (g...@github.com:llvm/llvm-project.git
> c1a0a213378a458fbea1a5c77b315c7dce08fd05) (based on LLVM 9.0.1)

We have been doing this since, well, forever. And this way actually
originates from upstream, we only define the CLANG_VENDOR macro. I see
no reason to change this after all those years.

A better question is, why these perl scripts "suddenly" started failing?
Or have they also failed since forever, and it was only noticed now?

-Dimitry



signature.asc
Description: Message signed with OpenPGP


svn commit: r364827 - head/stand/libsa/zfs

2020-08-26 Thread Toomas Soome
Author: tsoome
Date: Wed Aug 26 17:52:32 2020
New Revision: 364827
URL: https://svnweb.freebsd.org/changeset/base/364827

Log:
  libsa: only skein_block.c is using SKEIN_LOOP
  
  Only use SKEIN_LOOP while compiling skein_block.c

Modified:
  head/stand/libsa/zfs/Makefile.inc

Modified: head/stand/libsa/zfs/Makefile.inc
==
--- head/stand/libsa/zfs/Makefile.inc   Wed Aug 26 17:15:17 2020
(r364826)
+++ head/stand/libsa/zfs/Makefile.inc   Wed Aug 26 17:52:32 2020
(r364827)
@@ -2,8 +2,6 @@
 
 .PATH: ${ZFSSRC}
 SRCS+= zfs.c nvlist.c skein.c skein_block.c list.c
-# Do not unroll skein loops, reduce code size
-CFLAGS+=   -DSKEIN_LOOP=111
 .PATH: ${SYSDIR}/crypto/skein
 .PATH: ${SYSDIR}/cddl/contrib/opensolaris/uts/common/os
 
@@ -12,6 +10,8 @@ CFLAGS+=  -I${SYSDIR}/cddl/boot/zfs
 CFLAGS+=   -I${SYSDIR}/cddl/contrib/opensolaris/uts/common
 CFLAGS+=   -I${SYSDIR}/crypto/skein
 
+# Do not unroll skein loops, reduce code size
+CFLAGS.skein_block.c+= -DSKEIN_LOOP=111
 CFLAGS.zfs.c+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/lz4
 
 CFLAGS+=   -Wformat -Wall
___
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: r364806 - in head/sys/contrib/openzfs: include/os/freebsd/spl/sys module/os/freebsd/spl

2020-08-26 Thread Warner Losh
On Wed, Aug 26, 2020 at 11:33 AM John Baldwin  wrote:

> On 8/26/20 10:15 AM, Matthew Macy wrote:
> > Do not commit directly to sys/contrib. PR, vendor branch update, then
> merge.
>
> We do live in a world where source control is able to merge changes, and
> it should be ok in that world to commit things directly while waiting for
> the PR to be merged and letting the VCS figure it out on the next merge.
> We haven't had a policy of never comitting directly to contrib/ since the
> CVS days.  I do agree that changes should be pushed upstream to keep local
> diffs as small as possible, but reasonable judgement should be applied
> rather than a hard rule banning all commits.
>

Matt's wording sucked. However, he's requesting that people push changes
upstream for the moment to help him manage because he's planning on doing
several more vendor imports in the coming days and these commits lead to
conflicts which slow him down. It's not a hard lock, but a very strong
request to make his life easier while the velocity upstream is still kinda
fast and we need to loop in many of those changes in.

Warner


> > On Wed, Aug 26, 2020 at 12:29 AM Toomas Soome 
> wrote:
> >>
> >> Author: tsoome
> >> Date: Wed Aug 26 07:29:17 2020
> >> New Revision: 364806
> >> URL: https://svnweb.freebsd.org/changeset/base/364806
> >>
> >> Log:
> >>   remove pragma ident lines
> >>
> >>   The #pragma ident is historical relict and not needed any more, this
> >>   pragma is actually unknown for common compilers and is only causing
> >>   trouble.
>
> --
> John Baldwin
>
___
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: r364806 - in head/sys/contrib/openzfs: include/os/freebsd/spl/sys module/os/freebsd/spl

2020-08-26 Thread John Baldwin
On 8/26/20 10:15 AM, Matthew Macy wrote:
> Do not commit directly to sys/contrib. PR, vendor branch update, then merge.

We do live in a world where source control is able to merge changes, and
it should be ok in that world to commit things directly while waiting for
the PR to be merged and letting the VCS figure it out on the next merge.
We haven't had a policy of never comitting directly to contrib/ since the
CVS days.  I do agree that changes should be pushed upstream to keep local
diffs as small as possible, but reasonable judgement should be applied
rather than a hard rule banning all commits.

> On Wed, Aug 26, 2020 at 12:29 AM Toomas Soome  wrote:
>>
>> Author: tsoome
>> Date: Wed Aug 26 07:29:17 2020
>> New Revision: 364806
>> URL: https://svnweb.freebsd.org/changeset/base/364806
>>
>> Log:
>>   remove pragma ident lines
>>
>>   The #pragma ident is historical relict and not needed any more, this
>>   pragma is actually unknown for common compilers and is only causing
>>   trouble.

-- 
John Baldwin
___
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: r364806 - in head/sys/contrib/openzfs: include/os/freebsd/spl/sys module/os/freebsd/spl

2020-08-26 Thread Cy Schubert
If these are local FreeBSD changes then one *should* commit directly to 
contrib/. vendor is for virgin vendor sources, i.e. without our 
modifications. svn does a fair job of merging from vendor to contrib 
(though occasionally it gets it wrong).

Ideally we should push our changes back to the vendor, import those into 
vendor, then merge the official vendor sources/updates only after we 
receive them from the vendor or after the vendor has officially accepted 
them. But to put our changes into the vendor branch is wrong.


-- 
Cheers,
Cy Schubert 
FreeBSD UNIX: Web:  https://FreeBSD.org
NTP:   Web:  https://nwtime.org

The need of the many outweighs the greed of the few.


In message 
, Matthew Macy writes:
> Do not commit directly to sys/contrib. PR, vendor branch update, then merge.
>
> On Wed, Aug 26, 2020 at 12:29 AM Toomas Soome  wrote:
> >
> > Author: tsoome
> > Date: Wed Aug 26 07:29:17 2020
> > New Revision: 364806
> > URL: https://svnweb.freebsd.org/changeset/base/364806
> >
> > Log:
> >   remove pragma ident lines
> >
> >   The #pragma ident is historical relict and not needed any more, this
> >   pragma is actually unknown for common compilers and is only causing
> >   trouble.
> >
> > Modified:
> >   head/sys/contrib/openzfs/include/os/freebsd/spl/sys/acl_impl.h
> >   head/sys/contrib/openzfs/include/os/freebsd/spl/sys/cmn_err.h
> >   head/sys/contrib/openzfs/include/os/freebsd/spl/sys/extdirent.h
> >   head/sys/contrib/openzfs/include/os/freebsd/spl/sys/list.h
> >   head/sys/contrib/openzfs/include/os/freebsd/spl/sys/list_impl.h
> >   head/sys/contrib/openzfs/include/os/freebsd/spl/sys/zmod.h
> >   head/sys/contrib/openzfs/module/os/freebsd/spl/list.c
> >
> > Modified: head/sys/contrib/openzfs/include/os/freebsd/spl/sys/acl_impl.h
> > ===
> ===
> > --- head/sys/contrib/openzfs/include/os/freebsd/spl/sys/acl_impl.h  Wed
>  Aug 26 07:00:07 2020(r364805)
> > +++ head/sys/contrib/openzfs/include/os/freebsd/spl/sys/acl_impl.h  Wed
>  Aug 26 07:29:17 2020(r364806)
> > @@ -26,8 +26,6 @@
> >  #ifndef _SYS_ACL_IMPL_H
> >  #define_SYS_ACL_IMPL_H
> >
> > -#pragma ident  "%Z%%M% %I% %E% SMI"
> > -
> >  #ifdef __cplusplus
> >  extern "C" {
> >  #endif
> >
> > Modified: head/sys/contrib/openzfs/include/os/freebsd/spl/sys/cmn_err.h
> > ===
> ===
> > --- head/sys/contrib/openzfs/include/os/freebsd/spl/sys/cmn_err.h   Wed
>  Aug 26 07:00:07 2020(r364805)
> > +++ head/sys/contrib/openzfs/include/os/freebsd/spl/sys/cmn_err.h   Wed
>  Aug 26 07:29:17 2020(r364806)
> > @@ -31,8 +31,6 @@
> >  #ifndef _SYS_CMN_ERR_H
> >  #define_SYS_CMN_ERR_H
> >
> > -#pragma ident  "%Z%%M% %I% %E% SMI"
> > -
> >  #if !defined(_ASM)
> >  #include 
> >  #endif
> >
> > Modified: head/sys/contrib/openzfs/include/os/freebsd/spl/sys/extdirent.h
> > ===
> ===
> > --- head/sys/contrib/openzfs/include/os/freebsd/spl/sys/extdirent.h Wed
>  Aug 26 07:00:07 2020(r364805)
> > +++ head/sys/contrib/openzfs/include/os/freebsd/spl/sys/extdirent.h Wed
>  Aug 26 07:29:17 2020(r364806)
> > @@ -26,8 +26,6 @@
> >  #ifndef _SYS_EXTDIRENT_H
> >  #define_SYS_EXTDIRENT_H
> >
> > -#pragma ident  "%Z%%M% %I% %E% SMI"
> > -
> >  #ifdef __cplusplus
> >  extern "C" {
> >  #endif
> >
> > Modified: head/sys/contrib/openzfs/include/os/freebsd/spl/sys/list.h
> > ===
> ===
> > --- head/sys/contrib/openzfs/include/os/freebsd/spl/sys/list.h  Wed Aug 26 
> 07:00:07 2020(r364805)
> > +++ head/sys/contrib/openzfs/include/os/freebsd/spl/sys/list.h  Wed Aug 26 
> 07:29:17 2020(r364806)
> > @@ -26,8 +26,6 @@
> >  #ifndef_SYS_LIST_H
> >  #define_SYS_LIST_H
> >
> > -#pragma ident  "%Z%%M% %I% %E% SMI"
> > -
> >  #include 
> >
> >  #ifdef __cplusplus
> >
> > Modified: head/sys/contrib/openzfs/include/os/freebsd/spl/sys/list_impl.h
> > ===
> ===
> > --- head/sys/contrib/openzfs/include/os/freebsd/spl/sys/list_impl.h Wed
>  Aug 26 07:00:07 2020(r364805)
> > +++ head/sys/contrib/openzfs/include/os/freebsd/spl/sys/list_impl.h Wed
>  Aug 26 07:29:17 2020(r364806)
> > @@ -27,8 +27,6 @@
> >  #ifndef_SYS_LIST_IMPL_H
> >  #define_SYS_LIST_IMPL_H
> >
> > -#pragma ident  "%Z%%M% %I% %E% SMI"
> > -
> >  #include 
> >
> >  #ifdef __cplusplus
> >
> > Modified: head/sys/contrib/openzfs/include/os/freebsd/spl/sys/zmod.h
> > ===
> ===
> > --- head/sys/contrib/openzfs/include/os/freebsd/spl/sys/zmod.h  Wed Aug 26 
> 07:00:07 2020(r364805)
> > +++ 

Re: svn commit: r364806 - in head/sys/contrib/openzfs: include/os/freebsd/spl/sys module/os/freebsd/spl

2020-08-26 Thread Matthew Macy
Do not commit directly to sys/contrib. PR, vendor branch update, then merge.

On Wed, Aug 26, 2020 at 12:29 AM Toomas Soome  wrote:
>
> Author: tsoome
> Date: Wed Aug 26 07:29:17 2020
> New Revision: 364806
> URL: https://svnweb.freebsd.org/changeset/base/364806
>
> Log:
>   remove pragma ident lines
>
>   The #pragma ident is historical relict and not needed any more, this
>   pragma is actually unknown for common compilers and is only causing
>   trouble.
>
> Modified:
>   head/sys/contrib/openzfs/include/os/freebsd/spl/sys/acl_impl.h
>   head/sys/contrib/openzfs/include/os/freebsd/spl/sys/cmn_err.h
>   head/sys/contrib/openzfs/include/os/freebsd/spl/sys/extdirent.h
>   head/sys/contrib/openzfs/include/os/freebsd/spl/sys/list.h
>   head/sys/contrib/openzfs/include/os/freebsd/spl/sys/list_impl.h
>   head/sys/contrib/openzfs/include/os/freebsd/spl/sys/zmod.h
>   head/sys/contrib/openzfs/module/os/freebsd/spl/list.c
>
> Modified: head/sys/contrib/openzfs/include/os/freebsd/spl/sys/acl_impl.h
> ==
> --- head/sys/contrib/openzfs/include/os/freebsd/spl/sys/acl_impl.h  Wed 
> Aug 26 07:00:07 2020(r364805)
> +++ head/sys/contrib/openzfs/include/os/freebsd/spl/sys/acl_impl.h  Wed 
> Aug 26 07:29:17 2020(r364806)
> @@ -26,8 +26,6 @@
>  #ifndef _SYS_ACL_IMPL_H
>  #define_SYS_ACL_IMPL_H
>
> -#pragma ident  "%Z%%M% %I% %E% SMI"
> -
>  #ifdef __cplusplus
>  extern "C" {
>  #endif
>
> Modified: head/sys/contrib/openzfs/include/os/freebsd/spl/sys/cmn_err.h
> ==
> --- head/sys/contrib/openzfs/include/os/freebsd/spl/sys/cmn_err.h   Wed 
> Aug 26 07:00:07 2020(r364805)
> +++ head/sys/contrib/openzfs/include/os/freebsd/spl/sys/cmn_err.h   Wed 
> Aug 26 07:29:17 2020(r364806)
> @@ -31,8 +31,6 @@
>  #ifndef _SYS_CMN_ERR_H
>  #define_SYS_CMN_ERR_H
>
> -#pragma ident  "%Z%%M% %I% %E% SMI"
> -
>  #if !defined(_ASM)
>  #include 
>  #endif
>
> Modified: head/sys/contrib/openzfs/include/os/freebsd/spl/sys/extdirent.h
> ==
> --- head/sys/contrib/openzfs/include/os/freebsd/spl/sys/extdirent.h Wed 
> Aug 26 07:00:07 2020(r364805)
> +++ head/sys/contrib/openzfs/include/os/freebsd/spl/sys/extdirent.h Wed 
> Aug 26 07:29:17 2020(r364806)
> @@ -26,8 +26,6 @@
>  #ifndef _SYS_EXTDIRENT_H
>  #define_SYS_EXTDIRENT_H
>
> -#pragma ident  "%Z%%M% %I% %E% SMI"
> -
>  #ifdef __cplusplus
>  extern "C" {
>  #endif
>
> Modified: head/sys/contrib/openzfs/include/os/freebsd/spl/sys/list.h
> ==
> --- head/sys/contrib/openzfs/include/os/freebsd/spl/sys/list.h  Wed Aug 26 
> 07:00:07 2020(r364805)
> +++ head/sys/contrib/openzfs/include/os/freebsd/spl/sys/list.h  Wed Aug 26 
> 07:29:17 2020(r364806)
> @@ -26,8 +26,6 @@
>  #ifndef_SYS_LIST_H
>  #define_SYS_LIST_H
>
> -#pragma ident  "%Z%%M% %I% %E% SMI"
> -
>  #include 
>
>  #ifdef __cplusplus
>
> Modified: head/sys/contrib/openzfs/include/os/freebsd/spl/sys/list_impl.h
> ==
> --- head/sys/contrib/openzfs/include/os/freebsd/spl/sys/list_impl.h Wed 
> Aug 26 07:00:07 2020(r364805)
> +++ head/sys/contrib/openzfs/include/os/freebsd/spl/sys/list_impl.h Wed 
> Aug 26 07:29:17 2020(r364806)
> @@ -27,8 +27,6 @@
>  #ifndef_SYS_LIST_IMPL_H
>  #define_SYS_LIST_IMPL_H
>
> -#pragma ident  "%Z%%M% %I% %E% SMI"
> -
>  #include 
>
>  #ifdef __cplusplus
>
> Modified: head/sys/contrib/openzfs/include/os/freebsd/spl/sys/zmod.h
> ==
> --- head/sys/contrib/openzfs/include/os/freebsd/spl/sys/zmod.h  Wed Aug 26 
> 07:00:07 2020(r364805)
> +++ head/sys/contrib/openzfs/include/os/freebsd/spl/sys/zmod.h  Wed Aug 26 
> 07:29:17 2020(r364806)
> @@ -27,8 +27,6 @@
>  #ifndef_ZMOD_H
>  #define_ZMOD_H
>
> -#pragma ident  "%Z%%M% %I% %E% SMI"
> -
>  #ifdef __cplusplus
>  extern "C" {
>  #endif
>
> Modified: head/sys/contrib/openzfs/module/os/freebsd/spl/list.c
> ==
> --- head/sys/contrib/openzfs/module/os/freebsd/spl/list.c   Wed Aug 26 
> 07:00:07 2020(r364805)
> +++ head/sys/contrib/openzfs/module/os/freebsd/spl/list.c   Wed Aug 26 
> 07:29:17 2020(r364806)
> @@ -23,8 +23,6 @@
>   * Use is subject to license terms.
>   */
>
> -#pragma ident  "%Z%%M% %I% %E% SMI"
> -
>  /*
>   * Generic doubly-linked list implementation
>   */
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head

Re: svn commit: r364822 - in head/crypto/openssl/crypto: aes/asm bn/asm chacha/asm ec/asm modes/asm poly1305/asm sha/asm

2020-08-26 Thread Ian Lepore
On Wed, 2020-08-26 at 19:04 +0200, Mateusz Guzik wrote:
> On 8/26/20, Jung-uk Kim  wrote:
> > Author: jkim
> > Date: Wed Aug 26 16:55:28 2020
> > New Revision: 364822
> > URL: https://svnweb.freebsd.org/changeset/base/364822
> > 
> > Log:
> >   Fix Clang version detection.
> > 
> >   We prepend "FreeBSD" to Clang version string.  This broke
> > compiler test
> > for
> >   AVX instruction support.
> > 
> 
> What about other software checking in similar fashion? imo the right
> fix is to stop mucking with the way clang reports itself
> 

Maybe it would be better to not modify the start of the string. 
Instead of 

FreeBSD clang version 9.0.1 (g...@github.com:llvm/llvm-project.git
c1a0a213378a458fbea1a5c77b315c7dce08fd05) (based on LLVM 9.0.1)

maybe

clang version 9.0.1 for FreeBSD (g...@github.com:llvm/llvm-project.git
c1a0a213378a458fbea1a5c77b315c7dce08fd05) (based on LLVM 9.0.1)

-- Ian

___
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: r364822 - in head/crypto/openssl/crypto: aes/asm bn/asm chacha/asm ec/asm modes/asm poly1305/asm sha/asm

2020-08-26 Thread Jessica Clarke
On 26 Aug 2020, at 18:04, Mateusz Guzik  wrote:
> 
> On 8/26/20, Jung-uk Kim  wrote:
>> Author: jkim
>> Date: Wed Aug 26 16:55:28 2020
>> New Revision: 364822
>> URL: https://svnweb.freebsd.org/changeset/base/364822
>> 
>> Log:
>>  Fix Clang version detection.
>> 
>>  We prepend "FreeBSD" to Clang version string.  This broke compiler test
>> for
>>  AVX instruction support.
>> 
> 
> What about other software checking in similar fashion? imo the right
> fix is to stop mucking with the way clang reports itself

Apple's LLVM also does the same thing. Whilst it may be better to leave
the string alone, it is sometimes useful information and, given the
existence of Apple's LLVM, well-behaved software should already be
dealing with this properly; based on this commit, upstream OpenSSL
seems like it suffers the same bug on macOS.

Jess

___
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: r364824 - head/share/man/man9

2020-08-26 Thread Warner Losh
Author: imp
Date: Wed Aug 26 17:06:16 2020
New Revision: 364824
URL: https://svnweb.freebsd.org/changeset/base/364824

Log:
  Make sbuf_setpos match the implementation.
  
  sbuf_setpos can only be used to truncate the buffer, never to make it
  longer. Update the documentation to reflect this.
  
  Reviewed By: allanjude, phk
  Differential Revision: https://reviews.freebsd.org/D26198

Modified:
  head/share/man/man9/sbuf.9

Modified: head/share/man/man9/sbuf.9
==
--- head/share/man/man9/sbuf.9  Wed Aug 26 16:56:44 2020(r364823)
+++ head/share/man/man9/sbuf.9  Wed Aug 26 17:06:16 2020(r364824)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd August 7, 2019
+.Dd August 26, 2020
 .Dt SBUF 9
 .Os
 .Sh NAME
@@ -370,9 +370,8 @@ function sets the
 .Fa sbuf Ns 's
 end position to
 .Fa pos ,
-which is a value between zero and one less than the size of the
-storage buffer.
-This effectively truncates the sbuf at the new position.
+which is a value between zero and the current position in the buffer.
+It can only truncate the sbuf to the new position.
 .Pp
 The
 .Fn sbuf_bcat
___
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: r364822 - in head/crypto/openssl/crypto: aes/asm bn/asm chacha/asm ec/asm modes/asm poly1305/asm sha/asm

2020-08-26 Thread Mateusz Guzik
On 8/26/20, Jung-uk Kim  wrote:
> Author: jkim
> Date: Wed Aug 26 16:55:28 2020
> New Revision: 364822
> URL: https://svnweb.freebsd.org/changeset/base/364822
>
> Log:
>   Fix Clang version detection.
>
>   We prepend "FreeBSD" to Clang version string.  This broke compiler test
> for
>   AVX instruction support.
>

What about other software checking in similar fashion? imo the right
fix is to stop mucking with the way clang reports itself

>   Reported by:jhb
>
> Modified:
>   head/crypto/openssl/crypto/aes/asm/aesni-mb-x86_64.pl
>   head/crypto/openssl/crypto/aes/asm/aesni-sha1-x86_64.pl
>   head/crypto/openssl/crypto/aes/asm/aesni-sha256-x86_64.pl
>   head/crypto/openssl/crypto/bn/asm/rsaz-avx2.pl
>   head/crypto/openssl/crypto/bn/asm/rsaz-x86_64.pl
>   head/crypto/openssl/crypto/bn/asm/x86_64-mont.pl
>   head/crypto/openssl/crypto/bn/asm/x86_64-mont5.pl
>   head/crypto/openssl/crypto/chacha/asm/chacha-x86.pl
>   head/crypto/openssl/crypto/chacha/asm/chacha-x86_64.pl
>   head/crypto/openssl/crypto/ec/asm/ecp_nistz256-avx2.pl
>   head/crypto/openssl/crypto/ec/asm/ecp_nistz256-x86_64.pl
>   head/crypto/openssl/crypto/ec/asm/x25519-x86_64.pl
>   head/crypto/openssl/crypto/modes/asm/aesni-gcm-x86_64.pl
>   head/crypto/openssl/crypto/modes/asm/ghash-x86_64.pl
>   head/crypto/openssl/crypto/poly1305/asm/poly1305-x86.pl
>   head/crypto/openssl/crypto/poly1305/asm/poly1305-x86_64.pl
>   head/crypto/openssl/crypto/sha/asm/sha1-586.pl
>   head/crypto/openssl/crypto/sha/asm/sha1-mb-x86_64.pl
>   head/crypto/openssl/crypto/sha/asm/sha1-x86_64.pl
>   head/crypto/openssl/crypto/sha/asm/sha256-586.pl
>   head/crypto/openssl/crypto/sha/asm/sha256-mb-x86_64.pl
>   head/crypto/openssl/crypto/sha/asm/sha512-x86_64.pl
>
> Modified: head/crypto/openssl/crypto/aes/asm/aesni-mb-x86_64.pl
> ==
> --- head/crypto/openssl/crypto/aes/asm/aesni-mb-x86_64.pl Wed Aug 26
> 15:43:44 2020 (r364821)
> +++ head/crypto/openssl/crypto/aes/asm/aesni-mb-x86_64.pl Wed Aug 26
> 16:55:28 2020 (r364822)
> @@ -70,7 +70,7 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM
>   $avx = ($1>=10) + ($1>=11);
>  }
>
> -if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on
> LLVM) ([0-9]+\.[0-9]+)/) {
> +if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on
> LLVM) ([0-9]+\.[0-9]+)/) {
>   $avx = ($2>=3.0) + ($2>3.0);
>  }
>
>
> Modified: head/crypto/openssl/crypto/aes/asm/aesni-sha1-x86_64.pl
> ==
> --- head/crypto/openssl/crypto/aes/asm/aesni-sha1-x86_64.pl   Wed Aug 26
> 15:43:44 2020 (r364821)
> +++ head/crypto/openssl/crypto/aes/asm/aesni-sha1-x86_64.pl   Wed Aug 26
> 16:55:28 2020 (r364822)
> @@ -108,7 +108,7 @@ $avx=1 if (!$avx && $win64 && ($flavour =~ /nasm/ || $
>  $avx=1 if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/)
> &&
>  `ml64 2>&1` =~ /Version ([0-9]+)\./ &&
>  $1>=10);
> -$avx=1 if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based
> on LLVM) ([0-9]+\.[0-9]+)/ && $2>=3.0);
> +$avx=1 if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based
> on LLVM) ([0-9]+\.[0-9]+)/ && $2>=3.0);
>
>  $shaext=1;   ### set to zero if compiling for 1.0.1
>
>
> Modified: head/crypto/openssl/crypto/aes/asm/aesni-sha256-x86_64.pl
> ==
> --- head/crypto/openssl/crypto/aes/asm/aesni-sha256-x86_64.pl Wed Aug 26
> 15:43:44 2020 (r364821)
> +++ head/crypto/openssl/crypto/aes/asm/aesni-sha256-x86_64.pl Wed Aug 26
> 16:55:28 2020 (r364822)
> @@ -70,7 +70,7 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM
>   $avx = ($1>=10) + ($1>=12);
>  }
>
> -if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on
> LLVM) ([0-9]+\.[0-9]+)/) {
> +if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on
> LLVM) ([0-9]+\.[0-9]+)/) {
>   $avx = ($2>=3.0) + ($2>3.0);
>  }
>
>
> Modified: head/crypto/openssl/crypto/bn/asm/rsaz-avx2.pl
> ==
> --- head/crypto/openssl/crypto/bn/asm/rsaz-avx2.plWed Aug 26 15:43:44
> 2020  (r364821)
> +++ head/crypto/openssl/crypto/bn/asm/rsaz-avx2.plWed Aug 26 16:55:28
> 2020  (r364822)
> @@ -66,7 +66,7 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM
>   $addx = ($1>=11);
>  }
>
> -if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM)
> ([0-9]+)\.([0-9]+)/) {
> +if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|based on LLVM)
> ([0-9]+)\.([0-9]+)/) {
>   my $ver = $2 + $3/100.0;# 3.1->3.01, 3.10->3.10
>   $avx = ($ver>=3.0) + ($ver>=3.01);
>   $addx = ($ver>=3.03);
>
> Modified: head/crypto/openssl/crypto/bn/asm/rsaz-x86_64.pl
> ==
> --- 

svn commit: r364823 - in head/secure/lib/libcrypto: amd64 i386

2020-08-26 Thread Jung-uk Kim
Author: jkim
Date: Wed Aug 26 16:56:44 2020
New Revision: 364823
URL: https://svnweb.freebsd.org/changeset/base/364823

Log:
  Regen X86 assembly files after r364822.

Modified:
  head/secure/lib/libcrypto/amd64/aesni-gcm-x86_64.S
  head/secure/lib/libcrypto/amd64/aesni-mb-x86_64.S
  head/secure/lib/libcrypto/amd64/aesni-sha1-x86_64.S
  head/secure/lib/libcrypto/amd64/aesni-sha256-x86_64.S
  head/secure/lib/libcrypto/amd64/chacha-x86_64.S
  head/secure/lib/libcrypto/amd64/ecp_nistz256-x86_64.S
  head/secure/lib/libcrypto/amd64/ghash-x86_64.S
  head/secure/lib/libcrypto/amd64/poly1305-x86_64.S
  head/secure/lib/libcrypto/amd64/rsaz-avx2.S
  head/secure/lib/libcrypto/amd64/rsaz-x86_64.S
  head/secure/lib/libcrypto/amd64/sha1-mb-x86_64.S
  head/secure/lib/libcrypto/amd64/sha1-x86_64.S
  head/secure/lib/libcrypto/amd64/sha256-mb-x86_64.S
  head/secure/lib/libcrypto/amd64/sha256-x86_64.S
  head/secure/lib/libcrypto/amd64/sha512-x86_64.S
  head/secure/lib/libcrypto/amd64/x25519-x86_64.S
  head/secure/lib/libcrypto/amd64/x86_64-mont.S
  head/secure/lib/libcrypto/amd64/x86_64-mont5.S
  head/secure/lib/libcrypto/i386/chacha-x86.S
  head/secure/lib/libcrypto/i386/poly1305-x86.S
  head/secure/lib/libcrypto/i386/sha1-586.S
  head/secure/lib/libcrypto/i386/sha256-586.S

Modified: head/secure/lib/libcrypto/amd64/aesni-gcm-x86_64.S
==
--- head/secure/lib/libcrypto/amd64/aesni-gcm-x86_64.S  Wed Aug 26 16:55:28 
2020(r364822)
+++ head/secure/lib/libcrypto/amd64/aesni-gcm-x86_64.S  Wed Aug 26 16:56:44 
2020(r364823)
@@ -2,20 +2,790 @@
 /* Do not modify. This file is auto-generated from aesni-gcm-x86_64.pl. */
 .text  
 
-.globl aesni_gcm_encrypt
-.type  aesni_gcm_encrypt,@function
-aesni_gcm_encrypt:
+.type  _aesni_ctr32_ghash_6x,@function
+.align 32
+_aesni_ctr32_ghash_6x:
 .cfi_startproc 
-   xorl%eax,%eax
+   vmovdqu 32(%r11),%xmm2
+   subq$6,%rdx
+   vpxor   %xmm4,%xmm4,%xmm4
+   vmovdqu 0-128(%rcx),%xmm15
+   vpaddb  %xmm2,%xmm1,%xmm10
+   vpaddb  %xmm2,%xmm10,%xmm11
+   vpaddb  %xmm2,%xmm11,%xmm12
+   vpaddb  %xmm2,%xmm12,%xmm13
+   vpaddb  %xmm2,%xmm13,%xmm14
+   vpxor   %xmm15,%xmm1,%xmm9
+   vmovdqu %xmm4,16+8(%rsp)
+   jmp .Loop6x
+
+.align 32
+.Loop6x:
+   addl$100663296,%ebx
+   jc  .Lhandle_ctr32
+   vmovdqu 0-32(%r9),%xmm3
+   vpaddb  %xmm2,%xmm14,%xmm1
+   vpxor   %xmm15,%xmm10,%xmm10
+   vpxor   %xmm15,%xmm11,%xmm11
+
+.Lresume_ctr32:
+   vmovdqu %xmm1,(%r8)
+   vpclmulqdq  $0x10,%xmm3,%xmm7,%xmm5
+   vpxor   %xmm15,%xmm12,%xmm12
+   vmovups 16-128(%rcx),%xmm2
+   vpclmulqdq  $0x01,%xmm3,%xmm7,%xmm6
+   xorq%r12,%r12
+   cmpq%r14,%r15
+
+   vaesenc %xmm2,%xmm9,%xmm9
+   vmovdqu 48+8(%rsp),%xmm0
+   vpxor   %xmm15,%xmm13,%xmm13
+   vpclmulqdq  $0x00,%xmm3,%xmm7,%xmm1
+   vaesenc %xmm2,%xmm10,%xmm10
+   vpxor   %xmm15,%xmm14,%xmm14
+   setnc   %r12b
+   vpclmulqdq  $0x11,%xmm3,%xmm7,%xmm7
+   vaesenc %xmm2,%xmm11,%xmm11
+   vmovdqu 16-32(%r9),%xmm3
+   negq%r12
+   vaesenc %xmm2,%xmm12,%xmm12
+   vpxor   %xmm5,%xmm6,%xmm6
+   vpclmulqdq  $0x00,%xmm3,%xmm0,%xmm5
+   vpxor   %xmm4,%xmm8,%xmm8
+   vaesenc %xmm2,%xmm13,%xmm13
+   vpxor   %xmm5,%xmm1,%xmm4
+   andq$0x60,%r12
+   vmovups 32-128(%rcx),%xmm15
+   vpclmulqdq  $0x10,%xmm3,%xmm0,%xmm1
+   vaesenc %xmm2,%xmm14,%xmm14
+
+   vpclmulqdq  $0x01,%xmm3,%xmm0,%xmm2
+   leaq(%r14,%r12,1),%r14
+   vaesenc %xmm15,%xmm9,%xmm9
+   vpxor   16+8(%rsp),%xmm8,%xmm8
+   vpclmulqdq  $0x11,%xmm3,%xmm0,%xmm3
+   vmovdqu 64+8(%rsp),%xmm0
+   vaesenc %xmm15,%xmm10,%xmm10
+   movbeq  88(%r14),%r13
+   vaesenc %xmm15,%xmm11,%xmm11
+   movbeq  80(%r14),%r12
+   vaesenc %xmm15,%xmm12,%xmm12
+   movq%r13,32+8(%rsp)
+   vaesenc %xmm15,%xmm13,%xmm13
+   movq%r12,40+8(%rsp)
+   vmovdqu 48-32(%r9),%xmm5
+   vaesenc %xmm15,%xmm14,%xmm14
+
+   vmovups 48-128(%rcx),%xmm15
+   vpxor   %xmm1,%xmm6,%xmm6
+   vpclmulqdq  $0x00,%xmm5,%xmm0,%xmm1
+   vaesenc %xmm15,%xmm9,%xmm9
+   vpxor   %xmm2,%xmm6,%xmm6
+   vpclmulqdq  $0x10,%xmm5,%xmm0,%xmm2
+   vaesenc %xmm15,%xmm10,%xmm10
+   vpxor   %xmm3,%xmm7,%xmm7
+   vpclmulqdq  $0x01,%xmm5,%xmm0,%xmm3
+   vaesenc %xmm15,%xmm11,%xmm11
+   vpclmulqdq  $0x11,%xmm5,%xmm0,%xmm5
+   vmovdqu 80+8(%rsp),%xmm0
+   vaesenc %xmm15,%xmm12,%xmm12
+   vaesenc %xmm15,%xmm13,%xmm13
+   vpxor   %xmm1,%xmm4,%xmm4
+   vmovdqu 64-32(%r9),%xmm1
+   vaesenc %xmm15,%xmm14,%xmm14
+
+   vmovups 64-128(%rcx),%xmm15
+   vpxor   %xmm2,%xmm6,%xmm6
+   vpclmulqdq  $0x00,%xmm1,%xmm0,%xmm2
+   vaesenc %xmm15,%xmm9,%xmm9
+   vpxor   %xmm3,%xmm6,%xmm6
+   

svn commit: r364822 - in head/crypto/openssl/crypto: aes/asm bn/asm chacha/asm ec/asm modes/asm poly1305/asm sha/asm

2020-08-26 Thread Jung-uk Kim
Author: jkim
Date: Wed Aug 26 16:55:28 2020
New Revision: 364822
URL: https://svnweb.freebsd.org/changeset/base/364822

Log:
  Fix Clang version detection.
  
  We prepend "FreeBSD" to Clang version string.  This broke compiler test for
  AVX instruction support.
  
  Reported by:  jhb

Modified:
  head/crypto/openssl/crypto/aes/asm/aesni-mb-x86_64.pl
  head/crypto/openssl/crypto/aes/asm/aesni-sha1-x86_64.pl
  head/crypto/openssl/crypto/aes/asm/aesni-sha256-x86_64.pl
  head/crypto/openssl/crypto/bn/asm/rsaz-avx2.pl
  head/crypto/openssl/crypto/bn/asm/rsaz-x86_64.pl
  head/crypto/openssl/crypto/bn/asm/x86_64-mont.pl
  head/crypto/openssl/crypto/bn/asm/x86_64-mont5.pl
  head/crypto/openssl/crypto/chacha/asm/chacha-x86.pl
  head/crypto/openssl/crypto/chacha/asm/chacha-x86_64.pl
  head/crypto/openssl/crypto/ec/asm/ecp_nistz256-avx2.pl
  head/crypto/openssl/crypto/ec/asm/ecp_nistz256-x86_64.pl
  head/crypto/openssl/crypto/ec/asm/x25519-x86_64.pl
  head/crypto/openssl/crypto/modes/asm/aesni-gcm-x86_64.pl
  head/crypto/openssl/crypto/modes/asm/ghash-x86_64.pl
  head/crypto/openssl/crypto/poly1305/asm/poly1305-x86.pl
  head/crypto/openssl/crypto/poly1305/asm/poly1305-x86_64.pl
  head/crypto/openssl/crypto/sha/asm/sha1-586.pl
  head/crypto/openssl/crypto/sha/asm/sha1-mb-x86_64.pl
  head/crypto/openssl/crypto/sha/asm/sha1-x86_64.pl
  head/crypto/openssl/crypto/sha/asm/sha256-586.pl
  head/crypto/openssl/crypto/sha/asm/sha256-mb-x86_64.pl
  head/crypto/openssl/crypto/sha/asm/sha512-x86_64.pl

Modified: head/crypto/openssl/crypto/aes/asm/aesni-mb-x86_64.pl
==
--- head/crypto/openssl/crypto/aes/asm/aesni-mb-x86_64.pl   Wed Aug 26 
15:43:44 2020(r364821)
+++ head/crypto/openssl/crypto/aes/asm/aesni-mb-x86_64.pl   Wed Aug 26 
16:55:28 2020(r364822)
@@ -70,7 +70,7 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM
$avx = ($1>=10) + ($1>=11);
 }
 
-if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) 
([0-9]+\.[0-9]+)/) {
+if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on LLVM) 
([0-9]+\.[0-9]+)/) {
$avx = ($2>=3.0) + ($2>3.0);
 }
 

Modified: head/crypto/openssl/crypto/aes/asm/aesni-sha1-x86_64.pl
==
--- head/crypto/openssl/crypto/aes/asm/aesni-sha1-x86_64.pl Wed Aug 26 
15:43:44 2020(r364821)
+++ head/crypto/openssl/crypto/aes/asm/aesni-sha1-x86_64.pl Wed Aug 26 
16:55:28 2020(r364822)
@@ -108,7 +108,7 @@ $avx=1 if (!$avx && $win64 && ($flavour =~ /nasm/ || $
 $avx=1 if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) &&
   `ml64 2>&1` =~ /Version ([0-9]+)\./ &&
   $1>=10);
-$avx=1 if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on 
LLVM) ([0-9]+\.[0-9]+)/ && $2>=3.0);
+$avx=1 if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on 
LLVM) ([0-9]+\.[0-9]+)/ && $2>=3.0);
 
 $shaext=1; ### set to zero if compiling for 1.0.1
 

Modified: head/crypto/openssl/crypto/aes/asm/aesni-sha256-x86_64.pl
==
--- head/crypto/openssl/crypto/aes/asm/aesni-sha256-x86_64.pl   Wed Aug 26 
15:43:44 2020(r364821)
+++ head/crypto/openssl/crypto/aes/asm/aesni-sha256-x86_64.pl   Wed Aug 26 
16:55:28 2020(r364822)
@@ -70,7 +70,7 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM
$avx = ($1>=10) + ($1>=12);
 }
 
-if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) 
([0-9]+\.[0-9]+)/) {
+if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on LLVM) 
([0-9]+\.[0-9]+)/) {
$avx = ($2>=3.0) + ($2>3.0);
 }
 

Modified: head/crypto/openssl/crypto/bn/asm/rsaz-avx2.pl
==
--- head/crypto/openssl/crypto/bn/asm/rsaz-avx2.pl  Wed Aug 26 15:43:44 
2020(r364821)
+++ head/crypto/openssl/crypto/bn/asm/rsaz-avx2.pl  Wed Aug 26 16:55:28 
2020(r364822)
@@ -66,7 +66,7 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM
$addx = ($1>=11);
 }
 
-if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM) 
([0-9]+)\.([0-9]+)/) {
+if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|based on LLVM) 
([0-9]+)\.([0-9]+)/) {
my $ver = $2 + $3/100.0;# 3.1->3.01, 3.10->3.10
$avx = ($ver>=3.0) + ($ver>=3.01);
$addx = ($ver>=3.03);

Modified: head/crypto/openssl/crypto/bn/asm/rsaz-x86_64.pl
==
--- head/crypto/openssl/crypto/bn/asm/rsaz-x86_64.plWed Aug 26 15:43:44 
2020(r364821)
+++ head/crypto/openssl/crypto/bn/asm/rsaz-x86_64.plWed Aug 26 16:55:28 
2020(r364822)
@@ -81,7 +81,7 @@ if (!$addx && $win64 && ($flavour =~ /masm/ || 

Re: svn commit: r364791 - head/usr.sbin/jail

2020-08-26 Thread James Gritton

On 2020-08-26 09:32, Kyle Evans wrote:
On Wed, Aug 26, 2020 at 6:58 AM Roman Bogorodskiy  
wrote:


  Jamie Gritton wrote:

> Author: jamie
> Date: Wed Aug 26 00:42:59 2020
> New Revision: 364791
> URL: https://svnweb.freebsd.org/changeset/base/364791
>
> Log:
>   Handle jail.conf variables that have the same names as parameters.
>
>   PR: 248444
>   Submitted by:   Akos Somfai
>   Reported by:Markus Stoff
>
> Modified:
>   head/usr.sbin/jail/config.c
>
> Modified: head/usr.sbin/jail/config.c
> ==
> --- head/usr.sbin/jail/config.c   Wed Aug 26 00:31:59 2020
(r364790)
> +++ head/usr.sbin/jail/config.c   Wed Aug 26 00:42:59 2020
(r364791)
> @@ -393,7 +393,8 @@ add_param(struct cfjail *j, const struct cfparam *p, e
>   else
>   for (ipnum = IP__NULL + 1; ipnum < IP_NPARAM; ipnum++)
>   if (!(intparams[ipnum].flags & PF_CONV) &&
> - equalopts(name, intparams[ipnum].name)) {
> + equalopts(name, intparams[ipnum].name) &&
> + !(p->flags & PF_VAR)) {
>   j->intparams[ipnum] = np;
>   np->flags |= intparams[ipnum].flags;
>   break;

Looks like it's causing jail(8) to segfault, at least when using with
poudriere:



It looks like it's also wiped out a good chunk of the test suite, as
reported by lwhsu:
https://ci.freebsd.org/job/FreeBSD-head-amd64-test/16305/testReport/


Ooh - I killed things nicely, didn't I?  I'll get on that.

- Jamie
___
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: r364791 - head/usr.sbin/jail

2020-08-26 Thread Kyle Evans
On Wed, Aug 26, 2020 at 6:58 AM Roman Bogorodskiy  wrote:
>
>   Jamie Gritton wrote:
>
> > Author: jamie
> > Date: Wed Aug 26 00:42:59 2020
> > New Revision: 364791
> > URL: https://svnweb.freebsd.org/changeset/base/364791
> >
> > Log:
> >   Handle jail.conf variables that have the same names as parameters.
> >
> >   PR: 248444
> >   Submitted by:   Akos Somfai
> >   Reported by:Markus Stoff
> >
> > Modified:
> >   head/usr.sbin/jail/config.c
> >
> > Modified: head/usr.sbin/jail/config.c
> > ==
> > --- head/usr.sbin/jail/config.c   Wed Aug 26 00:31:59 2020
> > (r364790)
> > +++ head/usr.sbin/jail/config.c   Wed Aug 26 00:42:59 2020
> > (r364791)
> > @@ -393,7 +393,8 @@ add_param(struct cfjail *j, const struct cfparam *p, e
> >   else
> >   for (ipnum = IP__NULL + 1; ipnum < IP_NPARAM; ipnum++)
> >   if (!(intparams[ipnum].flags & PF_CONV) &&
> > - equalopts(name, intparams[ipnum].name)) {
> > + equalopts(name, intparams[ipnum].name) &&
> > + !(p->flags & PF_VAR)) {
> >   j->intparams[ipnum] = np;
> >   np->flags |= intparams[ipnum].flags;
> >   break;
>
> Looks like it's causing jail(8) to segfault, at least when using with
> poudriere:
>

It looks like it's also wiped out a good chunk of the test suite, as
reported by lwhsu:
https://ci.freebsd.org/job/FreeBSD-head-amd64-test/16305/testReport/
___
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: r364821 - head/cddl/sbin/zpool

2020-08-26 Thread Ryan Moeller
Author: freqlabs
Date: Wed Aug 26 15:43:44 2020
New Revision: 364821
URL: https://svnweb.freebsd.org/changeset/base/364821

Log:
  Install zfs-events.5
  
  Sponsored by: iXsystems, Inc.

Modified:
  head/cddl/sbin/zpool/Makefile

Modified: head/cddl/sbin/zpool/Makefile
==
--- head/cddl/sbin/zpool/Makefile   Wed Aug 26 14:31:48 2020
(r364820)
+++ head/cddl/sbin/zpool/Makefile   Wed Aug 26 15:43:44 2020
(r364821)
@@ -12,6 +12,7 @@ PACKAGE=  runtime
 PROG=  zpool
 MAN= \
spl-module-parameters.5 \
+   zfs-events.5 \
zfs-module-parameters.5 \
zpool.8 \
zpool-add.8 \
___
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: r364819 - head/sys/kern

2020-08-26 Thread Mark Johnston
Author: markj
Date: Wed Aug 26 14:31:35 2020
New Revision: 364819
URL: https://svnweb.freebsd.org/changeset/base/364819

Log:
  vmem: Avoid allocating span tags when segments are never released.
  
  vmem uses span tags to delimit imported segments, so that they can be
  released if the segment becomes free in the future.  However, the
  per-domain kernel KVA arenas never release resources, so the span tags
  between imported ranges are unused when the ranges are contiguous.
  Furthermore, such span tags prevent coalescing of free segments across
  KVA_QUANTUM boundaries, resulting in internal fragmentation which
  inhibits superpage promotion in the kernel map.
  
  Stop allocating span tags in arenas that never release resources.  This
  saves a small amount of memory and allows free segements to coalesce
  across import boundaries.  This manifests as improved kernel superpage
  usage during poudriere runs, which also helps to reduce physical memory
  fragmentation by reducing the number of broken partially populated
  reservations.
  
  Tested by:pho
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D24548

Modified:
  head/sys/kern/subr_vmem.c

Modified: head/sys/kern/subr_vmem.c
==
--- head/sys/kern/subr_vmem.c   Wed Aug 26 14:02:38 2020(r364818)
+++ head/sys/kern/subr_vmem.c   Wed Aug 26 14:31:35 2020(r364819)
@@ -249,6 +249,18 @@ static struct vmem memguard_arena_storage;
 vmem_t *memguard_arena = _arena_storage;
 #endif
 
+static bool
+bt_isbusy(bt_t *bt)
+{
+   return (bt->bt_type == BT_TYPE_BUSY);
+}
+
+static bool
+bt_isfree(bt_t *bt)
+{
+   return (bt->bt_type == BT_TYPE_FREE);
+}
+
 /*
  * Fill the vmem's boundary tag cache.  We guarantee that boundary tag
  * allocation will not fail once bt_fill() passes.  To do so we cache
@@ -795,25 +807,49 @@ SYSINIT(vfs, SI_SUB_CONFIGURE, SI_ORDER_ANY, vmem_star
 static void
 vmem_add1(vmem_t *vm, vmem_addr_t addr, vmem_size_t size, int type)
 {
-   bt_t *btspan;
-   bt_t *btfree;
+   bt_t *btfree, *btprev, *btspan;
 
+   VMEM_ASSERT_LOCKED(vm);
MPASS(type == BT_TYPE_SPAN || type == BT_TYPE_SPAN_STATIC);
MPASS((size & vm->vm_quantum_mask) == 0);
 
-   btspan = bt_alloc(vm);
-   btspan->bt_type = type;
-   btspan->bt_start = addr;
-   btspan->bt_size = size;
-   bt_insseg_tail(vm, btspan);
+   if (vm->vm_releasefn == NULL) {
+   /*
+* The new segment will never be released, so see if it is
+* contiguous with respect to an existing segment.  In this case
+* a span tag is not needed, and it may be possible now or in
+* the future to coalesce the new segment with an existing free
+* segment.
+*/
+   btprev = TAILQ_LAST(>vm_seglist, vmem_seglist);
+   if ((!bt_isbusy(btprev) && !bt_isfree(btprev)) ||
+   btprev->bt_start + btprev->bt_size != addr)
+   btprev = NULL;
+   } else {
+   btprev = NULL;
+   }
 
-   btfree = bt_alloc(vm);
-   btfree->bt_type = BT_TYPE_FREE;
-   btfree->bt_start = addr;
-   btfree->bt_size = size;
-   bt_insseg(vm, btfree, btspan);
-   bt_insfree(vm, btfree);
+   if (btprev == NULL || bt_isbusy(btprev)) {
+   if (btprev == NULL) {
+   btspan = bt_alloc(vm);
+   btspan->bt_type = type;
+   btspan->bt_start = addr;
+   btspan->bt_size = size;
+   bt_insseg_tail(vm, btspan);
+   }
 
+   btfree = bt_alloc(vm);
+   btfree->bt_type = BT_TYPE_FREE;
+   btfree->bt_start = addr;
+   btfree->bt_size = size;
+   bt_insseg_tail(vm, btfree);
+   bt_insfree(vm, btfree);
+   } else {
+   bt_remfree(vm, btprev);
+   btprev->bt_size += size;
+   bt_insfree(vm, btprev);
+   }
+
vm->vm_size += size;
 }
 
@@ -1147,6 +1183,7 @@ vmem_set_import(vmem_t *vm, vmem_import_t *importfn,
 {
 
VMEM_LOCK(vm);
+   KASSERT(vm->vm_size == 0, ("%s: arena is non-empty", __func__));
vm->vm_importfn = importfn;
vm->vm_releasefn = releasefn;
vm->vm_arg = arg;
___
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: r364820 - head/sys/vm

2020-08-26 Thread Mark Johnston
Author: markj
Date: Wed Aug 26 14:31:48 2020
New Revision: 364820
URL: https://svnweb.freebsd.org/changeset/base/364820

Log:
  Use a large kmem arena import size on NUMA systems.
  
  This helps minimize internal fragmentation that occurs when 2MB imports
  are interleaved across NUMA domains.  Virtually all KVA allocations on
  direct map platforms consume more than one page, so the fragmentation
  manifests as runs of 511 4KB page mappings in the kernel.
  
  Reviewed by:  alc, kib
  Tested by:pho
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D26050

Modified:
  head/sys/vm/vm_kern.c

Modified: head/sys/vm/vm_kern.c
==
--- head/sys/vm/vm_kern.c   Wed Aug 26 14:31:35 2020(r364819)
+++ head/sys/vm/vm_kern.c   Wed Aug 26 14:31:48 2020(r364820)
@@ -128,6 +128,7 @@ SYSCTL_ULONG(_vm, OID_AUTO, max_kernel_address, CTLFLA
 #defineKVA_QUANTUM_SHIFT   (8 + PAGE_SHIFT)
 #endif
 #defineKVA_QUANTUM (1 << KVA_QUANTUM_SHIFT)
+#defineKVA_NUMA_IMPORT_QUANTUM (KVA_QUANTUM * 128)
 
 extern void uma_startup2(void);
 
@@ -745,6 +746,7 @@ kva_import_domain(void *arena, vmem_size_t size, int f
 void
 kmem_init(vm_offset_t start, vm_offset_t end)
 {
+   vm_size_t quantum;
int domain;
 
vm_map_init(kernel_map, kernel_pmap, VM_MIN_KERNEL_ADDRESS, end);
@@ -774,10 +776,20 @@ kmem_init(vm_offset_t start, vm_offset_t end)
vm_map_unlock(kernel_map);
 
/*
+* Use a large import quantum on NUMA systems.  This helps minimize
+* interleaving of superpages, reducing internal fragmentation within
+* the per-domain arenas.
+*/
+   if (vm_ndomains > 1 && PMAP_HAS_DMAP)
+   quantum = KVA_NUMA_IMPORT_QUANTUM;
+   else
+   quantum = KVA_QUANTUM;
+
+   /*
 * Initialize the kernel_arena.  This can grow on demand.
 */
vmem_init(kernel_arena, "kernel arena", 0, 0, PAGE_SIZE, 0, 0);
-   vmem_set_import(kernel_arena, kva_import, NULL, NULL, KVA_QUANTUM);
+   vmem_set_import(kernel_arena, kva_import, NULL, NULL, quantum);
 
for (domain = 0; domain < vm_ndomains; domain++) {
/*
@@ -789,13 +801,15 @@ kmem_init(vm_offset_t start, vm_offset_t end)
vm_dom[domain].vmd_kernel_arena = vmem_create(
"kernel arena domain", 0, 0, PAGE_SIZE, 0, M_WAITOK);
vmem_set_import(vm_dom[domain].vmd_kernel_arena,
-   kva_import_domain, NULL, kernel_arena, KVA_QUANTUM);
+   kva_import_domain, NULL, kernel_arena, quantum);
 
/*
 * In architectures with superpages, maintain separate arenas
 * for allocations with permissions that differ from the
 * "standard" read/write permissions used for kernel memory,
 * so as not to inhibit superpage promotion.
+*
+* Use the base import quantum since this arena is rarely used.
 */
 #if VM_NRESERVLEVEL > 0
vm_dom[domain].vmd_kernel_rwx_arena = vmem_create(
___
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: r364818 - head/usr.sbin/efibootmgr

2020-08-26 Thread Toomas Soome
Author: tsoome
Date: Wed Aug 26 14:02:38 2020
New Revision: 364818
URL: https://svnweb.freebsd.org/changeset/base/364818

Log:
  efibootmgr: wrong check for opts.order
  
  opts.order && !(opts.order) does not really make sense.
  
  Reported by:  swildner

Modified:
  head/usr.sbin/efibootmgr/efibootmgr.c

Modified: head/usr.sbin/efibootmgr/efibootmgr.c
==
--- head/usr.sbin/efibootmgr/efibootmgr.c   Wed Aug 26 13:13:57 2020
(r364817)
+++ head/usr.sbin/efibootmgr/efibootmgr.c   Wed Aug 26 14:02:38 2020
(r364818)
@@ -295,7 +295,7 @@ parse_args(int argc, char *argv[])
return;
}
 
-   if (opts.order && !(opts.order))
+   if (opts.order != NULL && *opts.order == '\0')
errx(1, "%s", ORDER_USAGE);
 
if ((opts.set_inactive || opts.set_active) && !opts.has_bootnum)
___
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: r364817 - head/libexec/rc/rc.d

2020-08-26 Thread Cy Schubert
Author: cy
Date: Wed Aug 26 13:13:57 2020
New Revision: 364817
URL: https://svnweb.freebsd.org/changeset/base/364817

Log:
  As of r364746 (OpenZFS import) existing ZPOOLs are not imported
  prior to zvol and mountcritlocal resulting in ZVOLs (swap and
  virtual machine UFS filesystems) being unavailable, leading to
  boot failures.
  
  We move the zpool import from zfs to a new zpool script, with the
  -N option to avoid mounting datasets while making the ZPOOL's
  datasets available for "legacy" mount (mountpoint=legacy) and ZVOLs
  available for subsequent use for swap (in the zvol rc sript) or
  for UFS or other filesystems in fstab(5), mounted by mountcritlocal.
  
  Reviewed by:  freqlabs (previous version)
  Differential Revision:https://reviews.freebsd.org/D26185

Added:
  head/libexec/rc/rc.d/zpool   (contents, props changed)
Modified:
  head/libexec/rc/rc.d/Makefile
  head/libexec/rc/rc.d/mountcritlocal
  head/libexec/rc/rc.d/zfs
  head/libexec/rc/rc.d/zvol

Modified: head/libexec/rc/rc.d/Makefile
==
--- head/libexec/rc/rc.d/Makefile   Wed Aug 26 12:54:18 2020
(r364816)
+++ head/libexec/rc/rc.d/Makefile   Wed Aug 26 13:13:57 2020
(r364817)
@@ -318,6 +318,7 @@ CONFGROUPS+=ZFS
 ZFS+=  zfs
 ZFS+=  zfsbe
 ZFS+=  zfsd
+ZFS+=  zpool
 ZFS+=  zvol
 .endif
 

Modified: head/libexec/rc/rc.d/mountcritlocal
==
--- head/libexec/rc/rc.d/mountcritlocal Wed Aug 26 12:54:18 2020
(r364816)
+++ head/libexec/rc/rc.d/mountcritlocal Wed Aug 26 13:13:57 2020
(r364817)
@@ -4,7 +4,7 @@
 #
 
 # PROVIDE: mountcritlocal
-# REQUIRE: root hostid_save mdconfig
+# REQUIRE: root hostid_save mdconfig zvol
 # KEYWORD: nojail shutdown
 
 . /etc/rc.subr

Modified: head/libexec/rc/rc.d/zfs
==
--- head/libexec/rc/rc.d/zfsWed Aug 26 12:54:18 2020(r364816)
+++ head/libexec/rc/rc.d/zfsWed Aug 26 13:13:57 2020(r364817)
@@ -25,13 +25,6 @@ zfs_start_jail()
 
 zfs_start_main()
 {
-   local cachefile
-
-   for cachefile in /boot/zfs/zpool.cache /etc/zfs/zpool.cache; do
-   if [ -r $cachefile ]; then
-   zpool import -c $cachefile -a
-   fi
-   done
zfs mount -va
zfs share -a
if [ ! -r /etc/zfs/exports ]; then

Added: head/libexec/rc/rc.d/zpool
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/libexec/rc/rc.d/zpool  Wed Aug 26 13:13:57 2020(r364817)
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: zpool
+# REQUIRE: hostid
+# BEFORE: zvol mountcritlocal
+# KEYWORD: nojail
+
+. /etc/rc.subr
+
+name="zpool"
+desc="Import ZPOOLs"
+rcvar="zfs_enable"
+start_cmd="zpool_start"
+required_modules="zfs"
+
+zpool_start()
+{
+   local cachefile
+
+   for cachefile in /boot/zfs/zpool.cache /etc/zfs/zpool.cache; do
+   if [ -r $cachefile ]; then
+   zpool import -c $cachefile -a -N
+   fi
+   done
+}
+
+load_rc_config $name
+run_rc_command "$1"

Modified: head/libexec/rc/rc.d/zvol
==
--- head/libexec/rc/rc.d/zvol   Wed Aug 26 12:54:18 2020(r364816)
+++ head/libexec/rc/rc.d/zvol   Wed Aug 26 13:13:57 2020(r364817)
@@ -4,7 +4,7 @@
 #
 
 # PROVIDE: zvol
-# REQUIRE: hostid
+# REQUIRE: zpool
 # BEFORE: dumpon
 # KEYWORD: nojail
 
___
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: r364816 - head/sys/kern

2020-08-26 Thread Mateusz Guzik
Author: mjg
Date: Wed Aug 26 12:54:18 2020
New Revision: 364816
URL: https://svnweb.freebsd.org/changeset/base/364816

Log:
  cache: relock on failure in cache_zap_locked_vnode
  
  This gets rid of bogus scheme of yielding in hopes the blocking thread will
  make progress.

Modified:
  head/sys/kern/vfs_cache.c

Modified: head/sys/kern/vfs_cache.c
==
--- head/sys/kern/vfs_cache.c   Wed Aug 26 12:53:16 2020(r364815)
+++ head/sys/kern/vfs_cache.c   Wed Aug 26 12:54:18 2020(r364816)
@@ -1134,8 +1134,15 @@ cache_zap_locked_vnode(struct namecache *ncp, struct v
to_unlock = vlp2;
} else {
if (!mtx_trylock(vlp1)) {
-   error = EAGAIN;
-   goto out;
+   /*
+* TODO: Very wasteful but rare.
+*/
+   mtx_unlock(pvlp);
+   mtx_lock(vlp1);
+   mtx_lock(vlp2);
+   mtx_unlock(vlp2);
+   mtx_unlock(vlp1);
+   return (EAGAIN);
}
to_unlock = vlp1;
}
@@ -1377,7 +1384,6 @@ negative_success:
error = cache_zap_locked_vnode(ncp, dvp);
if (__predict_false(error != 0)) {
zap_and_exit_bucket_fail2++;
-   cache_maybe_yield();
goto retry;
}
cache_free(ncp);
@@ -1465,7 +1471,6 @@ retry:
error = cache_zap_locked_bucket(ncp, cnp, hash, blp);
if (__predict_false(error != 0)) {
zap_and_exit_bucket_fail++;
-   cache_maybe_yield();
goto retry;
}
counter_u64_add(numposzaps, 1);
@@ -1584,7 +1589,6 @@ negative_success:
error = cache_zap_locked_vnode(ncp, dvp);
if (__predict_false(error != 0)) {
zap_and_exit_bucket_fail2++;
-   cache_maybe_yield();
goto retry;
}
cache_free(ncp);
___
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: r364815 - head/sys/kern

2020-08-26 Thread Mateusz Guzik
Author: mjg
Date: Wed Aug 26 12:53:16 2020
New Revision: 364815
URL: https://svnweb.freebsd.org/changeset/base/364815

Log:
  cache: stop null checking in cache_free

Modified:
  head/sys/kern/vfs_cache.c

Modified: head/sys/kern/vfs_cache.c
==
--- head/sys/kern/vfs_cache.c   Wed Aug 26 12:52:54 2020(r364814)
+++ head/sys/kern/vfs_cache.c   Wed Aug 26 12:53:16 2020(r364815)
@@ -388,8 +388,7 @@ cache_free(struct namecache *ncp)
 {
struct namecache_ts *ncp_ts;
 
-   if (ncp == NULL)
-   return;
+   MPASS(ncp != NULL);
if ((ncp->nc_flag & NCF_DVDROP) != 0)
vdrop(ncp->nc_dvp);
if (__predict_false(ncp->nc_flag & NCF_TS)) {
@@ -980,7 +979,8 @@ cache_negative_zap_one(void)
}
mtx_unlock(blp);
mtx_unlock(dvlp);
-   cache_free(ncp);
+   if (ncp != NULL)
+   cache_free(ncp);
 }
 
 /*
@@ -1962,7 +1962,8 @@ cache_enter_dotdot_prep(struct vnode *dvp, struct vnod
dvp->v_cache_dd = NULL;
vn_seqc_write_end(dvp);
cache_enter_unlock();
-   cache_free(ncp);
+   if (ncp != NULL)
+   cache_free(ncp);
 }
 
 /*
@@ -2158,7 +2159,8 @@ cache_enter_time(struct vnode *dvp, struct vnode *vp, 
cache_enter_unlock();
if (numneg * ncnegfactor > lnumcache)
cache_negative_zap_one();
-   cache_free(ndd);
+   if (ndd != NULL)
+   cache_free(ndd);
return;
 out_unlock_free:
cache_enter_unlock();
___
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: r364814 - head/sys/kern

2020-08-26 Thread Mateusz Guzik
Author: mjg
Date: Wed Aug 26 12:52:54 2020
New Revision: 364814
URL: https://svnweb.freebsd.org/changeset/base/364814

Log:
  cache: make it mandatory to request both timestamps or neither

Modified:
  head/sys/kern/vfs_cache.c

Modified: head/sys/kern/vfs_cache.c
==
--- head/sys/kern/vfs_cache.c   Wed Aug 26 12:52:17 2020(r364813)
+++ head/sys/kern/vfs_cache.c   Wed Aug 26 12:52:54 2020(r364814)
@@ -415,14 +415,12 @@ cache_out_ts(struct namecache *ncp, struct timespec *t
(tsp == NULL && ticksp == NULL),
("No NCF_TS"));
 
-   if (tsp == NULL && ticksp == NULL)
+   if (tsp == NULL)
return;
 
ncp_ts = __containerof(ncp, struct namecache_ts, nc_nc);
-   if (tsp != NULL)
-   *tsp = ncp_ts->nc_time;
-   if (ticksp != NULL)
-   *ticksp = ncp_ts->nc_ticks;
+   *tsp = ncp_ts->nc_time;
+   *ticksp = ncp_ts->nc_ticks;
 }
 
 #ifdef DEBUG_CACHE
@@ -1616,6 +1614,8 @@ cache_lookup(struct vnode *dvp, struct vnode **vpp, st
int error;
bool whiteout;
u_short nc_flag;
+
+   MPASS((tsp == NULL && ticksp == NULL) || (tsp != NULL && ticksp != 
NULL));
 
 #ifdef DEBUG_CACHE
if (__predict_false(!doingcache)) {
___
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: r364813 - head/sys/kern

2020-08-26 Thread Mateusz Guzik
Author: mjg
Date: Wed Aug 26 12:52:17 2020
New Revision: 364813
URL: https://svnweb.freebsd.org/changeset/base/364813

Log:
  cache: convert bucketlocks to a mutex
  
  By now bucket locks are almost never taken for anything but writing and
  converting to mutex simplifies the code.

Modified:
  head/sys/kern/subr_witness.c
  head/sys/kern/vfs_cache.c

Modified: head/sys/kern/subr_witness.c
==
--- head/sys/kern/subr_witness.cWed Aug 26 12:50:57 2020
(r364812)
+++ head/sys/kern/subr_witness.cWed Aug 26 12:52:17 2020
(r364813)
@@ -638,7 +638,7 @@ static struct witness_order_list_entry order_lists[] =
 * VFS namecache
 */
{ "ncvn", _class_mtx_sleep },
-   { "ncbuc", _class_rw },
+   { "ncbuc", _class_mtx_sleep },
{ "vnode interlock", _class_mtx_sleep },
{ "ncneg", _class_mtx_sleep },
{ NULL, NULL },

Modified: head/sys/kern/vfs_cache.c
==
--- head/sys/kern/vfs_cache.c   Wed Aug 26 12:50:57 2020(r364812)
+++ head/sys/kern/vfs_cache.c   Wed Aug 26 12:52:17 2020(r364813)
@@ -55,7 +55,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -247,7 +246,7 @@ cache_ncp_canuse(struct namecache *ncp)
  * These locks are used (in the order in which they can be taken):
  * NAMETYPEROLE
  * vnodelock   mtx vnode lists and v_cache_dd field protection
- * bucketlock  rwlock  for access to given set of hash buckets
+ * bucketlock  mtx for access to given set of hash buckets
  * neglist mtx negative entry LRU management
  *
  * Additionally, ncneg_shrink_lock mtx is used to have at most one thread
@@ -263,7 +262,8 @@ cache_ncp_canuse(struct namecache *ncp)
  * name -> vnode lookup requires the relevant bucketlock to be held for 
reading.
  *
  * Insertions and removals of entries require involved vnodes and bucketlocks
- * to be write-locked to prevent other threads from seeing the entry.
+ * to be locked to provide safe operation against other threads modifying the
+ * cache.
  *
  * Some lookups result in removal of the found entry (e.g. getting rid of a
  * negative entry with the intent to create a positive one), which poses a
@@ -336,9 +336,9 @@ NCP2NEGSTATE(struct namecache *ncp)
 
 #definenumbucketlocks (ncbuckethash + 1)
 static u_int __read_mostly  ncbuckethash;
-static struct rwlock_padalign __read_mostly  *bucketlocks;
+static struct mtx_padalign __read_mostly  *bucketlocks;
 #defineHASH2BUCKETLOCK(hash) \
-   ((struct rwlock *)([((hash) & ncbuckethash)]))
+   ((struct mtx *)([((hash) & ncbuckethash)]))
 
 #definenumvnodelocks (ncvnodehash + 1)
 static u_int __read_mostly  ncvnodehash;
@@ -552,7 +552,7 @@ NCP2BUCKET(struct namecache *ncp)
return (NCHHASH(hash));
 }
 
-static inline struct rwlock *
+static inline struct mtx *
 NCP2BUCKETLOCK(struct namecache *ncp)
 {
uint32_t hash;
@@ -563,15 +563,25 @@ NCP2BUCKETLOCK(struct namecache *ncp)
 
 #ifdef INVARIANTS
 static void
-cache_assert_bucket_locked(struct namecache *ncp, int mode)
+cache_assert_bucket_locked(struct namecache *ncp)
 {
-   struct rwlock *blp;
+   struct mtx *blp;
 
blp = NCP2BUCKETLOCK(ncp);
-   rw_assert(blp, mode);
+   mtx_assert(blp, MA_OWNED);
 }
+
+static void
+cache_assert_bucket_unlocked(struct namecache *ncp)
+{
+   struct mtx *blp;
+
+   blp = NCP2BUCKETLOCK(ncp);
+   mtx_assert(blp, MA_NOTOWNED);
+}
 #else
-#define cache_assert_bucket_locked(x, y) do { } while (0)
+#define cache_assert_bucket_locked(x) do { } while (0)
+#define cache_assert_bucket_unlocked(x) do { } while (0)
 #endif
 
 #define cache_sort_vnodes(x, y)_cache_sort_vnodes((void **)(x), (void 
**)(y))
@@ -595,7 +605,7 @@ cache_lock_all_buckets(void)
u_int i;
 
for (i = 0; i < numbucketlocks; i++)
-   rw_wlock([i]);
+   mtx_lock([i]);
 }
 
 static void
@@ -604,7 +614,7 @@ cache_unlock_all_buckets(void)
u_int i;
 
for (i = 0; i < numbucketlocks; i++)
-   rw_wunlock([i]);
+   mtx_unlock([i]);
 }
 
 static void
@@ -829,7 +839,7 @@ cache_negative_insert(struct namecache *ncp)
struct neglist *neglist;
 
MPASS(ncp->nc_flag & NCF_NEGATIVE);
-   cache_assert_bucket_locked(ncp, RA_WLOCKED);
+   cache_assert_bucket_locked(ncp);
neglist = NCP2NEGLIST(ncp);
mtx_lock(>nl_lock);
TAILQ_INSERT_TAIL(>nl_list, ncp, nc_dst);
@@ -845,7 +855,7 @@ cache_negative_remove(struct namecache *ncp)
bool hot_locked = false;
bool list_locked = false;
 
-   cache_assert_bucket_locked(ncp, RA_WLOCKED);
+   cache_assert_bucket_locked(ncp);
neglist = NCP2NEGLIST(ncp);
negstate = NCP2NEGSTATE(ncp);
if 

svn commit: r364812 - head/sys/kern

2020-08-26 Thread Mateusz Guzik
Author: mjg
Date: Wed Aug 26 12:50:57 2020
New Revision: 364812
URL: https://svnweb.freebsd.org/changeset/base/364812

Log:
  cache: only evict negative entries on CREATE when ISLASTCN is set

Modified:
  head/sys/kern/vfs_cache.c

Modified: head/sys/kern/vfs_cache.c
==
--- head/sys/kern/vfs_cache.c   Wed Aug 26 12:50:10 2020(r364811)
+++ head/sys/kern/vfs_cache.c   Wed Aug 26 12:50:57 2020(r364812)
@@ -1398,15 +1398,17 @@ retry:
return (-1);
 negative_success:
if (__predict_false(cnp->cn_nameiop == CREATE)) {
-   counter_u64_add(numnegzaps, 1);
-   error = cache_zap_locked_vnode(ncp, dvp);
-   if (__predict_false(error != 0)) {
-   zap_and_exit_bucket_fail2++;
-   cache_maybe_yield();
-   goto retry;
+   if (cnp->cn_flags & ISLASTCN) {
+   counter_u64_add(numnegzaps, 1);
+   error = cache_zap_locked_vnode(ncp, dvp);
+   if (__predict_false(error != 0)) {
+   zap_and_exit_bucket_fail2++;
+   cache_maybe_yield();
+   goto retry;
+   }
+   cache_free(ncp);
+   return (0);
}
-   cache_free(ncp);
-   return (0);
}
 
SDT_PROBE2(vfs, namecache, lookup, hit__negative, dvp, ncp->nc_name);
@@ -1603,15 +1605,17 @@ retry:
 negative_success:
/* We found a negative match, and want to create it, so purge */
if (__predict_false(cnp->cn_nameiop == CREATE)) {
-   counter_u64_add(numnegzaps, 1);
-   error = cache_zap_rlocked_bucket(ncp, cnp, hash, blp);
-   if (__predict_false(error != 0)) {
-   zap_and_exit_bucket_fail2++;
-   cache_maybe_yield();
-   goto retry;
+   if (cnp->cn_flags & ISLASTCN) {
+   counter_u64_add(numnegzaps, 1);
+   error = cache_zap_locked_vnode(ncp, dvp);
+   if (__predict_false(error != 0)) {
+   zap_and_exit_bucket_fail2++;
+   cache_maybe_yield();
+   goto retry;
+   }
+   cache_free(ncp);
+   return (0);
}
-   cache_free(ncp);
-   return (0);
}
 
SDT_PROBE2(vfs, namecache, lookup, hit__negative, dvp, ncp->nc_name);
@@ -1658,13 +1662,6 @@ cache_lookup(struct vnode *dvp, struct vnode **vpp, st
return (0);
}
 
-   /*
-* TODO: we only fallback becasue if a negative entry is found it will
-* need to be purged.
-*/
-   if (cnp->cn_nameiop == CREATE)
-   goto out_fallback;
-
hash = cache_get_hash(cnp->cn_nameptr, cnp->cn_namelen, dvp);
vfs_smr_enter();
 
@@ -1723,6 +1720,13 @@ cache_lookup(struct vnode *dvp, struct vnode **vpp, st
return (-1);
 
 negative_success:
+   if (__predict_false(cnp->cn_nameiop == CREATE)) {
+   if (cnp->cn_flags & ISLASTCN) {
+   vfs_smr_exit();
+   goto out_fallback;
+   }
+   }
+
SDT_PROBE2(vfs, namecache, lookup, hit__negative, dvp, ncp->nc_name);
cache_out_ts(ncp, tsp, ticksp);
counter_u64_add(numneghits, 1);
___
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: r364811 - head/sys/kern

2020-08-26 Thread Mateusz Guzik
Author: mjg
Date: Wed Aug 26 12:50:10 2020
New Revision: 364811
URL: https://svnweb.freebsd.org/changeset/base/364811

Log:
  cache: decouple smr and locked lookup in the slowpath
  
  Tested by:pho

Modified:
  head/sys/kern/vfs_cache.c

Modified: head/sys/kern/vfs_cache.c
==
--- head/sys/kern/vfs_cache.c   Wed Aug 26 12:49:39 2020(r364810)
+++ head/sys/kern/vfs_cache.c   Wed Aug 26 12:50:10 2020(r364811)
@@ -1538,17 +1538,104 @@ out_no_entry:
  * .., dvp is unlocked.  If we're looking up . an extra ref is taken, but the
  * lock is not recursively acquired.
  */
+static int __noinline
+cache_lookup_fallback(struct vnode *dvp, struct vnode **vpp, struct 
componentname *cnp,
+struct timespec *tsp, int *ticksp)
+{
+   struct namecache *ncp;
+   struct rwlock *blp;
+   uint32_t hash;
+   enum vgetstate vs;
+   int error;
+   bool whiteout;
+
+   MPASS((cnp->cn_flags & (MAKEENTRY | ISDOTDOT)) == MAKEENTRY);
+
+retry:
+   hash = cache_get_hash(cnp->cn_nameptr, cnp->cn_namelen, dvp);
+   blp = HASH2BUCKETLOCK(hash);
+   rw_rlock(blp);
+
+   CK_SLIST_FOREACH(ncp, (NCHHASH(hash)), nc_hash) {
+   if (ncp->nc_dvp == dvp && ncp->nc_nlen == cnp->cn_namelen &&
+   !bcmp(ncp->nc_name, cnp->cn_nameptr, ncp->nc_nlen))
+   break;
+   }
+
+   /* We failed to find an entry */
+   if (__predict_false(ncp == NULL)) {
+   rw_runlock(blp);
+   SDT_PROBE3(vfs, namecache, lookup, miss, dvp, cnp->cn_nameptr,
+   NULL);
+   counter_u64_add(nummiss, 1);
+   return (0);
+   }
+
+   if (ncp->nc_flag & NCF_NEGATIVE)
+   goto negative_success;
+
+   /* We found a "positive" match, return the vnode */
+   counter_u64_add(numposhits, 1);
+   *vpp = ncp->nc_vp;
+   CTR4(KTR_VFS, "cache_lookup(%p, %s) found %p via ncp %p",
+   dvp, cnp->cn_nameptr, *vpp, ncp);
+   SDT_PROBE3(vfs, namecache, lookup, hit, dvp, ncp->nc_name,
+   *vpp);
+   cache_out_ts(ncp, tsp, ticksp);
+   /*
+* On success we return a locked and ref'd vnode as per the lookup
+* protocol.
+*/
+   MPASS(dvp != *vpp);
+   vs = vget_prep(*vpp);
+   cache_lookup_unlock(blp);
+   error = vget_finish(*vpp, cnp->cn_lkflags, vs);
+   if (error) {
+   *vpp = NULL;
+   goto retry;
+   }
+   if ((cnp->cn_flags & ISLASTCN) &&
+   (cnp->cn_lkflags & LK_TYPE_MASK) == LK_EXCLUSIVE) {
+   ASSERT_VOP_ELOCKED(*vpp, "cache_lookup");
+   }
+   return (-1);
+
+negative_success:
+   /* We found a negative match, and want to create it, so purge */
+   if (__predict_false(cnp->cn_nameiop == CREATE)) {
+   counter_u64_add(numnegzaps, 1);
+   error = cache_zap_rlocked_bucket(ncp, cnp, hash, blp);
+   if (__predict_false(error != 0)) {
+   zap_and_exit_bucket_fail2++;
+   cache_maybe_yield();
+   goto retry;
+   }
+   cache_free(ncp);
+   return (0);
+   }
+
+   SDT_PROBE2(vfs, namecache, lookup, hit__negative, dvp, ncp->nc_name);
+   cache_out_ts(ncp, tsp, ticksp);
+   counter_u64_add(numneghits, 1);
+   whiteout = (ncp->nc_flag & NCF_WHITE);
+   cache_negative_hit(ncp);
+   cache_lookup_unlock(blp);
+   if (whiteout)
+   cnp->cn_flags |= ISWHITEOUT;
+   return (ENOENT);
+}
+
 int
 cache_lookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp,
 struct timespec *tsp, int *ticksp)
 {
struct namecache *ncp;
struct negstate *negstate;
-   struct rwlock *blp;
uint32_t hash;
enum vgetstate vs;
int error;
-   bool try_smr, doing_smr, whiteout;
+   bool whiteout;
+   u_short nc_flag;
 
 #ifdef DEBUG_CACHE
if (__predict_false(!doingcache)) {
@@ -1571,24 +1658,15 @@ cache_lookup(struct vnode *dvp, struct vnode **vpp, st
return (0);
}
 
-   try_smr = true;
+   /*
+* TODO: we only fallback becasue if a negative entry is found it will
+* need to be purged.
+*/
if (cnp->cn_nameiop == CREATE)
-   try_smr = false;
-retry:
-   doing_smr = false;
-   blp = NULL;
-   error = 0;
+   goto out_fallback;
 
hash = cache_get_hash(cnp->cn_nameptr, cnp->cn_namelen, dvp);
-retry_hashed:
-   if (try_smr) {
-   vfs_smr_enter();
-   doing_smr = true;
-   try_smr = false;
-   } else {
-   blp = HASH2BUCKETLOCK(hash);
-   rw_rlock(blp);
-   }
+   vfs_smr_enter();
 
CK_SLIST_FOREACH(ncp, (NCHHASH(hash)), nc_hash) {
if (ncp->nc_dvp == 

svn commit: r364810 - head/sys/kern

2020-08-26 Thread Mateusz Guzik
Author: mjg
Date: Wed Aug 26 12:49:39 2020
New Revision: 364810
URL: https://svnweb.freebsd.org/changeset/base/364810

Log:
  cache: factor dotdot lookup out of cache_lookup
  
  Tested by:pho

Modified:
  head/sys/kern/vfs_cache.c

Modified: head/sys/kern/vfs_cache.c
==
--- head/sys/kern/vfs_cache.c   Wed Aug 26 10:21:38 2020(r364809)
+++ head/sys/kern/vfs_cache.c   Wed Aug 26 12:49:39 2020(r364810)
@@ -1273,14 +1273,10 @@ cache_zap_wlocked_bucket_kl(struct namecache *ncp, str
 }
 
 static void
-cache_lookup_unlock(struct rwlock *blp, struct mtx *vlp)
+cache_lookup_unlock(struct rwlock *blp)
 {
 
-   if (blp != NULL) {
-   rw_runlock(blp);
-   } else {
-   mtx_unlock(vlp);
-   }
+   rw_runlock(blp);
 }
 
 static int __noinline
@@ -1320,6 +1316,111 @@ cache_lookup_dot(struct vnode *dvp, struct vnode **vpp
 }
 
 static __noinline int
+cache_remove_cnp(struct vnode *dvp, struct componentname *cnp);
+
+
+static int __noinline
+cache_lookup_dotdot(struct vnode *dvp, struct vnode **vpp, struct 
componentname *cnp,
+struct timespec *tsp, int *ticksp)
+{
+   struct namecache_ts *ncp_ts;
+   struct namecache *ncp;
+   struct mtx *dvlp;
+   enum vgetstate vs;
+   int error, ltype;
+   bool whiteout;
+
+   MPASS((cnp->cn_flags & ISDOTDOT) != 0);
+
+   if ((cnp->cn_flags & MAKEENTRY) == 0) {
+   cache_remove_cnp(dvp, cnp);
+   return (0);
+   }
+
+   counter_u64_add(dotdothits, 1);
+retry:
+   dvlp = VP2VNODELOCK(dvp);
+   mtx_lock(dvlp);
+   ncp = dvp->v_cache_dd;
+   if (ncp == NULL) {
+   SDT_PROBE3(vfs, namecache, lookup, miss, dvp,
+   "..", NULL);
+   mtx_unlock(dvlp);
+   return (0);
+   }
+   if ((ncp->nc_flag & NCF_ISDOTDOT) != 0) {
+   if (ncp->nc_flag & NCF_NEGATIVE)
+   *vpp = NULL;
+   else
+   *vpp = ncp->nc_vp;
+   } else
+   *vpp = ncp->nc_dvp;
+   /* Return failure if negative entry was found. */
+   if (*vpp == NULL)
+   goto negative_success;
+   CTR3(KTR_VFS, "cache_lookup(%p, %s) found %p via ..",
+   dvp, cnp->cn_nameptr, *vpp);
+   SDT_PROBE3(vfs, namecache, lookup, hit, dvp, "..",
+   *vpp);
+   cache_out_ts(ncp, tsp, ticksp);
+   if ((ncp->nc_flag & (NCF_ISDOTDOT | NCF_DTS)) ==
+   NCF_DTS && tsp != NULL) {
+   ncp_ts = __containerof(ncp, struct namecache_ts, nc_nc);
+   *tsp = ncp_ts->nc_dotdottime;
+   }
+
+   /*
+* On success we return a locked and ref'd vnode as per the lookup
+* protocol.
+*/
+   MPASS(dvp != *vpp);
+   ltype = 0;  /* silence gcc warning */
+   ltype = VOP_ISLOCKED(dvp);
+   VOP_UNLOCK(dvp);
+   vs = vget_prep(*vpp);
+   mtx_unlock(dvlp);
+   error = vget_finish(*vpp, cnp->cn_lkflags, vs);
+   vn_lock(dvp, ltype | LK_RETRY);
+   if (VN_IS_DOOMED(dvp)) {
+   if (error == 0)
+   vput(*vpp);
+   *vpp = NULL;
+   return (ENOENT);
+   }
+   if (error) {
+   *vpp = NULL;
+   goto retry;
+   }
+   if ((cnp->cn_flags & ISLASTCN) &&
+   (cnp->cn_lkflags & LK_TYPE_MASK) == LK_EXCLUSIVE) {
+   ASSERT_VOP_ELOCKED(*vpp, "cache_lookup");
+   }
+   return (-1);
+negative_success:
+   if (__predict_false(cnp->cn_nameiop == CREATE)) {
+   counter_u64_add(numnegzaps, 1);
+   error = cache_zap_locked_vnode(ncp, dvp);
+   if (__predict_false(error != 0)) {
+   zap_and_exit_bucket_fail2++;
+   cache_maybe_yield();
+   goto retry;
+   }
+   cache_free(ncp);
+   return (0);
+   }
+
+   SDT_PROBE2(vfs, namecache, lookup, hit__negative, dvp, ncp->nc_name);
+   cache_out_ts(ncp, tsp, ticksp);
+   counter_u64_add(numneghits, 1);
+   whiteout = (ncp->nc_flag & NCF_WHITE);
+   cache_negative_hit(ncp);
+   mtx_unlock(dvlp);
+   if (whiteout)
+   cnp->cn_flags |= ISWHITEOUT;
+   return (ENOENT);
+}
+
+static __noinline int
 cache_remove_cnp(struct vnode *dvp, struct componentname *cnp)
 {
struct namecache *ncp;
@@ -1441,14 +1542,12 @@ int
 cache_lookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp,
 struct timespec *tsp, int *ticksp)
 {
-   struct namecache_ts *ncp_ts;
struct namecache *ncp;
struct negstate *negstate;
struct rwlock *blp;
-   struct mtx *dvlp;
uint32_t hash;
enum vgetstate vs;
-   int error, ltype;
+   int error;
bool try_smr, doing_smr, whiteout;
 
 #ifdef DEBUG_CACHE
@@ -1458,9 

Re: svn commit: r364791 - head/usr.sbin/jail

2020-08-26 Thread Roman Bogorodskiy
  Jamie Gritton wrote:

> Author: jamie
> Date: Wed Aug 26 00:42:59 2020
> New Revision: 364791
> URL: https://svnweb.freebsd.org/changeset/base/364791
> 
> Log:
>   Handle jail.conf variables that have the same names as parameters.
>   
>   PR: 248444
>   Submitted by:   Akos Somfai
>   Reported by:Markus Stoff
> 
> Modified:
>   head/usr.sbin/jail/config.c
> 
> Modified: head/usr.sbin/jail/config.c
> ==
> --- head/usr.sbin/jail/config.c   Wed Aug 26 00:31:59 2020
> (r364790)
> +++ head/usr.sbin/jail/config.c   Wed Aug 26 00:42:59 2020
> (r364791)
> @@ -393,7 +393,8 @@ add_param(struct cfjail *j, const struct cfparam *p, e
>   else
>   for (ipnum = IP__NULL + 1; ipnum < IP_NPARAM; ipnum++)
>   if (!(intparams[ipnum].flags & PF_CONV) &&
> - equalopts(name, intparams[ipnum].name)) {
> + equalopts(name, intparams[ipnum].name) &&
> + !(p->flags & PF_VAR)) {
>   j->intparams[ipnum] = np;
>   np->flags |= intparams[ipnum].flags;
>   break;

Looks like it's causing jail(8) to segfault, at least when using with
poudriere:

$
[00:00:00] Creating the reference jail... done
[00:00:07] Mounting system devices for current-local
[00:00:07] Mounting ports/packages/distfiles
[00:00:07] Using packages from previously failed build: 
/usr/local/poudriere/data/packages/current-local/.building
[00:00:07] Mounting ccache from: /var/cache/ccache
[00:00:07] Mounting packages from: 
/usr/local/poudriere/data/packages/current-local
[00:00:07] Copying /var/db/ports from: 
/usr/local/etc/poudriere.d/current-local-options
[00:00:07] Appending to make.conf: /usr/local/etc/poudriere.d/current-make.conf
/etc/resolv.conf -> 
/usr/local/poudriere/data/.m/current-local/ref/etc/resolv.conf
[00:00:07] Starting jail current-local
Segmentation fault (core dumped)
[00:00:08] Cleaning up
[00:00:08] Unmounting file systems
$

$ lldb /usr/sbin/jail --core /tmp/jail.core
(lldb) target create "/usr/sbin/jail" --core "/tmp/jail.core"
Core file '/tmp/jail.core' (x86_64) was loaded.

(lldb) bt all
* thread #1, name = 'jail', stop reason = signal SIGSEGV
  * frame #0: 0x0020c3fb jail`add_param(j=0x000800a09000, 
p=, ipnum=, value=) at config.c:399:16
frame #1: 0x00207e08 jail`main(argc=8, argv=0x7fffe8f0) at 
jail.c:0
frame #2: 0x00206e10 jail`_start(ap=, 
cleanup=) at crt1_c.c:75:7
(lldb) 

This works fine when I back out this change.

Roman Bogorodskiy


signature.asc
Description: PGP signature


svn commit: r364809 - head/share/mk

2020-08-26 Thread Alex Richardson
Author: arichardson
Date: Wed Aug 26 10:21:38 2020
New Revision: 364809
URL: https://svnweb.freebsd.org/changeset/base/364809

Log:
  Avoid recomputing COMPILER_/LINKER_ variables when set explicitly
  
  I noticed that when we build libraries for a different ABI (in CheriBSD) we
  were calling ${XCC}/${LD} --version for every directory. It turns out that
  this was caused by bsd.compat.mk explicitly setting (X_)COMPILER variables
  for that build stage and this stops the _can_export logic from working.
  To fix this, we change the check to only set _can_export=no if the variable
  is set and it is set to a different value than the cached value.
  This noticeably speeds up the tree walk while building compat libraries.
  During an upstream amd64 buildworld this also removes 8 --version calls.
  
  Obtained from:CheriBSD
  Reviewed By:  brooks, emaste
  Differential Revision: https://reviews.freebsd.org/D25986

Modified:
  head/share/mk/bsd.compiler.mk
  head/share/mk/bsd.linker.mk

Modified: head/share/mk/bsd.compiler.mk
==
--- head/share/mk/bsd.compiler.mk   Wed Aug 26 09:19:49 2020
(r364808)
+++ head/share/mk/bsd.compiler.mk   Wed Aug 26 10:21:38 2020
(r364809)
@@ -146,10 +146,13 @@ _exported_vars=   ${X_}COMPILER_TYPE ${X_}COMPILER_VERSI
${X_}COMPILER_FREEBSD_VERSION ${X_}COMPILER_RESOURCE_DIR
 ${X_}_cc_hash= ${${cc}}${MACHINE}${PATH}
 ${X_}_cc_hash:=${${X_}_cc_hash:hash}
-# Only import if none of the vars are set somehow else.
+# Only import if none of the vars are set differently somehow else.
 _can_export=   yes
 .for var in ${_exported_vars}
-.if defined(${var})
+.if defined(${var}) && (!defined(${var}__${${X_}_cc_hash}) || 
${${var}__${${X_}_cc_hash}} != ${${var}})
+.if defined(${var}__${${X_}_ld_hash})
+.info "Cannot import ${X_}COMPILER variables since cached ${var} is different: 
${${var}__${${X_}_cc_hash}} != ${${var}}"
+.endif
 _can_export=   no
 .endif
 .endfor

Modified: head/share/mk/bsd.linker.mk
==
--- head/share/mk/bsd.linker.mk Wed Aug 26 09:19:49 2020(r364808)
+++ head/share/mk/bsd.linker.mk Wed Aug 26 10:21:38 2020(r364809)
@@ -41,10 +41,13 @@ _exported_vars= ${X_}LINKER_TYPE ${X_}LINKER_VERSION $
${X_}LINKER_FREEBSD_VERSION
 ${X_}_ld_hash= ${${ld}}${MACHINE}${PATH}
 ${X_}_ld_hash:=${${X_}_ld_hash:hash}
-# Only import if none of the vars are set somehow else.
+# Only import if none of the vars are set differently somehow else.
 _can_export=   yes
 .for var in ${_exported_vars}
-.if defined(${var})
+.if defined(${var}) && (!defined(${var}__${${X_}_ld_hash}) || 
${${var}__${${X_}_ld_hash}} != ${${var}})
+.if defined(${var}__${${X_}_ld_hash})
+.info "Cannot import ${X_}LINKER variables since cached ${var} is different: 
${${var}__${${X_}_ld_hash}} != ${${var}}"
+.endif
 _can_export=   no
 .endif
 .endfor
___
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: r364808 - head/lib

2020-08-26 Thread Alex Richardson
Author: arichardson
Date: Wed Aug 26 09:19:49 2020
New Revision: 364808
URL: https://svnweb.freebsd.org/changeset/base/364808

Log:
  Move libsqlite3 to the top of the SUBDIR list
  
  In parallel builds, this should allow sqlite to start building earlier and
  increase parallelism when building lib/. Looking at htop output during
  buildworld/tinderbox, there are long phases where only one CPU is active
  optimizing the massive sqlite3.c file since the build of libsqlite3 is
  started quite late.
  
  Reviewed By:  emaste
  Differential Revision: https://reviews.freebsd.org/D26169

Modified:
  head/lib/Makefile

Modified: head/lib/Makefile
==
--- head/lib/Makefile   Wed Aug 26 09:19:44 2020(r364807)
+++ head/lib/Makefile   Wed Aug 26 09:19:49 2020(r364808)
@@ -23,9 +23,12 @@ SUBDIR_BOOTSTRAP= \
msun
 
 # The main list; please keep these sorted alphabetically.
+# The only exception is sqlite3: we place it at the start of the list since it
+# takes a long time to build and starting it first improves parallelism.
 
 SUBDIR=${SUBDIR_BOOTSTRAP} \
.WAIT \
+   libsqlite3 \
geom \
libalias \
libarchive \
@@ -84,7 +87,6 @@ SUBDIR=   ${SUBDIR_BOOTSTRAP} \
librtld_db \
libsbuf \
libsmb \
-   libsqlite3 \
libstdbuf \
libstdthreads \
libsysdecode \
___
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: r364807 - in head: share/mk sys/conf

2020-08-26 Thread Alex Richardson
Author: arichardson
Date: Wed Aug 26 09:19:44 2020
New Revision: 364807
URL: https://svnweb.freebsd.org/changeset/base/364807

Log:
  Fix builds that set LD=ld.lld after r364761
  
  When using relative paths for the linker we have to transform the name
  since clang does not like -fuse-ld=ld.lld and instead requires -fuse-ld=lld
  (the same also applies for ld.bfd).

Modified:
  head/share/mk/bsd.sys.mk
  head/sys/conf/kern.mk

Modified: head/share/mk/bsd.sys.mk
==
--- head/share/mk/bsd.sys.mkWed Aug 26 07:29:17 2020(r364806)
+++ head/share/mk/bsd.sys.mkWed Aug 26 09:19:44 2020(r364807)
@@ -289,7 +289,8 @@ CFLAGS+=ERROR-tried-to-rebuild-during-make-install
 # Add -fuse-ld=${LD} if $LD is in a different directory or not called "ld".
 # Note: Clang 12+ will prefer --ld-path= over -fuse-ld=.
 .if ${COMPILER_TYPE} == "clang"
-LDFLAGS+=  -fuse-ld=${LD:[1]}
+# Note: Clang does not like relative paths in -fuse-ld so we map ld.lld -> lld.
+LDFLAGS+=  -fuse-ld=${LD:[1]:S/^ld.//1W}
 .else
 # GCC does not support an absolute path for -fuse-ld so we just print this
 # warning instead and let the user add the required symlinks.

Modified: head/sys/conf/kern.mk
==
--- head/sys/conf/kern.mk   Wed Aug 26 07:29:17 2020(r364806)
+++ head/sys/conf/kern.mk   Wed Aug 26 09:19:44 2020(r364807)
@@ -278,7 +278,8 @@ CFLAGS+=-std=${CSTD}
 # Note: unlike bsd.sys.mk we can't use LDFLAGS here since that is used for the
 # flags required when linking the kernel. We don't need those flags when
 # building the vdsos. However, we do need -fuse-ld, so use ${CCLDFLAGS} 
instead.
-CCLDFLAGS+=-fuse-ld=${LD:[1]}
+# Note: Clang does not like relative paths in -fuse-ld so we map ld.lld -> lld.
+CCLDFLAGS+=-fuse-ld=${LD:[1]:S/^ld.//1W}
 .else
 # GCC does not support an absolute path for -fuse-ld so we just print this
 # warning instead and let the user add the required symlinks.
___
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: r364806 - in head/sys/contrib/openzfs: include/os/freebsd/spl/sys module/os/freebsd/spl

2020-08-26 Thread Toomas Soome
Author: tsoome
Date: Wed Aug 26 07:29:17 2020
New Revision: 364806
URL: https://svnweb.freebsd.org/changeset/base/364806

Log:
  remove pragma ident lines
  
  The #pragma ident is historical relict and not needed any more, this
  pragma is actually unknown for common compilers and is only causing
  trouble.

Modified:
  head/sys/contrib/openzfs/include/os/freebsd/spl/sys/acl_impl.h
  head/sys/contrib/openzfs/include/os/freebsd/spl/sys/cmn_err.h
  head/sys/contrib/openzfs/include/os/freebsd/spl/sys/extdirent.h
  head/sys/contrib/openzfs/include/os/freebsd/spl/sys/list.h
  head/sys/contrib/openzfs/include/os/freebsd/spl/sys/list_impl.h
  head/sys/contrib/openzfs/include/os/freebsd/spl/sys/zmod.h
  head/sys/contrib/openzfs/module/os/freebsd/spl/list.c

Modified: head/sys/contrib/openzfs/include/os/freebsd/spl/sys/acl_impl.h
==
--- head/sys/contrib/openzfs/include/os/freebsd/spl/sys/acl_impl.h  Wed Aug 
26 07:00:07 2020(r364805)
+++ head/sys/contrib/openzfs/include/os/freebsd/spl/sys/acl_impl.h  Wed Aug 
26 07:29:17 2020(r364806)
@@ -26,8 +26,6 @@
 #ifndef _SYS_ACL_IMPL_H
 #define_SYS_ACL_IMPL_H
 
-#pragma ident  "%Z%%M% %I% %E% SMI"
-
 #ifdef __cplusplus
 extern "C" {
 #endif

Modified: head/sys/contrib/openzfs/include/os/freebsd/spl/sys/cmn_err.h
==
--- head/sys/contrib/openzfs/include/os/freebsd/spl/sys/cmn_err.h   Wed Aug 
26 07:00:07 2020(r364805)
+++ head/sys/contrib/openzfs/include/os/freebsd/spl/sys/cmn_err.h   Wed Aug 
26 07:29:17 2020(r364806)
@@ -31,8 +31,6 @@
 #ifndef _SYS_CMN_ERR_H
 #define_SYS_CMN_ERR_H
 
-#pragma ident  "%Z%%M% %I% %E% SMI"
-
 #if !defined(_ASM)
 #include 
 #endif

Modified: head/sys/contrib/openzfs/include/os/freebsd/spl/sys/extdirent.h
==
--- head/sys/contrib/openzfs/include/os/freebsd/spl/sys/extdirent.h Wed Aug 
26 07:00:07 2020(r364805)
+++ head/sys/contrib/openzfs/include/os/freebsd/spl/sys/extdirent.h Wed Aug 
26 07:29:17 2020(r364806)
@@ -26,8 +26,6 @@
 #ifndef _SYS_EXTDIRENT_H
 #define_SYS_EXTDIRENT_H
 
-#pragma ident  "%Z%%M% %I% %E% SMI"
-
 #ifdef __cplusplus
 extern "C" {
 #endif

Modified: head/sys/contrib/openzfs/include/os/freebsd/spl/sys/list.h
==
--- head/sys/contrib/openzfs/include/os/freebsd/spl/sys/list.h  Wed Aug 26 
07:00:07 2020(r364805)
+++ head/sys/contrib/openzfs/include/os/freebsd/spl/sys/list.h  Wed Aug 26 
07:29:17 2020(r364806)
@@ -26,8 +26,6 @@
 #ifndef_SYS_LIST_H
 #define_SYS_LIST_H
 
-#pragma ident  "%Z%%M% %I% %E% SMI"
-
 #include 
 
 #ifdef __cplusplus

Modified: head/sys/contrib/openzfs/include/os/freebsd/spl/sys/list_impl.h
==
--- head/sys/contrib/openzfs/include/os/freebsd/spl/sys/list_impl.h Wed Aug 
26 07:00:07 2020(r364805)
+++ head/sys/contrib/openzfs/include/os/freebsd/spl/sys/list_impl.h Wed Aug 
26 07:29:17 2020(r364806)
@@ -27,8 +27,6 @@
 #ifndef_SYS_LIST_IMPL_H
 #define_SYS_LIST_IMPL_H
 
-#pragma ident  "%Z%%M% %I% %E% SMI"
-
 #include 
 
 #ifdef __cplusplus

Modified: head/sys/contrib/openzfs/include/os/freebsd/spl/sys/zmod.h
==
--- head/sys/contrib/openzfs/include/os/freebsd/spl/sys/zmod.h  Wed Aug 26 
07:00:07 2020(r364805)
+++ head/sys/contrib/openzfs/include/os/freebsd/spl/sys/zmod.h  Wed Aug 26 
07:29:17 2020(r364806)
@@ -27,8 +27,6 @@
 #ifndef_ZMOD_H
 #define_ZMOD_H
 
-#pragma ident  "%Z%%M% %I% %E% SMI"
-
 #ifdef __cplusplus
 extern "C" {
 #endif

Modified: head/sys/contrib/openzfs/module/os/freebsd/spl/list.c
==
--- head/sys/contrib/openzfs/module/os/freebsd/spl/list.c   Wed Aug 26 
07:00:07 2020(r364805)
+++ head/sys/contrib/openzfs/module/os/freebsd/spl/list.c   Wed Aug 26 
07:29:17 2020(r364806)
@@ -23,8 +23,6 @@
  * Use is subject to license terms.
  */
 
-#pragma ident  "%Z%%M% %I% %E% SMI"
-
 /*
  * Generic doubly-linked list implementation
  */
___
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: r364805 - head/sys/cddl/contrib/opensolaris/uts/common/fs

2020-08-26 Thread Toomas Soome
Author: tsoome
Date: Wed Aug 26 07:00:07 2020
New Revision: 364805
URL: https://svnweb.freebsd.org/changeset/base/364805

Log:
  remove left over empty directory
  
  364746 did leave empty directory around.

Deleted:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/
___
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"