svn commit: r365325 - head/usr.sbin/fmtree
Author: stevek Date: Fri Sep 4 04:31:56 2020 New Revision: 365325 URL: https://svnweb.freebsd.org/changeset/base/365325 Log: Avoid collisions with function names in openssl headers. Just using MD5, SHA1, RMD160 and SHA256 for defines collides with functions of the same name in OpenSSL. This can cause compilation issues in downstream consumers if they use OpenSSL for the hash functions instead of libmd. Reviewed by: sjg Obtained from:Juniper Networks, Inc. Differential Revision:https://reviews.freebsd.org/D26321 Modified: head/usr.sbin/fmtree/Makefile head/usr.sbin/fmtree/compare.c Modified: head/usr.sbin/fmtree/Makefile == --- head/usr.sbin/fmtree/Makefile Fri Sep 4 02:22:27 2020 (r365324) +++ head/usr.sbin/fmtree/Makefile Fri Sep 4 04:31:56 2020 (r365325) @@ -10,7 +10,7 @@ MAN= fmtree.8 SRCS= compare.c crc.c create.c excludes.c misc.c mtree.c spec.c verify.c SRCS+= specspec.c -CFLAGS+= -DMD5 -DSHA1 -DRMD160 -DSHA256 +CFLAGS+= -DWITH_MD5 -DWITH_SHA1 -DWITH_RMD160 -DWITH_SHA256 LIBADD=md CLEANFILES+= fmtree.8 Modified: head/usr.sbin/fmtree/compare.c == --- head/usr.sbin/fmtree/compare.c Fri Sep 4 02:22:27 2020 (r365324) +++ head/usr.sbin/fmtree/compare.c Fri Sep 4 04:31:56 2020 (r365325) @@ -43,16 +43,16 @@ __FBSDID("$FreeBSD$"); #include #include #include -#ifdef MD5 +#ifdef WITH_MD5 #include #endif -#ifdef RMD160 +#ifdef WITH_RMD160 #include #endif -#ifdef SHA1 +#ifdef WITH_SHA1 #include #endif -#ifdef SHA256 +#ifdef WITH_SHA256 #include #endif #include @@ -244,7 +244,7 @@ typeerr:LABEL; (void)printf("\n"); tab = "\t"; } -#ifdef MD5 +#ifdef WITH_MD5 if (s->flags & F_MD5) { char *new_digest, buf[33]; @@ -262,7 +262,7 @@ typeerr:LABEL; } } #endif /* MD5 */ -#ifdef SHA1 +#ifdef WITH_SHA1 if (s->flags & F_SHA1) { char *new_digest, buf[41]; @@ -280,7 +280,7 @@ typeerr:LABEL; } } #endif /* SHA1 */ -#ifdef RMD160 +#ifdef WITH_RMD160 if (s->flags & F_RMD160) { char *new_digest, buf[41]; @@ -298,7 +298,7 @@ typeerr:LABEL; } } #endif /* RMD160 */ -#ifdef SHA256 +#ifdef WITH_SHA256 if (s->flags & F_SHA256) { char *new_digest, buf[65]; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365319 - in head/sys/compat: lindebugfs linsysfs linux
Author: markj Date: Fri Sep 4 00:12:28 2020 New Revision: 365319 URL: https://svnweb.freebsd.org/changeset/base/365319 Log: Add emulation support for the Linux kcov(4) ioctl API. This makes it possible to run an unmodified Linux syzkaller executor against the Linuxulator, and have it gather code coverage information. Sponsored by: The FreeBSD Foundation Modified: head/sys/compat/lindebugfs/lindebugfs.c head/sys/compat/linsysfs/linsysfs.c head/sys/compat/linux/linux_ioctl.c head/sys/compat/linux/linux_ioctl.h Modified: head/sys/compat/lindebugfs/lindebugfs.c == --- head/sys/compat/lindebugfs/lindebugfs.c Fri Sep 4 00:11:01 2020 (r365318) +++ head/sys/compat/lindebugfs/lindebugfs.c Fri Sep 4 00:12:28 2020 (r365319) @@ -299,6 +299,9 @@ debugfs_init(PFS_INIT_ARGS) { debugfs_root = pi->pi_root; + + (void)debugfs_create_symlink("kcov", NULL, "/dev/kcov"); + return (0); } Modified: head/sys/compat/linsysfs/linsysfs.c == --- head/sys/compat/linsysfs/linsysfs.c Fri Sep 4 00:11:01 2020 (r365318) +++ head/sys/compat/linsysfs/linsysfs.c Fri Sep 4 00:12:28 2020 (r365319) @@ -624,6 +624,8 @@ linsysfs_init(PFS_INIT_ARGS) struct pfs_node *net; struct pfs_node *power_supply; struct pfs_node *devdir, *chardev; + struct pfs_node *kernel; + struct pfs_node *debug; devclass_t devclass; device_t dev; @@ -671,6 +673,11 @@ linsysfs_init(PFS_INIT_ARGS) linsysfs_listcpus(cpu); linsysfs_listnics(net); + + /* /sys/kernel */ + kernel = pfs_create_dir(root, "kernel", NULL, NULL, NULL, 0); + /* /sys/kernel/debug, mountpoint for lindebugfs. */ + debug = pfs_create_dir(kernel, "debug", NULL, NULL, NULL, 0); return (0); } Modified: head/sys/compat/linux/linux_ioctl.c == --- head/sys/compat/linux/linux_ioctl.c Fri Sep 4 00:11:01 2020 (r365318) +++ head/sys/compat/linux/linux_ioctl.c Fri Sep 4 00:12:28 2020 (r365319) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -117,6 +118,7 @@ static linux_ioctl_function_t linux_ioctl_v4l2; static linux_ioctl_function_t linux_ioctl_special; static linux_ioctl_function_t linux_ioctl_fbsd_usb; static linux_ioctl_function_t linux_ioctl_evdev; +static linux_ioctl_function_t linux_ioctl_kcov; static struct linux_ioctl_handler cdrom_handler = { linux_ioctl_cdrom, LINUX_IOCTL_CDROM_MIN, LINUX_IOCTL_CDROM_MAX }; @@ -146,6 +148,8 @@ static struct linux_ioctl_handler fbsd_usb = { linux_ioctl_fbsd_usb, FBSD_LUSB_MIN, FBSD_LUSB_MAX }; static struct linux_ioctl_handler evdev_handler = { linux_ioctl_evdev, LINUX_IOCTL_EVDEV_MIN, LINUX_IOCTL_EVDEV_MAX }; +static struct linux_ioctl_handler kcov_handler = +{ linux_ioctl_kcov, LINUX_KCOV_MIN, LINUX_KCOV_MAX }; DATA_SET(linux_ioctl_handler_set, cdrom_handler); DATA_SET(linux_ioctl_handler_set, vfat_handler); @@ -161,6 +165,7 @@ DATA_SET(linux_ioctl_handler_set, video_handler); DATA_SET(linux_ioctl_handler_set, video2_handler); DATA_SET(linux_ioctl_handler_set, fbsd_usb); DATA_SET(linux_ioctl_handler_set, evdev_handler); +DATA_SET(linux_ioctl_handler_set, kcov_handler); /* * Keep sorted by low. @@ -3570,6 +3575,38 @@ linux_ioctl_evdev(struct thread *td, struct linux_ioct args->cmd = (args->cmd & ~IOC_DIRMASK) | IOC_INOUT; return (sys_ioctl(td, (struct ioctl_args *)args)); +} + +static int +linux_ioctl_kcov(struct thread *td, struct linux_ioctl_args *args) +{ + int error; + + error = 0; + switch (args->cmd & 0x) { + case LINUX_KCOV_INIT_TRACE: + args->cmd = KIOSETBUFSIZE; + break; + case LINUX_KCOV_ENABLE: + args->cmd = KIOENABLE; + if (args->arg == 0) + args->arg = KCOV_MODE_TRACE_PC; + else if (args->arg == 1) + args->arg = KCOV_MODE_TRACE_CMP; + else + error = EINVAL; + break; + case LINUX_KCOV_DISABLE: + args->cmd = KIODISABLE; + break; + default: + error = ENOTTY; + break; + } + + if (error == 0) + error = sys_ioctl(td, (struct ioctl_args *)args); + return (error); } /* Modified: head/sys/compat/linux/linux_ioctl.h == --- head/sys/compat/linux/linux_ioctl.h Fri Sep 4 00:11:01 2020 (r365318) +++ head/sys/compat/linux/linux_ioctl.h Fri Sep 4 00:12:28 2020 (r365319) @@ -762,6 +762,17 @@ #define LINUX_IOCTL_EVDEV_MAX
svn commit: r365318 - head/stand/efi/loader
Author: jhb Date: Fri Sep 4 00:11:01 2020 New Revision: 365318 URL: https://svnweb.freebsd.org/changeset/base/365318 Log: Quiet int-to-pointer-cast warnings on i386 with GCC 9. Reviewed by: emaste Differential Revision:https://reviews.freebsd.org/D26200 Modified: head/stand/efi/loader/copy.c Modified: head/stand/efi/loader/copy.c == --- head/stand/efi/loader/copy.cThu Sep 3 23:17:25 2020 (r365317) +++ head/stand/efi/loader/copy.cFri Sep 4 00:11:01 2020 (r365318) @@ -290,8 +290,8 @@ before_staging: * translation still works. */ staging_base = addr; - memmove((void *)staging_base, (void *)staging, - staging_end - staging); + memmove((void *)(uintptr_t)staging_base, + (void *)(uintptr_t)staging, staging_end - staging); stage_offset -= (staging - staging_base); staging = staging_base; return (true); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365316 - head/sys/rpc/rpcsec_tls
Author: mhorne Date: Thu Sep 3 22:40:51 2020 New Revision: 365316 URL: https://svnweb.freebsd.org/changeset/base/365316 Log: Remove a duplicate declaration This is already declared in sys/file.h, which is included directly. Compiling with GCC9 emits an error. Discussed with: rmacklem Modified: head/sys/rpc/rpcsec_tls/rpctls_impl.c Modified: head/sys/rpc/rpcsec_tls/rpctls_impl.c == --- head/sys/rpc/rpcsec_tls/rpctls_impl.c Thu Sep 3 22:24:52 2020 (r365315) +++ head/sys/rpc/rpcsec_tls/rpctls_impl.c Thu Sep 3 22:40:51 2020 (r365316) @@ -62,8 +62,6 @@ __FBSDID("$FreeBSD$"); #include "rpctlscd.h" #include "rpctlssd.h" -extern struct fileops badfileops; - /* * Syscall hooks */ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365315 - head/sys/net/route
Author: melifaro Date: Thu Sep 3 22:24:52 2020 New Revision: 365315 URL: https://svnweb.freebsd.org/changeset/base/365315 Log: Fix regression for IPv6 loopback routes. After nexthop introduction, loopback routes for the interface addresses were created without embedding actual interface index in the gateway. The latter is needed to pass the IPv6 scope during transmission via loopback.. Fix the regression by actually using passed gateway data with interface index. Differential Revision:https://reviews.freebsd.org/D26306 Modified: head/sys/net/route/nhop_ctl.c Modified: head/sys/net/route/nhop_ctl.c == --- head/sys/net/route/nhop_ctl.c Thu Sep 3 22:20:27 2020 (r365314) +++ head/sys/net/route/nhop_ctl.c Thu Sep 3 22:24:52 2020 (r365315) @@ -225,6 +225,7 @@ set_nhop_gw_from_info(struct nhop_object *nh, struct r } memcpy(>gw_sa, gw, gw->sa_len); } else { + /* * Interface route. Currently the route.c code adds * sa of type AF_LINK, which is 56 bytes long. The only @@ -235,7 +236,21 @@ set_nhop_gw_from_info(struct nhop_object *nh, struct r * in the separate field (nh_aifp, see below), write AF_LINK * compatible sa with shorter total length. */ - fill_sdl_from_ifp(>gwl_sa, nh->nh_ifp); + struct sockaddr_dl *sdl; + struct ifnet *ifp; + + /* Fetch and validate interface index */ + sdl = (struct sockaddr_dl *)gw; + if (sdl->sdl_family != AF_LINK) { + DPRINTF("unsupported AF: %d", sdl->sdl_family); + return (ENOTSUP); + } + ifp = ifnet_byindex(sdl->sdl_index); + if (ifp == NULL) { + DPRINTF("invalid ifindex %d", sdl->sdl_index); + return (EINVAL); + } + fill_sdl_from_ifp(>gwl_sa, ifp); } return (0); @@ -272,12 +287,13 @@ fill_nhop_from_info(struct nhop_priv *nh_priv, struct nh->nh_flags = convert_rt_to_nh_flags(rt_flags); set_nhop_mtu_from_info(nh, info); + if ((error = set_nhop_gw_from_info(nh, info)) != 0) + return (error); + nh->nh_ifp = info->rti_ifa->ifa_ifp; nh->nh_ifa = info->rti_ifa; + /* depends on the gateway */ nh->nh_aifp = get_aifp(nh, 0); - - if ((error = set_nhop_gw_from_info(nh, info)) != 0) - return (error); /* * Note some of the remaining data is set by the ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365309 - head/share/snmp/mibs
Author: rmacklem Date: Thu Sep 3 20:42:30 2020 New Revision: 365309 URL: https://svnweb.freebsd.org/changeset/base/365309 Log: Add entries for the OID used for NFS-over-TLS "user@domain". The NFS-over-TLS server daemon (rpc.tlsservd) can optionally replace user credentials in the RPC header with ones derived from a username specified by the form "user@domain", if this exists in the client's X.509 v3 certificate. Specifically, "user@domain" needs to be in the "otherName" component of subjectjAltName, with a unique OID as assigned by this update. This patch adds a subtree for the "otherName" component of subjectAltName in X.509 v3 cerificates and a value for "user@domain" as used by NFS-over-TLS. Reviewed by: phk, gordon Differential Revision:https://reviews.freebsd.org/D26225 Modified: head/share/snmp/mibs/FREEBSD-MIB.txt Modified: head/share/snmp/mibs/FREEBSD-MIB.txt == --- head/share/snmp/mibs/FREEBSD-MIB.txtThu Sep 3 20:30:52 2020 (r365308) +++ head/share/snmp/mibs/FREEBSD-MIB.txtThu Sep 3 20:42:30 2020 (r365309) @@ -16,7 +16,7 @@ IMPORTS FROM SNMPv2-SMI; freeBSD MODULE-IDENTITY - LAST-UPDATED "200610311000Z" + LAST-UPDATED "202009032030Z" ORGANIZATION "The FreeBSD Project." CONTACT-INFO "p...@freebsd.org is contact person for this file. @@ -24,6 +24,9 @@ freeBSD MODULE-IDENTITY DESCRIPTION "The Structure of Management Information for the FreeBSD Project enterprise MIB subtree." + REVISION "202009031900Z" + DESCRIPTION + "Added entries for the otherName component of a X.509 cert" REVISION "200610310800Z" DESCRIPTION "Initial version of this MIB module." @@ -35,6 +38,21 @@ freeBSDsrc OBJECT-IDENTITY DESCRIPTION "Subtree for things which lives in the src tree." ::= { freeBSD 1 } + +freeBSDsrcCertOtherName OBJECT-IDENTITY + STATUS current + DESCRIPTION + "Subtree for X.509 Certificate otherName entries" + ::= { freeBSDsrc 1 } + +-- +-- For NFS over TLS, a user@domain can optionally be handled by rpc.tlsservd +-- +freeBSDsrcCertNFSuser OBJECT-IDENTITY + STATUS current + DESCRIPTION + "Entry for X.509 Certificate for NFS user@domain name" + ::= { freeBSDsrcCertOtherName 1 } freeBSDports OBJECT-IDENTITY STATUS current ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365308 - head/sys/security/mac
Author: avg Date: Thu Sep 3 20:30:52 2020 New Revision: 365308 URL: https://svnweb.freebsd.org/changeset/base/365308 Log: mac_framework.h: fix build with DEBUG_VFS_LOCKS and !MAC I have such a custom kernel configuration and its build failed with: linking kernel.full ld: error: undefined symbol: mac_vnode_assert_locked >>> referenced by mac_framework.h:556 (/usr/devel/git/apu2c4/sys/security/mac/mac_framework.h:556) >>> tmpfs_vnops.o:(mac_vnode_check_stat) >>> referenced by mac_framework.h:556 (/usr/devel/git/apu2c4/sys/security/mac/mac_framework.h:556) >>> vfs_default.o:(mac_vnode_check_stat) >>> referenced by mac_framework.h:556 (/usr/devel/git/apu2c4/sys/security/mac/mac_framework.h:556) >>> ufs_vnops.o:(mac_vnode_check_stat) Modified: head/sys/security/mac/mac_framework.h Modified: head/sys/security/mac/mac_framework.h == --- head/sys/security/mac/mac_framework.h Thu Sep 3 18:34:01 2020 (r365307) +++ head/sys/security/mac/mac_framework.h Thu Sep 3 20:30:52 2020 (r365308) @@ -400,7 +400,7 @@ voidmac_sysvshm_init(struct shmid_kernel *); void mac_thread_userret(struct thread *td); -#ifdef DEBUG_VFS_LOCKS +#if defined(MAC) && defined(DEBUG_VFS_LOCKS) void mac_vnode_assert_locked(struct vnode *vp, const char *func); #else #define mac_vnode_assert_locked(vp, func) do { } while (0) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r365305 - in head: . tools/build/mk
On Thu, 3 Sep 2020 at 14:22, Dimitry Andric wrote: > > Author: dim > Date: Thu Sep 3 18:21:58 2020 > New Revision: 365305 > URL: https://svnweb.freebsd.org/changeset/base/365305 > > Log: > Ensure zpool-features(5) doesn't get removed by make delete-old. > > Apparently, somewhere in 2012 ZFS-on-FreeBSD moved it from section 5 to > 7, but ZFS-on-Linux never did. Certainly it's silly for us to install zpool-features.5 and then remove it again and this change is sensible in the immediate term, although it looks like this should actually be in section 7. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365307 - head/contrib/llvm-project/llvm/include/llvm/ADT
Author: dim Date: Thu Sep 3 18:34:01 2020 New Revision: 365307 URL: https://svnweb.freebsd.org/changeset/base/365307 Log: Merge commit f26fc568402f from llvm git (by me): Eliminate the sizing template parameter N from CoalescingBitVector Since the parameter is not used anywhere, and the default size of 16 apparently causes PR47359, remove it. This ensures that IntervalMap will automatically determine the optimal size, using its NodeSizer struct. Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D87044 This should fix 'Assertion failed: (Elements + Grow <= Nodes * Capacity && "Not enough room for elements"), function distribute, file /usr/src/contrib/llvm-project/llvm/lib/Support/IntervalMap.cpp, line 123.' when building the x11-toolkits/py-wxPython40 port on a i386 host. Reported by: zeising MFC after:6 weeks X-MFC-With: r364284 Modified: head/contrib/llvm-project/llvm/include/llvm/ADT/CoalescingBitVector.h Modified: head/contrib/llvm-project/llvm/include/llvm/ADT/CoalescingBitVector.h == --- head/contrib/llvm-project/llvm/include/llvm/ADT/CoalescingBitVector.h Thu Sep 3 18:27:13 2020(r365306) +++ head/contrib/llvm-project/llvm/include/llvm/ADT/CoalescingBitVector.h Thu Sep 3 18:34:01 2020(r365307) @@ -34,15 +34,14 @@ namespace llvm { /// performance for non-sequential find() operations. /// /// \tparam IndexT - The type of the index into the bitvector. -/// \tparam N - The first N coalesced intervals of set bits are stored in-place. -template class CoalescingBitVector { +template class CoalescingBitVector { static_assert(std::is_unsigned::value, "Index must be an unsigned integer."); - using ThisT = CoalescingBitVector; + using ThisT = CoalescingBitVector; /// An interval map for closed integer ranges. The mapped values are unused. - using MapT = IntervalMap; + using MapT = IntervalMap; using UnderlyingIterator = typename MapT::const_iterator; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365306 - head/lib/clang/libllvm
Author: dim Date: Thu Sep 3 18:27:13 2020 New Revision: 365306 URL: https://svnweb.freebsd.org/changeset/base/365306 Log: Add a few more files to libllvm, which are required when doing sanitized builds, for example with -fsanitize=undefined. MFC after:6 weeks X-MFC-With: r364284 Modified: head/lib/clang/libllvm/Makefile Modified: head/lib/clang/libllvm/Makefile == --- head/lib/clang/libllvm/Makefile Thu Sep 3 18:21:58 2020 (r365305) +++ head/lib/clang/libllvm/Makefile Thu Sep 3 18:27:13 2020 (r365306) @@ -850,11 +850,14 @@ SRCS_MIN+=ProfileData/ProfileSummaryBuilder.cpp SRCS_MIN+= ProfileData/SampleProf.cpp SRCS_MIN+= ProfileData/SampleProfReader.cpp SRCS_MIN+= ProfileData/SampleProfWriter.cpp +SRCS_MIN+= Remarks/BitstreamRemarkParser.cpp SRCS_MIN+= Remarks/BitstreamRemarkSerializer.cpp SRCS_MIN+= Remarks/RemarkFormat.cpp +SRCS_MIN+= Remarks/RemarkParser.cpp SRCS_MIN+= Remarks/RemarkSerializer.cpp SRCS_MIN+= Remarks/RemarkStreamer.cpp SRCS_MIN+= Remarks/RemarkStringTable.cpp +SRCS_MIN+= Remarks/YAMLRemarkParser.cpp SRCS_MIN+= Remarks/YAMLRemarkSerializer.cpp SRCS_MIN+= Support/AArch64TargetParser.cpp SRCS_MIN+= Support/ABIBreak.cpp ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365305 - in head: . tools/build/mk
Author: dim Date: Thu Sep 3 18:21:58 2020 New Revision: 365305 URL: https://svnweb.freebsd.org/changeset/base/365305 Log: Ensure zpool-features(5) doesn't get removed by make delete-old. Apparently, somewhere in 2012 ZFS-on-FreeBSD moved it from section 5 to 7, but ZFS-on-Linux never did. Modified: head/ObsoleteFiles.inc head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Thu Sep 3 17:07:58 2020(r365304) +++ head/ObsoleteFiles.inc Thu Sep 3 18:21:58 2020(r365305) @@ -7605,8 +7605,6 @@ OLD_FILES+=usr/lib/libdisk.a usr/lib32/libdisk.a # 20121230: remove wrongly created directories for auditdistd OLD_DIRS+=var/dist OLD_DIRS+=var/remote -# 20121114: zpool-features manual page moved from section 5 to 7 -OLD_FILES+=usr/share/man/man5/zpool-features.5.gz # 20121022: remove harp, hfa and idt man page OLD_FILES+=usr/share/man/man4/harp.4.gz OLD_FILES+=usr/share/man/man4/hfa.4.gz Modified: head/tools/build/mk/OptionalObsoleteFiles.inc == --- head/tools/build/mk/OptionalObsoleteFiles.inc Thu Sep 3 17:07:58 2020(r365304) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Thu Sep 3 18:21:58 2020(r365305) @@ -1173,7 +1173,7 @@ OLD_FILES+=usr/sbin/zfsd OLD_FILES+=usr/sbin/zhack OLD_FILES+=usr/sbin/zdb OLD_FILES+=usr/share/man/man3/libbe.3.gz -OLD_FILES+=usr/share/man/man7/zpool-features.7.gz +OLD_FILES+=usr/share/man/man5/zpool-features.5.gz OLD_FILES+=usr/share/man/man8/bectl.8.gz OLD_FILES+=usr/share/man/man8/gptzfsboot.8.gz OLD_FILES+=usr/share/man/man8/zdb.8.gz ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r360037 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
On Fri, Apr 17, 2020 at 1:05 AM Gleb Smirnoff wrote: > > Author: glebius > Date: Fri Apr 17 06:05:08 2020 > New Revision: 360037 > URL: https://svnweb.freebsd.org/changeset/base/360037 > > Log: > Make ZFS depend on xdr.ko only. It doesn't need kernel RPC. > > Differential Revision:https://reviews.freebsd.org/D24408 > Would you object to me MFC'ing this series to stable/12? It's pretty useful for building a good MINIMAL config with zfs support, and would probably allow us to drop a __FreeBSD_version split of dependencies in the short-to-mid term from OpenZFS if we don't need to pretend that OpenZFS will build on 11. None of it looked too invasive for stable from a cursory glance. Thanks, Kyle Evans ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365304 - head/sys/arm64/include
Author: mhorne Date: Thu Sep 3 17:07:58 2020 New Revision: 365304 URL: https://svnweb.freebsd.org/changeset/base/365304 Log: arm64: update the set of HWCAP definitions This is in sync with what is defined for Linux 5.8. Note that all bits in HWCAP are exhausted, and HWCAP2 has been added. This also revealed an error in some of the existing definitions. We are missing HWCAP_ASIMDHP, and as a result a portion of the HWCAP values are shifted right by one bit. This will be fixed in an upcoming change, but the values being added now are compatible with what Linux defines. Reviewed by: emaste, markj, manu MFC after:1 week Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D26030 Modified: head/sys/arm64/include/elf.h Modified: head/sys/arm64/include/elf.h == --- head/sys/arm64/include/elf.hThu Sep 3 15:57:37 2020 (r365303) +++ head/sys/arm64/include/elf.hThu Sep 3 17:07:58 2020 (r365304) @@ -92,33 +92,58 @@ __ElfType(Auxinfo); #endif /* HWCAP */ +#defineHWCAP_FP0x0001 +#defineHWCAP_ASIMD 0x0002 +#defineHWCAP_EVTSTRM 0x0004 +#defineHWCAP_AES 0x0008 +#defineHWCAP_PMULL 0x0010 +#defineHWCAP_SHA1 0x0020 +#defineHWCAP_SHA2 0x0040 +#defineHWCAP_CRC32 0x0080 +#defineHWCAP_ATOMICS 0x0100 +#defineHWCAP_FPHP 0x0200 +/* XXX: The following bits don't match the Linux definitions */ +#defineHWCAP_CPUID 0x0400 +#defineHWCAP_ASIMDRDM 0x0800 +#defineHWCAP_JSCVT 0x1000 +#defineHWCAP_FCMA 0x2000 +#defineHWCAP_LRCPC 0x4000 +#defineHWCAP_DCPOP 0x8000 +#defineHWCAP_SHA3 0x0001 +#defineHWCAP_SM3 0x0002 +#defineHWCAP_SM4 0x0004 +#defineHWCAP_ASIMDDP 0x0008 +#defineHWCAP_SHA5120x0010 +#defineHWCAP_SVE 0x0020 +#defineHWCAP_ASIMDFHM 0x0040 +#defineHWCAP_DIT 0x0080 +#defineHWCAP_USCAT 0x0100 +#defineHWCAP_ILRCPC0x0200 +#defineHWCAP_FLAGM 0x0400 +/* XXX: end of incorrect definitions */ +#defineHWCAP_SSBS 0x1000 +#defineHWCAP_SB0x2000 +#defineHWCAP_PACA 0x4000 +#defineHWCAP_PACG 0x8000 -#defineHWCAP_FP0x0001 -#defineHWCAP_ASIMD 0x0002 -#defineHWCAP_EVTSTRM 0x0004 -#defineHWCAP_AES 0x0008 -#defineHWCAP_PMULL 0x0010 -#defineHWCAP_SHA1 0x0020 -#defineHWCAP_SHA2 0x0040 -#defineHWCAP_CRC32 0x0080 -#defineHWCAP_ATOMICS 0x0100 -#defineHWCAP_FPHP 0x0200 -#defineHWCAP_CPUID 0x0400 -#defineHWCAP_ASIMDRDM 0x0800 -#defineHWCAP_JSCVT 0x1000 -#defineHWCAP_FCMA 0x2000 -#defineHWCAP_LRCPC 0x4000 -#defineHWCAP_DCPOP 0x8000 -#defineHWCAP_SHA3 0x0001 -#defineHWCAP_SM3 0x0002 -#defineHWCAP_SM4 0x0004 -#defineHWCAP_ASIMDDP 0x0008 -#defineHWCAP_SHA5120x0010 -#defineHWCAP_SVE 0x0020 -#defineHWCAP_ASIMDFHM 0x0040 -#defineHWCAP_DIT 0x0080 -#defineHWCAP_USCAT 0x0100 -#defineHWCAP_ILRCPC0x0200 -#defineHWCAP_FLAGM 0x0400 +/* HWCAP2 */ +#defineHWCAP2_DCPODP 0x0001 +#defineHWCAP2_SVE2 0x0002 +#defineHWCAP2_SVEAES 0x0004 +#defineHWCAP2_SVEPMULL 0x0008 +#defineHWCAP2_SVEBITPERM 0x0010 +#defineHWCAP2_SVESHA3 0x0020 +#defineHWCAP2_SVESM4 0x0040 +#defineHWCAP2_FLAGM2 0x0080 +#defineHWCAP2_FRINT0x0100 +#defineHWCAP2_SVEI8MM 0x0200 +#defineHWCAP2_SVEF32MM 0x0400 +#defineHWCAP2_SVEF64MM 0x0800 +#defineHWCAP2_SVEBF16 0x1000 +#defineHWCAP2_I8MM 0x2000 +#defineHWCAP2_BF16 0x4000 +#defineHWCAP2_DGH 0x8000 +#defineHWCAP2_RNG 0x0001 +#defineHWCAP2_BTI 0x0002 #endif /* !_MACHINE_ELF_H_ */
svn commit: r365302 - head/lib/libc/tests/resolv
Author: jhb Date: Thu Sep 3 14:50:15 2020 New Revision: 365302 URL: https://svnweb.freebsd.org/changeset/base/365302 Log: Various fixes to the load() function. - Use getline() instead of fgetln(). This ensures the returned string is always null-terminated without losing the last character if the last line in a file doesn't have a newline. Also, while fgetln says the returned buffer can be modified, that doesn't actually seem safe as the current implementation means you are modifying stdio's internal buffer. - Remove a spurious if before an ATF_REQUIRE that was clearly supposed to be non-optional. - Remove a pointless compare of 'ptr' against '\0' (really NULL) that duplicated the middle condition in the for(). - Once a comment is found, skip the rest of the line, not just the current word. Reviewed by: kevans Obtained from:CheriBSD Sponsored by: DARPA Differential Revision:https://reviews.freebsd.org/D26278 Modified: head/lib/libc/tests/resolv/resolv_test.c Modified: head/lib/libc/tests/resolv/resolv_test.c == --- head/lib/libc/tests/resolv/resolv_test.cThu Sep 3 13:57:20 2020 (r365301) +++ head/lib/libc/tests/resolv/resolv_test.cThu Sep 3 14:50:15 2020 (r365302) @@ -70,22 +70,23 @@ static void load(const char *fname) { FILE *fp; - size_t len; + size_t linecap; char *line; - if ((fp = fopen(fname, "r")) == NULL) + fp = fopen(fname, "r"); ATF_REQUIRE(fp != NULL); - while ((line = fgetln(fp, )) != NULL) { - char c = line[len - 1]; + line = NULL; + linecap = 0; + while (getline(, , fp) >= 0) { char *ptr; - line[len - 1] = '\0'; + for (ptr = strtok(line, WS); ptr; ptr = strtok(NULL, WS)) { - if (ptr == '\0' || ptr[0] == '#') - continue; + if (ptr[0] == '#') + break; sl_add(hosts, strdup(ptr)); } - line[len - 1] = c; } + free(line); (void)fclose(fp); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365296 - in head/sys/arm64: arm64 include
Author: andrew Date: Thu Sep 3 10:11:12 2020 New Revision: 365296 URL: https://svnweb.freebsd.org/changeset/base/365296 Log: Switch to an empty ttbr0 pagetable when the MMU is enabled We don't need these pagetables after the early boot. Remove the chance we write to memory we didn't expect to and remove architectural undefined behaviour. Reviewed by: alc (earlier version), mmel Sponsored by: Innovate UK Differential Revision:https://reviews.freebsd.org/D22606 Modified: head/sys/arm64/arm64/locore.S head/sys/arm64/arm64/machdep.c head/sys/arm64/include/machdep.h Modified: head/sys/arm64/arm64/locore.S == --- head/sys/arm64/arm64/locore.S Thu Sep 3 09:09:44 2020 (r365295) +++ head/sys/arm64/arm64/locore.S Thu Sep 3 10:11:12 2020 (r365296) @@ -128,6 +128,9 @@ _start: /* Enable the mmu */ bl start_mmu + /* Load the new ttbr0 pagetable */ + adr x27, pagetable_l0_ttbr0 + /* Jump to the virtual address space */ ldr x15, .Lvirtdone br x15 @@ -166,6 +169,7 @@ virtdone: str x25, [x0, #BP_KERN_STACK] str x24, [x0, #BP_KERN_L0PT] str x23, [x0, #BP_BOOT_EL] + str x27, [x0, 40] /* kern_ttbr0 */ /* trace back starts here */ mov fp, #0 @@ -204,11 +208,14 @@ ENTRY(mpentry) /* Load the kernel page table */ adr x24, pagetable_l0_ttbr1 /* Load the identity page table */ - adr x27, pagetable_l0_ttbr0 + adr x27, pagetable_l0_ttbr0_boostrap /* Enable the mmu */ bl start_mmu + /* Load the new ttbr0 pagetable */ + adr x27, pagetable_l0_ttbr0 + /* Jump to the virtual address space */ ldr x15, =mp_virtdone br x15 @@ -218,6 +225,16 @@ mp_virtdone: ldr x4, =bootstack ldr x4, [x4] mov sp, x4 + + /* Load the kernel ttbr0 pagetable */ + msr ttbr0_el1, x27 + isb + + /* Invalidate the TLB */ + tlbivmalle1 + dsb sy + isb + b init_secondary END(mpentry) #endif @@ -760,10 +777,13 @@ abort: //.section .init_pagetable .align 12 /* 4KiB aligned */ /* -* 3 initial tables (in the following order): +* 6 initial tables (in the following order): * L2 for kernel (High addresses) * L1 for kernel -* L1 for user (Low addresses) +* L0 for kernel +* L1 bootstrap for user (Low addresses) +* L0 bootstrap for user +* L0 for user */ pagetable: .space PAGE_SIZE @@ -771,7 +791,9 @@ pagetable_l1_ttbr1: .space PAGE_SIZE pagetable_l0_ttbr1: .space PAGE_SIZE -pagetable_l1_ttbr0: +pagetable_l1_ttbr0_bootstrap: + .space PAGE_SIZE +pagetable_l0_ttbr0_boostrap: .space PAGE_SIZE pagetable_l0_ttbr0: .space PAGE_SIZE Modified: head/sys/arm64/arm64/machdep.c == --- head/sys/arm64/arm64/machdep.c Thu Sep 3 09:09:44 2020 (r365295) +++ head/sys/arm64/arm64/machdep.c Thu Sep 3 10:11:12 2020 (r365296) @@ -1235,6 +1235,8 @@ initarm(struct arm64_bootparams *abp) valid = bus_probe(); cninit(); + set_ttbr0(abp->kern_ttbr0); + cpu_tlb_flushID(); if (!valid) panic("Invalid bus configuration: %s", Modified: head/sys/arm64/include/machdep.h == --- head/sys/arm64/include/machdep.hThu Sep 3 09:09:44 2020 (r365295) +++ head/sys/arm64/include/machdep.hThu Sep 3 10:11:12 2020 (r365296) @@ -37,6 +37,7 @@ struct arm64_bootparams { uint64_tkern_delta; vm_offset_t kern_stack; vm_offset_t kern_l0pt; /* L1 page table for the kernel */ + vm_paddr_t kern_ttbr0; int boot_el;/* EL the kernel booted from */ int pad; }; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365291 - head/sbin/bectl/tests
Author: lwhsu Date: Thu Sep 3 08:16:57 2020 New Revision: 365291 URL: https://svnweb.freebsd.org/changeset/base/365291 Log: Temporarily skip sbin.bectl.bectl_test.* i386 kernel in CI kldload zfs.ko on i386 hangs in CI Sponsored by: The FreeBSD Foundation Modified: head/sbin/bectl/tests/bectl_test.sh Modified: head/sbin/bectl/tests/bectl_test.sh == --- head/sbin/bectl/tests/bectl_test.sh Thu Sep 3 08:02:19 2020 (r365290) +++ head/sbin/bectl/tests/bectl_test.sh Thu Sep 3 08:16:57 2020 (r365291) @@ -148,6 +148,11 @@ bectl_destroy_head() } bectl_destroy_body() { + if [ "$(atf_config_get ci false)" = "true" ] && \ + [ "$(uname -p)" = "i386" ]; then + atf_skip "https://bugs.freebsd.org/249055; + fi + cwd=$(realpath .) zpool=$(make_zpool_name) disk=${cwd}/disk.img @@ -228,6 +233,11 @@ bectl_export_import_head() } bectl_export_import_body() { + if [ "$(atf_config_get ci false)" = "true" ] && \ + [ "$(uname -p)" = "i386" ]; then + atf_skip "https://bugs.freebsd.org/249055; + fi + cwd=$(realpath .) zpool=$(make_zpool_name) disk=${cwd}/disk.img @@ -256,6 +266,11 @@ bectl_list_head() } bectl_list_body() { + if [ "$(atf_config_get ci false)" = "true" ] && \ + [ "$(uname -p)" = "i386" ]; then + atf_skip "https://bugs.freebsd.org/249055; + fi + cwd=$(realpath .) zpool=$(make_zpool_name) disk=${cwd}/disk.img @@ -291,6 +306,11 @@ bectl_mount_head() } bectl_mount_body() { + if [ "$(atf_config_get ci false)" = "true" ] && \ + [ "$(uname -p)" = "i386" ]; then + atf_skip "https://bugs.freebsd.org/249055; + fi + cwd=$(realpath .) zpool=$(make_zpool_name) disk=${cwd}/disk.img @@ -325,6 +345,11 @@ bectl_rename_head() } bectl_rename_body() { + if [ "$(atf_config_get ci false)" = "true" ] && \ + [ "$(uname -p)" = "i386" ]; then + atf_skip "https://bugs.freebsd.org/249055; + fi + cwd=$(realpath .) zpool=$(make_zpool_name) disk=${cwd}/disk.img @@ -352,6 +377,11 @@ bectl_jail_head() } bectl_jail_body() { + if [ "$(atf_config_get ci false)" = "true" ] && \ + [ "$(uname -p)" = "i386" ]; then + atf_skip "https://bugs.freebsd.org/249055; + fi + cwd=$(realpath .) zpool=$(make_zpool_name) disk=${cwd}/disk.img ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365290 - head/sys/dev/iicbus
Author: avg Date: Thu Sep 3 08:02:19 2020 New Revision: 365290 URL: https://svnweb.freebsd.org/changeset/base/365290 Log: move defintion of hw.i2c sysctl node from iicbb to iicbus MFC after:2 weeks Modified: head/sys/dev/iicbus/iicbb.c head/sys/dev/iicbus/iicbus.c Modified: head/sys/dev/iicbus/iicbb.c == --- head/sys/dev/iicbus/iicbb.c Thu Sep 3 08:01:21 2020(r365289) +++ head/sys/dev/iicbus/iicbb.c Thu Sep 3 08:02:19 2020(r365290) @@ -228,7 +228,7 @@ iicbb_print_child(device_t bus, device_t dev) #ifdef IICBB_DEBUG static int i2c_debug = 0; -static SYSCTL_NODE(_hw, OID_AUTO, i2c, CTLFLAG_RW, 0, "i2c debug"); +SYSCTL_DECL(_hw_i2c); SYSCTL_INT(_hw_i2c, OID_AUTO, iicbb_debug, CTLFLAG_RWTUN, _debug, 0, "Enable i2c bit-banging driver debug"); Modified: head/sys/dev/iicbus/iicbus.c == --- head/sys/dev/iicbus/iicbus.cThu Sep 3 08:01:21 2020 (r365289) +++ head/sys/dev/iicbus/iicbus.cThu Sep 3 08:02:19 2020 (r365290) @@ -52,6 +52,8 @@ __FBSDID("$FreeBSD$"); /* See comments below for why auto-scanning is a bad idea. */ #define SCAN_IICBUS 0 +SYSCTL_NODE(_hw, OID_AUTO, i2c, CTLFLAG_RW, 0, "i2c controls"); + static int iicbus_probe(device_t dev) { ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365289 - head/sys/dev/iicbus/twsi
Author: avg Date: Thu Sep 3 08:01:21 2020 New Revision: 365289 URL: https://svnweb.freebsd.org/changeset/base/365289 Log: twsi: no need to compare boolean with boolean constant Testing the boolean directly is shorter and more idiomatic. MFC after:1 week Modified: head/sys/dev/iicbus/twsi/twsi.c Modified: head/sys/dev/iicbus/twsi/twsi.c == --- head/sys/dev/iicbus/twsi/twsi.c Thu Sep 3 07:42:53 2020 (r365288) +++ head/sys/dev/iicbus/twsi/twsi.c Thu Sep 3 08:01:21 2020 (r365289) @@ -484,7 +484,7 @@ twsi_transfer(device_t dev, struct iic_msg *msgs, uint sc = device_get_softc(dev); - if (sc->have_intr == false) + if (!sc->have_intr) return (iicbus_transfer_gen(dev, msgs, nmsgs)); sc->error = 0; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365288 - head/sys/dev/iicbus/twsi
Author: avg Date: Thu Sep 3 07:42:53 2020 New Revision: 365288 URL: https://svnweb.freebsd.org/changeset/base/365288 Log: twsi: replace a couple of errno codes with i2c error codes Reviewed by: manu MFC after:1 week Modified: head/sys/dev/iicbus/twsi/twsi.c Modified: head/sys/dev/iicbus/twsi/twsi.c == --- head/sys/dev/iicbus/twsi/twsi.c Thu Sep 3 05:25:39 2020 (r365287) +++ head/sys/dev/iicbus/twsi/twsi.c Thu Sep 3 07:42:53 2020 (r365288) @@ -579,7 +579,7 @@ twsi_intr(void *arg) case TWSI_STATUS_ADDR_R_NACK: debugf(sc->dev, "No ack received after transmitting the address\n"); sc->transfer = 0; - sc->error = ETIMEDOUT; + sc->error = IIC_ENOACK; sc->control_val = 0; wakeup(sc); break; @@ -660,7 +660,7 @@ twsi_intr(void *arg) default: debugf(sc->dev, "status=%x hot handled\n", status); sc->transfer = 0; - sc->error = ENXIO; + sc->error = IIC_EBUSERR; sc->control_val = 0; wakeup(sc); break; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r353419 - head/sys/net
Gleb Smirnoff (gleb...@freebsd.org) wrote: > On Fri, Aug 28, 2020 at 02:31:30PM -0700, Oleksandr Tymoshenko wrote: > O> Gleb Smirnoff (gleb...@freebsd.org) wrote: > O> > Author: glebius > O> > Date: Thu Oct 10 23:42:55 2019 > O> > New Revision: 353419 > O> > URL: https://svnweb.freebsd.org/changeset/base/353419 > O> > > O> > Log: > O> > Provide new KPI for network drivers to access lists of interface > O> > addresses. The KPI doesn't reveal neither how addresses are stored, > O> > how the access to them is synchronized, neither reveal struct ifaddr > O> > and struct ifmaddr. > O> > > O> > Reviewed by: gallatin, erj, hselasky, philip, stevek > O> > Differential Revision: https://reviews.freebsd.org/D21943 > O> > O> Hi Gleb, > O> > O> Are there any plans to MFC this change and the subsequent API consumer > changes? > O> Lack of this API in 12 makes MFCing unrelated eth driver fixes hard. > > I don't plan to MFC it, but there is nothing that would blocks such MFC. > > Of course internals of the functions would be different - using mutex instead > of the epoch to sync access to address lists. > > I can provide patch for you, but you would be responsive for MFC. I don't > have any 12-based systems to test changes. I only need it for if_dwc, I don't plan to merge code for any other drivers. I tested this patch[1] and there were no issues. Does it look sane? Do I need to run specific steps to trigger codepaths with these new API calls? [1] https://people.freebsd.org/~gonzo/patches/if-foreach-mfc.diff -- gonzo ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"