svn commit: r362938 - head/sys/dev/cxgbe

2020-07-04 Thread Navdeep Parhar
Author: np
Date: Sun Jul  5 05:14:33 2020
New Revision: 362938
URL: https://svnweb.freebsd.org/changeset/base/362938

Log:
  cxgbe(4): Fix a bug (introduced in r362905) where some tx traffic wasn't
  being reported to BPF.

Modified:
  head/sys/dev/cxgbe/t4_sge.c

Modified: head/sys/dev/cxgbe/t4_sge.c
==
--- head/sys/dev/cxgbe/t4_sge.c Sun Jul  5 00:19:08 2020(r362937)
+++ head/sys/dev/cxgbe/t4_sge.c Sun Jul  5 05:14:33 2020(r362938)
@@ -3013,6 +3013,7 @@ eth_tx(struct mp_ring *r, u_int cidx, u_int pidx, bool
if (avail < n)
break;  /* out of descriptors */
}
+   ETHER_BPF_MTAP(ifp, m0);
if (sc->flags & IS_VF)
n = write_txpkt_vm_wr(sc, txq, m0);
else
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r362937 - head/sbin/newfs_msdos

2020-07-04 Thread Xin LI
Author: delphij
Date: Sun Jul  5 00:19:08 2020
New Revision: 362937
URL: https://svnweb.freebsd.org/changeset/base/362937

Log:
  Use KERN_MAXPHYS.
  
  Suggested by: imp
  Reviewed by:  imp, cem (earlier version), emaste
  MFC after:2 weeks
  Differential Revision:https://reviews.freebsd.org/D25563

Modified:
  head/sbin/newfs_msdos/mkfs_msdos.c

Modified: head/sbin/newfs_msdos/mkfs_msdos.c
==
--- head/sbin/newfs_msdos/mkfs_msdos.c  Sat Jul  4 18:37:04 2020
(r362936)
+++ head/sbin/newfs_msdos/mkfs_msdos.c  Sun Jul  5 00:19:08 2020
(r362937)
@@ -41,8 +41,10 @@ static const char rcsid[] =
 #include 
 #endif
 #include 
+#include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -78,25 +80,6 @@ static const char rcsid[] =
 #defineMAXCLS16  0xfff4U   /* maximum FAT16 clusters */
 #defineMAXCLS32  0xff4U/* maximum FAT32 clusters */
 
-#ifndefCTASSERT
-#defineCTASSERT(x) _CTASSERT(x, __LINE__)
-#define_CTASSERT(x, y) __CTASSERT(x, y)
-#define__CTASSERT(x, y)typedef char __assert_ ## y [(x) ? 1 : 
-1]
-#endif
-
-/*
- * For better performance, we want to write larger chunks instead of
- * individual sectors (the size can only be 512, 1024, 2048 or 4096
- * bytes). Assert that MAXPHYS can always hold an integer number of
- * sectors by asserting that both are power of two numbers and the
- * MAXPHYS is greater than MAXBPS.
- */
-CTASSERT(powerof2(MAXPHYS));
-CTASSERT(powerof2(MAXBPS));
-CTASSERT(MAXPHYS > MAXBPS);
-
-const static ssize_t chunksize = MAXPHYS;
-
 #definemincls(fat)  ((fat) == 12 ? MINCLS12 :  \
  (fat) == 16 ? MINCLS16 :  \
MINCLS32)
@@ -240,6 +223,7 @@ static volatile sig_atomic_t got_siginfo;
 static void infohandler(int);
 
 static int check_mounted(const char *, mode_t);
+static ssize_t getchunksize(void);
 static int getstdfmt(const char *, struct bpb *);
 static int getdiskinfo(int, const char *, const char *, int, struct bpb *);
 static void print_bpb(struct bpb *);
