svn commit: r354126 - in head: etc/mtree lib/libexecinfo lib/libexecinfo/tests

2019-10-26 Thread Conrad Meyer
Author: cem
Date: Sun Oct 27 05:32:08 2019
New Revision: 354126
URL: https://svnweb.freebsd.org/changeset/base/354126

Log:
  libexecinfo: Integrate NetBSD test into FreeBSD

Added:
  head/lib/libexecinfo/tests/
  head/lib/libexecinfo/tests/Makefile   (contents, props changed)
Modified:
  head/etc/mtree/BSD.tests.dist
  head/lib/libexecinfo/Makefile

Modified: head/etc/mtree/BSD.tests.dist
==
--- head/etc/mtree/BSD.tests.dist   Sun Oct 27 04:10:49 2019
(r354125)
+++ head/etc/mtree/BSD.tests.dist   Sun Oct 27 05:32:08 2019
(r354126)
@@ -384,6 +384,8 @@
 ..
 libdevdctl
 ..
+libexecinfo
+..
 libkvm
 ..
 libmp

Modified: head/lib/libexecinfo/Makefile
==
--- head/lib/libexecinfo/Makefile   Sun Oct 27 04:10:49 2019
(r354125)
+++ head/lib/libexecinfo/Makefile   Sun Oct 27 05:32:08 2019
(r354126)
@@ -1,12 +1,13 @@
 # $FreeBSD$
 
 PACKAGE=lib${LIB}
-LIBEXECINFO=   ${SRCTOP}/contrib/libexecinfo
 
+.include 
+
 LIB=   execinfo
 SHLIB_MAJOR=   1
 
-.PATH: ${LIBEXECINFO}
+.PATH: ${SRCTOP}/contrib/libexecinfo
 
 INCS=  execinfo.h
 SRCS=  backtrace.c symtab.c unwind.c
@@ -20,5 +21,8 @@ MLINKS+=  backtrace.3 backtrace_symbols.3
 MLINKS+=   backtrace.3 backtrace_symbols_fmt.3
 MLINKS+=   backtrace.3 backtrace_symbols_fd.3
 MLINKS+=   backtrace.3 backtrace_symbols_fd_fmt.3
+
+HAS_TESTS=
+SUBDIR.${MK_TESTS}+= tests
 
 .include 

Added: head/lib/libexecinfo/tests/Makefile
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/lib/libexecinfo/tests/Makefile Sun Oct 27 05:32:08 2019
(r354126)
@@ -0,0 +1,15 @@
+# $FreeBSD$
+
+PACKAGE=   tests
+
+TESTSRC=   ${SRCTOP}/contrib/netbsd-tests/lib/libexecinfo
+
+.include 
+
+NETBSD_ATF_TESTS_C+=   backtrace_test
+
+LIBADD.backtrace_test+=execinfo
+
+.include 
+
+.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: r354125 - stable/11/sys/ufs/ufs

2019-10-26 Thread Kirk McKusick
Author: mckusick
Date: Sun Oct 27 04:10:49 2019
New Revision: 354125
URL: https://svnweb.freebsd.org/changeset/base/354125

Log:
  MFC of 354050
  
  Ensure that ctime update is visible immediately

Modified:
  stable/11/sys/ufs/ufs/ufs_lookup.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/ufs/ufs/ufs_lookup.c
==
--- stable/11/sys/ufs/ufs/ufs_lookup.c  Sun Oct 27 04:09:24 2019
(r354124)
+++ stable/11/sys/ufs/ufs/ufs_lookup.c  Sun Oct 27 04:10:49 2019
(r354125)
@@ -1176,6 +1176,7 @@ ufs_dirremove(dvp, ip, flags, isrmdir)
 */
