svn commit: r359549 - stable/11/sys/conf

2020-04-01 Thread Konstantin Belousov
Author: kib
Date: Wed Apr  1 22:51:30 2020
New Revision: 359549
URL: https://svnweb.freebsd.org/changeset/base/359549

Log:
  MFC r359111:
  Add file for static compilation of mlx5.

Modified:
  stable/11/sys/conf/files
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/conf/files
==
--- stable/11/sys/conf/filesWed Apr  1 22:50:54 2020(r359548)
+++ stable/11/sys/conf/filesWed Apr  1 22:51:30 2020(r359549)
@@ -4568,6 +4568,8 @@ dev/mlx5/mlx5_core/mlx5_diagnostics.c 
optional mlx5 p
compile-with "${OFED_C}"
 dev/mlx5/mlx5_core/mlx5_eq.c   optional mlx5 pci   \
compile-with "${OFED_C}"
+dev/mlx5/mlx5_core/mlx5_eswitch.c  optional mlx5 pci   \
+   compile-with "${OFED_C}"
 dev/mlx5/mlx5_core/mlx5_fs_cmd.c   optional mlx5 pci   \
compile-with "${OFED_C}"
 dev/mlx5/mlx5_core/mlx5_fs_tree.c  optional mlx5 pci   \
___
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: r359508 - head/usr.bin/iscsictl

2020-04-01 Thread Edward Tomasz Napierala
Author: trasz
Date: Wed Apr  1 15:08:53 2020
New Revision: 359508
URL: https://svnweb.freebsd.org/changeset/base/359508

Log:
  Stop hardcoding WARNS in iscsictl(8).
  
  MFC after:2 weeks
  Sponsored by: DARPA

Modified:
  head/usr.bin/iscsictl/Makefile

Modified: head/usr.bin/iscsictl/Makefile
==
--- head/usr.bin/iscsictl/Makefile  Wed Apr  1 15:08:13 2020
(r359507)
+++ head/usr.bin/iscsictl/Makefile  Wed Apr  1 15:08:53 2020
(r359508)
@@ -13,7 +13,6 @@ YFLAGS+=  -v
 LFLAGS+=   -i
 CLEANFILES=y.tab.c y.tab.h y.output
 
-WARNS= 6
 NO_WMISSING_VARIABLE_DECLARATIONS=
 
 .include 
___
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: r359547 - in head/lib: libc/stdio libc/stdlib msun/man

2020-04-01 Thread Warner Losh
Author: imp
Date: Wed Apr  1 22:50:41 2020
New Revision: 359547
URL: https://svnweb.freebsd.org/changeset/base/359547

Log:
  Note some functions that appeared in First Edition Unix
  
  These functions first appeared in the First Edition of Unix (or earlier in the
  pdp-7 version). Just claim 1st Edition for all this. The pdp-7 code is too
  fragmented at this point to extend history that far back.

Modified:
  head/lib/libc/stdio/getwc.3
  head/lib/libc/stdlib/atof.3
  head/lib/libc/stdlib/atoi.3
  head/lib/msun/man/cos.3
  head/lib/msun/man/exp.3
  head/lib/msun/man/sin.3

Modified: head/lib/libc/stdio/getwc.3
==
--- head/lib/libc/stdio/getwc.3 Wed Apr  1 22:49:47 2020(r359546)
+++ head/lib/libc/stdio/getwc.3 Wed Apr  1 22:50:41 2020(r359547)
@@ -112,3 +112,10 @@ and
 functions
 conform to
 .St -isoC-99 .
+.Sh HISTORY
+A version of the
+.Fn getc
+and
+.Fn getw
+functions appeared in
+.At v1 .

Modified: head/lib/libc/stdlib/atof.3
==
--- head/lib/libc/stdlib/atof.3 Wed Apr  1 22:49:47 2020(r359546)
+++ head/lib/libc/stdlib/atof.3 Wed Apr  1 22:50:41 2020(r359547)
@@ -32,7 +32,7 @@
 .\" @(#)atof.3 8.1 (Berkeley) 6/4/93
 .\" $FreeBSD$
 .\"
-.Dd June 4, 1993
+.Dd April 1, 2020
 .Dt ATOF 3
 .Os
 .Sh NAME
@@ -93,3 +93,8 @@ function conforms to
 .St -isoC ,
 and
 .St -isoC-99 .
+.Sh HISTORY
+The
+.Fn atof
+function appeared in
+.At v1 .

Modified: head/lib/libc/stdlib/atoi.3
==
--- head/lib/libc/stdlib/atoi.3 Wed Apr  1 22:49:47 2020(r359546)
+++ head/lib/libc/stdlib/atoi.3 Wed Apr  1 22:50:41 2020(r359547)
@@ -32,7 +32,7 @@
 .\" @(#)atoi.3 8.1 (Berkeley) 6/4/93
 .\" $FreeBSD$
 .\"
-.Dd June 13, 2018
+.Dd April 1, 2020
 .Dt ATOI 3
 .Os
 .Sh NAME
@@ -85,3 +85,8 @@ function conforms to
 .St -isoC ,
 and
 .St -isoC-99 .
+.Sh HISTORY
+The
+.Fn atoi
+function appeared in
+.At v1 .

Modified: head/lib/msun/man/cos.3
==
--- head/lib/msun/man/cos.3 Wed Apr  1 22:49:47 2020(r359546)
+++ head/lib/msun/man/cos.3 Wed Apr  1 22:50:41 2020(r359547)
@@ -28,7 +28,7 @@
 .\" from: @(#)cos.35.1 (Berkeley) 5/2/91
 .\" $FreeBSD$
 .\"
-.Dd January 24, 2008
+.Dd April 1, 2020
 .Dt COS 3
 .Os
 .Sh NAME
@@ -81,3 +81,8 @@ functions return the cosine value.
 .Sh STANDARDS
 These functions conform to
 .St -isoC-99 .
+.Sh HISTORY
+The
+.Fn sin
+function first appeared in
+.At v1 .

Modified: head/lib/msun/man/exp.3
==
--- head/lib/msun/man/exp.3 Wed Apr  1 22:49:47 2020(r359546)
+++ head/lib/msun/man/exp.3 Wed Apr  1 22:50:41 2020(r359547)
@@ -28,7 +28,7 @@
 .\" from: @(#)exp.36.12 (Berkeley) 7/31/91
 .\" $FreeBSD$
 .\"
-.Dd December 8, 2017
+.Dd April 1, 2020
 .Dt EXP 3
 .Os
 .Sh NAME
@@ -190,3 +190,8 @@ and infinite x, i.e., independently of x.
 .Sh STANDARDS
 These functions conform to
 .St -isoC-99 .
+.Sh HISTORY
+The
+.Fn exp
+function appeared in
+.At v1 .

Modified: head/lib/msun/man/sin.3
==
--- head/lib/msun/man/sin.3 Wed Apr  1 22:49:47 2020(r359546)
+++ head/lib/msun/man/sin.3 Wed Apr  1 22:50:41 2020(r359547)
@@ -29,7 +29,7 @@
 .\" from: @(#)sin.36.7 (Berkeley) 4/19/91
 .\" $FreeBSD$
 .\"
-.Dd January 24, 2008
+.Dd April 1, 2020
 .Dt SIN 3
 .Os
 .Sh NAME
@@ -80,3 +80,8 @@ functions return the sine value.
 .Sh STANDARDS
 These functions conform to
 .St -isoC-99 .
+.Sh HISTORY
+The
+.Fn sin
+function first appeared in
+.At v1 .
___
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: r359542 - in stable/11/sys/dev/mlx5: . mlx5_core mlx5_en

2020-04-01 Thread Konstantin Belousov
Author: kib
Date: Wed Apr  1 22:45:33 2020
New Revision: 359542
URL: https://svnweb.freebsd.org/changeset/base/359542

Log:
  MFC r359101:
  mlx5: Integrate eswitch and mpfs management code.

Modified:
  stable/11/sys/dev/mlx5/mlx5_core/mlx5_eswitch.c
  stable/11/sys/dev/mlx5/mlx5_core/mlx5_mpfs.c
  stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c
  stable/11/sys/dev/mlx5/mpfs.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_eswitch.c
==
--- stable/11/sys/dev/mlx5/mlx5_core/mlx5_eswitch.c Wed Apr  1 22:44:26 
2020(r359541)
+++ stable/11/sys/dev/mlx5/mlx5_core/mlx5_eswitch.c Wed Apr  1 22:45:33 
2020(r359542)
@@ -30,6 +30,7 @@
 #include 
 #include 
 #include 
+#include 
 #include "mlx5_core.h"
 #include "eswitch.h"
 
@@ -212,81 +213,6 @@ static int modify_esw_vport_cvlan(struct mlx5_core_dev
return modify_esw_vport_context_cmd(dev, vport, in, sizeof(in));
 }
 
-/* HW L2 Table (MPFS) management */
-static int set_l2_table_entry_cmd(struct mlx5_core_dev *dev, u32 index,
- u8 *mac, u8 vlan_valid, u16 vlan)
-{
-   u32 in[MLX5_ST_SZ_DW(set_l2_table_entry_in)] = {0};
-   u32 out[MLX5_ST_SZ_DW(set_l2_table_entry_out)] = {0};
-   u8 *in_mac_addr;
-
-   MLX5_SET(set_l2_table_entry_in, in, opcode,
-MLX5_CMD_OP_SET_L2_TABLE_ENTRY);
-   MLX5_SET(set_l2_table_entry_in, in, table_index, index);
-   MLX5_SET(set_l2_table_entry_in, in, vlan_valid, vlan_valid);
-   MLX5_SET(set_l2_table_entry_in, in, vlan, vlan);
-
-   in_mac_addr = MLX5_ADDR_OF(set_l2_table_entry_in, in, mac_address);
-   ether_addr_copy(&in_mac_addr[2], mac);
-
-   return mlx5_cmd_exec(dev, in, sizeof(in), out, sizeof(out));
-}
-
-static int del_l2_table_entry_cmd(struct mlx5_core_dev *dev, u32 index)
-{
-   u32 in[MLX5_ST_SZ_DW(delete_l2_table_entry_in)] = {0};
-   u32 out[MLX5_ST_SZ_DW(delete_l2_table_entry_out)] = {0};
-
-   MLX5_SET(delete_l2_table_entry_in, in, opcode,
-MLX5_CMD_OP_DELETE_L2_TABLE_ENTRY);
-   MLX5_SET(delete_l2_table_entry_in, in, table_index, index);
-   return mlx5_cmd_exec(dev, in, sizeof(in), out, sizeof(out));
-}
-
-static int alloc_l2_table_index(struct mlx5_l2_table *l2_table, u32 *ix)
-{
-   int err = 0;
-
-   *ix = find_first_zero_bit(l2_table->bitmap, l2_table->size);
-   if (*ix >= l2_table->size)
-   err = -ENOSPC;
-   else
-   __set_bit(*ix, l2_table->bitmap);
-
-   return err;
-}
-
-static void free_l2_table_index(struct mlx5_l2_table *l2_table, u32 ix)
-{
-   __clear_bit(ix, l2_table->bitmap);
-}
-
-static int set_l2_table_entry(struct mlx5_core_dev *dev, u8 *mac,
- u8 vlan_valid, u16 vlan,
- u32 *index)
-{
-   struct mlx5_l2_table *l2_table = &dev->priv.eswitch->l2_table;
-   int err;
-
-   err = alloc_l2_table_index(l2_table, index);
-   if (err)
-   return err;
-
-   err = set_l2_table_entry_cmd(dev, *index, mac, vlan_valid, vlan);
-   if (err)
-   free_l2_table_index(l2_table, *index);
-
-   return err;
-}
-
-static void del_l2_table_entry(struct mlx5_core_dev *dev, u32 index)
-{
-   struct mlx5_l2_table *l2_table = &dev->priv.eswitch->l2_table;
-
-   del_l2_table_entry_cmd(dev, index);
-   free_l2_table_index(l2_table, index);
-}
-
 /* E-Switch FDB */
 static struct mlx5_flow_rule *
 esw_fdb_set_vport_rule(struct mlx5_eswitch *esw, u8 mac[ETH_ALEN], u32 vport)