@@ -272,6 +256,7 @@ mkfs_msdos(const char *fname, const char *dtype, const
 bool set_res, set_spf, set_spc;
 int fd, fd1, rv;
 struct msdos_options o = *op;
+ssize_t chunksize;
 
 physbuf = NULL;
 rv = -1;
@@ -640,6 +625,7 @@ mkfs_msdos(const char *fname, const char *dtype, const
tm = localtime();
}
 
+   chunksize = getchunksize();
physbuf = malloc(chunksize);
if (physbuf == NULL) {
warn(NULL);
@@ -848,6 +834,47 @@ check_mounted(const char *fname, mode_t mode)
 }
 #endif
 return 0;
+}
+
+/*
+ * Get optimal I/O size
+ */
+static ssize_t
+getchunksize(void)
+{
+   static int chunksize;
+
+   if (chunksize != 0)
+   return ((ssize_t)chunksize);
+
+#ifdef KERN_MAXPHYS
+   int mib[2];
+   size_t len;
+
+   mib[0] = CTL_KERN;
+   mib[1] = KERN_MAXPHYS;
+   len = sizeof(chunksize);
+
+   if (sysctl(mib, 2, , , NULL, 0) == -1) {
+   warn("sysctl: KERN_MAXPHYS, using %zu", (size_t)MAXPHYS);
+   chunksize = 0;
+   }
+#endif
+   if (chunksize == 0)
+   chunksize = MAXPHYS;
+
+   /*
+* For better performance, we want to write larger chunks instead of
+* individual sectors (the size can only be 512, 1024, 2048 or 4096
+* bytes). Assert that chunksize can always hold an integer number of
+* sectors by asserting that both are power of two numbers and the
+* chunksize is greater than MAXBPS.
+*/
+   static_assert(powerof2(MAXBPS), "MAXBPS is not power of 2");
+   assert(powerof2(chunksize));
+   assert(chunksize > MAXBPS);
+
+   return ((ssize_t)chunksize);
 }
 
 /*
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r362736 - head/sys/arm64/rockchip

2020-07-04 Thread Peter Jeremy
On 2020-Jul-02 17:26:23 -0700, Oleksandr Tymoshenko  wrote:
>Could you try kernel with this patch? It's mostly debug output,
>with one possible clock-related fix.
>
>https://people.freebsd.org/~gonzo/patches/rk3328-gmac-debug.patch

It's still not working for me.  I get the following:
dwc0:  mem 0xff54-0xff54 irq 44 
on ofwbus0
setting RK3328 RX/TX delays:  24/36
>>> RK3328_GRF_MAC_CON1 (0413):
>>> gmac2io_gmii_clk_sel: 0x0
>>> gmac2io_rmii_extclk_sel: 0x1
>>> gmac2io_rmii_mode: 0x0
>>> gmac2io_rmii_clk_sel: 0x0
>>> gmac2io_phy_intf_sel: 0x1
>>> gmac2io_flowctrl: 0x0
>>> gmac2io_rxclk_dly_ena: 0x1
>>> gmac2io_txclk_dly_ena: 0x1
>>> RK3328_GRF_MAC_CON0 (0c24):
miibus0:  on dwc0
rgephy0:  PHY 0 on miibus0
rgephy0: OUI 0x00e04c, model 0x0011, rev. 6
rgephy0:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 
1000baseT-FDX-master, auto

>I have Rock64 v2, which, as you mentioned, has a known issue with GigE, so
>my tests are not reliable. I'll try to get another RK3328 board for tests,
>but it may take some time.

I've asked on -arm if anyone else has tried this on a Rock64 v2 or v3.

>If the clock fix doesn't help, I'll make
>delays configuration run-time configurable with off by default until
>more hardware is tested.

That sounds like a good way forward - maybe boot and run-time configurable.
It's a pity that there doesn't seem to be any documentation on what the
numbers represent (or what the "default" value is) - which means that
actually adjusting the delay numbers would be very time consuming.

-- 
Peter Jeremy


signature.asc
Description: PGP signature


Re: svn commit: r362936 - head/sbin/newfs_msdos

2020-07-04 Thread Xin Li via svn-src-all


On 7/4/20 12:01 PM, Conrad Meyer wrote:
> Hi Xin Li,
> 
> Maybe we can use C11 static_assert instead of the CTASSERT array mechanism?

Good point, maybe https://reviews.freebsd.org/D25562 ?



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r362936 - head/sbin/newfs_msdos

2020-07-04 Thread Conrad Meyer
Hi Xin Li,

Maybe we can use C11 static_assert instead of the CTASSERT array mechanism?

Best,
Conrad

On Sat, Jul 4, 2020 at 11:37 Xin LI  wrote:

> Author: delphij
> Date: Sat Jul  4 18:37:04 2020
> New Revision: 362936
> URL: https://svnweb.freebsd.org/changeset/base/362936
>
> Log:
>   Gather writes to larger chunks (MAXPHYS) instead of issuing them in
>   sectors.
>
>   On my SanDisk Cruzer Blade 16GB USB stick this made formatting much
> faster:
>
>   x before
>   + after
>
> +--+
>   |+
>|
>   |+
> x  |
>   |+
> x x|
>   |A
> MA||
>
> +--+
>   N   Min   MaxMedian   Avg
> Stddev
>   x   3 15.89 16.3816 16.09
>  0.2570992
>   +   3  0.32  0.37  0.350.3467
>  0.025166115
>   Difference at 95.0% confidence
> -15.7433 +/- 0.414029
> -97.8455% +/- 0.25668%
> (Student's t, pooled s = 0.182665)
>
>   Reviewed by:  emaste
>   MFC after:2 weeks
>   Differential Revision:https://reviews.freebsd.org/D24508
>
> Modified:
>   head/sbin/newfs_msdos/mkfs_msdos.c
>
> Modified: head/sbin/newfs_msdos/mkfs_msdos.c
>
> ==
> --- head/sbin/newfs_msdos/mkfs_msdos.c  Sat Jul  4 18:01:29 2020
> (r362935)
> +++ head/sbin/newfs_msdos/mkfs_msdos.c  Sat Jul  4 18:37:04 2020
> (r362936)
> @@ -64,6 +64,7 @@ static const char rcsid[] =
>
>  #defineDOSMAGIC  0xaa55/* DOS magic number */
>  #defineMINBPS512   /* minimum bytes per sector */
> +#defineMAXBPS4096  /* maximum bytes per sector */
>  #defineMAXSPC128   /* maximum sectors per cluster */
>  #defineMAXNFT16/* maximum number of FATs */
>  #defineDEFBLK4096  /* default block size */
> @@ -77,6 +78,25 @@ static const char rcsid[] =
>  #defineMAXCLS16  0xfff4U   /* maximum FAT16 clusters */
>  #defineMAXCLS32  0xff4U/* maximum FAT32 clusters */
>
> +#ifndefCTASSERT
> +#defineCTASSERT(x) _CTASSERT(x, __LINE__)
> +#define_CTASSERT(x, y) __CTASSERT(x, y)
> +#define__CTASSERT(x, y)typedef char __assert_ ## y [(x) ?
> 1 : -1]
> +#endif
> +
> +/*
> + * For better performance, we want to write larger chunks instead of
> + * individual sectors (the size can only be 512, 1024, 2048 or 4096
> + * bytes). Assert that MAXPHYS can always hold an integer number of
> + * sectors by asserting that both are power of two numbers and the
> + * MAXPHYS is greater than MAXBPS.
> + */
> +CTASSERT(powerof2(MAXPHYS));
> +CTASSERT(powerof2(MAXBPS));
> +CTASSERT(MAXPHYS > MAXBPS);
> +
> +const static ssize_t chunksize = MAXPHYS;
> +
>  #definemincls(fat)  ((fat) == 12 ? MINCLS12 :  \
>   (fat) == 16 ? MINCLS16 :  \
> MINCLS32)
> @@ -243,6 +263,7 @@ mkfs_msdos(const char *fname, const char *dtype, const
>  struct bsx *bsx;
>  struct de *de;
>  u_int8_t *img;
> +u_int8_t *physbuf, *physbuf_end;
>  const char *bname;
>  ssize_t n;
>  time_t now;
> @@ -252,7 +273,7 @@ mkfs_msdos(const char *fname, const char *dtype, const
>  int fd, fd1, rv;
>  struct msdos_options o = *op;
>
> -img = NULL;
> +physbuf = NULL;
>  rv = -1;
>  fd = fd1 = -1;
>
> @@ -343,15 +364,13 @@ mkfs_msdos(const char *fname, const char *dtype,
> const
> bpb.bpbSecPerClust = 64;/* otherwise 32k */
> }
>  }
> -if (!powerof2(bpb.bpbBytesPerSec)) {
> -   warnx("bytes/sector (%u) is not a power of 2", bpb.bpbBytesPerSec);
> +if (bpb.bpbBytesPerSec < MINBPS ||
> +bpb.bpbBytesPerSec > MAXBPS ||
> +   !powerof2(bpb.bpbBytesPerSec)) {
> +   warnx("Invalid bytes/sector (%u): must be 512, 1024, 2048 or 4096",
> +   bpb.bpbBytesPerSec);
> goto done;
>  }
> -if (bpb.bpbBytesPerSec < MINBPS) {
> -   warnx("bytes/sector (%u) is too small; minimum is %u",
> -bpb.bpbBytesPerSec, MINBPS);
> -   goto done;
> -}
>
>  if (o.volume_label && !oklabel(o.volume_label)) {
> warnx("%s: bad volume label", o.volume_label);
> @@ -621,11 +640,14 @@ mkfs_msdos(const char *fname, const char *dtype,
> const
> tm = localtime();
> }
>
> -
> -   if (!(img = malloc(bpb.bpbBytesPerSec))) {
> +   physbuf = malloc(chunksize);
> +   if (physbuf == NULL) {
> warn(NULL);
> goto done;
> }
> +   physbuf_end = physbuf + chunksize;
> +   img = physbuf;
> +
> dir = bpb.bpbResSectors + (bpb.bpbFATsecs ? bpb.bpbFATsecs :
>bpb.bpbBigFATsecs) * bpb.bpbFATs;
> 

svn commit: r362936 - head/sbin/newfs_msdos

2020-07-04 Thread Xin LI
Author: delphij
Date: Sat Jul  4 18:37:04 2020
New Revision: 362936
URL: https://svnweb.freebsd.org/changeset/base/362936

Log:
  Gather writes to larger chunks (MAXPHYS) instead of issuing them in
  sectors.
  
  On my SanDisk Cruzer Blade 16GB USB stick this made formatting much faster:
  
  x before
  + after
  +--+
  |+ |
  |+  x  |
  |+  x x|
  |A  MA||
  +--+
  N   Min   MaxMedian   AvgStddev
  x   3 15.89 16.3816 16.09 0.2570992
  +   3  0.32  0.37  0.350.3467   0.025166115
  Difference at 95.0% confidence
-15.7433 +/- 0.414029
-97.8455% +/- 0.25668%
(Student's t, pooled s = 0.182665)
  
  Reviewed by:  emaste
  MFC after:2 weeks
  Differential Revision:https://reviews.freebsd.org/D24508

Modified:
  head/sbin/newfs_msdos/mkfs_msdos.c

Modified: head/sbin/newfs_msdos/mkfs_msdos.c
==
--- head/sbin/newfs_msdos/mkfs_msdos.c  Sat Jul  4 18:01:29 2020
(r362935)
+++ head/sbin/newfs_msdos/mkfs_msdos.c  Sat Jul  4 18:37:04 2020
(r362936)
@@ -64,6 +64,7 @@ static const char rcsid[] =
 
 #defineDOSMAGIC  0xaa55/* DOS magic number */
 #defineMINBPS512   /* minimum bytes per sector */
+#defineMAXBPS4096  /* maximum bytes per sector */
 #defineMAXSPC128   /* maximum sectors per cluster */
 #defineMAXNFT16/* maximum number of FATs */
 #defineDEFBLK4096  /* default block size */
@@ -77,6 +78,25 @@ static const char rcsid[] =
 #defineMAXCLS16  0xfff4U   /* maximum FAT16 clusters */
 #defineMAXCLS32  0xff4U/* maximum FAT32 clusters */
 
+#ifndefCTASSERT
+#defineCTASSERT(x) _CTASSERT(x, __LINE__)
+#define_CTASSERT(x, y) __CTASSERT(x, y)
+#define__CTASSERT(x, y)typedef char __assert_ ## y [(x) ? 1 : 
-1]
+#endif
+
+/*
+ * For better performance, we want to write larger chunks instead of
+ * individual sectors (the size can only be 512, 1024, 2048 or 4096
+ * bytes). Assert that MAXPHYS can always hold an integer number of
+ * sectors by asserting that both are power of two numbers and the
+ * MAXPHYS is greater than MAXBPS.
+ */
+CTASSERT(powerof2(MAXPHYS));
+CTASSERT(powerof2(MAXBPS));
+CTASSERT(MAXPHYS > MAXBPS);
+
+const static ssize_t chunksize = MAXPHYS;
+
 #definemincls(fat)  ((fat) == 12 ? MINCLS12 :  \
  (fat) == 16 ? MINCLS16 :  \
MINCLS32)
@@ -243,6 +263,7 @@ mkfs_msdos(const char *fname, const char *dtype, const
 struct bsx *bsx;
 struct de *de;
 u_int8_t *img;
+u_int8_t *physbuf, *physbuf_end;
 const char *bname;
 ssize_t n;
 time_t now;
@@ -252,7 +273,7 @@ mkfs_msdos(const char *fname, const char *dtype, const
 int fd, fd1, rv;
 struct msdos_options o = *op;
 
-img = NULL;
+physbuf = NULL;
 rv = -1;
 fd = fd1 = -1;
 
@@ -343,15 +364,13 @@ mkfs_msdos(const char *fname, const char *dtype, const
bpb.bpbSecPerClust = 64;/* otherwise 32k */
}
 }
-if (!powerof2(bpb.bpbBytesPerSec)) {
-   warnx("bytes/sector (%u) is not a power of 2", bpb.bpbBytesPerSec);
+if (bpb.bpbBytesPerSec < MINBPS ||
+bpb.bpbBytesPerSec > MAXBPS ||
+   !powerof2(bpb.bpbBytesPerSec)) {
+   warnx("Invalid bytes/sector (%u): must be 512, 1024, 2048 or 4096",
+   bpb.bpbBytesPerSec);
goto done;
 }
-if (bpb.bpbBytesPerSec < MINBPS) {
-   warnx("bytes/sector (%u) is too small; minimum is %u",
-bpb.bpbBytesPerSec, MINBPS);
-   goto done;
-}
 
 if (o.volume_label && !oklabel(o.volume_label)) {
warnx("%s: bad volume label", o.volume_label);
@@ -621,11 +640,14 @@ mkfs_msdos(const char *fname, const char *dtype, const
tm = localtime();
}
 
-
-   if (!(img = malloc(bpb.bpbBytesPerSec))) {
+   physbuf = malloc(chunksize);
+   if (physbuf == NULL) {
warn(NULL);
goto done;
}
+   physbuf_end = physbuf + chunksize;
+   img = physbuf;
+
dir = bpb.bpbResSectors + (bpb.bpbFATsecs ? bpb.bpbFATsecs :
   bpb.bpbBigFATsecs) * bpb.bpbFATs;
memset(_sa, 0, sizeof(si_sa));
@@ -750,19 +772,37 @@ mkfs_msdos(const char *fname, const char *dtype, const
 

svn commit: r362935 - in head: libexec/rc/rc.d share/man/man4

2020-07-04 Thread Edward Tomasz Napierala
Author: trasz
Date: Sat Jul  4 18:01:29 2020
New Revision: 362935
URL: https://svnweb.freebsd.org/changeset/base/362935

Log:
  Make the linux rc script use linrdlnk by default.
  
  This fixes Linux gettyname(3), with caveats (see PR).
  
  PR:   kern/240767
  MFC after:2 weeks
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D25558

Modified:
  head/libexec/rc/rc.d/linux
  head/share/man/man4/linux.4

Modified: head/libexec/rc/rc.d/linux
==
--- head/libexec/rc/rc.d/linux  Sat Jul  4 15:20:23 2020(r362934)
+++ head/libexec/rc/rc.d/linux  Sat Jul  4 18:01:29 2020(r362935)
@@ -51,7 +51,7 @@ linux_start()
mount -o nocover -t linprocfs linprocfs "${_emul_path}/proc"
mount -o nocover -t linsysfs linsysfs "${_emul_path}/sys"
mount -o nocover -t devfs devfs "${_emul_path}/dev"
-   mount -o nocover -t fdescfs fdescfs "${_emul_path}/dev/fd"
+   mount -o nocover,linrdlnk -t fdescfs fdescfs 
"${_emul_path}/dev/fd"
mount -o nocover,mode=1777 -t tmpfs tmpfs 
"${_emul_path}/dev/shm"
fi
 }

Modified: head/share/man/man4/linux.4
==
--- head/share/man/man4/linux.4 Sat Jul  4 15:20:23 2020(r362934)
+++ head/share/man/man4/linux.4 Sat Jul  4 18:01:29 2020(r362935)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd June 12, 2020
+.Dd July 4, 2020
 .Dt LINUX 4
 .Os
 .Sh NAME
@@ -130,7 +130,9 @@ Defaults to 0.
 .It Pa /compat/linux
 minimal Linux run-time environment
 .It Pa /compat/linux/dev/fd
-file-descriptor file system, see
+file descriptor file system mounted with the
+.Cm linrdlnk
+option, see
 .Xr fdescfs 5
 .It Pa /compat/linux/dev/shm
 in-memory file system, see
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r362934 - in stable/11: etc share/man/man5

2020-07-04 Thread Eugene Grosbein
Author: eugen
Date: Sat Jul  4 15:20:23 2020
New Revision: 362934
URL: https://svnweb.freebsd.org/changeset/base/362934

Log:
  MFC r362502,r362503: network.subr, rc.conf: unobsolete gif_interfaces.
  
  There are cases when gif_interfaces cannot be replaced
  with cloned_interfaces, such as tunnels with external IPv6 addresses
  and internal IPv4 or vice versa. Such configuration requires
  extra invocation of ifconfig(8) and supported with gif_interfaces only.

Modified:
  stable/11/etc/network.subr
  stable/11/share/man/man5/rc.conf.5
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/etc/network.subr
==
--- stable/11/etc/network.subr  Sat Jul  4 15:16:48 2020(r362933)
+++ stable/11/etc/network.subr  Sat Jul  4 15:20:23 2020(r362934)
@@ -1379,9 +1379,6 @@ clone_up()
fi
esac
done
-   if [ -n "$gif_interfaces" ]; then
-   warn "\$gif_interfaces is obsolete.  Use \$cloned_interfaces 
instead."
-   fi
for ifn in ${gif_interfaces}; do
# Parse ifn:ifopt.
OIFS=$IFS; IFS=:; set -- $ifn; ifn=$1; ifopt=$2; IFS=$OIFS

Modified: stable/11/share/man/man5/rc.conf.5
==
--- stable/11/share/man/man5/rc.conf.5  Sat Jul  4 15:16:48 2020
(r362933)
+++ stable/11/share/man/man5/rc.conf.5  Sat Jul  4 15:20:23 2020
(r362934)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd June 8, 2020
+.Dd June 23, 2020
 .Dt RC.CONF 5
 .Os
 .Sh NAME
@@ -1842,46 +1842,35 @@ Even if this variable is specified to
 .Dq :nosticky
 keyword can be used to override it on per interface basis.
 .It Va gif_interfaces
-.Pq Vt str
-This variable is deprecated in favor of
-.Va cloned_interfaces .
 Set to the list of
 .Xr gif 4
 tunnel interfaces to configure on this host.
-For each
-.Xr gif
-tunnel interface, set a variable named
-.Va ifconfig_ Ns Aq Ar interface
-with the parameters for the
-.Xr ifconfig 8
-command to configure the link level for
-.Ar interface
-with the
-.Cm tunnel
-option.
+A
+.Va gifconfig_ Ns Aq Ar interface
+variable is assumed to exist for each value of
+.Ar interface .
 The value of this variable is used to configure the link layer of the
 tunnel using the
 .Cm tunnel
 option to
 .Xr ifconfig .
+Additionally, this option ensures that each listed interface is created
+via the
+.Cm create
+option to
+.Xr ifconfig
+before attempting to configure it.
+.Pp
 For example, configure two
 .Xr gif
 interfaces with:
-.Bd -literal -offset indent
+.Bd -literal
 gif_interfaces="gif0 gif1"
-ifconfig_gif0="tunnel src_addr0 dst_addr0"
-ifconfig_gif1="tunnel src_addr1 dst_addr1"
+gifconfig_gif0="100.64.0.1 100.64.0.2"
+ifconfig_gif0="inet 10.0.0.1 10.0.0.2 netmask 255.255.255.252"
+gifconfig_gif1="inet6 2a00::1 2a01::1"
+ifconfig_gif1="inet 10.1.0.1 10.1.0.2 netmask 255.255.255.252"
 .Ed
-.Pp
-Additionally, this option ensures that each listed interface is created
-via the
-.Cm create
-option to
-.Xr ifconfig .
-This example also works with
-.Va cloned_interfaces
-instead of
-.Va gif_interfaces .
 .It Va sppp_interfaces
 .Pq Vt str
 Set to the list of
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r362933 - in stable/12: libexec/rc share/man/man5

2020-07-04 Thread Eugene Grosbein
Author: eugen
Date: Sat Jul  4 15:16:48 2020
New Revision: 362933
URL: https://svnweb.freebsd.org/changeset/base/362933

Log:
  MFC r362502,r362503: network.subr, rc.conf: unobsolete gif_interfaces.
  
  There are cases when gif_interfaces cannot be replaced
  with cloned_interfaces, such as tunnels with external IPv6 addresses
  and internal IPv4 or vice versa. Such configuration requires
  extra invocation of ifconfig(8) and supported with gif_interfaces only.

Modified:
  stable/12/libexec/rc/network.subr
  stable/12/share/man/man5/rc.conf.5
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/libexec/rc/network.subr
==
--- stable/12/libexec/rc/network.subr   Sat Jul  4 14:20:03 2020
(r362932)
+++ stable/12/libexec/rc/network.subr   Sat Jul  4 15:16:48 2020
(r362933)
@@ -1364,9 +1364,6 @@ clone_up()
fi
esac
done
-   if [ -n "$gif_interfaces" ]; then
-   warn "\$gif_interfaces is obsolete.  Use \$cloned_interfaces 
instead."
-   fi
for ifn in ${gif_interfaces}; do
# Parse ifn:ifopt.
OIFS=$IFS; IFS=:; set -- $ifn; ifn=$1; ifopt=$2; IFS=$OIFS

Modified: stable/12/share/man/man5/rc.conf.5
==
--- stable/12/share/man/man5/rc.conf.5  Sat Jul  4 14:20:03 2020
(r362932)
+++ stable/12/share/man/man5/rc.conf.5  Sat Jul  4 15:16:48 2020
(r362933)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd June 8, 2020
+.Dd June 23, 2020
 .Dt RC.CONF 5
 .Os
 .Sh NAME
@@ -1845,46 +1845,35 @@ Even if this variable is specified to
 .Dq :nosticky
 keyword can be used to override it on per interface basis.
 .It Va gif_interfaces
-.Pq Vt str
-This variable is deprecated in favor of
-.Va cloned_interfaces .
 Set to the list of
 .Xr gif 4
 tunnel interfaces to configure on this host.
-For each
-.Xr gif
-tunnel interface, set a variable named
-.Va ifconfig_ Ns Aq Ar interface
-with the parameters for the
-.Xr ifconfig 8
-command to configure the link level for
-.Ar interface
-with the
-.Cm tunnel
-option.
+A
+.Va gifconfig_ Ns Aq Ar interface
+variable is assumed to exist for each value of
+.Ar interface .
 The value of this variable is used to configure the link layer of the
 tunnel using the
 .Cm tunnel
 option to
 .Xr ifconfig .
+Additionally, this option ensures that each listed interface is created
+via the
+.Cm create
+option to
+.Xr ifconfig
+before attempting to configure it.
+.Pp
 For example, configure two
 .Xr gif
 interfaces with:
-.Bd -literal -offset indent
+.Bd -literal
 gif_interfaces="gif0 gif1"
-ifconfig_gif0="tunnel src_addr0 dst_addr0"
-ifconfig_gif1="tunnel src_addr1 dst_addr1"
+gifconfig_gif0="100.64.0.1 100.64.0.2"
+ifconfig_gif0="inet 10.0.0.1 10.0.0.2 netmask 255.255.255.252"
+gifconfig_gif1="inet6 2a00::1 2a01::1"
+ifconfig_gif1="inet 10.1.0.1 10.1.0.2 netmask 255.255.255.252"
 .Ed
-.Pp
-Additionally, this option ensures that each listed interface is created
-via the
-.Cm create
-option to
-.Xr ifconfig .
-This example also works with
-.Va cloned_interfaces
-instead of
-.Va gif_interfaces .
 .It Va sppp_interfaces
 .Pq Vt str
 Set to the list of
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r362932 - head/sys/dev/ixl

2020-07-04 Thread Pawel Biernacki
Author: kaktus
Date: Sat Jul  4 14:20:03 2020
New Revision: 362932
URL: https://svnweb.freebsd.org/changeset/base/362932

Log:
  dev.ixl..debug: mark as MPSAFE
  
  This node provides no handler, it's implicitly MPSAFE.
  
  Reviewed by:  erj
  Sponsored by: Mysterious Code Ltd.
  Differential Revision:https://reviews.freebsd.org/D25408

Modified:
  head/sys/dev/ixl/if_iavf.c

Modified: head/sys/dev/ixl/if_iavf.c
==
--- head/sys/dev/ixl/if_iavf.c  Sat Jul  4 13:32:57 2020(r362931)
+++ head/sys/dev/ixl/if_iavf.c  Sat Jul  4 14:20:03 2020(r362932)
@@ -2090,7 +2090,7 @@ iavf_add_device_sysctls(struct iavf_sc *sc)
/* Add sysctls meant to print debug information, but don't list them
 * in "sysctl -a" output. */
debug_node = SYSCTL_ADD_NODE(ctx, ctx_list,
-   OID_AUTO, "debug", CTLFLAG_RD | CTLFLAG_SKIP | CTLFLAG_NEEDGIANT,
+   OID_AUTO, "debug", CTLFLAG_RD | CTLFLAG_SKIP | CTLFLAG_MPSAFE,
NULL, "Debug Sysctls");
debug_list = SYSCTL_CHILDREN(debug_node);
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r362931 - svnadmin/conf

2020-07-04 Thread Konstantin Belousov
Author: kib
Date: Sat Jul  4 13:32:57 2020
New Revision: 362931
URL: https://svnweb.freebsd.org/changeset/base/362931

Log:
  Finish kaktus' mentorship.
  
  Discussed with: mjg
  Approved by:  core (implicit)

Modified:
  svnadmin/conf/mentors

Modified: svnadmin/conf/mentors
==
--- svnadmin/conf/mentors   Sat Jul  4 11:26:03 2020(r362930)
+++ svnadmin/conf/mentors   Sat Jul  4 13:32:57 2020(r362931)
@@ -18,7 +18,6 @@ jceel trasz
 jkhrwatson
 jrtc27 brooks  Co-mentor: jhb
 kadesaiken Co-mentor: scottl, ambrisko
-kaktus kib Co-mentor: mjg
 mjoras rstone
 nick   philip  Co-mentor: kp
 ramken Co-mentor: mav
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r362930 - head/sys/compat/linprocfs

2020-07-04 Thread Edward Tomasz Napierala
Author: trasz
Date: Sat Jul  4 11:26:03 2020
New Revision: 362930
URL: https://svnweb.freebsd.org/changeset/base/362930

Log:
  Add /proc/sys/kernel/tainted to linprocfs(5).  Helps LTP.
  
  MFC after:2 weeks
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D25556

Modified:
  head/sys/compat/linprocfs/linprocfs.c

Modified: head/sys/compat/linprocfs/linprocfs.c
==
--- head/sys/compat/linprocfs/linprocfs.c   Sat Jul  4 11:22:35 2020
(r362929)
+++ head/sys/compat/linprocfs/linprocfs.c   Sat Jul  4 11:26:03 2020
(r362930)
@@ -1414,6 +1414,17 @@ linprocfs_dosem(PFS_FILL_ARGS)
 }
 
 /*
+ * Filler function for proc/sys/kernel/tainted
+ */
+static int
+linprocfs_dotainted(PFS_FILL_ARGS)
+{
+
+   sbuf_printf(sb, "0\n");
+   return (0);
+}
+
+/*
  * Filler function for proc/sys/vm/min_free_kbytes
  *
  * This mirrors the approach in illumos to return zero for reads. Effectively,
@@ -1814,6 +1825,8 @@ linprocfs_init(PFS_INIT_ARGS)
pfs_create_file(dir, "pid_max", _dopid_max,
NULL, NULL, NULL, PFS_RD);
pfs_create_file(dir, "sem", _dosem,
+   NULL, NULL, NULL, PFS_RD);
+   pfs_create_file(dir, "tainted", _dotainted,
NULL, NULL, NULL, PFS_RD);
 
/* /proc/sys/kernel/random/... */
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r362929 - in head/sys/compat: linprocfs linsysfs

2020-07-04 Thread Edward Tomasz Napierala
Author: trasz
Date: Sat Jul  4 11:22:35 2020
New Revision: 362929
URL: https://svnweb.freebsd.org/changeset/base/362929

Log:
  Make linprocfs(5) create /proc/bus/pci/devices/, and linsysfs(5)
  create /sys/class/power_supply/.  This silences some warnings
  from biology/linux-foldingathome.
  
  Reported by:  0mp
  MFC after:2 weeks
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D25557

Modified:
  head/sys/compat/linprocfs/linprocfs.c
  head/sys/compat/linsysfs/linsysfs.c

Modified: head/sys/compat/linprocfs/linprocfs.c
==
--- head/sys/compat/linprocfs/linprocfs.c   Sat Jul  4 09:18:19 2020
(r362928)
+++ head/sys/compat/linprocfs/linprocfs.c   Sat Jul  4 11:22:35 2020
(r362929)
@@ -1746,6 +1746,11 @@ linprocfs_init(PFS_INIT_ARGS)
pfs_create_file(root, "version", _doversion,
NULL, NULL, NULL, PFS_RD);
 
+   /* /proc/bus/... */
+   dir = pfs_create_dir(root, "bus", NULL, NULL, NULL, 0);
+   dir = pfs_create_dir(dir, "pci", NULL, NULL, NULL, 0);
+   dir = pfs_create_dir(dir, "devices", NULL, NULL, NULL, 0);
+
/* /proc/net/... */
dir = pfs_create_dir(root, "net", NULL, NULL, NULL, 0);
pfs_create_file(dir, "dev", _donetdev,

Modified: head/sys/compat/linsysfs/linsysfs.c
==
--- head/sys/compat/linsysfs/linsysfs.c Sat Jul  4 09:18:19 2020
(r362928)
+++ head/sys/compat/linsysfs/linsysfs.c Sat Jul  4 11:22:35 2020
(r362929)
@@ -622,6 +622,7 @@ linsysfs_init(PFS_INIT_ARGS)
struct pfs_node *pci;
struct pfs_node *scsi;
struct pfs_node *net;
+   struct pfs_node *power_supply;
struct pfs_node *devdir, *chardev;
devclass_t devclass;
device_t dev;
@@ -634,6 +635,7 @@ linsysfs_init(PFS_INIT_ARGS)
class = pfs_create_dir(root, "class", NULL, NULL, NULL, 0);
scsi = pfs_create_dir(class, "scsi_host", NULL, NULL, NULL, 0);
drm = pfs_create_dir(class, "drm", NULL, NULL, NULL, 0);
+   power_supply = pfs_create_dir(class, "power_supply", NULL, NULL, NULL, 
0);
 
/* /sys/class/net/.. */
net = pfs_create_dir(class, "net", NULL, NULL, NULL, 0);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r362928 - in stable/12: share/man/man4 sys/dev/rtwn/usb sys/dev/usb

2020-07-04 Thread Li-Wen Hsu
Author: lwhsu
Date: Sat Jul  4 09:18:19 2020
New Revision: 362928
URL: https://svnweb.freebsd.org/changeset/base/362928

Log:
  MFC r362672:
  
  rtwn: Add a USB ID for Buffalo WI-U2-433DHP
  
  PR:   247573
  Submitted by: HATANO Tomomi 

Modified:
  stable/12/share/man/man4/rtwn_usb.4
  stable/12/sys/dev/rtwn/usb/rtwn_usb_attach.h
  stable/12/sys/dev/usb/usbdevs
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/share/man/man4/rtwn_usb.4
==
--- stable/12/share/man/man4/rtwn_usb.4 Sat Jul  4 08:36:06 2020
(r362927)
+++ stable/12/share/man/man4/rtwn_usb.4 Sat Jul  4 09:18:19 2020
(r362928)
@@ -29,7 +29,7 @@
 .\"
 .\" $FreeBSD$
 .\"/
-.Dd May 12, 2020
+.Dd June 27, 2020
 .Dt RTWN_USB 4
 .Os
 .Sh NAME
@@ -67,6 +67,7 @@ based USB wireless network adapters, including:
 .It "ASUS USB-N10 NANO" Ta RTL8188CUS Ta USB 2.0
 .It "Asus USB-N13, rev. B1" Ta RTL8192CU Ta USB 2.0
 .It "Belkin F7D1102 Surf Wireless Micro" Ta RTL8188CUS Ta USB 2.0
+.It "Buffalo WI-U2-433DHP" Ta RTL8821AU Ta USB 2.0
 .It "Buffalo WI-U2-433DM" Ta RTL8821AU Ta USB 2.0
 .It "Buffalo WI-U3-866D" Ta RTL8812AU Ta USB 3.0
 .It "D-Link DWA-123 rev D1" Ta RTL8188EU Ta USB 2.0

Modified: stable/12/sys/dev/rtwn/usb/rtwn_usb_attach.h
==
--- stable/12/sys/dev/rtwn/usb/rtwn_usb_attach.hSat Jul  4 08:36:06 
2020(r362927)
+++ stable/12/sys/dev/rtwn/usb/rtwn_usb_attach.hSat Jul  4 09:18:19 
2020(r362928)
@@ -158,6 +158,7 @@ static const STRUCT_USB_HOST_ID rtwn_devs[] = {
RTWN_RTL8821AU_DEV(EDIMAX,  EW7811UTC_2),
RTWN_RTL8821AU_DEV(HAWKING, HD65U),
RTWN_RTL8821AU_DEV(MELCO,   WIU2433DM),
+   RTWN_RTL8821AU_DEV(MELCO,   WIU2433DHP),
RTWN_RTL8821AU_DEV(NETGEAR, A6100),
RTWN_RTL8821AU_DEV(REALTEK, RTL8821AU_1),
RTWN_RTL8821AU_DEV(REALTEK, RTL8821AU_2),

Modified: stable/12/sys/dev/usb/usbdevs
==
--- stable/12/sys/dev/usb/usbdevs   Sat Jul  4 08:36:06 2020
(r362927)
+++ stable/12/sys/dev/usb/usbdevs   Sat Jul  4 09:18:19 2020
(r362928)
@@ -3190,6 +3190,7 @@ product MELCO WLIUCG300HPV1   0x01a8  WLI-UC-G300HP-V1
 product MELCO WLIUCGNM20x01ee  WLI-UC-GNM2
 product MELCO WIU2433DM0x0242  WI-U2-433DM
 product MELCO WIU3866D 0x025d  WI-U3-866D
+product MELCO WIU2433DHP   0x029b  WI-U2-433DHP
 
 /* Merlin products */
 product MERLIN V620 0x1110  Merlin V620
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r362927 - stable/11/sys/amd64/amd64

2020-07-04 Thread Konstantin Belousov
Author: kib
Date: Sat Jul  4 08:36:06 2020
New Revision: 362927
URL: https://svnweb.freebsd.org/changeset/base/362927

Log:
  MFC r362706:
  amd64 pmap: explain ptepindex.

Modified:
  stable/11/sys/amd64/amd64/pmap.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/amd64/amd64/pmap.c
==
--- stable/11/sys/amd64/amd64/pmap.cSat Jul  4 08:34:43 2020
(r362926)
+++ stable/11/sys/amd64/amd64/pmap.cSat Jul  4 08:36:06 2020
(r362927)
@@ -2754,6 +2754,29 @@ pmap_pinit(pmap_t pmap)
  * one or two pages may be held during the wait, only to be released
  * afterwards.  This conservative approach is easily argued to avoid
  * race conditions.
+ *
+ * The ptepindexes, i.e. page indices, of the page table pages encountered
+ * while translating virtual address va are defined as follows:
+ * - for the page table page (last level),
+ *  ptepindex = pmap_pde_pindex(va) = va >> PDRSHIFT,
+ *   in other words, it is just the index of the PDE that maps the page
+ *   table page.
+ * - for the page directory page,
+ *  ptepindex = NUPDE (number of userland PD entries) +
+ *  (pmap_pde_index(va) >> NPDEPGSHIFT)
+ *   i.e. index of PDPE is put after the last index of PDE,
+ * - for the page directory pointer page,
+ *  ptepindex = NUPDE + NUPDPE + (pmap_pde_index(va) >> (NPDEPGSHIFT +
+ *  NPML4EPGSHIFT),
+ *   i.e. index of pml4e is put after the last index of PDPE.
+ *
+ * Define an order on the paging entries, where all entries of the
+ * same height are put together, then heights are put from deepest to
+ * root.  Then ptexpindex is the sequential number of the
+ * corresponding paging entry in this order.
+ *
+ * The root page at PML4 does not participate in this indexing scheme, since
+ * it is statically allocated by pmap_pinit() and not by _pmap_allocpte().
  */
 static vm_page_t
 _pmap_allocpte(pmap_t pmap, vm_pindex_t ptepindex, struct rwlock **lockp)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r362926 - stable/12/sys/amd64/amd64

2020-07-04 Thread Konstantin Belousov
Author: kib
Date: Sat Jul  4 08:34:43 2020
New Revision: 362926
URL: https://svnweb.freebsd.org/changeset/base/362926

Log:
  MFC r362706:
  amd64 pmap: explain ptepindex.

Modified:
  stable/12/sys/amd64/amd64/pmap.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/amd64/amd64/pmap.c
==
--- stable/12/sys/amd64/amd64/pmap.cSat Jul  4 07:04:56 2020
(r362925)
+++ stable/12/sys/amd64/amd64/pmap.cSat Jul  4 08:34:43 2020
(r362926)
@@ -3618,6 +3618,29 @@ pmap_pinit(pmap_t pmap)
  * one or two pages may be held during the wait, only to be released
  * afterwards.  This conservative approach is easily argued to avoid
  * race conditions.
+ *
+ * The ptepindexes, i.e. page indices, of the page table pages encountered
+ * while translating virtual address va are defined as follows:
+ * - for the page table page (last level),
+ *  ptepindex = pmap_pde_pindex(va) = va >> PDRSHIFT,
+ *   in other words, it is just the index of the PDE that maps the page
+ *   table page.
+ * - for the page directory page,
+ *  ptepindex = NUPDE (number of userland PD entries) +
+ *  (pmap_pde_index(va) >> NPDEPGSHIFT)
+ *   i.e. index of PDPE is put after the last index of PDE,
+ * - for the page directory pointer page,
+ *  ptepindex = NUPDE + NUPDPE + (pmap_pde_index(va) >> (NPDEPGSHIFT +
+ *  NPML4EPGSHIFT),
+ *   i.e. index of pml4e is put after the last index of PDPE.
+ *
+ * Define an order on the paging entries, where all entries of the
+ * same height are put together, then heights are put from deepest to
+ * root.  Then ptexpindex is the sequential number of the
+ * corresponding paging entry in this order.
+ *
+ * The root page at PML4 does not participate in this indexing scheme, since
+ * it is statically allocated by pmap_pinit() and not by _pmap_allocpte().
  */
 static vm_page_t
 _pmap_allocpte(pmap_t pmap, vm_pindex_t ptepindex, struct rwlock **lockp)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r362925 - in stable: 11/share/ctypedef 12/share/ctypedef

2020-07-04 Thread Hiroki Sato
Author: hrs
Date: Sat Jul  4 07:04:56 2020
New Revision: 362925
URL: https://svnweb.freebsd.org/changeset/base/362925

Log:
  MFC r362770:
  
  Fix CTYPE for ja_JP.eucJP and ja_JP.SJIS.
  
  PR:   163168

Modified:
  stable/11/share/ctypedef/ja_JP.eucJP.src
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/12/share/ctypedef/ja_JP.eucJP.src
Directory Properties:
  stable/12/   (props changed)

Modified: stable/11/share/ctypedef/ja_JP.eucJP.src
==
--- stable/11/share/ctypedef/ja_JP.eucJP.srcSat Jul  4 06:34:55 2020
(r362924)
+++ stable/11/share/ctypedef/ja_JP.eucJP.srcSat Jul  4 07:04:56 2020
(r362925)
@@ -49,7 +49,6 @@ upper ;/
;/
;/
;/
-   ;/
;/
;/
;/
@@ -73,7 +72,6 @@ upper ;/
;/
;/
;/
-   ;/
;/
;/
;/
@@ -85,7 +83,6 @@ upper ;/
;/
;/
;/
-   ;/
;/
;/
;/
@@ -101,7 +98,6 @@ upper;/
;/
;/
;/
-   ;/
;/
;/
;/
@@ -126,45 +122,6 @@ upper  ;/
;/
;/
;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
;/
;/
;/
@@ -173,292 +130,86 @@ upper;/
;/
;/
;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
- 

svn commit: r362925 - in stable: 11/share/ctypedef 12/share/ctypedef

2020-07-04 Thread Hiroki Sato
Author: hrs
Date: Sat Jul  4 07:04:56 2020
New Revision: 362925
URL: https://svnweb.freebsd.org/changeset/base/362925

Log:
  MFC r362770:
  
  Fix CTYPE for ja_JP.eucJP and ja_JP.SJIS.
  
  PR:   163168

Modified:
  stable/12/share/ctypedef/ja_JP.eucJP.src
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/share/ctypedef/ja_JP.eucJP.src
Directory Properties:
  stable/11/   (props changed)

Modified: stable/12/share/ctypedef/ja_JP.eucJP.src
==
--- stable/12/share/ctypedef/ja_JP.eucJP.srcSat Jul  4 06:34:55 2020
(r362924)
+++ stable/12/share/ctypedef/ja_JP.eucJP.srcSat Jul  4 07:04:56 2020
(r362925)
@@ -49,7 +49,6 @@ upper ;/
;/
;/
;/
-   ;/
;/
;/
;/
@@ -73,7 +72,6 @@ upper ;/
;/
;/
;/
-   ;/
;/
;/
;/
@@ -85,7 +83,6 @@ upper ;/
;/
;/
;/
-   ;/
;/
;/
;/
@@ -101,7 +98,6 @@ upper;/
;/
;/
;/
-   ;/
;/
;/
;/
@@ -126,45 +122,6 @@ upper  ;/
;/
;/
;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
;/
;/
;/
@@ -173,293 +130,86 @@ upper;/
;/
;/
;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
- 

svn commit: r362924 - stable/12/bin/ps

2020-07-04 Thread Piotr Pawel Stefaniak
Author: pstef
Date: Sat Jul  4 06:34:55 2020
New Revision: 362924
URL: https://svnweb.freebsd.org/changeset/base/362924

Log:
  MFC r362705 and r362707:
  ps(1): reuse keyword "cpu" to show CPU number
  ps(1): don't try to handle non-SMP systems

Modified:
  stable/12/bin/ps/extern.h
  stable/12/bin/ps/keyword.c
  stable/12/bin/ps/print.c
  stable/12/bin/ps/ps.1
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/bin/ps/extern.h
==
--- stable/12/bin/ps/extern.h   Sat Jul  4 06:27:28 2020(r362923)
+++ stable/12/bin/ps/extern.h   Sat Jul  4 06:34:55 2020(r362924)
@@ -48,6 +48,7 @@ __BEGIN_DECLS
 char*arguments(KINFO *, VARENT *);
 char*command(KINFO *, VARENT *);
 char*cputime(KINFO *, VARENT *);
+char*cpunum(KINFO *, VARENT *);
 int donlist(void);
 char*elapsed(KINFO *, VARENT *);
 char*elapseds(KINFO *, VARENT *);

Modified: stable/12/bin/ps/keyword.c
==
--- stable/12/bin/ps/keyword.c  Sat Jul  4 06:27:28 2020(r362923)
+++ stable/12/bin/ps/keyword.c  Sat Jul  4 06:34:55 2020(r362924)
@@ -83,8 +83,7 @@ static VAR var[] = {
CHAR, NULL, 0},
{"cow", "COW", NULL, "copy-on-write-faults", 0, kvar, KOFF(ki_cow),
UINT, "u", 0},
-   {"cpu", "CPU", NULL, "cpu-usage", 0, kvar, KOFF(ki_estcpu), UINT, "d",
-   0},
+   {"cpu", "C", NULL, "on-cpu", 0, cpunum, 0, CHAR, NULL, 0},
{"cputime", "", "time", NULL, 0, NULL, 0, CHAR, NULL, 0},
{"dsiz", "DSIZ", NULL, "data-size", 0, kvar, KOFF(ki_dsize), PGTOK,
"ld", 0},

Modified: stable/12/bin/ps/print.c
==
--- stable/12/bin/ps/print.cSat Jul  4 06:27:28 2020(r362923)
+++ stable/12/bin/ps/print.cSat Jul  4 06:34:55 2020(r362924)
@@ -551,6 +551,19 @@ cputime(KINFO *k, VARENT *ve)
 }
 
 char *
+cpunum(KINFO *k, VARENT *ve __unused)
+{
+   char *cpu;
+
+   if (k->ki_p->ki_stat == SRUN && k->ki_p->ki_oncpu != NOCPU) {
+   asprintf(, "%d", k->ki_p->ki_oncpu);
+   } else {
+   asprintf(, "%d", k->ki_p->ki_lastcpu);
+   }
+   return (cpu);
+}
+
+char *
 systime(KINFO *k, VARENT *ve)
 {
long secs, psecs;

Modified: stable/12/bin/ps/ps.1
==
--- stable/12/bin/ps/ps.1   Sat Jul  4 06:27:28 2020(r362923)
+++ stable/12/bin/ps/ps.1   Sat Jul  4 06:34:55 2020(r362924)
@@ -29,7 +29,7 @@
 .\" @(#)ps.1   8.3 (Berkeley) 4/18/94
 .\" $FreeBSD$
 .\"
-.Dd October 31, 2018
+.Dd June 27, 2020
 .Dt PS 1
 .Os
 .Sh NAME
@@ -545,7 +545,8 @@ command and arguments
 .It Cm cow
 number of copy-on-write faults
 .It Cm cpu
-short-term CPU usage factor (for scheduling)
+The processor number on which the process is executing (visible only on SMP
+systems).
 .It Cm dsiz
 data size (in Kbytes)
 .It Cm emul
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r362923 - head/sys/fs/devfs

2020-07-04 Thread Mateusz Guzik
Author: mjg
Date: Sat Jul  4 06:27:28 2020
New Revision: 362923
URL: https://svnweb.freebsd.org/changeset/base/362923

Log:
  devfs: fix a vnode use-after-free in devfs_ioctl
  
  The vnode to be replaced was read with a shared lock, meaning 2 racing threads
  can find the same one.
  
  While here clean it up a little bit.

Modified:
  head/sys/fs/devfs/devfs_vnops.c

Modified: head/sys/fs/devfs/devfs_vnops.c
==
--- head/sys/fs/devfs/devfs_vnops.c Sat Jul  4 06:25:41 2020
(r362922)
+++ head/sys/fs/devfs/devfs_vnops.c Sat Jul  4 06:27:28 2020
(r362923)
@@ -787,6 +787,7 @@ devfs_ioctl(struct vop_ioctl_args *ap)
struct vnode *vpold, *vp;
struct cdevsw *dsw;
struct thread *td;
+   struct session *sess;
struct cdev *dev;
int error, ref, i;
const char *p;
@@ -836,18 +837,18 @@ devfs_ioctl(struct vop_ioctl_args *ap)
 * nothing left to do.
 */
sx_slock(_lock);
-   if (td->td_proc->p_session->s_ttyvp == vp ||
-   td->td_proc->p_session->s_ttyp == NULL) {
+   sess = td->td_proc->p_session;
+   if (sess->s_ttyvp == vp || sess->s_ttyp == NULL) {
sx_sunlock(_lock);
return (0);
}
 
-   vpold = td->td_proc->p_session->s_ttyvp;
-   VREF(vp);
-   SESS_LOCK(td->td_proc->p_session);
-   td->td_proc->p_session->s_ttyvp = vp;
-   td->td_proc->p_session->s_ttydp = cdev2priv(dev);
-   SESS_UNLOCK(td->td_proc->p_session);
+   vrefact(vp);
+   SESS_LOCK(sess);
+   vpold = sess->s_ttyvp;
+   sess->s_ttyvp = vp;
+   sess->s_ttydp = cdev2priv(dev);
+   SESS_UNLOCK(sess);
 
sx_sunlock(_lock);
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r362922 - head/sys/compat/linux

2020-07-04 Thread Mateusz Guzik
Author: mjg
Date: Sat Jul  4 06:25:41 2020
New Revision: 362922
URL: https://svnweb.freebsd.org/changeset/base/362922

Log:
  linux: fix ioctl performance for termios
  
  TCGETS et al are frequently issued by Linux binaries while the previous code
  avoidably ping-pongs a global sx lock and serializes on Giant.
  
  Note that even with the fix the common case will serialize on a per-tty lock.

Modified:
  head/sys/compat/linux/linux_ioctl.c

Modified: head/sys/compat/linux/linux_ioctl.c
==
--- head/sys/compat/linux/linux_ioctl.c Sat Jul  4 06:22:05 2020
(r362921)
+++ head/sys/compat/linux/linux_ioctl.c Sat Jul  4 06:25:41 2020
(r362922)
@@ -132,8 +132,6 @@ static struct linux_ioctl_handler socket_handler =
 { linux_ioctl_socket, LINUX_IOCTL_SOCKET_MIN, LINUX_IOCTL_SOCKET_MAX };
 static struct linux_ioctl_handler sound_handler =
 { linux_ioctl_sound, LINUX_IOCTL_SOUND_MIN, LINUX_IOCTL_SOUND_MAX };
-static struct linux_ioctl_handler termio_handler =
-{ linux_ioctl_termio, LINUX_IOCTL_TERMIO_MIN, LINUX_IOCTL_TERMIO_MAX };
 static struct linux_ioctl_handler private_handler =
 { linux_ioctl_private, LINUX_IOCTL_PRIVATE_MIN, LINUX_IOCTL_PRIVATE_MAX };
 static struct linux_ioctl_handler drm_handler =
@@ -156,7 +154,6 @@ DATA_SET(linux_ioctl_handler_set, hdio_handler);
 DATA_SET(linux_ioctl_handler_set, disk_handler);
 DATA_SET(linux_ioctl_handler_set, socket_handler);
 DATA_SET(linux_ioctl_handler_set, sound_handler);
-DATA_SET(linux_ioctl_handler_set, termio_handler);
 DATA_SET(linux_ioctl_handler_set, private_handler);
 DATA_SET(linux_ioctl_handler_set, drm_handler);
 DATA_SET(linux_ioctl_handler_set, sg_handler);
@@ -165,6 +162,14 @@ DATA_SET(linux_ioctl_handler_set, video2_handler);
 DATA_SET(linux_ioctl_handler_set, fbsd_usb);
 DATA_SET(linux_ioctl_handler_set, evdev_handler);
 
+/*
+ * Keep sorted by low.
+ */
+static struct linux_ioctl_handler linux_ioctls[] = {
+   { .func = linux_ioctl_termio, .low = LINUX_IOCTL_TERMIO_MIN,
+   .high = LINUX_IOCTL_TERMIO_MAX },
+};
+
 #ifdef __i386__
 static TAILQ_HEAD(, linux_ioctl_handler_element) linux_ioctl_handlers =
 TAILQ_HEAD_INITIALIZER(linux_ioctl_handlers);
@@ -3558,8 +3563,8 @@ linux_ioctl_evdev(struct thread *td, struct linux_ioct
  * main ioctl syscall function
  */
 
-int
-linux_ioctl(struct thread *td, struct linux_ioctl_args *args)
+static int
+linux_ioctl_fallback(struct thread *td, struct linux_ioctl_args *args)
 {
struct file *fp;
struct linux_ioctl_handler_element *he;
@@ -3618,6 +3623,35 @@ linux_ioctl(struct thread *td, struct linux_ioctl_args
}
 
return (EINVAL);
+}
+
+int
+linux_ioctl(struct thread *td, struct linux_ioctl_args *args)
+{
+   struct linux_ioctl_handler *handler;
+   int error, cmd, i;
+
+   cmd = args->cmd & 0x;
+
+   /*
+* array of ioctls known at compilation time. Elides a lot of work on
+* each call compared to the list variant. Everything frequently used
+* should be moved here.
+*
+* Arguably the magic creating the list should create an array instead.
+*
+* For now just a linear scan.
+*/
+   for (i = 0; i < nitems(linux_ioctls); i++) {
+   handler = _ioctls[i];
+   if (cmd >= handler->low && cmd <= handler->high) {
+   error = (*handler->func)(td, args);
+   if (error != ENOIOCTL) {
+   return (error);
+   }
+   }
+   }
+   return (linux_ioctl_fallback(td, args));
 }
 
 int
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r362921 - in head/sys: kern sys

2020-07-04 Thread Mateusz Guzik
Author: mjg
Date: Sat Jul  4 06:22:05 2020
New Revision: 362921
URL: https://svnweb.freebsd.org/changeset/base/362921

Log:
  Add char and short types to kcsan

Modified:
  head/sys/kern/subr_csan.c
  head/sys/sys/_cscan_atomic.h

Modified: head/sys/kern/subr_csan.c
==
--- head/sys/kern/subr_csan.c   Sat Jul  4 06:21:20 2020(r362920)
+++ head/sys/kern/subr_csan.c   Sat Jul  4 06:22:05 2020(r362921)
@@ -590,6 +590,38 @@ CSAN_ATOMIC_FUNC_TESTANDCLEAR(64, uint64_t)
 CSAN_ATOMIC_FUNC_TESTANDSET(64, uint64_t)
 #endif
 
+CSAN_ATOMIC_FUNC_ADD(char, uint8_t)
+CSAN_ATOMIC_FUNC_CLEAR(char, uint8_t)
+CSAN_ATOMIC_FUNC_CMPSET(char, uint8_t)
+CSAN_ATOMIC_FUNC_FCMPSET(char, uint8_t)
+CSAN_ATOMIC_FUNC_LOAD(char, uint8_t)
+CSAN_ATOMIC_FUNC_SET(char, uint8_t)
+CSAN_ATOMIC_FUNC_SUBTRACT(char, uint8_t)
+_CSAN_ATOMIC_FUNC_STORE(char, uint8_t)
+#if 0
+CSAN_ATOMIC_FUNC_FETCHADD(char, uint8_t)
+CSAN_ATOMIC_FUNC_READANDCLEAR(char, uint8_t)
+CSAN_ATOMIC_FUNC_SWAP(char, uint8_t)
+CSAN_ATOMIC_FUNC_TESTANDCLEAR(char, uint8_t)
+CSAN_ATOMIC_FUNC_TESTANDSET(char, uint8_t)
+#endif
+
+CSAN_ATOMIC_FUNC_ADD(short, uint16_t)
+CSAN_ATOMIC_FUNC_CLEAR(short, uint16_t)
+CSAN_ATOMIC_FUNC_CMPSET(short, uint16_t)
+CSAN_ATOMIC_FUNC_FCMPSET(short, uint16_t)
+CSAN_ATOMIC_FUNC_LOAD(short, uint16_t)
+CSAN_ATOMIC_FUNC_SET(short, uint16_t)
+CSAN_ATOMIC_FUNC_SUBTRACT(short, uint16_t)
+_CSAN_ATOMIC_FUNC_STORE(short, uint16_t)
+#if 0
+CSAN_ATOMIC_FUNC_FETCHADD(short, uint16_t)
+CSAN_ATOMIC_FUNC_READANDCLEAR(short, uint16_t)
+CSAN_ATOMIC_FUNC_SWAP(short, uint16_t)
+CSAN_ATOMIC_FUNC_TESTANDCLEAR(short, uint16_t)
+CSAN_ATOMIC_FUNC_TESTANDSET(short, uint16_t)
+#endif
+
 CSAN_ATOMIC_FUNC_ADD(int, u_int)
 CSAN_ATOMIC_FUNC_CLEAR(int, u_int)
 CSAN_ATOMIC_FUNC_CMPSET(int, u_int)

Modified: head/sys/sys/_cscan_atomic.h
==
--- head/sys/sys/_cscan_atomic.hSat Jul  4 06:21:20 2020
(r362920)
+++ head/sys/sys/_cscan_atomic.hSat Jul  4 06:22:05 2020
(r362921)
@@ -87,6 +87,8 @@
KCSAN_ATOMIC_TEST(testandclear, name, type);\
KCSAN_ATOMIC_TEST(testandset, name, type)
 
+KCSAN_ATOMIC_FUNCS(char, uint8_t);
+KCSAN_ATOMIC_FUNCS(short, uint16_t);
 KCSAN_ATOMIC_FUNCS(int, u_int);
 KCSAN_ATOMIC_FUNCS(long, u_long);
 KCSAN_ATOMIC_FUNCS(ptr, uintptr_t);
@@ -101,6 +103,62 @@ void   kcsan_atomic_thread_fence_rel(void);
 void   kcsan_atomic_thread_fence_seq_cst(void);
 
 #ifndef KCSAN_RUNTIME
+
+#defineatomic_add_char kcsan_atomic_add_char
+#defineatomic_add_acq_char kcsan_atomic_add_acq_char
+#defineatomic_add_rel_char kcsan_atomic_add_rel_char
+#defineatomic_clear_char   kcsan_atomic_clear_char
+#defineatomic_clear_acq_char   kcsan_atomic_clear_acq_char
+#defineatomic_clear_rel_char   kcsan_atomic_clear_rel_char
+#defineatomic_cmpset_char  kcsan_atomic_cmpset_char
+#defineatomic_cmpset_acq_char  kcsan_atomic_cmpset_acq_char
+#defineatomic_cmpset_rel_char  kcsan_atomic_cmpset_rel_char
+#defineatomic_fcmpset_char kcsan_atomic_fcmpset_char
+#defineatomic_fcmpset_acq_char kcsan_atomic_fcmpset_acq_char
+#defineatomic_fcmpset_rel_char kcsan_atomic_fcmpset_rel_char
+#defineatomic_fetchadd_charkcsan_atomic_fetchadd_char
+#defineatomic_load_charkcsan_atomic_load_char
+#defineatomic_load_acq_charkcsan_atomic_load_acq_char
+#defineatomic_readandclear_charkcsan_atomic_readandclear_char
+#defineatomic_set_char kcsan_atomic_set_char
+#defineatomic_set_acq_char kcsan_atomic_set_acq_char
+#defineatomic_set_rel_char kcsan_atomic_set_rel_char
+#defineatomic_subtract_charkcsan_atomic_subtract_char
+#defineatomic_subtract_acq_charkcsan_atomic_subtract_acq_char
+#defineatomic_subtract_rel_charkcsan_atomic_subtract_rel_char
+#defineatomic_store_char   kcsan_atomic_store_char
+#defineatomic_store_rel_char   kcsan_atomic_store_rel_char
+#defineatomic_swap_charkcsan_atomic_swap_char
+#defineatomic_testandclear_charkcsan_atomic_testandclear_char
+#defineatomic_testandset_char  kcsan_atomic_testandset_char
+
+#defineatomic_add_shortkcsan_atomic_add_short
+#defineatomic_add_acq_shortkcsan_atomic_add_acq_short
+#defineatomic_add_rel_shortkcsan_atomic_add_rel_short
+#defineatomic_clear_short  kcsan_atomic_clear_short
+#defineatomic_clear_acq_short  kcsan_atomic_clear_acq_short
+#define 

svn commit: r362920 - head/sys/security/audit

2020-07-04 Thread Mateusz Guzik
Author: mjg
Date: Sat Jul  4 06:21:20 2020
New Revision: 362920
URL: https://svnweb.freebsd.org/changeset/base/362920

Log:
  audit: provide AUDITING_TD for !AUDIT case

Modified:
  head/sys/security/audit/audit.h

Modified: head/sys/security/audit/audit.h
==
--- head/sys/security/audit/audit.h Sat Jul  4 03:30:19 2020
(r362919)
+++ head/sys/security/audit/audit.h Sat Jul  4 06:21:20 2020
(r362920)
@@ -468,6 +468,8 @@ void audit_thread_free(struct thread *td);
 #defineAUDIT_ARG_VNODE1(vp)
 #defineAUDIT_ARG_VNODE2(vp)
 
+#defineAUDITING_TD(td) 0
+
 #defineAUDIT_SYSCALL_ENTER(code, td)   0
 #defineAUDIT_SYSCALL_EXIT(error, td)
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"