if (ip) {
ip->i_effnlink--;
+   ip->i_flag |= IN_CHANGE;
if (DOINGSOFTDEP(dvp)) {
softdep_setup_unlink(dp, ip);
} else {
@@ -1289,6 +1290,7 @@ ufs_dirrewrite(dp, oip, newinum, newtype, isrmdir)
 * necessary.
 */
oip->i_effnlink--;
+   oip->i_flag |= IN_CHANGE;
if (DOINGSOFTDEP(vdp)) {
softdep_setup_unlink(dp, oip);
} else {
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r354124 - stable/12/sys/ufs/ufs

2019-10-26 Thread Kirk McKusick
Author: mckusick
Date: Sun Oct 27 04:09:24 2019
New Revision: 354124
URL: https://svnweb.freebsd.org/changeset/base/354124

Log:
  MFC of 354050
  
  Ensure that ctime update is visible immediately

Modified:
  stable/12/sys/ufs/ufs/ufs_lookup.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/ufs/ufs/ufs_lookup.c
==
--- stable/12/sys/ufs/ufs/ufs_lookup.c  Sun Oct 27 03:47:16 2019
(r354123)
+++ stable/12/sys/ufs/ufs/ufs_lookup.c  Sun Oct 27 04:09:24 2019
(r354124)
@@ -1178,6 +1178,7 @@ ufs_dirremove(dvp, ip, flags, isrmdir)
 */
if (ip) {
ip->i_effnlink--;
+   ip->i_flag |= IN_CHANGE;
if (DOINGSOFTDEP(dvp)) {
softdep_setup_unlink(dp, ip);
} else {
@@ -1291,6 +1292,7 @@ ufs_dirrewrite(dp, oip, newinum, newtype, isrmdir)
 * necessary.
 */
oip->i_effnlink--;
+   oip->i_flag |= IN_CHANGE;
if (DOINGSOFTDEP(vdp)) {
softdep_setup_unlink(dp, oip);
} else {
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r354122 - stable/12/sbin/fsck_ffs

2019-10-26 Thread Kirk McKusick
Author: mckusick
Date: Sun Oct 27 03:46:00 2019
New Revision: 354122
URL: https://svnweb.freebsd.org/changeset/base/354122

Log:
  MFC of 353903
  
  Fix uninitialized variable in SUJ recovery.

Modified:
  stable/12/sbin/fsck_ffs/suj.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sbin/fsck_ffs/suj.c
==
--- stable/12/sbin/fsck_ffs/suj.c   Sat Oct 26 21:19:55 2019
(r354121)
+++ stable/12/sbin/fsck_ffs/suj.c   Sun Oct 27 03:46:00 2019
(r354122)
@@ -1544,7 +1544,7 @@ ino_trunc(ino_t ino, off_t size)
/* If we freed everything in this indirect free the indir. */
if (lastlbn > lbn)
continue;
-   blk_free(DIP(ip, di_ib[i]), 0, frags);
+   blk_free(DIP(ip, di_ib[i]), 0, fs->fs_frag);
DIP_SET(ip, di_ib[i], 0);
}
ino_dirty(ino);
___
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: r354123 - stable/11/sbin/fsck_ffs

2019-10-26 Thread Kirk McKusick
Author: mckusick
Date: Sun Oct 27 03:47:16 2019
New Revision: 354123
URL: https://svnweb.freebsd.org/changeset/base/354123

Log:
  MFC of 353903
  
  Fix uninitialized variable in SUJ recovery.

Modified:
  stable/11/sbin/fsck_ffs/suj.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sbin/fsck_ffs/suj.c
==
--- stable/11/sbin/fsck_ffs/suj.c   Sun Oct 27 03:46:00 2019
(r354122)
+++ stable/11/sbin/fsck_ffs/suj.c   Sun Oct 27 03:47:16 2019
(r354123)
@@ -1566,7 +1566,7 @@ ino_trunc(ino_t ino, off_t size)
/* If we freed everything in this indirect free the indir. */
if (lastlbn > lbn)
continue;
-   blk_free(DIP(ip, di_ib[i]), 0, frags);
+   blk_free(DIP(ip, di_ib[i]), 0, fs->fs_frag);
DIP_SET(ip, di_ib[i], 0);
}
ino_dirty(ino);
___
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: r354121 - in head/tests/sys/netpfil: common pf

2019-10-26 Thread Bjoern A. Zeeb
Author: bz
Date: Sat Oct 26 21:19:55 2019
New Revision: 354121
URL: https://svnweb.freebsd.org/changeset/base/354121

Log:
  Upgrade (scapy) py2 tests to work on py3.
  
  In order to move python2 out of the test framework to avoid py2 vs. py3
  confusions upgrade the remaining test cases using scapy to work with py3.
  That means only one version of scapy needs to be installed in the CI system.
  It also gives a path forward for testing i386 issues observed in the CI
  system with some of these tests.
  
  Fixes are:
  - Use default python from environment (which is 3.x these days).
  - properly ident some lines as common for the rest of the file to avoid
errors.
  - cast the calculated offset to an int as the division result is considered
a float which is not accepted input.
  - when comparing payload to a magic number make sure we always add the
payload properly to the packet and do not try to compare string in
the result but convert the data payload back into an integer.
  - fix print formating.
  
  Discussed with:   lwhsu, kp (taking it off his todo :)
  MFC after:2 weeks

Modified:
  head/tests/sys/netpfil/common/pft_ping.py
  head/tests/sys/netpfil/pf/CVE-2019-5597.py
  head/tests/sys/netpfil/pf/CVE-2019-5598.py

Modified: head/tests/sys/netpfil/common/pft_ping.py
==
--- head/tests/sys/netpfil/common/pft_ping.py   Sat Oct 26 19:20:59 2019
(r354120)
+++ head/tests/sys/netpfil/common/pft_ping.py   Sat Oct 26 21:19:55 2019
(r354121)
@@ -1,4 +1,4 @@
-#!/usr/local/bin/python2.7
+#!/usr/bin/env python
 
 import argparse
 import scapy.all as sp
@@ -34,15 +34,15 @@ def check_ping4_request(args, packet):
raw = packet.getlayer(sp.Raw)
if not raw:
return False
-   if raw.load != str(PAYLOAD_MAGIC):
+   if int(raw.load) != PAYLOAD_MAGIC:
return False
 
# Wait to check expectations until we've established this is the packet 
we
# sent.
if args.expect_tos:
if ip.tos != int(args.expect_tos[0]):
-   print "Unexpected ToS value %d, expected %s" \
-   % (ip.tos, args.expect_tos[0])
+   print("Unexpected ToS value %d, expected %d" \
+   % (ip.tos, int(args.expect_tos[0])))
return False
 
return True
@@ -62,7 +62,7 @@ def check_ping6_request(args, packet):
icmp = packet.getlayer(sp.ICMPv6EchoRequest)
if not icmp:
return False
-   if icmp.data != str(PAYLOAD_MAGIC):
+   if int(icmp.data) != PAYLOAD_MAGIC:
return False
 
return True
@@ -71,7 +71,7 @@ def ping(send_if, dst_ip, args):
ether = sp.Ether()
ip = sp.IP(dst=dst_ip)
icmp = sp.ICMP(type='echo-request')
-   raw = sp.Raw(str(PAYLOAD_MAGIC))
+   raw = sp.raw(str(PAYLOAD_MAGIC))
 
if args.send_tos:
ip.tos = int(args.send_tos[0])
@@ -82,7 +82,7 @@ def ping(send_if, dst_ip, args):
 def ping6(send_if, dst_ip, args):
ether = sp.Ether()
ip6 = sp.IPv6(dst=dst_ip)
-   icmp = sp.ICMPv6EchoRequest(data=PAYLOAD_MAGIC)
+   icmp = sp.ICMPv6EchoRequest(data=sp.raw(str(PAYLOAD_MAGIC)))
 
req = ether / ip6 / icmp
sp.sendp(req, iface=send_if, verbose=False)

Modified: head/tests/sys/netpfil/pf/CVE-2019-5597.py
==
--- head/tests/sys/netpfil/pf/CVE-2019-5597.py  Sat Oct 26 19:20:59 2019
(r354120)
+++ head/tests/sys/netpfil/pf/CVE-2019-5597.py  Sat Oct 26 21:19:55 2019
(r354121)
@@ -1,4 +1,4 @@
-#!/usr/local/bin/python2.7
+#!/usr/bin/env python
 
 import random
 import scapy.all as sp
@@ -18,7 +18,8 @@ def main():
 padding = 8
 fid = random.randint(0,10)
 frag_0 = sp.IPv6ExtHdrFragment(id=fid, nh=UDP_PROTO, m=1, offset=0)
-frag_1 = sp.IPv6ExtHdrFragment(id=fid, nh=UDP_PROTO, m=0, offset=padding/8)
+foff_1 = (int)(padding/8)
+frag_1 = sp.IPv6ExtHdrFragment(id=fid, nh=UDP_PROTO, m=0, offset=foff_1)
 
 pkt1_opts = sp.AH(nh=AH_PROTO, payloadlen=200) \
 / sp.Raw('' * 199) \

Modified: head/tests/sys/netpfil/pf/CVE-2019-5598.py
==
--- head/tests/sys/netpfil/pf/CVE-2019-5598.py  Sat Oct 26 19:20:59 2019
(r354120)
+++ head/tests/sys/netpfil/pf/CVE-2019-5598.py  Sat Oct 26 21:19:55 2019
(r354121)
@@ -1,4 +1,4 @@
-#!/usr/local/bin/python2.7
+#!/usr/bin/env python
 
 import argparse
 import scapy.all as sp
@@ -38,18 +38,18 @@ def main():
 
args = parser.parse_args()
 
-# Send the allowed packet to establish state
-udp = sp.Ether() / \
-sp.IP(src=args.src[0], dst=args.to[0]) / \
-sp.UDP(dport=53, sport=1234)
-

Re: svn commit: r354095 - in head/sys: amd64/amd64 amd64/include kern

2019-10-26 Thread Gerald Pfeifer
On Sat, 26 Oct 2019, Antoine Brodin wrote:
> It builds fine with this patch.

Thank you for the quick report and testing, Antoine, and the
quick fix, Konstantin!

Gerald
___
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: r354120 - head/lib/libbe

2019-10-26 Thread Alan Somers
Author: asomers
Date: Sat Oct 26 19:20:59 2019
New Revision: 354120
URL: https://svnweb.freebsd.org/changeset/base/354120

Log:
  Commit missing file from r354116
  
  Pointy-hat-to:Me
  Reported by:  Dan Mack
  MFC after:2 weeks
  MFC-With: 354116

Modified:
  head/lib/libbe/be_info.c

Modified: head/lib/libbe/be_info.c
==
--- head/lib/libbe/be_info.cSat Oct 26 18:29:02 2019(r354119)
+++ head/lib/libbe/be_info.cSat Oct 26 19:20:59 2019(r354120)
@@ -257,7 +257,8 @@ static int
 snapshot_proplist_update(zfs_handle_t *hdl, prop_data_t *data)
 {
 
-   return (zfs_iter_snapshots_sorted(hdl, prop_list_builder_cb, data));
+   return (zfs_iter_snapshots_sorted(hdl, prop_list_builder_cb, data,
+   0, 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: r354116 - in head: cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common/sy

2019-10-26 Thread Alan Somers
Ack, my bad.  Fix coming...

On Sat, Oct 26, 2019 at 12:37 PM Dan Mack  wrote:

>
> This appears to have broken my buildworld unless I did something wrong on
> my end: Last Changed Rev: 354116
>
>
> snip ...
>
> ===> lib/ofed/libibumad (all)
> --- all_subdir_lib/libbe ---
> /usr/src/lib/libbe/be_info.c:260:67: error: too few arguments to function
> call, expected 5, have 3
>  return (zfs_iter_snapshots_sorted(hdl, prop_list_builder_cb,
> data));
>  ~^
> /usr/src/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h:575:1: note:
> 'zfs_iter_snapshots_sorted' declared here
> extern int zfs_iter_snapshots_sorted(zfs_handle_t *, zfs_iter_f, void *,
> ^
> 1 error generated.
> *** [be_info.o] Error code 1
>
> On Sat, 26 Oct 2019, Alan Somers wrote:
>
> > Author: asomers
> > Date: Sat Oct 26 17:11:02 2019
> > New Revision: 354116
> > URL: https://svnweb.freebsd.org/changeset/base/354116
> >
> > Log:
> >  MFZoL:  Avoid retrieving unused snapshot props
> >
> >  This patch modifies the zfs_ioc_snapshot_list_next() ioctl to enable it
> >  to take input parameters that alter the way looping through the list of
> >  snapshots is performed. The idea here is to restrict functions that
> >  throw away some of the snapshots returned by the ioctl to a range of
> >  snapshots that these functions actually use. This improves efficiency
> >  and execution speed for some rollback and send operations.
> >
> >  Reviewed-by: Tom Caputi 
> >  Reviewed-by: Brian Behlendorf 
> >  Reviewed by: Matt Ahrens 
> >  Signed-off-by: Alek Pinchuk 
> >  Closes #8077
> >  zfsonlinux/zfs@4c0883fb4af0d5565459099b98fcf90ecbfa1ca1
> >
> >  MFC after:   2 weeks
> >
> > Modified:
> >  head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c
> >  head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
> >  head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h
> >  head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
> >  head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c
> >  head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c
> >  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
> >  head/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.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"


Re: svn commit: r354116 - in head: cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common/sy

2019-10-26 Thread Dan Mack



This appears to have broken my buildworld unless I did something wrong on 
my end: Last Changed Rev: 354116



snip ...

===> lib/ofed/libibumad (all)
--- all_subdir_lib/libbe ---
/usr/src/lib/libbe/be_info.c:260:67: error: too few arguments to function 
call, expected 5, have 3
return (zfs_iter_snapshots_sorted(hdl, prop_list_builder_cb, 
data));

~^
/usr/src/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h:575:1: note: 
'zfs_iter_snapshots_sorted' declared here

extern int zfs_iter_snapshots_sorted(zfs_handle_t *, zfs_iter_f, void *,
^
1 error generated.
*** [be_info.o] Error code 1

On Sat, 26 Oct 2019, Alan Somers wrote:


Author: asomers
Date: Sat Oct 26 17:11:02 2019
New Revision: 354116
URL: https://svnweb.freebsd.org/changeset/base/354116

Log:
 MFZoL:  Avoid retrieving unused snapshot props

 This patch modifies the zfs_ioc_snapshot_list_next() ioctl to enable it
 to take input parameters that alter the way looping through the list of
 snapshots is performed. The idea here is to restrict functions that
 throw away some of the snapshots returned by the ioctl to a range of
 snapshots that these functions actually use. This improves efficiency
 and execution speed for some rollback and send operations.

 Reviewed-by: Tom Caputi 
 Reviewed-by: Brian Behlendorf 
 Reviewed by: Matt Ahrens 
 Signed-off-by: Alek Pinchuk 
 Closes #8077
 zfsonlinux/zfs@4c0883fb4af0d5565459099b98fcf90ecbfa1ca1

 MFC after: 2 weeks

Modified:
 head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c
 head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
 head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h
 head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
 head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c
 head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
 head/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h

Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c
==
--- head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.cSat Oct 26 17:10:27 
2019(r354115)
+++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.cSat Oct 26 17:11:02 
2019(r354116)
@@ -139,7 +139,7 @@ zfs_callback(zfs_handle_t *zhp, void *data)
ZFS_TYPE_BOOKMARK)) == 0) && include_snaps)
(void) zfs_iter_snapshots(zhp,
(cb->cb_flags & ZFS_ITER_SIMPLE) != 0, zfs_callback,
-   data);
+   data, 0, 0);
if (((zfs_get_type(zhp) & (ZFS_TYPE_SNAPSHOT |
ZFS_TYPE_BOOKMARK)) == 0) && include_bmarks)
(void) zfs_iter_bookmarks(zhp, zfs_callback, data);

Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
==
--- head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.cSat Oct 26 17:10:27 
2019(r354115)
+++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.cSat Oct 26 17:11:02 
2019(r354116)
@@ -30,7 +30,7 @@
 * Copyright (c) 2014 Integros [integros.com]
 * Copyright 2016 Igor Kozhukhov .
 * Copyright 2016 Nexenta Systems, Inc.
- * Copyright (c) 2018 Datto Inc.
+ * Copyright (c) 2019 Datto Inc.
 */

#include 
@@ -1174,7 +1174,7 @@ destroy_print_snapshots(zfs_handle_t *fs_zhp, destroy_
int err = 0;
assert(cb->cb_firstsnap == NULL);
assert(cb->cb_prevsnap == NULL);
-   err = zfs_iter_snapshots_sorted(fs_zhp, destroy_print_cb, cb);
+   err = zfs_iter_snapshots_sorted(fs_zhp, destroy_print_cb, cb, 0, 0);
if (cb->cb_firstsnap != NULL) {
uint64_t used = 0;
if (err == 0) {
@@ -3437,6 +3437,7 @@ zfs_do_promote(int argc, char **argv)
 */
typedef struct rollback_cbdata {
uint64_tcb_create;
+   uint8_t cb_younger_ds_printed;
boolean_t   cb_first;
int cb_doclones;
char*cb_target;
@@ -3467,15 +3468,20 @@ rollback_check_dependent(zfs_handle_t *zhp, void *data
}

/*
- * Report any snapshots more recent than the one specified.  Used when '-r' is
- * not specified.  We reuse this same callback for the snapshot dependents - if
- * 'cb_dependent' is set, then this is a dependent and we should report it
- * without checking the transaction group.
+ * Report some snapshots/bookmarks more recent than the one specified.
+ * Used when '-r' is not specified. We reuse this same callback for the
+ * snapshot dependents - if 'cb_dependent' is set, then this is a
+ * dependent and we should report it without checking the transaction group.
 */
static int
rollback_check(zfs_handle_t *zhp, void *data)
{
rollback_cbdata_t *cbp = data;
+   /*
+* Max number of younger snapshots and/or 

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

2019-10-26 Thread Toomas Soome
Author: tsoome
Date: Sat Oct 26 18:29:02 2019
New Revision: 354119
URL: https://svnweb.freebsd.org/changeset/base/354119

Log:
  loader: rs_alloc() may return NULL
  
  rs_alloc() in zfs reader code may return NULL, so we need to check the return 
value and error out if needed.
  MFC after:1 week

Modified:
  head/stand/libsa/zfs/zfsimpl.c

Modified: head/stand/libsa/zfs/zfsimpl.c
==
--- head/stand/libsa/zfs/zfsimpl.c  Sat Oct 26 18:22:52 2019
(r354118)
+++ head/stand/libsa/zfs/zfsimpl.c  Sat Oct 26 18:29:02 2019
(r354119)
@@ -840,12 +840,17 @@ vdev_indirect_remap(vdev_t *vd, uint64_t offset, uint6
list_t stack;
spa_t *spa = vd->spa;
zio_t *zio = arg;
+   remap_segment_t *rs;
 
list_create(, sizeof (remap_segment_t),
offsetof(remap_segment_t, rs_node));
 
-   for (remap_segment_t *rs = rs_alloc(vd, offset, asize, 0);
-   rs != NULL; rs = list_remove_head()) {
+   rs = rs_alloc(vd, offset, asize, 0);
+   if (rs == NULL) {
+   printf("vdev_indirect_remap: out of memory.\n");
+   zio->io_error = ENOMEM;
+   }
+   for ( ; rs != NULL; rs = list_remove_head()) {
vdev_t *v = rs->rs_vd;
uint64_t num_entries = 0;
/* vdev_indirect_mapping_t *vim = v->v_mapping; */
@@ -853,6 +858,9 @@ vdev_indirect_remap(vdev_t *vd, uint64_t offset, uint6
vdev_indirect_mapping_duplicate_adjacent_entries(v,
rs->rs_offset, rs->rs_asize, _entries);
 
+   if (num_entries == 0)
+   zio->io_error = ENOMEM;
+
for (uint64_t i = 0; i < num_entries; i++) {
vdev_indirect_mapping_entry_phys_t *m = [i];
uint64_t size = DVA_GET_ASIZE(>vimep_dst);
@@ -865,9 +873,18 @@ vdev_indirect_remap(vdev_t *vd, uint64_t offset, uint6
vdev_t *dst_v = vdev_lookup_top(spa, dst_vdev);
 
if (dst_v->v_read == vdev_indirect_read) {
-   list_insert_head(,
-   rs_alloc(dst_v, dst_offset + inner_offset,
-   inner_size, rs->rs_split_offset));
+   remap_segment_t *o;
+
+   o = rs_alloc(dst_v, dst_offset + inner_offset,
+   inner_size, rs->rs_split_offset);
+   if (o == NULL) {
+   printf("vdev_indirect_remap: "
+   "out of memory.\n");
+   zio->io_error = ENOMEM;
+   break;
+   }
+
+   list_insert_head(, o);
}
vdev_indirect_gather_splits(rs->rs_split_offset, dst_v,
dst_offset + inner_offset,
___
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: r354118 - head/sys/amd64/include

2019-10-26 Thread Konstantin Belousov
Author: kib
Date: Sat Oct 26 18:22:52 2019
New Revision: 354118
URL: https://svnweb.freebsd.org/changeset/base/354118

Log:
  Provide dummy definition of the amd64 struct pcb for -m32 compilation.
  
  I do not see a need in the proper x86/include/pcb.h header.
  
  Reported and tested by:   antoine
  MFC after:1 week

Modified:
  head/sys/amd64/include/pcb.h

Modified: head/sys/amd64/include/pcb.h
==
--- head/sys/amd64/include/pcb.hSat Oct 26 17:51:43 2019
(r354117)
+++ head/sys/amd64/include/pcb.hSat Oct 26 18:22:52 2019
(r354118)
@@ -116,6 +116,10 @@ struct susppcb {
/* fpu context for suspend/resume */
void*sp_fpususpend;
 };
+#else  /* 32bit */
+struct pcb {
+   uint64_t pcb_dummy[40];
+};
 #endif
 
 #ifdef _KERNEL
___
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: r354117 - head/sys/modules/dtb/rockchip

2019-10-26 Thread Emmanuel Vadot
Author: manu
Date: Sat Oct 26 17:51:43 2019
New Revision: 354117
URL: https://svnweb.freebsd.org/changeset/base/354117

Log:
  arm64: rockchip: dts: Build the Khadas board DTS
  
  We boot on thoses boards so build them.
  
  Submitted by: s199p.wa1...@gmail.com
  MFC after:1 week
  Differential Revision:https://reviews.freebsd.org/D22158

Modified:
  head/sys/modules/dtb/rockchip/Makefile

Modified: head/sys/modules/dtb/rockchip/Makefile
==
--- head/sys/modules/dtb/rockchip/Makefile  Sat Oct 26 17:11:02 2019
(r354116)
+++ head/sys/modules/dtb/rockchip/Makefile  Sat Oct 26 17:51:43 2019
(r354117)
@@ -1,6 +1,9 @@
 # $FreeBSD$
 
 DTS=   \
+   rockchip/rk3399-khadas-edge-captain.dts \
+   rockchip/rk3399-khadas-edge.dts \
+   rockchip/rk3399-khadas-edge-v.dts \
rockchip/rk3328-rock64.dts \
rockchip/rk3399-rockpro64.dts
 
___
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: r354095 - in head/sys: amd64/amd64 amd64/include kern

2019-10-26 Thread Antoine Brodin
On Sat, Oct 26, 2019 at 3:01 PM Konstantin Belousov  wrote:
> On Sat, Oct 26, 2019 at 02:16:19PM +0200, Antoine Brodin wrote:
> > On Sat, Oct 26, 2019 at 10:27 AM Konstantin Belousov
> >  wrote:
> > > On Sat, Oct 26, 2019 at 08:24:09AM +0200, Antoine Brodin wrote:
> > > > On Fri, Oct 25, 2019 at 10:09 PM Konstantin Belousov  
> > > > wrote:
> > > > >
> > > > > Author: kib
> > > > > Date: Fri Oct 25 20:09:42 2019
> > > > > New Revision: 354095
> > > > > URL: https://svnweb.freebsd.org/changeset/base/354095
> > > > >
> > > > > Log:
> > > > >   amd64: move pcb out of kstack to struct thread.
> > > > >
> > > > >   This saves 320 bytes of the precious stack space.
> > > > >
> > > > >   The only negative aspect of the change I can think of is that the
> > > > >   struct thread increased by 320 bytes obviously, and that 320 bytes 
> > > > > are
> > > > >   not swapped out anymore. I believe the freed stack space is much 
> > > > > more
> > > > >   important than that.  Also, current struct thread size is 1392 bytes
> > > > >   on amd64, so UMA will allocate two thread structures per (4KB) slab,
> > > > >   which leaves a space for pcb without increasing zone memory use.
> > > > >
> > > > >   Reviewed by:  alc, markj
> > > > >   Tested by:pho
> > > > >   Sponsored by: The FreeBSD Foundation
> > > > >   MFC after:2 weeks
> > > > >   Differential revision:https://reviews.freebsd.org/D22138
> > > >
> > > > Hi,
> > > >
> > > > It seems that this breaks at least some versions of gcc:
> > > >
> > > > In file included from /usr/include/sys/proc.h:75,
> > > >  from /usr/include/sys/user.h:51,
> > > >  from ./md-unwind-support.h:34,
> > > >  from
> > > > /wrkdirs/usr/ports/lang/gcc10-devel/work/gcc-10-20191020/libgcc/unwind-dw2.c:412:
> > > > /usr/include/machine/proc.h:76:13: error: field 'md_pcb' has incomplete 
> > > > type
> > > >76 |  struct pcb md_pcb;
> > > >   | ^~
> > > >
> > >
> > > It is very strange.  Are gcc 9 or 8 affected ?
> >
> > gcc 8 and 9 are affected too.
> Then this is a completely different cause then I guessed below, and I think
> I know why.  All of 8/9/10 gcc ports have support for multiarch, and the
> error must happen for gcc or xgcc invocation with -m32, am I right ?
>
> If yes, please try the patch at the end of the message instead.
>
> diff --git a/sys/amd64/include/pcb.h b/sys/amd64/include/pcb.h
> index 44e34fa5c83..8800b355c9a 100644
> --- a/sys/amd64/include/pcb.h
> +++ b/sys/amd64/include/pcb.h
> @@ -116,6 +116,10 @@ struct susppcb {
> /* fpu context for suspend/resume */
> void*sp_fpususpend;
>  };
> +#else  /* 32bit */
> +struct pcb {
> +   uint64_t pcb_dummy[40];
> +};
>  #endif
>
>  #ifdef _KERNEL

Hi,

It builds fine with this patch.

Antoine
___
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: r354116 - in head: cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common/sys/fs

2019-10-26 Thread Alan Somers
Author: asomers
Date: Sat Oct 26 17:11:02 2019
New Revision: 354116
URL: https://svnweb.freebsd.org/changeset/base/354116

Log:
  MFZoL:  Avoid retrieving unused snapshot props
  
  This patch modifies the zfs_ioc_snapshot_list_next() ioctl to enable it
  to take input parameters that alter the way looping through the list of
  snapshots is performed. The idea here is to restrict functions that
  throw away some of the snapshots returned by the ioctl to a range of
  snapshots that these functions actually use. This improves efficiency
  and execution speed for some rollback and send operations.
  
  Reviewed-by: Tom Caputi 
  Reviewed-by: Brian Behlendorf 
  Reviewed by: Matt Ahrens 
  Signed-off-by: Alek Pinchuk 
  Closes #8077
  zfsonlinux/zfs@4c0883fb4af0d5565459099b98fcf90ecbfa1ca1
  
  MFC after:2 weeks

Modified:
  head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c
  head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
  head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h
  head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
  head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c
  head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
  head/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h

Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c
==
--- head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.cSat Oct 26 17:10:27 
2019(r354115)
+++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.cSat Oct 26 17:11:02 
2019(r354116)
@@ -139,7 +139,7 @@ zfs_callback(zfs_handle_t *zhp, void *data)
ZFS_TYPE_BOOKMARK)) == 0) && include_snaps)
(void) zfs_iter_snapshots(zhp,
(cb->cb_flags & ZFS_ITER_SIMPLE) != 0, zfs_callback,
-   data);
+   data, 0, 0);
if (((zfs_get_type(zhp) & (ZFS_TYPE_SNAPSHOT |
ZFS_TYPE_BOOKMARK)) == 0) && include_bmarks)
(void) zfs_iter_bookmarks(zhp, zfs_callback, data);

Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
==
--- head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.cSat Oct 26 17:10:27 
2019(r354115)
+++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.cSat Oct 26 17:11:02 
2019(r354116)
@@ -30,7 +30,7 @@
  * Copyright (c) 2014 Integros [integros.com]
  * Copyright 2016 Igor Kozhukhov .
  * Copyright 2016 Nexenta Systems, Inc.
- * Copyright (c) 2018 Datto Inc.
+ * Copyright (c) 2019 Datto Inc.
  */
 
 #include 
@@ -1174,7 +1174,7 @@ destroy_print_snapshots(zfs_handle_t *fs_zhp, destroy_
int err = 0;
assert(cb->cb_firstsnap == NULL);
assert(cb->cb_prevsnap == NULL);
-   err = zfs_iter_snapshots_sorted(fs_zhp, destroy_print_cb, cb);
+   err = zfs_iter_snapshots_sorted(fs_zhp, destroy_print_cb, cb, 0, 0);
if (cb->cb_firstsnap != NULL) {
uint64_t used = 0;
if (err == 0) {
@@ -3437,6 +3437,7 @@ zfs_do_promote(int argc, char **argv)
  */
 typedef struct rollback_cbdata {
uint64_tcb_create;
+   uint8_t cb_younger_ds_printed;
boolean_t   cb_first;
int cb_doclones;
char*cb_target;
@@ -3467,15 +3468,20 @@ rollback_check_dependent(zfs_handle_t *zhp, void *data
 }
 
 /*
- * Report any snapshots more recent than the one specified.  Used when '-r' is
- * not specified.  We reuse this same callback for the snapshot dependents - if
- * 'cb_dependent' is set, then this is a dependent and we should report it
- * without checking the transaction group.
+ * Report some snapshots/bookmarks more recent than the one specified.
+ * Used when '-r' is not specified. We reuse this same callback for the
+ * snapshot dependents - if 'cb_dependent' is set, then this is a
+ * dependent and we should report it without checking the transaction group.
  */
 static int
 rollback_check(zfs_handle_t *zhp, void *data)
 {
rollback_cbdata_t *cbp = data;
+   /*
+* Max number of younger snapshots and/or bookmarks to display before
+* we stop the iteration.
+*/
+   const uint8_t max_younger = 32;
 
if (cbp->cb_doclones) {
zfs_close(zhp);
@@ -3504,9 +3510,24 @@ rollback_check(zfs_handle_t *zhp, void *data)
} else {
(void) fprintf(stderr, "%s\n",
zfs_get_name(zhp));
+   cbp->cb_younger_ds_printed++;
}
}
zfs_close(zhp);
+
+   if (cbp->cb_younger_ds_printed == max_younger) {
+   /*
+* This non-recursive rollback is going to fail due to the
+* presence of snapshots 

svn commit: r354115 - head/usr.bin/dtc

2019-10-26 Thread Emmanuel Vadot
Author: manu
Date: Sat Oct 26 17:10:27 2019
New Revision: 354115
URL: https://svnweb.freebsd.org/changeset/base/354115

Log:
  dtc: Allow multiple dts-v1 tag
  
  Some dts are including dtsi that also contain a /dts-v1/ tag at the
  top. GNU DTC doesn't seems to have a problem with that so fix our
  dtc to behave the same.
  
  Reviewed by:  kevans
  MFC after:1 week

Modified:
  head/usr.bin/dtc/fdt.cc

Modified: head/usr.bin/dtc/fdt.cc
==
--- head/usr.bin/dtc/fdt.cc Sat Oct 26 10:33:21 2019(r354114)
+++ head/usr.bin/dtc/fdt.cc Sat Oct 26 17:10:27 2019(r354115)
@@ -1563,11 +1563,11 @@ device_tree::parse_file(text_input_buffer ,
 {
input.next_token();
// Read the header
-   if (input.consume("/dts-v1/;"))
+   while (input.consume("/dts-v1/;"))
{
read_header = true;
+   input.next_token();
}
-   input.next_token();
if (input.consume("/plugin/;"))
{
is_plugin = true;
___
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: r353937 - in head/share: man/man5 mk

2019-10-26 Thread Dimitry Andric


> On 24 Oct 2019, at 14:49, Alexey Dokuchaev  wrote:
> 
> On Wed, Oct 23, 2019 at 11:31:41AM -0700, Enji Cooper wrote:
>>> On Oct 23, 2019, at 10:02, Dimitry Andric  wrote:
>>> New Revision: 353937
>>> URL: https://svnweb.freebsd.org/changeset/base/353937
>>> 
>>> Log:
>>> Build toolchain components as dynamically linked executables by default
> 
> What are the benefits of the new order?

The advantages and disadvantages of dynamic linking are a contentious
and almost religious issue, so I hope you don't mind that I will not go
into this.


>>> In this day and age, we have boot environments, virtual machine
>>> snapshots, cloud backups, and other much more reliable methods to
>>> restore systems to working order.  So I think the time is ripe to flip
> 
> What about those of us who cannot use BEs, VMs, and other "cloudy" tech
> because, well, they might not work as well and reliably as one might think?

There are many possibilities, such as making backups, using
WITHOUT_SHARED_TOOLCHAIN (and hoping that you can compile/link your way
out of a botched installation), or even using NO_SHARED.


>> Using dynamic binaries instead of static binaries might actually regress
>> performance in a way you don't expect, depending on -j values, etc. Static
>> binaries avoid the dynamic linker, which (obviously) results in a perf hit
>> at scale [...]
> 
> Very good point.

But if you take this point to its logical conclusion, then you should
link everything statically, and never use dynamic linking at all. :)


>> Did you calculate the perf trade offs for the static binaries at low -j vs
>> high -j, system and user time, etc?
> 
> I'd like to know the answer to this question (and the results) as well.

I only tested -j24 on a 32-core system, but I could probably repeat the
experiment with lower and higher -j values:

* host system (and dynamic linker): head r346082 (2019-04-10)
* base/head checkout at r354065
* clang and lld compiled from r354065, dynamically linked:

  textdata   bssdec hex   filename
  69007497   52320290469   69350286   0x422338e   bin-dynamic/cc
  45708182   35280320613   46064075   0x2bee1cb   bin-dynamic/ld

* clang and lld compiled from r354065, statically linked:

  textdata   bssdec hex   filename
  70828318   71656   2592977   73492951   0x46169d7   bin-static/cc
  47533406   54776   2623121   50211303   0x2fe29e7   bin-static/ld

* built world with __MAKE_CONF and SRCCONF set to /dev/null, and CC,
  CXX, CPP and LD set to point to either the dynamic or static binaries
* verified that the cross-tools stage did /not/ attempt to bootstrap the
  compiler and linker
* repeated experiment 7 times, for each case
* measured real, user and system time of each experiment

Results for real time:
---
x static-real.txt
+ dynamic-real.txt
N   Min   MaxMedian   AvgStddev
x   7   1851.71   1892.11   1868.79 1868.6829 13.569253
+   7   1882.95   1940.741912.9 1912.6886 17.510156
Difference at 95.0% confidence
44.0057 +/- 18.2444
2.35491% +/- 0.985013%
(Student's t, pooled s = 15.6641)

Results for user time:
---
x static-user.txt
+ dynamic-user.txt
N   Min   MaxMedian   AvgStddev
x   7  31734.75  32055.47  31983.16 31942.131  118.2333
+   7 32957   33282.1  33224.25 33150.727 137.84805
Difference at 95.0% confidence
1208.6 +/- 149.569
3.7837% +/- 0.47584%
(Student's t, pooled s = 128.416)

Results for user time:
---
x static-sys.txt
+ dynamic-sys.txt
N   Min   MaxMedian   AvgStddev
x   7   2434.98   2661.22   2461.95 2516.3843 100.88134
+   7   2545.072813.8   2655.65 2682.5243 116.80319
Difference at 95.0% confidence
166.14 +/- 127.11
6.60233% +/- 5.1964%
(Student's t, pooled s = 109.133)

So ~2.3% difference in real time, which is not too bad I think.  There
are probably opportunities to improve the performance of the dynamic
linker, which would be beneficial to every program in the system.

-Dimitry



signature.asc
Description: Message signed with OpenPGP


Re: svn commit: r354095 - in head/sys: amd64/amd64 amd64/include kern

2019-10-26 Thread Gerald Pfeifer
On Sat, 26 Oct 2019, Konstantin Belousov wrote:
>>> It is very strange.  Are gcc 9 or 8 affected ?
>> gcc 8 and 9 are affected too.
> Then this is a completely different cause then I guessed below, and I think
> I know why.  All of 8/9/10 gcc ports have support for multiarch, and the
> error must happen for gcc or xgcc invocation with -m32, am I right ?

Here is what I got in terms of just being bombarded with build failure 
reports across the board, the two below being for lang/gcc8:


Date: Sat, 26 Oct 2019 11:46:37 GMT
Subject: [package - head-amd64-default][lang/gcc8] Failed for gcc8-8.3.0_3 in 
build

Log URL:
http://beefy19.nyi.freebsd.org/data/head-amd64-default/2019-10-26_10h54m41s/logs/gcc8-8.3.0_3.log
Build URL:  
http://beefy19.nyi.freebsd.org/build.html?mastername=head-amd64-default=2019-10-26_10h54m41s

 -and-

Date: Sat, 26 Oct 2019 12:59:10 GMT
Subject: [package - head-amd64-pcb-default][lang/gcc8] Failed for gcc8-8.3.0_3 
in build

Log URL:
http://beefy19.nyi.freebsd.org/data/head-amd64-pcb-default/2019-10-26_12h17m09s/logs/gcc8-8.3.0_3.log
Build URL:  
http://beefy19.nyi.freebsd.org/build.html?mastername=head-amd64-pcb-default=2019-10-26_12h17m09s


Indeed I see -m32 in the last invocation of xgcc here in both case.

Gerald
___
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: r354095 - in head/sys: amd64/amd64 amd64/include kern

2019-10-26 Thread Konstantin Belousov
On Sat, Oct 26, 2019 at 02:16:19PM +0200, Antoine Brodin wrote:
> On Sat, Oct 26, 2019 at 10:27 AM Konstantin Belousov
>  wrote:
> > On Sat, Oct 26, 2019 at 08:24:09AM +0200, Antoine Brodin wrote:
> > > On Fri, Oct 25, 2019 at 10:09 PM Konstantin Belousov  
> > > wrote:
> > > >
> > > > Author: kib
> > > > Date: Fri Oct 25 20:09:42 2019
> > > > New Revision: 354095
> > > > URL: https://svnweb.freebsd.org/changeset/base/354095
> > > >
> > > > Log:
> > > >   amd64: move pcb out of kstack to struct thread.
> > > >
> > > >   This saves 320 bytes of the precious stack space.
> > > >
> > > >   The only negative aspect of the change I can think of is that the
> > > >   struct thread increased by 320 bytes obviously, and that 320 bytes are
> > > >   not swapped out anymore. I believe the freed stack space is much more
> > > >   important than that.  Also, current struct thread size is 1392 bytes
> > > >   on amd64, so UMA will allocate two thread structures per (4KB) slab,
> > > >   which leaves a space for pcb without increasing zone memory use.
> > > >
> > > >   Reviewed by:  alc, markj
> > > >   Tested by:pho
> > > >   Sponsored by: The FreeBSD Foundation
> > > >   MFC after:2 weeks
> > > >   Differential revision:https://reviews.freebsd.org/D22138
> > >
> > > Hi,
> > >
> > > It seems that this breaks at least some versions of gcc:
> > >
> > > In file included from /usr/include/sys/proc.h:75,
> > >  from /usr/include/sys/user.h:51,
> > >  from ./md-unwind-support.h:34,
> > >  from
> > > /wrkdirs/usr/ports/lang/gcc10-devel/work/gcc-10-20191020/libgcc/unwind-dw2.c:412:
> > > /usr/include/machine/proc.h:76:13: error: field 'md_pcb' has incomplete 
> > > type
> > >76 |  struct pcb md_pcb;
> > >   | ^~
> > >
> >
> > It is very strange.  Are gcc 9 or 8 affected ?
> 
> gcc 8 and 9 are affected too.
Then this is a completely different cause then I guessed below, and I think
I know why.  All of 8/9/10 gcc ports have support for multiarch, and the
error must happen for gcc or xgcc invocation with -m32, am I right ?

If yes, please try the patch at the end of the message instead.

> 
> > As a blind guess, please try this patch.
> >
> > diff --git a/sys/amd64/include/pcb.h b/sys/amd64/include/pcb.h
> > index 44e34fa5c83..9758e684da2 100644
> > --- a/sys/amd64/include/pcb.h
> > +++ b/sys/amd64/include/pcb.h
> > @@ -45,7 +45,7 @@
> >  #include 
> >  #include 
> >
> > -#ifdef __amd64__
> > +#if defined(__amd64__) || defined(__x86_64__)
> >  /*
> >   * NB: The fields marked with (*) are used by kernel debuggers.  Their
> >   * ABI should be preserved.
> 
> I will test this.

Please use this instead

diff --git a/sys/amd64/include/pcb.h b/sys/amd64/include/pcb.h
index 44e34fa5c83..8800b355c9a 100644
--- a/sys/amd64/include/pcb.h
+++ b/sys/amd64/include/pcb.h
@@ -116,6 +116,10 @@ struct susppcb {
/* fpu context for suspend/resume */
void*sp_fpususpend;
 };
+#else  /* 32bit */
+struct pcb {
+   uint64_t pcb_dummy[40];
+};
 #endif
 
 #ifdef _KERNEL
___
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: r354095 - in head/sys: amd64/amd64 amd64/include kern

2019-10-26 Thread Antoine Brodin
On Sat, Oct 26, 2019 at 10:27 AM Konstantin Belousov
 wrote:
> On Sat, Oct 26, 2019 at 08:24:09AM +0200, Antoine Brodin wrote:
> > On Fri, Oct 25, 2019 at 10:09 PM Konstantin Belousov  
> > wrote:
> > >
> > > Author: kib
> > > Date: Fri Oct 25 20:09:42 2019
> > > New Revision: 354095
> > > URL: https://svnweb.freebsd.org/changeset/base/354095
> > >
> > > Log:
> > >   amd64: move pcb out of kstack to struct thread.
> > >
> > >   This saves 320 bytes of the precious stack space.
> > >
> > >   The only negative aspect of the change I can think of is that the
> > >   struct thread increased by 320 bytes obviously, and that 320 bytes are
> > >   not swapped out anymore. I believe the freed stack space is much more
> > >   important than that.  Also, current struct thread size is 1392 bytes
> > >   on amd64, so UMA will allocate two thread structures per (4KB) slab,
> > >   which leaves a space for pcb without increasing zone memory use.
> > >
> > >   Reviewed by:  alc, markj
> > >   Tested by:pho
> > >   Sponsored by: The FreeBSD Foundation
> > >   MFC after:2 weeks
> > >   Differential revision:https://reviews.freebsd.org/D22138
> >
> > Hi,
> >
> > It seems that this breaks at least some versions of gcc:
> >
> > In file included from /usr/include/sys/proc.h:75,
> >  from /usr/include/sys/user.h:51,
> >  from ./md-unwind-support.h:34,
> >  from
> > /wrkdirs/usr/ports/lang/gcc10-devel/work/gcc-10-20191020/libgcc/unwind-dw2.c:412:
> > /usr/include/machine/proc.h:76:13: error: field 'md_pcb' has incomplete type
> >76 |  struct pcb md_pcb;
> >   | ^~
> >
>
> It is very strange.  Are gcc 9 or 8 affected ?

gcc 8 and 9 are affected too.

> As a blind guess, please try this patch.
>
> diff --git a/sys/amd64/include/pcb.h b/sys/amd64/include/pcb.h
> index 44e34fa5c83..9758e684da2 100644
> --- a/sys/amd64/include/pcb.h
> +++ b/sys/amd64/include/pcb.h
> @@ -45,7 +45,7 @@
>  #include 
>  #include 
>
> -#ifdef __amd64__
> +#if defined(__amd64__) || defined(__x86_64__)
>  /*
>   * NB: The fields marked with (*) are used by kernel debuggers.  Their
>   * ABI should be preserved.

I will test this.

Antoine
___
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: r354076 - head/sys/dev/ow

2019-10-26 Thread Bruce Evans

On Fri, 25 Oct 2019, Andriy Gapon wrote:


On 25/10/2019 18:46, Ian Lepore wrote:

On Fri, 2019-10-25 at 15:38 +, Andriy Gapon wrote:

Author: avg
Date: Fri Oct 25 15:38:09 2019
New Revision: 354076
URL: https://svnweb.freebsd.org/changeset/base/354076

Log:
  owc_gpiobus_read_data: compare times in sbintime_t units

  Previously the code used sbttous() before microseconds comparison
in one
  place, sbttons() and nanoseconds in another, division by SBT_1US
and
  microseconds in yet another.

  Now the code consistently uses multiplication by SBT_1US to convert
  microseconds to sbintime_t before comparing them with periods
between
  calls to sbinuptime().  This is fast, this is precise enough (below
  0.03%) and the periods defined by the protocol cannot overflow.

  Reviewed by:  imp (D22108)
  MFC after:2 weeks

Modified:
  head/sys/dev/ow/owc_gpiobus.c

Modified: head/sys/dev/ow/owc_gpiobus.c
=
=
--- head/sys/dev/ow/owc_gpiobus.c   Fri Oct 25 15:02:50 2019(r354
075)
+++ head/sys/dev/ow/owc_gpiobus.c   Fri Oct 25 15:38:09 2019(r354
076)
@@ -296,10 +296,10 @@ owc_gpiobus_read_data(device_t dev, struct
ow_timing *
do {
now = sbinuptime();
GETPIN(sc, );
-   } while (sbttous(now - then) < t->t_rdv + 2 && sample == 0);
+   } while (now - then < (t->t_rdv + 2) * SBT_1US && sample == 0);
critical_exit();

-   if (sbttons(now - then) < t->t_rdv * 1000)
+   if (now - then < t->t_rdv * SBT_1US)
*bit = 1;
else
*bit = 0;
@@ -307,7 +307,7 @@ owc_gpiobus_read_data(device_t dev, struct
ow_timing *
/* Wait out the rest of t_slot */
do {
now = sbinuptime();
-   } while ((now - then) / SBT_1US < t->t_slot);
+   } while (now - then < t->t_slot * SBT_1US);

RELBUS(sc);



Unit conversions with sbt times should be done using the macros that
carefully avoid roundoff errors.  I don't understand why you've changed
the code that correctly did use those macros to inline math.


I think that the commit message explains it:
This is fast, this is precise enough (below 0.03%) and the periods defined by
the protocol cannot overflow.

Do you disagree?
Could you please explain in which of the three lines changed the new code is
worse and why?


The old code is worse.  This is partly because the inline functions are
over-engineered and poorly implemented and don't even work.

The first thing improved in the change is:


do {
now = sbinuptime();
GETPIN(sc, );
-   } while (sbttous(now - then) < t->t_rdv + 2 && sample == 0);
+   } while (now - then < (t->t_rdv + 2) * SBT_1US && sample == 0);


sbintime_t is signed so that negative differences work. Scaling negative
differences by SBT_1*S works right.  Scaling of negative difference by the
inline functions attempts to panic, but even the panic is broken (unreachable).

Here 'now' is an uptime and 'then' is presumably a previous uptime, so
now < then "can't happen".  Similar code with non-monotonic or untrusted
times might produce a negative difference.

For efficiency, t_rdv + 2 could be kept as an sbintime.  Scaling it at
runtime gives the cleaner code:

} while (now - then < ustosbt(t->t_rdv + 2) && sample == 0);

Sign extension bugs are further away in this expression.  The arg
(t->t_rdv + 2) is more obviously >= 0 since it is a limit, and all of
the inline functions return a signed type (sbintime_t or int64_t) so
that signed differences work.

The next thing improved is:


-   if (sbttons(now - then) < t->t_rdv * 1000)
+   if (now - then < t->t_rdv * SBT_1US)


This preserves full accuracy and signs for 'now - then' but loses a little
more accuracy than needed for conversion of t_rdv.  But accuracy of t_rdv
is apparently unimportant.  If the last bit in it were important, then it
should be kept as an sbintime and difference like 'now - then' should never
be scaled since even perfect rounding would lose bits.

The final thing improved is:


-   } while ((now - then) / SBT_1US < t->t_slot);
+   } while (now - then < t->t_slot * SBT_1US);


This already used the unscaled 'now - then', but with a style bug (excessive
parentheses.

imp still hasn't replied to my mails that fix some of the bugs in the
overengineerined committed version.  My version is even more overengineered.
I maintain the following version but only use the non-comment parts of
sbttons().  First look at the bugs in the committed sbtons():

XX /*
XX  * Large comment.  The function is not very overengineered except in the
XX  * comment.  Half the detals are wrong.
XX  */
XX static __inline int64_t
XX sbttons(sbintime_t _sbt)
XX {
XX  uint64_t ns;
XX 
XX #ifdef KASSERT

XX  KASSERT(_sbt >= 0, ("Negative values illegal for sbttons: %jx", _sbt));
XX #endif

Multiplication by SBT_1NS used to be 

Re: svn commit: r354095 - in head/sys: amd64/amd64 amd64/include kern

2019-10-26 Thread Gerald Pfeifer
On Sat, 26 Oct 2019, Konstantin Belousov wrote:
> It is very strange.  Are gcc 9 or 8 affected ?

So far I have only received notification from the head-amd64-default
package builder for lang/gcc10-devel, none of the other ports.

Gerald


> As a blind guess, please try this patch.

Thank you!  I'm not able to do so (no suitable system with root 
access); hopefully someone else can. Antoine, can you?

___
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: r354114 - stable/12/stand/libsa/zfs

2019-10-26 Thread Toomas Soome
Author: tsoome
Date: Sat Oct 26 10:33:21 2019
New Revision: 354114
URL: https://svnweb.freebsd.org/changeset/base/354114

Log:
  MFC r353757:
  loader: zfs_fmtdev can crash when pool discovery did fail and we have no spa
  
  When zfs probe did fail and no spa was created, but zfs_fmtdev() is called,
  we will crash while dereferencing spa (NULL pointer dereference).

Modified:
  stable/12/stand/libsa/zfs/zfs.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/stand/libsa/zfs/zfs.c
==
--- stable/12/stand/libsa/zfs/zfs.c Sat Oct 26 08:37:28 2019
(r354113)
+++ stable/12/stand/libsa/zfs/zfs.c Sat Oct 26 10:33:21 2019
(r354114)
@@ -769,11 +769,16 @@ zfs_fmtdev(void *vdev)
if (dev->dd.d_dev->dv_type != DEVT_ZFS)
return (buf);
 
-   if (dev->pool_guid == 0) {
-   spa = STAILQ_FIRST(_pools);
+   /* Do we have any pools? */
+   spa = STAILQ_FIRST(_pools);
+   if (spa == NULL)
+   return (buf);
+
+   if (dev->pool_guid == 0)
dev->pool_guid = spa->spa_guid;
-   } else
+   else
spa = spa_find_by_guid(dev->pool_guid);
+
if (spa == NULL) {
printf("ZFS: can't find pool by guid\n");
return (buf);
___
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: r354113 - stable/12/sys/kern

2019-10-26 Thread Konstantin Belousov
Author: kib
Date: Sat Oct 26 08:37:28 2019
New Revision: 354113
URL: https://svnweb.freebsd.org/changeset/base/354113

Log:
  MFC r353928:
  vn_printf(): Decode VI_TEXT_REF.

Modified:
  stable/12/sys/kern/vfs_subr.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/kern/vfs_subr.c
==
--- stable/12/sys/kern/vfs_subr.c   Sat Oct 26 06:59:59 2019
(r354112)
+++ stable/12/sys/kern/vfs_subr.c   Sat Oct 26 08:37:28 2019
(r354113)
@@ -3656,8 +3656,10 @@ vn_printf(struct vnode *vp, const char *fmt, ...)
strlcat(buf, "|VI_DOINGINACT", sizeof(buf));
if (vp->v_iflag & VI_OWEINACT)
strlcat(buf, "|VI_OWEINACT", sizeof(buf));
+   if (vp->v_iflag & VI_TEXT_REF)
+   strlcat(buf, "|VI_TEXT_REF", sizeof(buf));
flags = vp->v_iflag & ~(VI_MOUNT | VI_DOOMED | VI_FREE |
-   VI_ACTIVE | VI_DOINGINACT | VI_OWEINACT);
+   VI_ACTIVE | VI_DOINGINACT | VI_OWEINACT | VI_TEXT_REF);
if (flags != 0) {
snprintf(buf2, sizeof(buf2), "|VI(0x%lx)", flags);
strlcat(buf, buf2, sizeof(buf));
___
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: r354095 - in head/sys: amd64/amd64 amd64/include kern

2019-10-26 Thread Konstantin Belousov
On Sat, Oct 26, 2019 at 08:24:09AM +0200, Antoine Brodin wrote:
> On Fri, Oct 25, 2019 at 10:09 PM Konstantin Belousov  wrote:
> >
> > Author: kib
> > Date: Fri Oct 25 20:09:42 2019
> > New Revision: 354095
> > URL: https://svnweb.freebsd.org/changeset/base/354095
> >
> > Log:
> >   amd64: move pcb out of kstack to struct thread.
> >
> >   This saves 320 bytes of the precious stack space.
> >
> >   The only negative aspect of the change I can think of is that the
> >   struct thread increased by 320 bytes obviously, and that 320 bytes are
> >   not swapped out anymore. I believe the freed stack space is much more
> >   important than that.  Also, current struct thread size is 1392 bytes
> >   on amd64, so UMA will allocate two thread structures per (4KB) slab,
> >   which leaves a space for pcb without increasing zone memory use.
> >
> >   Reviewed by:  alc, markj
> >   Tested by:pho
> >   Sponsored by: The FreeBSD Foundation
> >   MFC after:2 weeks
> >   Differential revision:https://reviews.freebsd.org/D22138
> 
> Hi,
> 
> It seems that this breaks at least some versions of gcc:
> 
> In file included from /usr/include/sys/proc.h:75,
>  from /usr/include/sys/user.h:51,
>  from ./md-unwind-support.h:34,
>  from
> /wrkdirs/usr/ports/lang/gcc10-devel/work/gcc-10-20191020/libgcc/unwind-dw2.c:412:
> /usr/include/machine/proc.h:76:13: error: field 'md_pcb' has incomplete type
>76 |  struct pcb md_pcb;
>   | ^~
> 

It is very strange.  Are gcc 9 or 8 affected ?

As a blind guess, please try this patch.

diff --git a/sys/amd64/include/pcb.h b/sys/amd64/include/pcb.h
index 44e34fa5c83..9758e684da2 100644
--- a/sys/amd64/include/pcb.h
+++ b/sys/amd64/include/pcb.h
@@ -45,7 +45,7 @@
 #include 
 #include 
 
-#ifdef __amd64__
+#if defined(__amd64__) || defined(__x86_64__)
 /*
  * NB: The fields marked with (*) are used by kernel debuggers.  Their
  * ABI should be preserved.
___
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: r354112 - in head: contrib/libexecinfo lib/libexecinfo

2019-10-26 Thread Conrad Meyer
Author: cem
Date: Sat Oct 26 06:59:59 2019
New Revision: 354112
URL: https://svnweb.freebsd.org/changeset/base/354112

Log:
  Sync up with NetBSD libexecinfo changes 2014-2019
  
  Drop portions that are unlit or redundant with llvm-libunwind: builtin.c,
  unwind.h, and unwind_arm_ehabi_stub.c.
  
  This code should now work with -fPIE binaries, should we choose to build any
  that way.
  
  When backtrace() array is full, signal an error so the underlying
  Itanium-style C++ exception handling library (llvm-libunwind) knows to stop
  tracing instead of continuing.  (It should stop on its own when it finishes
  unwinding, so this is mostly an extra seatbelt against an infinite loop bug
  in the unwinder.)

Deleted:
  head/contrib/libexecinfo/builtin.c
  head/contrib/libexecinfo/unwind.h
  head/contrib/libexecinfo/unwind_arm_ehabi_stub.c
Modified:
  head/contrib/libexecinfo/symtab.c
  head/contrib/libexecinfo/unwind.c
  head/lib/libexecinfo/Makefile

Modified: head/contrib/libexecinfo/symtab.c
==
--- head/contrib/libexecinfo/symtab.c   Sat Oct 26 03:07:28 2019
(r354111)
+++ head/contrib/libexecinfo/symtab.c   Sat Oct 26 06:59:59 2019
(r354112)
@@ -1,4 +1,4 @@
-/* $NetBSD: symtab.c,v 1.2 2013/08/29 15:01:57 christos Exp $  */
+/* $NetBSD: symtab.c,v 1.5 2016/04/20 14:00:16 christos Exp $  */
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -29,12 +29,13 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__RCSID("$NetBSD: symtab.c,v 1.2 2013/08/29 15:01:57 christos Exp $");
+__RCSID("$NetBSD: symtab.c,v 1.5 2016/04/20 14:00:16 christos Exp $");
 
 #include 
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -47,7 +48,6 @@ __RCSID("$NetBSD: symtab.c,v 1.2 2013/08/29 15:01:57 c
 #define ELF_ST_TYPE(x)  (((unsigned int)x) & 0xf)
 #endif
 
-
 #include "symtab.h"
 
 struct symbol {
@@ -59,6 +59,7 @@ struct symbol {
 struct symtab {
size_t nsymbols;
struct symbol *symbols;
+   bool ispie;
 };
 
 static int
@@ -86,6 +87,7 @@ symtab_create(int fd, int bind, int type)
Elf *elf;
symtab_t *st;
Elf_Scn *scn = NULL;
+   GElf_Ehdr ehdr;
 
if (elf_version(EV_CURRENT) == EV_NONE) {
warnx("Elf Library is out of date.");
@@ -103,7 +105,14 @@ symtab_create(int fd, int bind, int type)
elf_end(elf);
return NULL;
}
+   if (gelf_getehdr(elf, ) == NULL) {
+   warnx("Error getting ELF Ehdr");
+   elf_end(elf);
+   return NULL;
+   }
 
+   st->ispie = ehdr.e_type == ET_DYN;
+
while ((scn = elf_nextscn(elf, scn)) != NULL) {
GElf_Shdr shdr;
Elf_Data *edata;
@@ -127,6 +136,13 @@ symtab_create(int fd, int bind, int type)
GElf_Sym sym;
 gelf_getsym(edata, (int)i, );
 
+#ifdef SYMTAB_DEBUG
+   fprintf(stderr, "%s: %s@%#jx=%d,%d\n", __func__,
+   elf_strptr(elf, shdr.sh_link, sym.st_name),
+   (uintmax_t)sym.st_value, ELF_ST_BIND(sym.st_info),
+   ELF_ST_TYPE(sym.st_info));
+#endif
+
if (bind != -1 &&
(unsigned)bind != ELF_ST_BIND(sym.st_info))
continue;
@@ -159,7 +175,7 @@ out:
return NULL;
 }
 
-   
+
 int
 symtab_find(const symtab_t *st, const void *p, Dl_info *dli)
 {
@@ -168,8 +184,15 @@ symtab_find(const symtab_t *st, const void *p, Dl_info
size_t hi = ns;
size_t lo = 0;
size_t mid = ns / 2;
-   uintptr_t dd, sd, me = (uintptr_t)p;
+   uintptr_t fbase = st->ispie ? (uintptr_t)dli->dli_fbase : 0;
+   uintptr_t dd, sd, me = (uintptr_t)p - fbase;
+   uintptr_t ad = (uintptr_t)dli->dli_saddr - fbase;
 
+#ifdef SYMTAB_DEBUG
+   fprintf(stderr, "%s: [fbase=%#jx, saddr=%p, me=%#jx ad=%#jx]\n",
+   __func__, (uintmax_t)fbase, dli->dli_saddr, (uintmax_t)me,
+   (uintmax_t)ad);
+#endif
for (;;) {
if (s[mid].st_value < me)
lo = mid;
@@ -183,11 +206,20 @@ symtab_find(const symtab_t *st, const void *p, Dl_info
}
mid = (hi + lo) / 2;
}
-   dd = me - (uintptr_t)dli->dli_saddr;
+   dd = me - ad;
sd = me - s[mid].st_value;
if (dd > sd) {
dli->dli_saddr = (void *)s[mid].st_value;
dli->dli_sname = s[mid].st_name;
+#ifdef SYMTAB_DEBUG
+   fprintf(stderr, "%s: me=%#jx -> [%#jx, %s]\n", __func__,
+   (uintmax_t)me, (uintmax_t)sd, dli->dli_sname);
+#endif
}
+#ifdef SYMTAB_DEBUG
+   else
+   fprintf(stderr, "%s: %#jx -> [%#jx, ***]\n", __func__,
+   (uintmax_t)me, (uintmax_t)sd);
+#endif
return 1;
 }


Re: svn commit: r354095 - in head/sys: amd64/amd64 amd64/include kern

2019-10-26 Thread Antoine Brodin
On Fri, Oct 25, 2019 at 10:09 PM Konstantin Belousov  wrote:
>
> Author: kib
> Date: Fri Oct 25 20:09:42 2019
> New Revision: 354095
> URL: https://svnweb.freebsd.org/changeset/base/354095
>
> Log:
>   amd64: move pcb out of kstack to struct thread.
>
>   This saves 320 bytes of the precious stack space.
>
>   The only negative aspect of the change I can think of is that the
>   struct thread increased by 320 bytes obviously, and that 320 bytes are
>   not swapped out anymore. I believe the freed stack space is much more
>   important than that.  Also, current struct thread size is 1392 bytes
>   on amd64, so UMA will allocate two thread structures per (4KB) slab,
>   which leaves a space for pcb without increasing zone memory use.
>
>   Reviewed by:  alc, markj
>   Tested by:pho
>   Sponsored by: The FreeBSD Foundation
>   MFC after:2 weeks
>   Differential revision:https://reviews.freebsd.org/D22138

Hi,

It seems that this breaks at least some versions of gcc:

In file included from /usr/include/sys/proc.h:75,
 from /usr/include/sys/user.h:51,
 from ./md-unwind-support.h:34,
 from
/wrkdirs/usr/ports/lang/gcc10-devel/work/gcc-10-20191020/libgcc/unwind-dw2.c:412:
/usr/include/machine/proc.h:76:13: error: field 'md_pcb' has incomplete type
   76 |  struct pcb md_pcb;
  | ^~

Antoine
___
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"