@@ -435,7 +361,7 @@ static int esw_add_uc_addr(struct mlx5_eswitch *esw, s
return -ENOMEM;
esw_uc->vport = vport;
 
-   err = set_l2_table_entry(esw->dev, mac, 0, 0, &esw_uc->table_index);
+   err = mlx5_mpfs_add_mac(esw->dev, &esw_uc->table_index, mac, 0, 0);
if (err)
goto abort;
 
@@ -467,7 +393,7 @@ static int esw_del_uc_addr(struct mlx5_eswitch *esw, s
esw_debug(esw->dev, "\tDELETE UC MAC: vport[%d] %pM index:%d fr(%p)\n",
  vport, mac, esw_uc->table_index, vaddr->flow_rule);
 
-   del_l2_table_entry(esw->dev, esw_uc->table_index);
+   mlx5_mpfs_del_mac(esw->dev, esw_uc->table_index);
 
if (vaddr->flow_rule)
mlx5_del_flow_rule(vaddr->flow_rule);

Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_mpfs.c
==
--- stable/11/sys/dev/mlx5/mlx5_core/mlx5_mpfs.cWed Apr  1 22:44:26 
2020(r359541)
+++ stable/11/sys/dev/mlx5/mlx5_core/mlx5_mpfs.cWed Apr  1 22:45:33 
2020(r359542)
@@ -39,7 +39,8 @@
 #defineMPFS_UNLOCK(dev) spin_unlock(&(dev)->mpfs.spinlock)
 
 int
-mlx5_mpfs_add_mac(struct mlx5_core_dev *dev, u32 *p_index, const u8 *mac)
+mlx5_mpfs_add_mac(struct mlx5_core_dev *dev, u32 *p_index,

svn commit: r359526 - stable/11/sys/conf

2020-04-01 Thread Konstantin Belousov
Author: kib
Date: Wed Apr  1 17:16:53 2020
New Revision: 359526
URL: https://svnweb.freebsd.org/changeset/base/359526

Log:
  MFC r359095:
  Add pci_iov_if.h header as a dependency for Linuxkpi consumers.
  
  MFC note: this is not a true merge of r359095, but an adaptation of the
  committed bit from r359378, which was MFC r359185.  The functional part
  of the change should be same.

Modified:
  stable/11/sys/conf/kmod.mk
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/conf/kmod.mk
==
--- stable/11/sys/conf/kmod.mk  Wed Apr  1 17:13:43 2020(r359525)
+++ stable/11/sys/conf/kmod.mk  Wed Apr  1 17:16:53 2020(r359526)
@@ -108,6 +108,7 @@ LINUXKPI_GENSRCS+= \
bus_if.h \
device_if.h \
pci_if.h \
+   pci_iov_if.h \
vnode_if.h \
usb_if.h \
opt_usb.h \
___
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: r359524 - head/sys/kgssapi/krb5

2020-04-01 Thread John Baldwin
Author: jhb
Date: Wed Apr  1 17:09:21 2020
New Revision: 359524
URL: https://svnweb.freebsd.org/changeset/base/359524

Log:
  Set crp_ilen for crypto requests.
  
  Assertions in crypto_dispatch() depend on this value being set to
  verify that payload and AAD regions are in bounds.  Also, requests
  that use a single kernel buffer rely on this to know how long the
  buffer is for bus_dma, etc.
  
  Reported by:  kp

Modified:
  head/sys/kgssapi/krb5/kcrypto_aes.c

Modified: head/sys/kgssapi/krb5/kcrypto_aes.c
==
--- head/sys/kgssapi/krb5/kcrypto_aes.c Wed Apr  1 17:08:55 2020
(r359523)
+++ head/sys/kgssapi/krb5/kcrypto_aes.c Wed Apr  1 17:09:21 2020
(r359524)
@@ -158,6 +158,7 @@ aes_encrypt_1(const struct krb5_key_state *ks, int buf
 
crp->crp_buf_type = buftype;
crp->crp_buf = buf;
+   crp->crp_ilen = skip + len;
crp->crp_opaque = as;
crp->crp_callback = aes_crypto_cb;
 
@@ -329,6 +330,7 @@ aes_checksum(const struct krb5_key_state *ks, int usag
crp->crp_flags = CRYPTO_F_CBIFSYNC;
crp->crp_buf_type = CRYPTO_BUF_MBUF;
crp->crp_mbuf = inout;
+   crp->crp_ilen = skip + inlen + 12;
crp->crp_opaque = as;
crp->crp_callback = aes_crypto_cb;
 
___
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: r359522 - head/include

2020-04-01 Thread Ed Maste
Author: emaste
Date: Wed Apr  1 16:38:45 2020
New Revision: 359522
URL: https://svnweb.freebsd.org/changeset/base/359522

Log:
  Remove redundant development tag from include Makefile
  
  Headers are placed in the -development package via install args in rules
  in share/mk/bsd.incs.mk; there is no need to explicitly modify TAGS in
  include/Makefile.  (Mentioned in review D24139.)
  
  Discussed with:   manu

Modified:
  head/include/Makefile

Modified: head/include/Makefile
==
--- head/include/Makefile   Wed Apr  1 16:22:31 2020(r359521)
+++ head/include/Makefile   Wed Apr  1 16:38:45 2020(r359522)
@@ -6,7 +6,6 @@
 .include 
 
 PACKAGE=runtime
-TAGS+= development
 CLEANFILES= osreldate.h version
 SUBDIR= arpa protocols rpcsvc rpc xlocale
 SUBDIR_PARALLEL=
___
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: r359521 - in head: share/man/man4 sys/dev/usb/misc

2020-04-01 Thread Warner Losh
Author: imp
Date: Wed Apr  1 16:22:31 2020
New Revision: 359521
URL: https://svnweb.freebsd.org/changeset/base/359521

Log:
  Start the retirement process for ufm
  
  This driver hasn't been relevant in almost 15 years. It was for a product on 
the
  shelves for about 6 months in 2003/2004. I've not updated the driver since 
then,
  and have had nobody talk to me about it since maybe 2006 or 2007. It doesn't
  implement a standard interface, and can be better done with libusb. All the
  action has moved to webcamd for newer, more fully featured hardware. It makes 
no
  appearances in the nycbug dmesg archive.
  
  Relnotes: yes
  MFC After: 3 days

Modified:
  head/share/man/man4/ufm.4
  head/sys/dev/usb/misc/ufm.c

Modified: head/share/man/man4/ufm.4
==
--- head/share/man/man4/ufm.4   Wed Apr  1 16:21:11 2020(r359520)
+++ head/share/man/man4/ufm.4   Wed Apr  1 16:22:31 2020(r359521)
@@ -43,6 +43,12 @@ module at boot time, place the following line in
 .Bd -literal -offset indent
 ufm_load="YES"
 .Ed
+.Sh DEPRECATION NOTICE
+The
+.Nm
+driver is not present in
+.Fx 13.0
+and later.
 .Sh DESCRIPTION
 The
 .Nm

Modified: head/sys/dev/usb/misc/ufm.c
==
--- head/sys/dev/usb/misc/ufm.c Wed Apr  1 16:21:11 2020(r359520)
+++ head/sys/dev/usb/misc/ufm.c Wed Apr  1 16:22:31 2020(r359521)
@@ -164,6 +164,7 @@ ufm_attach(device_t dev)
if (error) {
goto detach;
}
+   gone_in_dev(dev, 13, "Driver no longer relevant");
return (0); /* success */
 
 detach:
___
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: r359530 - in head: . lib/libsysdecode sys/amd64/amd64 sys/amd64/ia32 sys/arm/arm sys/arm64/arm64 sys/compat/ia32 sys/conf sys/fs/procfs sys/i386/i386 sys/kern sys/mips/mips sys/modules/...

2020-04-01 Thread John Baldwin
Author: jhb
Date: Wed Apr  1 19:22:09 2020
New Revision: 359530
URL: https://svnweb.freebsd.org/changeset/base/359530

Log:
  Retire procfs-based process debugging.
  
  Modern debuggers and process tracers use ptrace() rather than procfs
  for debugging.  ptrace() has a supserset of functionality available
  via procfs and new debugging features are only added to ptrace().
  While the two debugging services share some fields in struct proc,
  they each use dedicated fields and separate code.  This results in
  extra complexity to support a feature that hasn't been enabled in the
  default install for several years.
  
  PR:   244939 (exp-run)
  Reviewed by:  kib, mjg (earlier version)
  Relnotes: yes
  Differential Revision:https://reviews.freebsd.org/D23837

Deleted:
  head/sys/fs/procfs/procfs_ioctl.c
  head/sys/sys/pioctl.h
Modified:
  head/ObsoleteFiles.inc
  head/lib/libsysdecode/Makefile
  head/sys/amd64/amd64/trap.c
  head/sys/amd64/amd64/vm_machdep.c
  head/sys/amd64/ia32/ia32_reg.c
  head/sys/amd64/ia32/ia32_signal.c
  head/sys/amd64/ia32/ia32_syscall.c
  head/sys/arm/arm/syscall.c
  head/sys/arm64/arm64/trap.c
  head/sys/compat/ia32/ia32_sysvec.c
  head/sys/conf/files
  head/sys/fs/procfs/procfs.c
  head/sys/fs/procfs/procfs.h
  head/sys/i386/i386/trap.c
  head/sys/i386/i386/vm_machdep.c
  head/sys/kern/imgact_elf.c
  head/sys/kern/kern_exec.c
  head/sys/kern/kern_exit.c
  head/sys/kern/kern_fork.c
  head/sys/kern/kern_prot.c
  head/sys/kern/kern_sig.c
  head/sys/kern/kern_thread.c
  head/sys/kern/subr_syscall.c
  head/sys/kern/subr_trap.c
  head/sys/kern/sys_process.c
  head/sys/mips/mips/trap.c
  head/sys/modules/procfs/Makefile
  head/sys/powerpc/powerpc/trap.c
  head/sys/riscv/riscv/trap.c
  head/sys/sys/param.h
  head/sys/sys/proc.h

Modified: head/ObsoleteFiles.inc
==
--- head/ObsoleteFiles.inc  Wed Apr  1 19:09:47 2020(r359529)
+++ head/ObsoleteFiles.inc  Wed Apr  1 19:22:09 2020(r359530)
@@ -36,6 +36,9 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20200401: Remove procfs-based process debugging
+OLD_FILES+=usr/include/sys/pioctl.h
+
 # 20200330: GDB_LIBEXEC option retired (always true)
 OLD_FILES+=usr/bin/gdb
 OLD_FILES+=usr/bin/gdbserver

Modified: head/lib/libsysdecode/Makefile
==
--- head/lib/libsysdecode/Makefile  Wed Apr  1 19:09:47 2020
(r359529)
+++ head/lib/libsysdecode/Makefile  Wed Apr  1 19:22:09 2020
(r359530)
@@ -119,11 +119,6 @@ CFLAGS+=-DPF
 # Workaround duplicate declarations in 
 CFLAGS.gcc.ioctl.c+= -Wno-redundant-decls
 
-# Ignore deprecation warning in 
-CFLAGS.clang.ioctl.c+= -Wno-\#warnings
-CFLAGS.gcc.ioctl.c+= -Wno-cpp
-
-CFLAGS.clang+= ${CFLAGS.clang.${.IMPSRC}}
 CFLAGS.gcc+=   ${CFLAGS.gcc.${.IMPSRC}}
 
 DEPENDOBJS+=   tables.h

Modified: head/sys/amd64/amd64/trap.c
==
--- head/sys/amd64/amd64/trap.c Wed Apr  1 19:09:47 2020(r359529)
+++ head/sys/amd64/amd64/trap.c Wed Apr  1 19:22:09 2020(r359530)
@@ -57,7 +57,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: head/sys/amd64/amd64/vm_machdep.c
==
--- head/sys/amd64/amd64/vm_machdep.c   Wed Apr  1 19:09:47 2020
(r359529)
+++ head/sys/amd64/amd64/vm_machdep.c   Wed Apr  1 19:22:09 2020
(r359530)
@@ -58,7 +58,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -198,15 +197,11 @@ cpu_fork(struct thread *td1, struct proc *p2, struct t
td2->td_frame->tf_rdx = 1;
 
/*
-* If the parent process has the trap bit set (i.e. a debugger had
-* single stepped the process to the system call), we need to clear
-* the trap flag from the new frame unless the debugger had set PF_FORK
-* on the parent.  Otherwise, the child will receive a (likely
-* unexpected) SIGTRAP when it executes the first instruction after
-* returning  to userland.
+* If the parent process has the trap bit set (i.e. a debugger
+* had single stepped the process to the system call), we need
+* to clear the trap flag from the new frame.
 */
-   if ((p1->p_pfsflags & PF_FORK) == 0)
-   td2->td_frame->tf_rflags &= ~PSL_T;
+   td2->td_frame->tf_rflags &= ~PSL_T;
 
/*
 * Set registers for trampoline to user mode.  Leave space for the

Modified: head/sys/amd64/ia32/ia32_reg.c
==
--- head/sys/amd64/ia32/ia32_reg.c  Wed Apr  1 19:09:47 2020
(r359529)
+++ head/sys/amd64/ia32

svn commit: r359515 - stable/12/sys/x86/x86

2020-04-01 Thread Konstantin Belousov
Author: kib
Date: Wed Apr  1 15:57:14 2020
New Revision: 359515
URL: https://svnweb.freebsd.org/changeset/base/359515

Log:
  MFC r359090:
  Widen the stored io_apic_id to 8 bits.

Modified:
  stable/12/sys/x86/x86/io_apic.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/x86/x86/io_apic.c
==
--- stable/12/sys/x86/x86/io_apic.c Wed Apr  1 15:39:02 2020
(r359514)
+++ stable/12/sys/x86/x86/io_apic.c Wed Apr  1 15:57:14 2020
(r359515)
@@ -95,7 +95,7 @@ struct ioapic_intsrc {
 struct ioapic {
struct pic io_pic;
u_int io_id:8;  /* logical ID */
-   u_int io_apic_id:4;
+   u_int io_apic_id:8;
u_int io_intbase:8; /* System Interrupt base */
u_int io_numintr:8;
u_int io_haseoi:1;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r359529 - stable/11/sys/dev/mlx5/mlx5_core

2020-04-01 Thread Konstantin Belousov
Author: kib
Date: Wed Apr  1 19:09:47 2020
New Revision: 359529
URL: https://svnweb.freebsd.org/changeset/base/359529

Log:
  MFC r359094:
  mlx5_core: add sysctls to report device capabilities.

Modified:
  stable/11/sys/dev/mlx5/mlx5_core/mlx5_main.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_main.c
==
--- stable/11/sys/dev/mlx5/mlx5_core/mlx5_main.cWed Apr  1 19:06:26 
2020(r359528)
+++ stable/11/sys/dev/mlx5/mlx5_core/mlx5_main.cWed Apr  1 19:09:47 
2020(r359529)
@@ -1279,6 +1279,9 @@ static int init_one(struct pci_dev *pdev,
int i,err;
struct sysctl_oid *pme_sysctl_node;
struct sysctl_oid *pme_err_sysctl_node;
+   struct sysctl_oid *cap_sysctl_node;
+   struct sysctl_oid *current_cap_sysctl_node;
+   struct sysctl_oid *max_cap_sysctl_node;
 
dev = kzalloc(sizeof(*dev), GFP_KERNEL);
priv = &dev->priv;
@@ -1346,6 +1349,186 @@ static int init_one(struct pci_dev *pdev,
0, mlx5_pme_err_desc[2 * i + 1]);
}
 
+   cap_sysctl_node = SYSCTL_ADD_NODE(&dev->sysctl_ctx,
+   SYSCTL_CHILDREN(device_get_sysctl_tree(bsddev)),
+   OID_AUTO, "caps", CTLFLAG_RD | CTLFLAG_MPSAFE, NULL,
+   "hardware capabilities raw bitstrings");
+   if (cap_sysctl_node == NULL) {
+   err = -ENOMEM;
+   goto clean_sysctl_ctx;
+   }
+   current_cap_sysctl_node = SYSCTL_ADD_NODE(&dev->sysctl_ctx,
+   SYSCTL_CHILDREN(cap_sysctl_node),
+   OID_AUTO, "current", CTLFLAG_RD | CTLFLAG_MPSAFE, NULL,
+   "");
+   if (current_cap_sysctl_node == NULL) {
+   err = -ENOMEM;
+   goto clean_sysctl_ctx;
+   }
+   max_cap_sysctl_node = SYSCTL_ADD_NODE(&dev->sysctl_ctx,
+   SYSCTL_CHILDREN(cap_sysctl_node),
+   OID_AUTO, "max", CTLFLAG_RD | CTLFLAG_MPSAFE, NULL,
+   "");
+   if (max_cap_sysctl_node == NULL) {
+   err = -ENOMEM;
+   goto clean_sysctl_ctx;
+   }
+   SYSCTL_ADD_OPAQUE(&dev->sysctl_ctx,
+   SYSCTL_CHILDREN(current_cap_sysctl_node),
+   OID_AUTO, "general", CTLFLAG_RD | CTLFLAG_MPSAFE,
+   &dev->hca_caps_cur[MLX5_CAP_GENERAL],
+   MLX5_UN_SZ_DW(hca_cap_union) * sizeof(u32), "IU", "");
+   SYSCTL_ADD_OPAQUE(&dev->sysctl_ctx,
+   SYSCTL_CHILDREN(max_cap_sysctl_node),
+   OID_AUTO, "general", CTLFLAG_RD | CTLFLAG_MPSAFE,
+   &dev->hca_caps_max[MLX5_CAP_GENERAL],
+   MLX5_UN_SZ_DW(hca_cap_union) * sizeof(u32), "IU", "");
+   SYSCTL_ADD_OPAQUE(&dev->sysctl_ctx,
+   SYSCTL_CHILDREN(current_cap_sysctl_node),
+   OID_AUTO, "ether", CTLFLAG_RD | CTLFLAG_MPSAFE,
+   &dev->hca_caps_cur[MLX5_CAP_ETHERNET_OFFLOADS],
+   MLX5_UN_SZ_DW(hca_cap_union) * sizeof(u32), "IU", "");
+   SYSCTL_ADD_OPAQUE(&dev->sysctl_ctx,
+   SYSCTL_CHILDREN(max_cap_sysctl_node),
+   OID_AUTO, "ether", CTLFLAG_RD | CTLFLAG_MPSAFE,
+   &dev->hca_caps_max[MLX5_CAP_ETHERNET_OFFLOADS],
+   MLX5_UN_SZ_DW(hca_cap_union) * sizeof(u32), "IU", "");
+   SYSCTL_ADD_OPAQUE(&dev->sysctl_ctx,
+   SYSCTL_CHILDREN(current_cap_sysctl_node),
+   OID_AUTO, "odp", CTLFLAG_RD | CTLFLAG_MPSAFE,
+   &dev->hca_caps_cur[MLX5_CAP_ODP],
+   MLX5_UN_SZ_DW(hca_cap_union) * sizeof(u32), "IU", "");
+   SYSCTL_ADD_OPAQUE(&dev->sysctl_ctx,
+   SYSCTL_CHILDREN(max_cap_sysctl_node),
+   OID_AUTO, "odp", CTLFLAG_RD | CTLFLAG_MPSAFE,
+   &dev->hca_caps_max[MLX5_CAP_ODP],
+   MLX5_UN_SZ_DW(hca_cap_union) * sizeof(u32), "IU", "");
+   SYSCTL_ADD_OPAQUE(&dev->sysctl_ctx,
+   SYSCTL_CHILDREN(current_cap_sysctl_node),
+   OID_AUTO, "atomic", CTLFLAG_RD | CTLFLAG_MPSAFE,
+   &dev->hca_caps_cur[MLX5_CAP_ATOMIC],
+   MLX5_UN_SZ_DW(hca_cap_union) * sizeof(u32), "IU", "");
+   SYSCTL_ADD_OPAQUE(&dev->sysctl_ctx,
+   SYSCTL_CHILDREN(max_cap_sysctl_node),
+   OID_AUTO, "atomic", CTLFLAG_RD | CTLFLAG_MPSAFE,
+   &dev->hca_caps_max[MLX5_CAP_ATOMIC],
+   MLX5_UN_SZ_DW(hca_cap_union) * sizeof(u32), "IU", "");
+   SYSCTL_ADD_OPAQUE(&dev->sysctl_ctx,
+   SYSCTL_CHILDREN(current_cap_sysctl_node),
+   OID_AUTO, "roce", CTLFLAG_RD | CTLFLAG_MPSAFE,
+   &dev->hca_caps_cur[MLX5_CAP_ROCE],
+   MLX5_UN_SZ_DW(hca_cap_union) * sizeof(u32), "IU", "");
+   SYSCTL_ADD_OPAQUE(&dev->sysctl_ctx,
+   SYSCTL_CHILDREN(max_cap_sysctl_node),
+   OID_AUTO, "roce", CTLFLAG_RD | CTLFLAG_MPSAFE,
+   &dev->hca_caps_max[MLX5_CAP_ROCE],
+   MLX5_UN_SZ_DW(hca_cap_union) * sizeof(u32), "IU", "");
+   SYSCTL_ADD_OPAQUE(&dev->sysctl_ctx,
+   SYSCTL_CHILDREN(current_cap_sysctl_node),
+

svn commit: r359532 - in stable/12/sys: dev/mlx5 dev/mlx5/mlx5_core modules/mlx5

2020-04-01 Thread Konstantin Belousov
Author: kib
Date: Wed Apr  1 19:38:46 2020
New Revision: 359532
URL: https://svnweb.freebsd.org/changeset/base/359532

Log:
  MFC r359100:
  mlx5: Restore eswitch management code from attic.

Added:
  stable/12/sys/dev/mlx5/mlx5_core/eswitch.h
 - copied unchanged from r359100, head/sys/dev/mlx5/mlx5_core/eswitch.h
  stable/12/sys/dev/mlx5/mlx5_core/flow_table.h
 - copied unchanged from r359100, head/sys/dev/mlx5/mlx5_core/flow_table.h
  stable/12/sys/dev/mlx5/mlx5_core/mlx5_eswitch.c
 - copied unchanged from r359100, head/sys/dev/mlx5/mlx5_core/mlx5_eswitch.c
Modified:
  stable/12/sys/dev/mlx5/driver.h
  stable/12/sys/modules/mlx5/Makefile
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/mlx5/driver.h
==
--- stable/12/sys/dev/mlx5/driver.h Wed Apr  1 19:37:23 2020
(r359531)
+++ stable/12/sys/dev/mlx5/driver.h Wed Apr  1 19:38:46 2020
(r359532)
@@ -632,6 +632,8 @@ struct mlx5_priv {
struct mlx5_rl_tablerl_table;
 #endif
struct mlx5_pme_stats pme_stats;
+
+   struct mlx5_eswitch *eswitch;
 };
 
 enum mlx5_device_state {

Copied: stable/12/sys/dev/mlx5/mlx5_core/eswitch.h (from r359100, 
head/sys/dev/mlx5/mlx5_core/eswitch.h)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/12/sys/dev/mlx5/mlx5_core/eswitch.h  Wed Apr  1 19:38:46 2020
(r359532, copy of r359100, head/sys/dev/mlx5/mlx5_core/eswitch.h)
@@ -0,0 +1,169 @@
+/*-
+ * Copyright (c) 2013-2017, Mellanox Technologies, Ltd.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS `AS IS' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef __MLX5_ESWITCH_H__
+#define __MLX5_ESWITCH_H__
+
+#include 
+#include 
+
+#define MLX5_MAX_UC_PER_VPORT(dev) \
+   (1 << MLX5_CAP_GEN(dev, log_max_current_uc_list))
+
+#define MLX5_MAX_MC_PER_VPORT(dev) \
+   (1 << MLX5_CAP_GEN(dev, log_max_current_mc_list))
+
+#define MLX5_L2_ADDR_HASH_SIZE (BIT(BITS_PER_BYTE))
+#define MLX5_L2_ADDR_HASH(addr) (addr[5])
+
+/* L2 -mac address based- hash helpers */
+struct l2addr_node {
+   struct hlist_node hlist;
+   u8addr[ETH_ALEN];
+};
+
+#define for_each_l2hash_node(hn, tmp, hash, i) \
+   for (i = 0; i < MLX5_L2_ADDR_HASH_SIZE; i++) \
+   hlist_for_each_entry_safe(hn, tmp, &hash[i], hlist)
+
+#define l2addr_hash_find(hash, mac, type) ({\
+   int ix = MLX5_L2_ADDR_HASH(mac);\
+   bool found = false; \
+   type *ptr = NULL;   \
+   \
+   hlist_for_each_entry(ptr, &hash[ix], node.hlist)\
+   if (ether_addr_equal(ptr->node.addr, mac)) {\
+   found = true;   \
+   break;  \
+   }   \
+   if (!found) \
+   ptr = NULL; \
+   ptr;\
+})
+
+#define l2addr_hash_add(hash, mac, type, gfp) ({\
+   int ix = MLX5_L2_ADDR_HASH(mac);\
+   type *ptr = NULL;   \
+   \
+   ptr = kzalloc(sizeof(type), gfp);   \
+   if (ptr) {  \
+   ether_addr_copy(ptr->node.addr, mac);   \
+   hlis

svn commit: r359509 - head/usr.sbin/iscsid

2020-04-01 Thread Edward Tomasz Napierala
Author: trasz
Date: Wed Apr  1 15:09:52 2020
New Revision: 359509
URL: https://svnweb.freebsd.org/changeset/base/359509

Log:
  Stop hardcoding WARNS in iscsid(8).
  
  MFC after:2 weeks
  Sponsored by: DARPA

Modified:
  head/usr.sbin/iscsid/Makefile

Modified: head/usr.sbin/iscsid/Makefile
==
--- head/usr.sbin/iscsid/Makefile   Wed Apr  1 15:08:53 2020
(r359508)
+++ head/usr.sbin/iscsid/Makefile   Wed Apr  1 15:09:52 2020
(r359509)
@@ -11,6 +11,4 @@ MAN=  iscsid.8
 
 LIBADD=md util
 
-WARNS= 6
-
 .include 
___
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: r359531 - stable/12/sys/dev/mlx5/mlx5_core

2020-04-01 Thread Konstantin Belousov
Author: kib
Date: Wed Apr  1 19:37:23 2020
New Revision: 359531
URL: https://svnweb.freebsd.org/changeset/base/359531

Log:
  MFC r359098:
  mlx5: Basic PCIe side of SR-IOV support.

Modified:
  stable/12/sys/dev/mlx5/mlx5_core/mlx5_main.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/mlx5/mlx5_core/mlx5_main.c
==
--- stable/12/sys/dev/mlx5/mlx5_core/mlx5_main.cWed Apr  1 19:22:09 
2020(r359530)
+++ stable/12/sys/dev/mlx5/mlx5_core/mlx5_main.cWed Apr  1 19:37:23 
2020(r359531)
@@ -45,6 +45,11 @@
 #include 
 #include "mlx5_core.h"
 #include "fs_core.h"
+#ifdef PCI_IOV
+#include 
+#include 
+#include 
+#endif
 
 static const char mlx5_version[] = "Mellanox Core driver "
DRIVER_VERSION " (" DRIVER_RELDATE ")";
@@ -512,12 +517,13 @@ static int set_hca_ctrl(struct mlx5_core_dev *dev)
return err;
 }
 
-static int mlx5_core_enable_hca(struct mlx5_core_dev *dev)
+static int mlx5_core_enable_hca(struct mlx5_core_dev *dev, u16 func_id)
 {
u32 out[MLX5_ST_SZ_DW(enable_hca_out)] = {0};
u32 in[MLX5_ST_SZ_DW(enable_hca_in)] = {0};
 
MLX5_SET(enable_hca_in, in, opcode, MLX5_CMD_OP_ENABLE_HCA);
+   MLX5_SET(enable_hca_in, in, function_id, func_id);
return mlx5_cmd_exec(dev, &in, sizeof(in), &out, sizeof(out));
 }
 
@@ -852,8 +858,11 @@ mlx5_firmware_update(struct mlx5_core_dev *dev)
 static int mlx5_pci_init(struct mlx5_core_dev *dev, struct mlx5_priv *priv)
 {
struct pci_dev *pdev = dev->pdev;
-   int err = 0;
+   device_t bsddev;
+   int err;
 
+   pdev = dev->pdev;
+   bsddev = pdev->dev.bsddev;
pci_set_drvdata(dev->pdev, dev);
strncpy(priv->name, dev_name(&pdev->dev), MLX5_MAX_NAME_LEN);
priv->name[MLX5_MAX_NAME_LEN - 1] = 0;
@@ -904,6 +913,10 @@ err_dbg:
 
 static void mlx5_pci_close(struct mlx5_core_dev *dev, struct mlx5_priv *priv)
 {
+#ifdef PCI_IOV
+   if (MLX5_CAP_GEN(dev, eswitch_flow_table))
+   pci_iov_detach(dev->pdev->dev.bsddev);
+#endif
iounmap(dev->iseg);
release_bar(dev->pdev);
mlx5_pci_disable_device(dev);
@@ -1034,7 +1047,7 @@ static int mlx5_load_one(struct mlx5_core_dev *dev, st
goto err_cmd_cleanup;
}
 
-   err = mlx5_core_enable_hca(dev);
+   err = mlx5_core_enable_hca(dev, 0);
if (err) {
mlx5_core_err(dev, "enable hca failed\n");
goto err_cmd_cleanup;
@@ -1294,6 +1307,9 @@ static int init_one(struct pci_dev *pdev,
struct mlx5_core_dev *dev;
struct mlx5_priv *priv;
device_t bsddev = pdev->dev.bsddev;
+#ifdef PCI_IOV
+   nvlist_t *pf_schema, *vf_schema;
+#endif
int i,err;
struct sysctl_oid *pme_sysctl_node;
struct sysctl_oid *pme_err_sysctl_node;
@@ -1577,6 +1593,19 @@ static int init_one(struct pci_dev *pdev,
 
mlx5_firmware_update(dev);
 
+#ifdef PCI_IOV
+   if (MLX5_CAP_GEN(dev, vport_group_manager)) {
+   pf_schema = pci_iov_schema_alloc_node();
+   vf_schema = pci_iov_schema_alloc_node();
+   err = pci_iov_attach(bsddev, pf_schema, vf_schema);
+   if (err != 0) {
+   device_printf(bsddev,
+   "Failed to initialize SR-IOV support, error %d\n",
+   err);
+   }
+   }
+#endif
+
pci_save_state(bsddev);
return 0;
 
@@ -1722,6 +1751,54 @@ static const struct pci_error_handlers mlx5_err_handle
.resume = mlx5_pci_resume
 };
 
+#ifdef PCI_IOV
+static int
+mlx5_iov_init(device_t dev, uint16_t num_vfs, const nvlist_t *pf_config)
+{
+   struct pci_dev *pdev;
+   struct mlx5_core_dev *core_dev;
+   struct mlx5_priv *priv;
+
+   pdev = device_get_softc(dev);
+   core_dev = pci_get_drvdata(pdev);
+   priv = &core_dev->priv;
+
+   return (0);
+}
+
+static void
+mlx5_iov_uninit(device_t dev)
+{
+   struct pci_dev *pdev;
+   struct mlx5_core_dev *core_dev;
+   struct mlx5_priv *priv;
+
+   pdev = device_get_softc(dev);
+   core_dev = pci_get_drvdata(pdev);
+   priv = &core_dev->priv;
+}
+
+static int
+mlx5_iov_add_vf(device_t dev, uint16_t vfnum, const nvlist_t *vf_config)
+{
+   struct pci_dev *pdev;
+   struct mlx5_core_dev *core_dev;
+   struct mlx5_priv *priv;
+   int error;
+
+   pdev = device_get_softc(dev);
+   core_dev = pci_get_drvdata(pdev);
+   priv = &core_dev->priv;
+
+   error = -mlx5_core_enable_hca(core_dev, vfnum + 1);
+   if (error != 0) {
+   mlx5_core_err(core_dev, "enabling VF %d failed, error %d\n",
+   vfnum, error);
+   }
+   return (error);
+}
+#endif
+
 static int mlx5_try_fast_unload(struct mlx5_core_dev *dev)
 {
bool fast_teardown, force_teardown;
@@ -1856,7 +1933,12 @@ struct p

svn commit: r359510 - head/usr.sbin/uefisign

2020-04-01 Thread Edward Tomasz Napierala
Author: trasz
Date: Wed Apr  1 15:10:26 2020
New Revision: 359510
URL: https://svnweb.freebsd.org/changeset/base/359510

Log:
  Stop hardcoding WARNS in uefisign(8).
  
  MFC after:2 weeks
  Sponsored by: DARPA

Modified:
  head/usr.sbin/uefisign/Makefile

Modified: head/usr.sbin/uefisign/Makefile
==
--- head/usr.sbin/uefisign/Makefile Wed Apr  1 15:09:52 2020
(r359509)
+++ head/usr.sbin/uefisign/Makefile Wed Apr  1 15:10:26 2020
(r359510)
@@ -6,6 +6,4 @@ MAN=uefisign.8
 
 LIBADD=crypto
 
-WARNS= 6
-
 .include 
___
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: r359533 - in stable/12/sys/dev/mlx5: . mlx5_core mlx5_en

2020-04-01 Thread Konstantin Belousov
Author: kib
Date: Wed Apr  1 19:40:14 2020
New Revision: 359533
URL: https://svnweb.freebsd.org/changeset/base/359533

Log:
  MFC r359101:
  mlx5: Integrate eswitch and mpfs management code.

Modified:
  stable/12/sys/dev/mlx5/mlx5_core/mlx5_eswitch.c
  stable/12/sys/dev/mlx5/mlx5_core/mlx5_mpfs.c
  stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c
  stable/12/sys/dev/mlx5/mpfs.h
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/mlx5/mlx5_core/mlx5_eswitch.c
==
--- stable/12/sys/dev/mlx5/mlx5_core/mlx5_eswitch.c Wed Apr  1 19:38:46 
2020(r359532)
+++ stable/12/sys/dev/mlx5/mlx5_core/mlx5_eswitch.c Wed Apr  1 19:40:14 
2020(r359533)
@@ -30,6 +30,7 @@
 #include 
 #include 
 #include 
+#include 
 #include "mlx5_core.h"
 #include "eswitch.h"
 
@@ -212,81 +213,6 @@ static int modify_esw_vport_cvlan(struct mlx5_core_dev
return modify_esw_vport_context_cmd(dev, vport, in, sizeof(in));
 }
 
-/* HW L2 Table (MPFS) management */
-static int set_l2_table_entry_cmd(struct mlx5_core_dev *dev, u32 index,
- u8 *mac, u8 vlan_valid, u16 vlan)
-{
-   u32 in[MLX5_ST_SZ_DW(set_l2_table_entry_in)] = {0};
-   u32 out[MLX5_ST_SZ_DW(set_l2_table_entry_out)] = {0};
-   u8 *in_mac_addr;
-
-   MLX5_SET(set_l2_table_entry_in, in, opcode,
-MLX5_CMD_OP_SET_L2_TABLE_ENTRY);
-   MLX5_SET(set_l2_table_entry_in, in, table_index, index);
-   MLX5_SET(set_l2_table_entry_in, in, vlan_valid, vlan_valid);
-   MLX5_SET(set_l2_table_entry_in, in, vlan, vlan);
-
-   in_mac_addr = MLX5_ADDR_OF(set_l2_table_entry_in, in, mac_address);
-   ether_addr_copy(&in_mac_addr[2], mac);
-
-   return mlx5_cmd_exec(dev, in, sizeof(in), out, sizeof(out));
-}
-
-static int del_l2_table_entry_cmd(struct mlx5_core_dev *dev, u32 index)
-{
-   u32 in[MLX5_ST_SZ_DW(delete_l2_table_entry_in)] = {0};
-   u32 out[MLX5_ST_SZ_DW(delete_l2_table_entry_out)] = {0};
-
-   MLX5_SET(delete_l2_table_entry_in, in, opcode,
-MLX5_CMD_OP_DELETE_L2_TABLE_ENTRY);
-   MLX5_SET(delete_l2_table_entry_in, in, table_index, index);
-   return mlx5_cmd_exec(dev, in, sizeof(in), out, sizeof(out));
-}
-
-static int alloc_l2_table_index(struct mlx5_l2_table *l2_table, u32 *ix)
-{
-   int err = 0;
-
-   *ix = find_first_zero_bit(l2_table->bitmap, l2_table->size);
-   if (*ix >= l2_table->size)
-   err = -ENOSPC;
-   else
-   __set_bit(*ix, l2_table->bitmap);
-
-   return err;
-}
-
-static void free_l2_table_index(struct mlx5_l2_table *l2_table, u32 ix)
-{
-   __clear_bit(ix, l2_table->bitmap);
-}
-
-static int set_l2_table_entry(struct mlx5_core_dev *dev, u8 *mac,
- u8 vlan_valid, u16 vlan,
- u32 *index)
-{
-   struct mlx5_l2_table *l2_table = &dev->priv.eswitch->l2_table;
-   int err;
-
-   err = alloc_l2_table_index(l2_table, index);
-   if (err)
-   return err;
-
-   err = set_l2_table_entry_cmd(dev, *index, mac, vlan_valid, vlan);
-   if (err)
-   free_l2_table_index(l2_table, *index);
-
-   return err;
-}
-
-static void del_l2_table_entry(struct mlx5_core_dev *dev, u32 index)
-{
-   struct mlx5_l2_table *l2_table = &dev->priv.eswitch->l2_table;
-
-   del_l2_table_entry_cmd(dev, index);
-   free_l2_table_index(l2_table, index);
-}
-
 /* E-Switch FDB */
 static struct mlx5_flow_rule *
 esw_fdb_set_vport_rule(struct mlx5_eswitch *esw, u8 mac[ETH_ALEN], u32 vport)
@@ -435,7 +361,7 @@ static int esw_add_uc_addr(struct mlx5_eswitch *esw, s
return -ENOMEM;
esw_uc->vport = vport;
 
-   err = set_l2_table_entry(esw->dev, mac, 0, 0, &esw_uc->table_index);
+   err = mlx5_mpfs_add_mac(esw->dev, &esw_uc->table_index, mac, 0, 0);
if (err)
goto abort;
 
@@ -467,7 +393,7 @@ static int esw_del_uc_addr(struct mlx5_eswitch *esw, s
esw_debug(esw->dev, "\tDELETE UC MAC: vport[%d] %pM index:%d fr(%p)\n",
  vport, mac, esw_uc->table_index, vaddr->flow_rule);
 
-   del_l2_table_entry(esw->dev, esw_uc->table_index);
+   mlx5_mpfs_del_mac(esw->dev, esw_uc->table_index);
 
if (vaddr->flow_rule)
mlx5_del_flow_rule(vaddr->flow_rule);

Modified: stable/12/sys/dev/mlx5/mlx5_core/mlx5_mpfs.c
==
--- stable/12/sys/dev/mlx5/mlx5_core/mlx5_mpfs.cWed Apr  1 19:38:46 
2020(r359532)
+++ stable/12/sys/dev/mlx5/mlx5_core/mlx5_mpfs.cWed Apr  1 19:40:14 
2020(r359533)
@@ -39,7 +39,8 @@
 #defineMPFS_UNLOCK(dev) spin_unlock(&(dev)->mpfs.spinlock)
 
 int
-mlx5_mpfs_add_mac(struct mlx5_core_dev *dev, u32 *p_index, const u8 *mac)
+mlx5_mpfs_add_mac(struct mlx5_core_dev *dev, u32 *p_index,

svn commit: r359534 - stable/12/sys/dev/mlx5

2020-04-01 Thread Konstantin Belousov
Author: kib
Date: Wed Apr  1 19:41:26 2020
New Revision: 359534
URL: https://svnweb.freebsd.org/changeset/base/359534

Log:
  MFC r359102:
  mlx5: Add 'follow' vport state, relevant for VFs.

Modified:
  stable/12/sys/dev/mlx5/device.h
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/mlx5/device.h
==
--- stable/12/sys/dev/mlx5/device.h Wed Apr  1 19:40:14 2020
(r359533)
+++ stable/12/sys/dev/mlx5/device.h Wed Apr  1 19:41:26 2020
(r359534)
@@ -826,6 +826,7 @@ static inline int mlx5_host_is_le(void)
 enum {
VPORT_STATE_DOWN= 0x0,
VPORT_STATE_UP  = 0x1,
+   VPORT_STATE_FOLLOW  = 0x2,
 };
 
 enum {
___
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: r359528 - stable/12/sys/dev/mlx5/mlx5_core

2020-04-01 Thread Konstantin Belousov
Author: kib
Date: Wed Apr  1 19:06:26 2020
New Revision: 359528
URL: https://svnweb.freebsd.org/changeset/base/359528

Log:
  MFC r359094:
  mlx5_core: add sysctls to report device capabilities.

Modified:
  stable/12/sys/dev/mlx5/mlx5_core/mlx5_main.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/mlx5/mlx5_core/mlx5_main.c
==
--- stable/12/sys/dev/mlx5/mlx5_core/mlx5_main.cWed Apr  1 17:19:27 
2020(r359527)
+++ stable/12/sys/dev/mlx5/mlx5_core/mlx5_main.cWed Apr  1 19:06:26 
2020(r359528)
@@ -1297,6 +1297,9 @@ static int init_one(struct pci_dev *pdev,
int i,err;
struct sysctl_oid *pme_sysctl_node;
struct sysctl_oid *pme_err_sysctl_node;
+   struct sysctl_oid *cap_sysctl_node;
+   struct sysctl_oid *current_cap_sysctl_node;
+   struct sysctl_oid *max_cap_sysctl_node;
 
dev = kzalloc(sizeof(*dev), GFP_KERNEL);
priv = &dev->priv;
@@ -1364,6 +1367,186 @@ static int init_one(struct pci_dev *pdev,
0, mlx5_pme_err_desc[2 * i + 1]);
}
 
+   cap_sysctl_node = SYSCTL_ADD_NODE(&dev->sysctl_ctx,
+   SYSCTL_CHILDREN(device_get_sysctl_tree(bsddev)),
+   OID_AUTO, "caps", CTLFLAG_RD | CTLFLAG_MPSAFE, NULL,
+   "hardware capabilities raw bitstrings");
+   if (cap_sysctl_node == NULL) {
+   err = -ENOMEM;
+   goto clean_sysctl_ctx;
+   }
+   current_cap_sysctl_node = SYSCTL_ADD_NODE(&dev->sysctl_ctx,
+   SYSCTL_CHILDREN(cap_sysctl_node),
+   OID_AUTO, "current", CTLFLAG_RD | CTLFLAG_MPSAFE, NULL,
+   "");
+   if (current_cap_sysctl_node == NULL) {
+   err = -ENOMEM;
+   goto clean_sysctl_ctx;
+   }
+   max_cap_sysctl_node = SYSCTL_ADD_NODE(&dev->sysctl_ctx,
+   SYSCTL_CHILDREN(cap_sysctl_node),
+   OID_AUTO, "max", CTLFLAG_RD | CTLFLAG_MPSAFE, NULL,
+   "");
+   if (max_cap_sysctl_node == NULL) {
+   err = -ENOMEM;
+   goto clean_sysctl_ctx;
+   }
+   SYSCTL_ADD_OPAQUE(&dev->sysctl_ctx,
+   SYSCTL_CHILDREN(current_cap_sysctl_node),
+   OID_AUTO, "general", CTLFLAG_RD | CTLFLAG_MPSAFE,
+   &dev->hca_caps_cur[MLX5_CAP_GENERAL],
+   MLX5_UN_SZ_DW(hca_cap_union) * sizeof(u32), "IU", "");
+   SYSCTL_ADD_OPAQUE(&dev->sysctl_ctx,
+   SYSCTL_CHILDREN(max_cap_sysctl_node),
+   OID_AUTO, "general", CTLFLAG_RD | CTLFLAG_MPSAFE,
+   &dev->hca_caps_max[MLX5_CAP_GENERAL],
+   MLX5_UN_SZ_DW(hca_cap_union) * sizeof(u32), "IU", "");
+   SYSCTL_ADD_OPAQUE(&dev->sysctl_ctx,
+   SYSCTL_CHILDREN(current_cap_sysctl_node),
+   OID_AUTO, "ether", CTLFLAG_RD | CTLFLAG_MPSAFE,
+   &dev->hca_caps_cur[MLX5_CAP_ETHERNET_OFFLOADS],
+   MLX5_UN_SZ_DW(hca_cap_union) * sizeof(u32), "IU", "");
+   SYSCTL_ADD_OPAQUE(&dev->sysctl_ctx,
+   SYSCTL_CHILDREN(max_cap_sysctl_node),
+   OID_AUTO, "ether", CTLFLAG_RD | CTLFLAG_MPSAFE,
+   &dev->hca_caps_max[MLX5_CAP_ETHERNET_OFFLOADS],
+   MLX5_UN_SZ_DW(hca_cap_union) * sizeof(u32), "IU", "");
+   SYSCTL_ADD_OPAQUE(&dev->sysctl_ctx,
+   SYSCTL_CHILDREN(current_cap_sysctl_node),
+   OID_AUTO, "odp", CTLFLAG_RD | CTLFLAG_MPSAFE,
+   &dev->hca_caps_cur[MLX5_CAP_ODP],
+   MLX5_UN_SZ_DW(hca_cap_union) * sizeof(u32), "IU", "");
+   SYSCTL_ADD_OPAQUE(&dev->sysctl_ctx,
+   SYSCTL_CHILDREN(max_cap_sysctl_node),
+   OID_AUTO, "odp", CTLFLAG_RD | CTLFLAG_MPSAFE,
+   &dev->hca_caps_max[MLX5_CAP_ODP],
+   MLX5_UN_SZ_DW(hca_cap_union) * sizeof(u32), "IU", "");
+   SYSCTL_ADD_OPAQUE(&dev->sysctl_ctx,
+   SYSCTL_CHILDREN(current_cap_sysctl_node),
+   OID_AUTO, "atomic", CTLFLAG_RD | CTLFLAG_MPSAFE,
+   &dev->hca_caps_cur[MLX5_CAP_ATOMIC],
+   MLX5_UN_SZ_DW(hca_cap_union) * sizeof(u32), "IU", "");
+   SYSCTL_ADD_OPAQUE(&dev->sysctl_ctx,
+   SYSCTL_CHILDREN(max_cap_sysctl_node),
+   OID_AUTO, "atomic", CTLFLAG_RD | CTLFLAG_MPSAFE,
+   &dev->hca_caps_max[MLX5_CAP_ATOMIC],
+   MLX5_UN_SZ_DW(hca_cap_union) * sizeof(u32), "IU", "");
+   SYSCTL_ADD_OPAQUE(&dev->sysctl_ctx,
+   SYSCTL_CHILDREN(current_cap_sysctl_node),
+   OID_AUTO, "roce", CTLFLAG_RD | CTLFLAG_MPSAFE,
+   &dev->hca_caps_cur[MLX5_CAP_ROCE],
+   MLX5_UN_SZ_DW(hca_cap_union) * sizeof(u32), "IU", "");
+   SYSCTL_ADD_OPAQUE(&dev->sysctl_ctx,
+   SYSCTL_CHILDREN(max_cap_sysctl_node),
+   OID_AUTO, "roce", CTLFLAG_RD | CTLFLAG_MPSAFE,
+   &dev->hca_caps_max[MLX5_CAP_ROCE],
+   MLX5_UN_SZ_DW(hca_cap_union) * sizeof(u32), "IU", "");
+   SYSCTL_ADD_OPAQUE(&dev->sysctl_ctx,
+   SYSCTL_CHILDREN(current_cap_sysctl_node),
+

svn commit: r359507 - head/usr.sbin/autofs

2020-04-01 Thread Edward Tomasz Napierala
Author: trasz
Date: Wed Apr  1 15:08:13 2020
New Revision: 359507
URL: https://svnweb.freebsd.org/changeset/base/359507

Log:
  Stop hardcoding WARNS in automount(8) et al.
  
  MFC after:2 weeks
  Sponsored by: DARPA

Modified:
  head/usr.sbin/autofs/Makefile

Modified: head/usr.sbin/autofs/Makefile
==
--- head/usr.sbin/autofs/Makefile   Wed Apr  1 13:18:01 2020
(r359506)
+++ head/usr.sbin/autofs/Makefile   Wed Apr  1 15:08:13 2020
(r359507)
@@ -24,8 +24,6 @@ LIBADD=   util
 MOUNT=  ${SRCTOP}/sbin/mount
 CFLAGS+=-I${MOUNT}
 
-WARNS= 6
-
 LINKS= ${BINDIR}/automountd ${BINDIR}/automount
 LINKS+=${BINDIR}/automountd ${BINDIR}/autounmountd
 
___
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: r359504 - head/lib/libc/locale

2020-04-01 Thread Rodney W. Grimes
> Author: 0mp (doc,ports committer)
> Date: Wed Apr  1 09:01:35 2020
> New Revision: 359504
> URL: https://svnweb.freebsd.org/changeset/base/359504
> 
> Log:
>   Use proper mdoc(7) macros for literal text and do not use Tn
>   
>   Tn is deprecated and upsets linters.
>   

I know I am way late to the game on this, but those of us who have
actually produced phototype output using groff of the man pages in
the past value the .Tn macro.  I can not phantom what would
of been so hard to implement that this had to be depricated by mdoc
simply render the argument as standard characters as groff did in
the past when the output device was of type ascii.

>   MFC after:  3 days
> 
> Modified:
>   head/lib/libc/locale/big5.5
> 
> Modified: head/lib/libc/locale/big5.5
> ==
> --- head/lib/libc/locale/big5.5   Wed Apr  1 07:28:31 2020
> (r359503)
> +++ head/lib/libc/locale/big5.5   Wed Apr  1 09:01:35 2020
> (r359504)
> @@ -24,7 +24,7 @@
>  .\"
>  .\" $FreeBSD$
>  .\"
> -.Dd September 12, 2019
> +.Dd April 1, 2020
>  .Dt BIG5 5
>  .Os
>  .Sh NAME
> @@ -39,9 +39,8 @@ encoding for Traditional Chinese text
>  .Dq Big Five
>  is a standard for encoding Traditional Chinese text.
>  Each character is represented by either one or two bytes.
> -Characters from the
> -.Tn ASCII
> -character set are represented as single bytes in the range 0x00 - 0x7F.
> +Characters from the ASCII character set are represented as
> +single bytes in the range 0x00 - 0x7F.
>  Traditional Chinese characters are represented by two bytes:
>  the first in the range 0xA1 - 0xFE, the second in the range
>  0x40 - 0xFE.
> @@ -51,7 +50,11 @@ the first in the range 0xA1 - 0xFE, the second in the 
>  .Xr utf8 5
>  .Sh BUGS
>  The range of the second byte overlaps some ASCII characters, including
> -0x5C (`\\') and 0x7C (`|') which may cause problems in program execution or
> +0x5C
> +.Pq Ql \e
> +and 0x7C
> +.Pq Ql |
> +which may cause problems in program execution or
>  display.
>  Big5 is considered a legacy standard and only preserved for backward
>  compatibility reason.
> 

-- 
Rod Grimes rgri...@freebsd.org
___
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: r359525 - in stable/12/sys/compat/linuxkpi/common: include/linux src

2020-04-01 Thread Konstantin Belousov
Author: kib
Date: Wed Apr  1 17:13:43 2020
New Revision: 359525
URL: https://svnweb.freebsd.org/changeset/base/359525

Log:
  MFC r359096, r359165 (by imp):
  linuxkpi: Add infrastructure to pass FreeBSD IOV method calls into
  pci_driver methods.

Modified:
  stable/12/sys/compat/linuxkpi/common/include/linux/pci.h
  stable/12/sys/compat/linuxkpi/common/src/linux_pci.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/compat/linuxkpi/common/include/linux/pci.h
==
--- stable/12/sys/compat/linuxkpi/common/include/linux/pci.hWed Apr  1 
17:09:21 2020(r359524)
+++ stable/12/sys/compat/linuxkpi/common/include/linux/pci.hWed Apr  1 
17:13:43 2020(r359525)
@@ -37,8 +37,10 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -201,6 +203,11 @@ struct pci_driver {
struct device_driverdriver;
const struct pci_error_handlers   *err_handler;
boolisdrm;
+   int  (*bsd_iov_init)(device_t dev, uint16_t num_vfs,
+   const nvlist_t *pf_config);
+   void  (*bsd_iov_uninit)(device_t dev);
+   int  (*bsd_iov_add_vf)(device_t dev, uint16_t vfnum,
+   const nvlist_t *vf_config);
 };
 
 struct pci_bus {

Modified: stable/12/sys/compat/linuxkpi/common/src/linux_pci.c
==
--- stable/12/sys/compat/linuxkpi/common/src/linux_pci.cWed Apr  1 
17:09:21 2020(r359524)
+++ stable/12/sys/compat/linuxkpi/common/src/linux_pci.cWed Apr  1 
17:13:43 2020(r359525)
@@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -45,6 +46,10 @@ __FBSDID("$FreeBSD$");
 
 #include 
 
+#include 
+#include 
+#include 
+
 #include 
 #include 
 #include 
@@ -64,6 +69,9 @@ static device_detach_t linux_pci_detach;
 static device_suspend_t linux_pci_suspend;
 static device_resume_t linux_pci_resume;
 static device_shutdown_t linux_pci_shutdown;
+static pci_iov_init_t linux_pci_iov_init;
+static pci_iov_uninit_t linux_pci_iov_uninit;
+static pci_iov_add_vf_t linux_pci_iov_add_vf;
 
 static device_method_t pci_methods[] = {
DEVMETHOD(device_probe, linux_pci_probe),
@@ -72,6 +80,9 @@ static device_method_t pci_methods[] = {
DEVMETHOD(device_suspend, linux_pci_suspend),
DEVMETHOD(device_resume, linux_pci_resume),
DEVMETHOD(device_shutdown, linux_pci_shutdown),
+   DEVMETHOD(pci_iov_init, linux_pci_iov_init),
+   DEVMETHOD(pci_iov_uninit, linux_pci_iov_uninit),
+   DEVMETHOD(pci_iov_add_vf, linux_pci_iov_add_vf),
DEVMETHOD_END
 };
 
@@ -268,6 +279,47 @@ linux_pci_shutdown(device_t dev)
if (pdev->pdrv->shutdown != NULL)
pdev->pdrv->shutdown(pdev);
return (0);
+}
+
+static int
+linux_pci_iov_init(device_t dev, uint16_t num_vfs, const nvlist_t *pf_config)
+{
+   struct pci_dev *pdev;
+   int error;
+
+   linux_set_current(curthread);
+   pdev = device_get_softc(dev);
+   if (pdev->pdrv->bsd_iov_init != NULL)
+   error = pdev->pdrv->bsd_iov_init(dev, num_vfs, pf_config);
+   else
+   error = EINVAL;
+   return (error);
+}
+
+static void
+linux_pci_iov_uninit(device_t dev)
+{
+   struct pci_dev *pdev;
+
+   linux_set_current(curthread);
+   pdev = device_get_softc(dev);
+   if (pdev->pdrv->bsd_iov_uninit != NULL)
+   pdev->pdrv->bsd_iov_uninit(dev);
+}
+
+static int
+linux_pci_iov_add_vf(device_t dev, uint16_t vfnum, const nvlist_t *vf_config)
+{
+   struct pci_dev *pdev;
+   int error;
+
+   linux_set_current(curthread);
+   pdev = device_get_softc(dev);
+   if (pdev->pdrv->bsd_iov_add_vf != NULL)
+   error = pdev->pdrv->bsd_iov_add_vf(dev, vfnum, vf_config);
+   else
+   error = EINVAL;
+   return (error);
 }
 
 static 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"


Re: svn commit: r359503 - in head

2020-04-01 Thread Cy Schubert
On March 31, 2020 10:53:14 PM PDT, Glen Barber  wrote:
>Author: gjb
>Date: Wed Apr  1 05:51:46 UTC 2020
>New Revision: 359503
>URL: https://svnweb.freebsd.org/changeset/base/359503
>
>Log:
>  Update head to 14.0-CURRENT in order to prevent having
>  a 13.0-RELEASE.
>
>Modified:
>  Makefile.inc1
>  UPDATING
>  lib/clang/freebsd_cc_version.h
>  lib/clang/llvm.build.mk
>  sys/conf/newvers.sh
>  sys/sys/param.h
>
>Index: Makefile.inc1
>===
>--- Makefile.inc1  (revision 359501)
>+++ Makefile.inc1  (working copy)
>@@ -130,9 +130,9 @@ TARGET_ABI=gnueabi
> .endif
> .endif
> MACHINE_ABI?= unknown
>-MACHINE_TRIPLE?=${MACHINE_ARCH:S/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${MACHINE_ABI}-freebsd13.0
>+MACHINE_TRIPLE?=${MACHINE_ARCH:S/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${MACHINE_ABI}-freebsd14.0
> TARGET_ABI?=  unknown
>-TARGET_TRIPLE?=   
>${TARGET_ARCH:S/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${TARGET_ABI}-freebsd13.0
>+TARGET_TRIPLE?=   
>${TARGET_ARCH:S/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${TARGET_ABI}-freebsd14.0
> KNOWN_ARCHES?=aarch64/arm64 \
>   amd64 \
>   armv6/arm \
>@@ -2123,7 +2123,7 @@ ${_bt}-lib/libdwarf: ${_bt_m4_depend}
> .endif
> 
># flua is required to regenerate syscall files.  It first appeared
>during the
>-# 13.0-CURRENT cycle, thus needs to be built on -older releases and
>stable
>+# 14.0-CURRENT cycle, thus needs to be built on -older releases and
>stable
> # branches.
> .if ${BOOTSTRAPPING} < 1300059
> ${_bt}-libexec/flua: ${_bt}-lib/liblua
>Index: UPDATING
>===
>--- UPDATING   (revision 359501)
>+++ UPDATING   (working copy)
>@@ -11,8 +11,8 @@ handbook:
> Items affecting the ports and packages system can be found in
>/usr/ports/UPDATING.  Please read that file before running portupgrade.
> 
>-NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW:
>-  FreeBSD 13.x has many debugging features turned on, in both the
>kernel
>+NOTE TO PEOPLE WHO THINK THAT FreeBSD 14.x IS SLOW:
>+  FreeBSD 14.x has many debugging features turned on, in both the
>kernel
>   and userland.  These features attempt to detect incorrect use of
>   system primitives, and encourage loud failure through extra sanity
>   checking and fail stop semantics.  They also substantially impact
>Index: lib/clang/freebsd_cc_version.h
>===
>--- lib/clang/freebsd_cc_version.h (revision 359501)
>+++ lib/clang/freebsd_cc_version.h (working copy)
>@@ -1,3 +1,3 @@
> /* $FreeBSD$ */
> 
>-#define   FREEBSD_CC_VERSION  137
>+#define   FREEBSD_CC_VERSION  147
>Index: lib/clang/llvm.build.mk
>===
>--- lib/clang/llvm.build.mk(revision 359501)
>+++ lib/clang/llvm.build.mk(working copy)
>@@ -38,7 +38,7 @@ TARGET_ABI=  -gnueabi
> TARGET_ABI=
> .endif
> VENDOR=   unknown
>-OS_VERSION=   freebsd13.0
>+OS_VERSION=   freebsd14.0
> 
>LLVM_TARGET_TRIPLE?=   
>${TARGET_ARCH:C/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${VENDOR}-${OS_VERSION}${TARGET_ABI}
>LLVM_BUILD_TRIPLE?=
>${BUILD_ARCH:C/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${VENDOR}-${OS_VERSION}
>Index: sys/conf/newvers.sh
>===
>--- sys/conf/newvers.sh(revision 359501)
>+++ sys/conf/newvers.sh(working copy)
>@@ -53,7 +53,7 @@
> #
> 
> TYPE="FreeBSD"
>-REVISION="13.0"
>+REVISION="14.0"
> BRANCH=${BRANCH_OVERRIDE:-CURRENT}
> RELEASE="${REVISION}-${BRANCH}"
> VERSION="${TYPE} ${RELEASE}"
>Index: sys/sys/param.h
>===
>--- sys/sys/param.h(revision 359501)
>+++ sys/sys/param.h(working copy)
>@@ -60,7 +60,7 @@
>  *in the range 5 to 9.
>  */
> #undef __FreeBSD_version
>-#define __FreeBSD_version 1300087 /* Master, propagated to newvers */
>+#define __FreeBSD_version 1400087 /* Master, propagated to newvers */
> 
> /*
>* __FreeBSD_kernel__ indicates that this system uses the kernel of
>FreeBSD,

This was discussed at length just before 12 was released. Are you now the one 
to decide naming, disregarding the discussion?

Should we not have also skipped 4?



-- 
Pardon the typos and autocorrect, small keyboard in use. 
Cy Schubert 
FreeBSD UNIX:  Web: https://www.FreeBSD.org

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

Sent from my Android device with K-9 Mail. Please excuse my brevity.
___
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: r359514 - head/tools/test/bsnmp

2020-04-01 Thread Hartmut Brandt
Author: harti
Date: Wed Apr  1 15:39:02 2020
New Revision: 359514
URL: https://svnweb.freebsd.org/changeset/base/359514

Log:
  Add a makefile to build and run the tests for the bsnmp library.
  This is not automatically built or run but must explicitly be built
  with 'make' and run with 'make run'.

Added:
  head/tools/test/bsnmp/
  head/tools/test/bsnmp/Makefile   (contents, props changed)

Added: head/tools/test/bsnmp/Makefile
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/test/bsnmp/Makefile  Wed Apr  1 15:39:02 2020
(r359514)
@@ -0,0 +1,19 @@
+# $FreeBSD$
+
+CONTRIB=${SRCTOP}/contrib/bsnmp
+.PATH: ${CONTRIB}/tests
+
+PROG_CXX=ctest
+SRCS= main.cc asn1.cc snmp_parse_server.cc
+CFLAGS += -I/${CONTRIB}/lib
+CXXFLAGS+= -std=c++2a
+LIBADD= bsnmp
+
+CFLAGS += -DBOGUS_CVE_2019_5610_FIX
+MK_MAN= no
+
+.include 
+
+
+run:
+   ${.OBJDIR}/ctest
___
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: r359523 - stable/12/sys/conf

2020-04-01 Thread Konstantin Belousov
Author: kib
Date: Wed Apr  1 17:08:55 2020
New Revision: 359523
URL: https://svnweb.freebsd.org/changeset/base/359523

Log:
  MFC r359095:
  Add pci_iov_if.h header as a dependency for Linuxkpi consumers.
  
  MFC note: this is not a true merge of r359095, but an adaptation of the
  committed bit from r359378, which was MFC r359185.  The functional part
  of the change should be same.

Modified:
  stable/12/sys/conf/kmod.mk
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/conf/kmod.mk
==
--- stable/12/sys/conf/kmod.mk  Wed Apr  1 16:38:45 2020(r359522)
+++ stable/12/sys/conf/kmod.mk  Wed Apr  1 17:08:55 2020(r359523)
@@ -117,6 +117,7 @@ LINUXKPI_GENSRCS+= \
bus_if.h \
device_if.h \
pci_if.h \
+   pci_iov_if.h \
vnode_if.h \
usb_if.h \
opt_usb.h \
___
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: r359527 - in stable/11/sys/compat/linuxkpi/common: include/linux src

2020-04-01 Thread Konstantin Belousov
Author: kib
Date: Wed Apr  1 17:19:27 2020
New Revision: 359527
URL: https://svnweb.freebsd.org/changeset/base/359527

Log:
  MFC r359096, r359165 (by imp):
  linuxkpi: Add infrastructure to pass FreeBSD IOV method calls into
  pci_driver methods.

Modified:
  stable/11/sys/compat/linuxkpi/common/include/linux/pci.h
  stable/11/sys/compat/linuxkpi/common/src/linux_pci.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/compat/linuxkpi/common/include/linux/pci.h
==
--- stable/11/sys/compat/linuxkpi/common/include/linux/pci.hWed Apr  1 
17:16:53 2020(r359526)
+++ stable/11/sys/compat/linuxkpi/common/include/linux/pci.hWed Apr  1 
17:19:27 2020(r359527)
@@ -37,8 +37,10 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -189,6 +191,11 @@ struct pci_driver {
struct device_driverdriver;
const struct pci_error_handlers   *err_handler;
boolisdrm;
+   int  (*bsd_iov_init)(device_t dev, uint16_t num_vfs,
+   const nvlist_t *pf_config);
+   void  (*bsd_iov_uninit)(device_t dev);
+   int  (*bsd_iov_add_vf)(device_t dev, uint16_t vfnum,
+   const nvlist_t *vf_config);
 };
 
 struct pci_bus {

Modified: stable/11/sys/compat/linuxkpi/common/src/linux_pci.c
==
--- stable/11/sys/compat/linuxkpi/common/src/linux_pci.cWed Apr  1 
17:16:53 2020(r359526)
+++ stable/11/sys/compat/linuxkpi/common/src/linux_pci.cWed Apr  1 
17:19:27 2020(r359527)
@@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -45,6 +46,10 @@ __FBSDID("$FreeBSD$");
 
 #include 
 
+#include 
+#include 
+#include 
+
 #include 
 #include 
 #include 
@@ -64,6 +69,9 @@ static device_detach_t linux_pci_detach;
 static device_suspend_t linux_pci_suspend;
 static device_resume_t linux_pci_resume;
 static device_shutdown_t linux_pci_shutdown;
+static pci_iov_init_t linux_pci_iov_init;
+static pci_iov_uninit_t linux_pci_iov_uninit;
+static pci_iov_add_vf_t linux_pci_iov_add_vf;
 
 static device_method_t pci_methods[] = {
DEVMETHOD(device_probe, linux_pci_probe),
@@ -72,6 +80,9 @@ static device_method_t pci_methods[] = {
DEVMETHOD(device_suspend, linux_pci_suspend),
DEVMETHOD(device_resume, linux_pci_resume),
DEVMETHOD(device_shutdown, linux_pci_shutdown),
+   DEVMETHOD(pci_iov_init, linux_pci_iov_init),
+   DEVMETHOD(pci_iov_uninit, linux_pci_iov_uninit),
+   DEVMETHOD(pci_iov_add_vf, linux_pci_iov_add_vf),
DEVMETHOD_END
 };
 
@@ -268,6 +279,47 @@ linux_pci_shutdown(device_t dev)
if (pdev->pdrv->shutdown != NULL)
pdev->pdrv->shutdown(pdev);
return (0);
+}
+
+static int
+linux_pci_iov_init(device_t dev, uint16_t num_vfs, const nvlist_t *pf_config)
+{
+   struct pci_dev *pdev;
+   int error;
+
+   linux_set_current(curthread);
+   pdev = device_get_softc(dev);
+   if (pdev->pdrv->bsd_iov_init != NULL)
+   error = pdev->pdrv->bsd_iov_init(dev, num_vfs, pf_config);
+   else
+   error = EINVAL;
+   return (error);
+}
+
+static void
+linux_pci_iov_uninit(device_t dev)
+{
+   struct pci_dev *pdev;
+
+   linux_set_current(curthread);
+   pdev = device_get_softc(dev);
+   if (pdev->pdrv->bsd_iov_uninit != NULL)
+   pdev->pdrv->bsd_iov_uninit(dev);
+}
+
+static int
+linux_pci_iov_add_vf(device_t dev, uint16_t vfnum, const nvlist_t *vf_config)
+{
+   struct pci_dev *pdev;
+   int error;
+
+   linux_set_current(curthread);
+   pdev = device_get_softc(dev);
+   if (pdev->pdrv->bsd_iov_add_vf != NULL)
+   error = pdev->pdrv->bsd_iov_add_vf(dev, vfnum, vf_config);
+   else
+   error = EINVAL;
+   return (error);
 }
 
 static 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: r359512 - in head: contrib/bsnmp/lib contrib/bsnmp/snmp_mibII contrib/bsnmp/snmp_usm contrib/bsnmp/snmp_vacm contrib/bsnmp/snmpd contrib/bsnmp/tests lib/libbsnmp/libbsnmp

2020-04-01 Thread Hartmut Brandt
Author: harti
Date: Wed Apr  1 15:25:16 2020
New Revision: 359512
URL: https://svnweb.freebsd.org/changeset/base/359512

Log:
  Merge release 1.14 of bsnmp.

Added:
  head/contrib/bsnmp/tests/
 - copied from r359490, vendor/bsnmp/dist/tests/
Replaced:
  head/contrib/bsnmp/snmpd/trans_inet.c
 - copied unchanged from r359490, vendor/bsnmp/dist/snmpd/trans_inet.c
  head/contrib/bsnmp/snmpd/trans_inet.h
 - copied unchanged from r359490, vendor/bsnmp/dist/snmpd/trans_inet.h
Modified:
  head/contrib/bsnmp/lib/asn1.c
  head/contrib/bsnmp/lib/bsnmpclient.3
  head/contrib/bsnmp/lib/snmpclient.c
  head/contrib/bsnmp/lib/snmpcrypto.c
  head/contrib/bsnmp/snmp_mibII/mibII.c
  head/contrib/bsnmp/snmp_mibII/mibII.h
  head/contrib/bsnmp/snmp_usm/usm_snmp.c
  head/contrib/bsnmp/snmp_vacm/vacm_snmp.c
  head/contrib/bsnmp/snmpd/snmpd.config
  head/lib/libbsnmp/libbsnmp/Makefile
Directory Properties:
  head/contrib/bsnmp/   (props changed)

Modified: head/contrib/bsnmp/lib/asn1.c
==
--- head/contrib/bsnmp/lib/asn1.c   Wed Apr  1 15:12:51 2020
(r359511)
+++ head/contrib/bsnmp/lib/asn1.c   Wed Apr  1 15:25:16 2020
(r359512)
@@ -65,8 +65,8 @@ asn_get_header(struct asn_buf *b, u_char *type, asn_le
return (ASN_ERR_EOBUF);
}
*type = *b->asn_cptr;
-   if ((*type & ASN_TYPE_MASK) > 0x30) {
-   asn_error(b, "types > 0x30 not supported (%u)",
+   if ((*type & ASN_TYPE_MASK) > 0x1e) {
+   asn_error(b, "tags > 0x1e not supported (%#x)",
*type & ASN_TYPE_MASK);
return (ASN_ERR_FAILED);
}
@@ -100,11 +100,19 @@ asn_get_header(struct asn_buf *b, u_char *type, asn_le
*len = *b->asn_cptr++;
b->asn_len--;
}
+
+#ifdef BOGUS_CVE_2019_5610_FIX
+   /*
+* This is the fix from CVE-2019-5610.
+*
+* This is the wrong place. Each of the asn functions should check
+* that it has enough info for its own work.
+*/
if (*len > b->asn_len) {
-   asn_error(b, "len %u exceeding asn_len %u", *len, b->asn_len);
+   asn_error(b, "lenen %u exceeding asn_len %u", *len, b->asn_len);
return (ASN_ERR_EOBUF);
}
-   
+#endif
return (ASN_ERR_OK);
 }
 
@@ -147,7 +155,7 @@ asn_put_len(u_char *ptr, asn_len_t len)
 
 /*
  * Write a header (tag and length fields).
- * Tags are restricted to one byte tags (value <= 0x30) and the
+ * Tags are restricted to one byte tags (value <= 0x1e) and the
  * lenght field to 16-bit. All errors stop the encoding.
  */
 enum asn_err
@@ -156,8 +164,8 @@ asn_put_header(struct asn_buf *b, u_char type, asn_len
u_int lenlen;
 
/* tag field */
-   if ((type & ASN_TYPE_MASK) > 0x30) {
-   asn_error(NULL, "types > 0x30 not supported (%u)",
+   if ((type & ASN_TYPE_MASK) > 0x1e) {
+   asn_error(NULL, "types > 0x1e not supported (%#x)",
type & ASN_TYPE_MASK);
return (ASN_ERR_FAILED);
}
@@ -251,9 +259,10 @@ asn_get_real_integer(struct asn_buf *b, asn_len_t len,
return (ASN_ERR_BADLEN);
}
err = ASN_ERR_OK;
-   if (len > 8)
+   if (len > 8) {
+   asn_error(b, "integer too long");
err = ASN_ERR_RANGE;
-   else if (len > 1 &&
+   } else if (len > 1 &&
((*b->asn_cptr == 0x00 && (b->asn_cptr[1] & 0x80) == 0) ||
(*b->asn_cptr == 0xff && (b->asn_cptr[1] & 0x80) == 0x80))) {
asn_error(b, "non-minimal integer");
@@ -331,27 +340,35 @@ asn_put_real_integer(struct asn_buf *b, u_char type, i
 static enum asn_err
 asn_get_real_unsigned(struct asn_buf *b, asn_len_t len, uint64_t *vp)
 {
-   enum asn_err err;
-
+   *vp = 0;
if (b->asn_len < len) {
asn_error(b, "truncated integer");
return (ASN_ERR_EOBUF);
}
if (len == 0) {
+   /* X.690: 8.3.1 */
asn_error(b, "zero-length integer");
-   *vp = 0;
return (ASN_ERR_BADLEN);
}
-   err = ASN_ERR_OK;
-   *vp = 0;
-   if ((*b->asn_cptr & 0x80) || (len == 9 && *b->asn_cptr != 0)) {
+   if (len > 1 && *b->asn_cptr == 0x00 && (b->asn_cptr[1] & 0x80) == 0) {
+   /* X.690: 8.3.2 */
+   asn_error(b, "non-minimal unsigned");
+   b->asn_cptr += len;
+   b->asn_len -= len;
+   return (ASN_ERR_BADLEN);
+   
+   }
+
+   enum asn_err err = ASN_ERR_OK;
+
+   if ((*b->asn_cptr & 0x80) || len > 9 ||
+   (len == 9 && *b->asn_cptr != 0)) {
/* negative integer or too larger */
*vp = 0xULL;
-   err = ASN_ERR_RANGE;
-   } else if (len > 1 &&
-   *b->asn_cptr == 0x00 && (b->asn

Re: svn commit: r359514 - head/tools/test/bsnmp

2020-04-01 Thread Enji Cooper

> On Apr 1, 2020, at 08:56, Hartmut Brandt  wrote:
> 
> Author: harti
> Date: Wed Apr  1 15:39:02 2020
> New Revision: 359514
> URL: https://svnweb.freebsd.org/changeset/base/359514
> 
> Log:
>  Add a makefile to build and run the tests for the bsnmp library.
>  This is not automatically built or run but must explicitly be built
>  with 'make' and run with 'make run'.

Why was this integrated this way?
-Enji
___
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: r359519 - head/release/scripts

2020-04-01 Thread Ed Maste
Author: emaste
Date: Wed Apr  1 16:03:06 2020
New Revision: 359519
URL: https://svnweb.freebsd.org/changeset/base/359519

Log:
  pkgbase: remove more profile package leftovers
  
  As of r356797 we don't produce profile packages.  r358549 removed one
  remnant of profile package support; clean up another now.

Modified:
  head/release/scripts/mtree-to-plist.awk

Modified: head/release/scripts/mtree-to-plist.awk
==
--- head/release/scripts/mtree-to-plist.awk Wed Apr  1 16:02:42 2020
(r359518)
+++ head/release/scripts/mtree-to-plist.awk Wed Apr  1 16:03:06 2020
(r359519)
@@ -41,7 +41,7 @@
gsub(/package=/, "", pkgname)
} else if (a[i] == "config") {
type="config"
-   } else if (a[i] == "development" || a[i] == "profile" 
|| a[i] == "debug" || a[i] == "docs") {
+   } else if (a[i] == "development" || a[i] == "debug" || 
a[i] == "docs") {
pkgend=a[i]
} else {
if (ext != "")
___
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: r359518 - stable/11/sys/x86/x86

2020-04-01 Thread Konstantin Belousov
Author: kib
Date: Wed Apr  1 16:02:42 2020
New Revision: 359518
URL: https://svnweb.freebsd.org/changeset/base/359518

Log:
  MFC r359093:
  Do not spuriously re-enable disabled io_apic pin on EOI for some 
configurations.

Modified:
  stable/11/sys/x86/x86/io_apic.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/x86/x86/io_apic.c
==
--- stable/11/sys/x86/x86/io_apic.c Wed Apr  1 16:01:03 2020
(r359517)
+++ stable/11/sys/x86/x86/io_apic.c Wed Apr  1 16:02:42 2020
(r359518)
@@ -191,8 +191,11 @@ _ioapic_eoi_source(struct intsrc *isrc, int locked)
low1 |= IOART_TRGREDG | IOART_INTMSET;
ioapic_write(io->io_addr, IOAPIC_REDTBL_LO(src->io_intpin),
low1);
+   low1 = src->io_lowreg;
+   if (src->io_masked != 0)
+   low1 |= IOART_INTMSET;
ioapic_write(io->io_addr, IOAPIC_REDTBL_LO(src->io_intpin),
-   src->io_lowreg);
+   low1);
if (!locked)
mtx_unlock_spin(&icu_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: r359517 - stable/12/sys/x86/x86

2020-04-01 Thread Konstantin Belousov
Author: kib
Date: Wed Apr  1 16:01:03 2020
New Revision: 359517
URL: https://svnweb.freebsd.org/changeset/base/359517

Log:
  MFC r359093:
  Do not spuriously re-enable disabled io_apic pin on EOI for some 
configurations.

Modified:
  stable/12/sys/x86/x86/io_apic.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/x86/x86/io_apic.c
==
--- stable/12/sys/x86/x86/io_apic.c Wed Apr  1 15:59:26 2020
(r359516)
+++ stable/12/sys/x86/x86/io_apic.c Wed Apr  1 16:01:03 2020
(r359517)
@@ -194,8 +194,11 @@ _ioapic_eoi_source(struct intsrc *isrc, int locked)
low1 |= IOART_TRGREDG | IOART_INTMSET;
ioapic_write(io->io_addr, IOAPIC_REDTBL_LO(src->io_intpin),
low1);
+   low1 = src->io_lowreg;
+   if (src->io_masked != 0)
+   low1 |= IOART_INTMSET;
ioapic_write(io->io_addr, IOAPIC_REDTBL_LO(src->io_intpin),
-   src->io_lowreg);
+   low1);
if (!locked)
mtx_unlock_spin(&icu_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: r359516 - stable/12/sys/x86/x86

2020-04-01 Thread Konstantin Belousov
Author: kib
Date: Wed Apr  1 15:59:26 2020
New Revision: 359516
URL: https://svnweb.freebsd.org/changeset/base/359516

Log:
  MFC r359092:
  Stop (trying to) renumber io apics.

Modified:
  stable/12/sys/x86/x86/io_apic.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/x86/x86/io_apic.c
==
--- stable/12/sys/x86/x86/io_apic.c Wed Apr  1 15:57:14 2020
(r359515)
+++ stable/12/sys/x86/x86/io_apic.c Wed Apr  1 15:59:26 2020
(r359516)
@@ -95,7 +95,8 @@ struct ioapic_intsrc {
 struct ioapic {
struct pic io_pic;
u_int io_id:8;  /* logical ID */
-   u_int io_apic_id:8;
+   u_int io_apic_id:8; /* Id as enumerated by MADT */
+   u_int io_hw_apic_id:8;  /* Content of APIC ID register */
u_int io_intbase:8; /* System Interrupt base */
u_int io_numintr:8;
u_int io_haseoi:1;
@@ -635,15 +636,12 @@ ioapic_create(vm_paddr_t addr, int32_t apic_id, int in
io->pci_wnd = NULL;
mtx_lock_spin(&icu_lock);
io->io_id = next_id++;
-   io->io_apic_id = ioapic_read(apic, IOAPIC_ID) >> APIC_ID_SHIFT;
-   if (apic_id != -1 && io->io_apic_id != apic_id) {
-   ioapic_write(apic, IOAPIC_ID, apic_id << APIC_ID_SHIFT);
-   mtx_unlock_spin(&icu_lock);
-   io->io_apic_id = apic_id;
-   printf("ioapic%u: Changing APIC ID to %d\n", io->io_id,
-   apic_id);
-   } else
-   mtx_unlock_spin(&icu_lock);
+   io->io_hw_apic_id = ioapic_read(apic, IOAPIC_ID) >> APIC_ID_SHIFT;
+   io->io_apic_id = apic_id == -1 ? io->io_hw_apic_id : apic_id;
+   mtx_unlock_spin(&icu_lock);
+   if (io->io_hw_apic_id != apic_id)
+   printf("ioapic%u: MADT APIC ID %d != hw id %d\n", io->io_id,
+   apic_id, io->io_hw_apic_id);
if (intbase == -1) {
intbase = next_ioapic_base;
printf("ioapic%u: Assuming intbase of %d\n", io->io_id,
@@ -1018,14 +1016,14 @@ ioapic_pci_attach(device_t dev)
}
/* Then by apic id */
STAILQ_FOREACH(io, &ioapic_list, io_next) {
-   if (io->io_apic_id == apic_id)
+   if (io->io_hw_apic_id == apic_id)
goto found;
}
mtx_unlock_spin(&icu_lock);
if (bootverbose)
device_printf(dev,
-   "cannot match pci bar apic id %d against MADT\n",
-   apic_id);
+   "cannot match pci bar apic id %d against MADT, BAR0 %#jx\n",
+   apic_id, (uintmax_t)rman_get_start(res));
 fail:
bus_release_resource(dev, SYS_RES_MEMORY, rid, res);
return (ENXIO);
@@ -1038,13 +1036,13 @@ found:
io->pci_dev = dev;
io->pci_wnd = res;
if (bootverbose && (io->io_paddr != (vm_paddr_t)rman_get_start(res) ||
-   io->io_apic_id != apic_id)) {
+   io->io_hw_apic_id != apic_id)) {
device_printf(dev, "pci%d:%d:%d:%d pci BAR0@%jx id %d "
-   "MADT id %d paddr@%jx\n",
+   "MADT id %d hw id %d paddr@%jx\n",
pci_get_domain(dev), pci_get_bus(dev),
pci_get_slot(dev), pci_get_function(dev),
(uintmax_t)rman_get_start(res), apic_id,
-   io->io_apic_id, (uintmax_t)io->io_paddr);
+   io->io_apic_id, io->io_hw_apic_id, (uintmax_t)io->io_paddr);
}
mtx_unlock_spin(&icu_lock);
return (0);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r359513 - head/share/man/man5

2020-04-01 Thread Ed Maste
Author: emaste
Date: Wed Apr  1 15:34:10 2020
New Revision: 359513
URL: https://svnweb.freebsd.org/changeset/base/359513

Log:
  elf.5: add definitions of FreeBSD notes
  
  I hope to extend this with some more detail in the future but it gives
  a good starting point.
  
  Thanks to 0mp for assistance with markup.
  
  Reviewed by:  jkoshy
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D23982

Modified:
  head/share/man/man5/elf.5

Modified: head/share/man/man5/elf.5
==
--- head/share/man/man5/elf.5   Wed Apr  1 15:25:16 2020(r359512)
+++ head/share/man/man5/elf.5   Wed Apr  1 15:34:10 2020(r359513)
@@ -1296,6 +1296,32 @@ fields are padded to ensure 4-byte alignemnt.
 and
 .Va descsz
 specify the unpadded length.
+.Pp
+.Fx
+defines the following ELF note types
+.Po with corresponding interpretation of
+.Va desc Pc :
+.Bl -tag -width 4n
+.It Dv NT_FREEBSD_ABI_TAG Pq Value: 1
+Indicates the OS ABI version in a form of a 32-bit integer containing expected
+ABI version
+.Po i.e.,
+.Dv __FreeBSD_version Pc .
+.It Dv NT_FREEBSD_NOINIT_TAG Pq Value: 2
+Indicates that crt does not call init.
+.Va desc
+is ignored.
+.It Dv NT_FREEBSD_ARCH_TAG Pq Value: 3
+.It Dv NT_FREEBSD_FEATURE_CTL Pq Value: 4
+Contains a bitmask of mitigations and features to enable:
+.Bl -column "NT_FREEBSD_FCTL_PROTMAX_DISABLE" "0x00" "Disable implicit 
PROT_MAX"
+.Sy Name Ta Sy Value Ta Sy Description
+.It NT_FREEBSD_FCTL_ASLR_DISABLETa 0x01 Ta Disable ASLR
+.It NT_FREEBSD_FCTL_PROTMAX_DISABLE Ta 0x02 Ta Disable implicit PROT_MAX
+.It NT_FREEBSD_FCTL_STKGAP_DISABLE  Ta 0x04 Ta Disable stack gap
+.It NT_FREEBSD_FCTL_WXNEEDEDTa 0x08 Ta Binary makes W+X mappings
+.El
+.El
 .Sh SEE ALSO
 .Xr as 1 ,
 .Xr gdb 1 ,
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r359511 - head/bin/sh

2020-04-01 Thread Edward Tomasz Napierala
Author: trasz
Date: Wed Apr  1 15:12:51 2020
New Revision: 359511
URL: https://svnweb.freebsd.org/changeset/base/359511

Log:
  Bump WARNS for sh(1).
  
  Reviewed by:  jilles
  MFC after:2 weeks
  Sponsored by: DARPA
  Differential Revision:https://reviews.freebsd.org/D24181

Modified:
  head/bin/sh/Makefile

Modified: head/bin/sh/Makefile
==
--- head/bin/sh/MakefileWed Apr  1 15:10:26 2020(r359510)
+++ head/bin/sh/MakefileWed Apr  1 15:12:51 2020(r359511)
@@ -30,8 +30,6 @@ LIBADD=   edit
 CFLAGS+=-DSHELL -I. -I${.CURDIR}
 # for debug:
 # DEBUG_FLAGS+= -g -DDEBUG=2 -fno-inline
-WARNS?=2
-WFORMAT=0
 
 .PATH: ${.CURDIR}/bltin \
${.CURDIR:H}/kill \
___
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: r359499 - head/sys/dev/ahci

2020-04-01 Thread Alexander Motin
Hi.

On 01.04.2020 00:28, Ravi Pokala wrote:
> -Original Message-
> From:  on behalf of Alexander Motin 
> 
> Date: 2020-03-31, Tuesday at 20:19
> To: , , 
> 
> Subject: svn commit: r359499 - head/sys/dev/ahci
> 
> Author: mav
> Date: Wed Apr  1 03:19:42 2020
> New Revision: 359499
> URL: https://svnweb.freebsd.org/changeset/base/359499
> 
> Log:
>   Add ID for JMicron JMB582/JMB585 AHCI controller.
>   
>   JMB582 has 2 6Gbps SATA ports and PCIe 3.0 x1.
>   JMB585 has 5 6Gbps SATA ports and PCIe 3.0 x2.
>   
>   Both chips support AHCI v1.31, Port Multiplier with FBS and 8 MSI 
> vectors.
> 
> Hi Alexander,
> 
> The second line of diff seems unrelated...?

It is related, because the check for shared PCI function for SATA and
PATA is no longer applicable to the new generation of HBAs, implementing
only AHCI.  And without adding more strict check the driver does not
attach when it should.

> 
>   MFC after:  2 weeks
> 
> Modified:
>   head/sys/dev/ahci/ahci_pci.c
> 
> Modified: head/sys/dev/ahci/ahci_pci.c
> 
> ==
> --- head/sys/dev/ahci/ahci_pci.c  Wed Apr  1 02:13:01 2020
> (r359498)
> +++ head/sys/dev/ahci/ahci_pci.c  Wed Apr  1 03:19:42 2020
> (r359499)
> @@ -247,6 +247,7 @@ static const struct {
>   {0x2365197b, 0x00, "JMicron JMB365",AHCI_Q_NOFORCE},
>   {0x2366197b, 0x00, "JMicron JMB366",AHCI_Q_NOFORCE},
>   {0x2368197b, 0x00, "JMicron JMB368",AHCI_Q_NOFORCE},
> + {0x0585197b, 0x00, "JMicron JMB58x",0},
>   {0x61ab, 0x00, "Marvell 88SE6111",  AHCI_Q_NOFORCE | AHCI_Q_NOPMP |
>   AHCI_Q_1CH | AHCI_Q_EDGEIS},
>   {0x612111ab, 0x00, "Marvell 88SE6121",  AHCI_Q_NOFORCE | AHCI_Q_NOPMP |
> @@ -399,6 +400,7 @@ ahci_probe(device_t dev)
>!(ahci_ids[i].quirks & AHCI_Q_NOFORCE {
>   /* Do not attach JMicrons with single PCI function. */
>   if (pci_get_vendor(dev) == 0x197b &&
> + (ahci_ids[i].quirks & AHCI_Q_NOFORCE) &&
>   (pci_read_config(dev, 0xdf, 1) & 0x40) == 0)
>   return (ENXIO);
>   snprintf(buf, sizeof(buf), "%s AHCI SATA controller",
> 
> 
> 

-- 
Alexander Motin
___
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: r359504 - head/lib/libc/locale

2020-04-01 Thread Mateusz Piotrowski
Author: 0mp (doc,ports committer)
Date: Wed Apr  1 09:01:35 2020
New Revision: 359504
URL: https://svnweb.freebsd.org/changeset/base/359504

Log:
  Use proper mdoc(7) macros for literal text and do not use Tn
  
  Tn is deprecated and upsets linters.
  
  MFC after:3 days

Modified:
  head/lib/libc/locale/big5.5

Modified: head/lib/libc/locale/big5.5
==
--- head/lib/libc/locale/big5.5 Wed Apr  1 07:28:31 2020(r359503)
+++ head/lib/libc/locale/big5.5 Wed Apr  1 09:01:35 2020(r359504)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd September 12, 2019
+.Dd April 1, 2020
 .Dt BIG5 5
 .Os
 .Sh NAME
@@ -39,9 +39,8 @@ encoding for Traditional Chinese text
 .Dq Big Five
 is a standard for encoding Traditional Chinese text.
 Each character is represented by either one or two bytes.
-Characters from the
-.Tn ASCII
-character set are represented as single bytes in the range 0x00 - 0x7F.
+Characters from the ASCII character set are represented as
+single bytes in the range 0x00 - 0x7F.
 Traditional Chinese characters are represented by two bytes:
 the first in the range 0xA1 - 0xFE, the second in the range
 0x40 - 0xFE.
@@ -51,7 +50,11 @@ the first in the range 0xA1 - 0xFE, the second in the 
 .Xr utf8 5
 .Sh BUGS
 The range of the second byte overlaps some ASCII characters, including
-0x5C (`\\') and 0x7C (`|') which may cause problems in program execution or
+0x5C
+.Pq Ql \e
+and 0x7C
+.Pq Ql |
+which may cause problems in program execution or
 display.
 Big5 is considered a legacy standard and only preserved for backward
 compatibility reason.
___
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: r359503 - in head

2020-04-01 Thread Cy Schubert
On April 1, 2020 5:06:06 AM PDT, Cy Schubert  wrote:
>On March 31, 2020 10:53:14 PM PDT, Glen Barber  wrote:
>>Author: gjb
>>Date: Wed Apr  1 05:51:46 UTC 2020
>>New Revision: 359503
>>URL: https://svnweb.freebsd.org/changeset/base/359503
>>
>>Log:
>>  Update head to 14.0-CURRENT in order to prevent having
>>  a 13.0-RELEASE.
>>
>>Modified:
>>  Makefile.inc1
>>  UPDATING
>>  lib/clang/freebsd_cc_version.h
>>  lib/clang/llvm.build.mk
>>  sys/conf/newvers.sh
>>  sys/sys/param.h
>>
>>Index: Makefile.inc1
>>===
>>--- Makefile.inc1 (revision 359501)
>>+++ Makefile.inc1 (working copy)
>>@@ -130,9 +130,9 @@ TARGET_ABI=   gnueabi
>> .endif
>> .endif
>> MACHINE_ABI?=unknown
>>-MACHINE_TRIPLE?=${MACHINE_ARCH:S/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${MACHINE_ABI}-freebsd13.0
>>+MACHINE_TRIPLE?=${MACHINE_ARCH:S/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${MACHINE_ABI}-freebsd14.0
>> TARGET_ABI?= unknown
>>-TARGET_TRIPLE?=  
>>${TARGET_ARCH:S/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${TARGET_ABI}-freebsd13.0
>>+TARGET_TRIPLE?=  
>>${TARGET_ARCH:S/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${TARGET_ABI}-freebsd14.0
>> KNOWN_ARCHES?=   aarch64/arm64 \
>>  amd64 \
>>  armv6/arm \
>>@@ -2123,7 +2123,7 @@ ${_bt}-lib/libdwarf: ${_bt_m4_depend}
>> .endif
>> 
>># flua is required to regenerate syscall files.  It first appeared
>>during the
>>-# 13.0-CURRENT cycle, thus needs to be built on -older releases and
>>stable
>>+# 14.0-CURRENT cycle, thus needs to be built on -older releases and
>>stable
>> # branches.
>> .if ${BOOTSTRAPPING} < 1300059
>> ${_bt}-libexec/flua: ${_bt}-lib/liblua
>>Index: UPDATING
>>===
>>--- UPDATING  (revision 359501)
>>+++ UPDATING  (working copy)
>>@@ -11,8 +11,8 @@ handbook:
>> Items affecting the ports and packages system can be found in
>>/usr/ports/UPDATING.  Please read that file before running
>portupgrade.
>> 
>>-NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW:
>>- FreeBSD 13.x has many debugging features turned on, in both the
>>kernel
>>+NOTE TO PEOPLE WHO THINK THAT FreeBSD 14.x IS SLOW:
>>+ FreeBSD 14.x has many debugging features turned on, in both the
>>kernel
>>  and userland.  These features attempt to detect incorrect use of
>>  system primitives, and encourage loud failure through extra sanity
>>  checking and fail stop semantics.  They also substantially impact
>>Index: lib/clang/freebsd_cc_version.h
>>===
>>--- lib/clang/freebsd_cc_version.h(revision 359501)
>>+++ lib/clang/freebsd_cc_version.h(working copy)
>>@@ -1,3 +1,3 @@
>> /* $FreeBSD$ */
>> 
>>-#define  FREEBSD_CC_VERSION  137
>>+#define  FREEBSD_CC_VERSION  147
>>Index: lib/clang/llvm.build.mk
>>===
>>--- lib/clang/llvm.build.mk   (revision 359501)
>>+++ lib/clang/llvm.build.mk   (working copy)
>>@@ -38,7 +38,7 @@ TARGET_ABI= -gnueabi
>> TARGET_ABI=
>> .endif
>> VENDOR=  unknown
>>-OS_VERSION=  freebsd13.0
>>+OS_VERSION=  freebsd14.0
>> 
>>LLVM_TARGET_TRIPLE?=  
>>${TARGET_ARCH:C/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${VENDOR}-${OS_VERSION}${TARGET_ABI}
>>LLVM_BUILD_TRIPLE?=   
>>${BUILD_ARCH:C/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${VENDOR}-${OS_VERSION}
>>Index: sys/conf/newvers.sh
>>===
>>--- sys/conf/newvers.sh   (revision 359501)
>>+++ sys/conf/newvers.sh   (working copy)
>>@@ -53,7 +53,7 @@
>> #
>> 
>> TYPE="FreeBSD"
>>-REVISION="13.0"
>>+REVISION="14.0"
>> BRANCH=${BRANCH_OVERRIDE:-CURRENT}
>> RELEASE="${REVISION}-${BRANCH}"
>> VERSION="${TYPE} ${RELEASE}"
>>Index: sys/sys/param.h
>>===
>>--- sys/sys/param.h   (revision 359501)
>>+++ sys/sys/param.h   (working copy)
>>@@ -60,7 +60,7 @@
>>  *   in the range 5 to 9.
>>  */
>> #undef __FreeBSD_version
>>-#define __FreeBSD_version 1300087/* Master, propagated to newvers */
>>+#define __FreeBSD_version 1400087/* Master, propagated to newvers */
>> 
>> /*
>>* __FreeBSD_kernel__ indicates that this system uses the kernel of
>>FreeBSD,
>
>This was discussed at length just before 12 was released. Are you now
>the one to decide naming, disregarding the discussion?
>
>Should we not have also skipped 4?

Ok. I've been had. Woke up at 4 am and half asleep and exceptionally grumpy, as 
I have been first thing in the morning the last few months. I didn't clue into 
which day it was. Yet. I'm awake now ready to tackle today's insanity. 



-- 
Pardon the typos and autocorrect, small keyboard in use. 
Cy Schubert 
FreeBSD UNIX:  Web: https://www.FreeBSD.org

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

Sent from my 

svn commit: r359503 - stable/12/usr.bin/posixshmcontrol

2020-04-01 Thread Mateusz Piotrowski
Author: 0mp (doc,ports committer)
Date: Wed Apr  1 07:28:31 2020
New Revision: 359503
URL: https://svnweb.freebsd.org/changeset/base/359503

Log:
  MFC 359071:
  
  Document that posixshmcontrol first appeared in 12.1
  
  Also while here, I am addressing some linting issues.
  
  PR:   243132
  Submitted by: Noah Altunian 
  Approved by:  bcr (mentor)
  Differential Revision:https://reviews.freebsd.org/D24112

Modified:
  stable/12/usr.bin/posixshmcontrol/posixshmcontrol.1
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/usr.bin/posixshmcontrol/posixshmcontrol.1
==
--- stable/12/usr.bin/posixshmcontrol/posixshmcontrol.1 Wed Apr  1 05:45:12 
2020(r359502)
+++ stable/12/usr.bin/posixshmcontrol/posixshmcontrol.1 Wed Apr  1 07:28:31 
2020(r359503)
@@ -27,7 +27,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd May 30, 2019
+.Dd March 18, 2020
 .Dt POSIXSHMCONTROL 1
 .Os
 .Sh NAME
@@ -99,7 +99,7 @@ Argument to the
 .Fl s
 option specifies new length.
 The human-friendly 'k', 'm', 'g' suffixes can be used, see
-.Xr expand_number 3.
+.Xr expand_number 3 .
 If the option is not specified, assumed length is zero.
 .El
 .Pp
@@ -143,10 +143,12 @@ and then enlarge it to 1M, use the sequence of command
 The
 .Nm
 command appeared in
-.Fx 13.0 .
+.Fx 12.1 .
 .Sh AUTHORS
 The
 .Nm
 command and this manual page were written by
 .An Konstantin Belousov Aq Mt k...@freebsd.org
-under sponsorship from The FreeBSD Foundation.
+under sponsorship from The
+.Fx
+Foundation.
___
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: r359503 - in head

2020-04-01 Thread Li-Wen Hsu
On Wed, Apr 1, 2020 at 1:53 PM Glen Barber  wrote:
>
> Author: gjb
> Date: Wed Apr  1 05:51:46 UTC 2020
> New Revision: 359503
> URL: https://svnweb.freebsd.org/changeset/base/359503
>
> Log:
>   Update head to 14.0-CURRENT in order to prevent having
>   a 13.0-RELEASE.
...
> Index: sys/sys/param.h
> ===
> --- sys/sys/param.h (revision 359501)
> +++ sys/sys/param.h (working copy)
> @@ -60,7 +60,7 @@
>   * in the range 5 to 9.
>   */
>  #undef __FreeBSD_version
> -#define __FreeBSD_version 1300087  /* Master, propagated to newvers */
> +#define __FreeBSD_version 1400087  /* Master, propagated to newvers */

I think we want 140 here :-)
___
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: r359505 - head/usr.sbin/jail

2020-04-01 Thread Andrew Turner
Author: andrew
Date: Wed Apr  1 09:51:29 2020
New Revision: 359505
URL: https://svnweb.freebsd.org/changeset/base/359505

Log:
  Use memmove to copy within a buffer
  
  jail(8) would try to use strcpy to remove the interface from the start of
  an IP address. This is undefined, and on arm64 will result in unexpected
  IPv6 addresses.
  
  Fix this by using memmove top move the string.
  
  PR:   245102
  Reported by:  sbruno
  MFC after:2 weeks
  Sponsored by: Innovate UK

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

Modified: head/usr.sbin/jail/config.c
==
--- head/usr.sbin/jail/config.c Wed Apr  1 09:01:35 2020(r359504)
+++ head/usr.sbin/jail/config.c Wed Apr  1 09:51:29 2020(r359505)
@@ -596,8 +596,8 @@ check_intparams(struct cfjail *j)
if (cs || defif)
add_param(j, NULL, IP__IP4_IFADDR, s->s);
if (cs) {
-   strcpy(s->s, cs + 1);
s->len -= cs + 1 - s->s;
+   memmove(s->s, cs + 1, s->len + 1);
}
if ((cs = strchr(s->s, '/')) != NULL) {
*cs = '\0';
@@ -617,8 +617,8 @@ check_intparams(struct cfjail *j)
if (cs || defif)
add_param(j, NULL, IP__IP6_IFADDR, s->s);
if (cs) {
-   strcpy(s->s, cs + 1);
s->len -= cs + 1 - s->s;
+   memmove(s->s, cs + 1, s->len + 1);
}
if ((cs = strchr(s->s, '/')) != NULL) {
*cs = '\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"


Re: svn commit: r359503 - in head

2020-04-01 Thread Glen Barber
On Wed, Apr 01, 2020 at 02:11:02PM +0800, Li-Wen Hsu wrote:
> On Wed, Apr 1, 2020 at 1:53 PM Glen Barber  wrote:
> >
> > Author: gjb
> > Date: Wed Apr  1 05:51:46 UTC 2020
> > New Revision: 359503
> > URL: https://svnweb.freebsd.org/changeset/base/359503
> >
> > Log:
> >   Update head to 14.0-CURRENT in order to prevent having
> >   a 13.0-RELEASE.
> ...
> > Index: sys/sys/param.h
> > ===
> > --- sys/sys/param.h (revision 359501)
> > +++ sys/sys/param.h (working copy)
> > @@ -60,7 +60,7 @@
> >   * in the range 5 to 9.
> >   */
> >  #undef __FreeBSD_version
> > -#define __FreeBSD_version 1300087  /* Master, propagated to newvers */
> > +#define __FreeBSD_version 1400087  /* Master, propagated to newvers */
> 
> I think we want 140 here :-)
> 

You are correct.  I will fix it after dealing with the influx of
complaints about this commit.

Glen



signature.asc
Description: PGP signature


svn commit: r359502 - in head: lib/libveriexec share/mk

2020-04-01 Thread Simon J. Gerraty
Author: sjg
Date: Wed Apr  1 05:45:12 2020
New Revision: 359502
URL: https://svnweb.freebsd.org/changeset/base/359502

Log:
  Do not claim libbearssl et al are INTERNALLIB
  
  If INTERNALLIB is defined we need PIE and bsd.incs.mk is
  not included.
  
  PR:   245189
  Reviewed by:  emaste
  MFC after:1 week
  Differential Revision: https://reviews.freebsd.org//D24233

Modified:
  head/lib/libveriexec/Makefile
  head/share/mk/src.libnames.mk

Modified: head/lib/libveriexec/Makefile
==
--- head/lib/libveriexec/Makefile   Wed Apr  1 04:51:39 2020
(r359501)
+++ head/lib/libveriexec/Makefile   Wed Apr  1 05:45:12 2020
(r359502)
@@ -1,6 +1,6 @@
 # $FreeBSD$
 
-.include 
+.include 
 
 LIB=   veriexec
 MAN=   veriexec.3

Modified: head/share/mk/src.libnames.mk
==
--- head/share/mk/src.libnames.mk   Wed Apr  1 04:51:39 2020
(r359501)
+++ head/share/mk/src.libnames.mk   Wed Apr  1 05:45:12 2020
(r359502)
@@ -222,18 +222,18 @@ _LIBRARIES+= \
 .endif
 
 .if ${MK_BEARSSL} == "yes"
-_INTERNALLIBS+= \
+_LIBRARIES+= \
bearssl \
secureboot \
 
-LIBBEARSSL?=   ${LIBBEARSSLDIR}/libbearssl${PIE_SUFFIX}.a
-LIBSECUREBOOT?=${LIBSECUREBOOTDIR}/libsecureboot${PIE_SUFFIX}.a
+LIBBEARSSL?=   ${LIBBEARSSLDIR}/libbearssl.a
+LIBSECUREBOOT?=${LIBSECUREBOOTDIR}/libsecureboot.a
 .endif
 
 .if ${MK_VERIEXEC} == "yes"
-_INTERNALLIBS+= veriexec
+_LIBRARIES+= veriexec
 
-LIBVERIEXEC?=  ${LIBVERIEXECDIR}/libveriexec${PIE_SUFFIX}.a
+LIBVERIEXEC?=  ${LIBVERIEXECDIR}/libveriexec.a
 .endif
 
 # Each library's LIBADD needs to be duplicated here for static linkage 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: r359503 - in head

2020-04-01 Thread Glen Barber
Author: gjb
Date: Wed Apr  1 05:51:46 UTC 2020
New Revision: 359503
URL: https://svnweb.freebsd.org/changeset/base/359503

Log:
  Update head to 14.0-CURRENT in order to prevent having
  a 13.0-RELEASE.

Modified:
  Makefile.inc1
  UPDATING
  lib/clang/freebsd_cc_version.h
  lib/clang/llvm.build.mk
  sys/conf/newvers.sh
  sys/sys/param.h

Index: Makefile.inc1
===
--- Makefile.inc1   (revision 359501)
+++ Makefile.inc1   (working copy)
@@ -130,9 +130,9 @@ TARGET_ABI= gnueabi
 .endif
 .endif
 MACHINE_ABI?=  unknown
-MACHINE_TRIPLE?=${MACHINE_ARCH:S/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${MACHINE_ABI}-freebsd13.0
+MACHINE_TRIPLE?=${MACHINE_ARCH:S/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${MACHINE_ABI}-freebsd14.0
 TARGET_ABI?=   unknown
-TARGET_TRIPLE?=
${TARGET_ARCH:S/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${TARGET_ABI}-freebsd13.0
+TARGET_TRIPLE?=
${TARGET_ARCH:S/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${TARGET_ABI}-freebsd14.0
 KNOWN_ARCHES?= aarch64/arm64 \
amd64 \
armv6/arm \
@@ -2123,7 +2123,7 @@ ${_bt}-lib/libdwarf: ${_bt_m4_depend}
 .endif
 
 # flua is required to regenerate syscall files.  It first appeared during the
-# 13.0-CURRENT cycle, thus needs to be built on -older releases and stable
+# 14.0-CURRENT cycle, thus needs to be built on -older releases and stable
 # branches.
 .if ${BOOTSTRAPPING} < 1300059
 ${_bt}-libexec/flua: ${_bt}-lib/liblua
Index: UPDATING
===
--- UPDATING(revision 359501)
+++ UPDATING(working copy)
@@ -11,8 +11,8 @@ handbook:
 Items affecting the ports and packages system can be found in
 /usr/ports/UPDATING.  Please read that file before running portupgrade.
 
-NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW:
-   FreeBSD 13.x has many debugging features turned on, in both the kernel
+NOTE TO PEOPLE WHO THINK THAT FreeBSD 14.x IS SLOW:
+   FreeBSD 14.x has many debugging features turned on, in both the kernel
and userland.  These features attempt to detect incorrect use of
system primitives, and encourage loud failure through extra sanity
checking and fail stop semantics.  They also substantially impact
Index: lib/clang/freebsd_cc_version.h
===
--- lib/clang/freebsd_cc_version.h  (revision 359501)
+++ lib/clang/freebsd_cc_version.h  (working copy)
@@ -1,3 +1,3 @@
 /* $FreeBSD$ */
 
-#defineFREEBSD_CC_VERSION  137
+#defineFREEBSD_CC_VERSION  147
Index: lib/clang/llvm.build.mk
===
--- lib/clang/llvm.build.mk (revision 359501)
+++ lib/clang/llvm.build.mk (working copy)
@@ -38,7 +38,7 @@ TARGET_ABI=   -gnueabi
 TARGET_ABI=
 .endif
 VENDOR=unknown
-OS_VERSION=freebsd13.0
+OS_VERSION=freebsd14.0
 
 LLVM_TARGET_TRIPLE?=   
${TARGET_ARCH:C/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${VENDOR}-${OS_VERSION}${TARGET_ABI}
 LLVM_BUILD_TRIPLE?=
${BUILD_ARCH:C/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${VENDOR}-${OS_VERSION}
Index: sys/conf/newvers.sh
===
--- sys/conf/newvers.sh (revision 359501)
+++ sys/conf/newvers.sh (working copy)
@@ -53,7 +53,7 @@
 #
 
 TYPE="FreeBSD"
-REVISION="13.0"
+REVISION="14.0"
 BRANCH=${BRANCH_OVERRIDE:-CURRENT}
 RELEASE="${REVISION}-${BRANCH}"
 VERSION="${TYPE} ${RELEASE}"
Index: sys/sys/param.h
===
--- sys/sys/param.h (revision 359501)
+++ sys/sys/param.h (working copy)
@@ -60,7 +60,7 @@
  * in the range 5 to 9.
  */
 #undef __FreeBSD_version
-#define __FreeBSD_version 1300087  /* Master, propagated to newvers */
+#define __FreeBSD_version 1400087  /* Master, propagated to newvers */
 
 /*
  * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
___
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"