svn commit: r360956 - head/cddl/contrib/opensolaris/cmd/zfs
Author: avg Date: Tue May 12 09:04:57 2020 New Revision: 360956 URL: https://svnweb.freebsd.org/changeset/base/360956 Log: zfs allow/unallow should work with numeric uid/gid And that should work even (especially) if there is no matching user or group name. This change allows to see and modify delegations for deleted groups and users. The change is originally by Xin Li. illumos report: https://www.illumos.org/issues/6037 OpenZFS (ZoL) PR: https://github.com/openzfs/zfs/pull/10280 Obtained from:delphij MFC after:2 weeks Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c == --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.cTue May 12 04:34:26 2020(r360955) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.cTue May 12 09:04:57 2020(r360956) @@ -4696,6 +4696,14 @@ parse_fs_perm(fs_perm_t *fsperm, nvlist_t *nvl) (void) strlcpy( node->who_perm.who_ug_name, nice_name, 256); + else { + /* User or group unknown */ + (void) snprintf( + node->who_perm.who_ug_name, + sizeof ( + node->who_perm.who_ug_name), + "(unknown: %d)", rid); + } } uu_avl_insert(avl, node, idx); @@ -5194,9 +5202,9 @@ construct_fsacl_list(boolean_t un, struct allow_opts * if (p != NULL) rid = p->pw_uid; - else { + else if (*endch != '\0') { (void) snprintf(errbuf, 256, gettext( - "invalid user %s"), curr); + "invalid user %s\n"), curr); allow_usage(un, B_TRUE, errbuf); } } else if (opts->group) { @@ -5208,9 +5216,9 @@ construct_fsacl_list(boolean_t un, struct allow_opts * if (g != NULL) rid = g->gr_gid; - else { + else if (*endch != '\0') { (void) snprintf(errbuf, 256, gettext( - "invalid group %s"), curr); + "invalid group %s\n"), curr); allow_usage(un, B_TRUE, errbuf); } } else { @@ -5236,7 +5244,7 @@ construct_fsacl_list(boolean_t un, struct allow_opts * rid = g->gr_gid; } else { (void) snprintf(errbuf, 256, gettext( - "invalid user/group %s"), curr); + "invalid user/group %s\n"), curr); allow_usage(un, B_TRUE, errbuf); } } ___ 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: r360957 - head/sys/amd64/amd64
Author: avg Date: Tue May 12 09:31:48 2020 New Revision: 360957 URL: https://svnweb.freebsd.org/changeset/base/360957 Log: amd64/pmap: unbreak !NUMA case for fictitious pages A fictitious page can have a physical address beyond the end of the RAM. In the NUMA case there is some special code to handle such pages, but in the other case the pages are handled the same as normal pages. So, we cannot assert that the physical address is within RAM addresses. Suggested by: kib Reviewed by: kib X-MFC note: NUMA support has not been MFC-ed Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c == --- head/sys/amd64/amd64/pmap.c Tue May 12 09:04:57 2020(r360956) +++ head/sys/amd64/amd64/pmap.c Tue May 12 09:31:48 2020(r360957) @@ -323,12 +323,12 @@ pmap_pku_mask_bit(pmap_t pmap) #endif #undef pa_index +#ifdef NUMA #definepa_index(pa)({ \ KASSERT((pa) <= vm_phys_segs[vm_phys_nsegs - 1].end,\ ("address %lx beyond the last segment", (pa))); \ (pa) >> PDRSHIFT; \ }) -#ifdef NUMA #definepa_to_pmdp(pa) (&pv_table[pa_index(pa)]) #definepa_to_pvh(pa) (&(pa_to_pmdp(pa)->pv_page)) #definePHYS_TO_PV_LIST_LOCK(pa)({ \ @@ -340,6 +340,7 @@ pmap_pku_mask_bit(pmap_t pmap) _lock; \ }) #else +#definepa_index(pa)((pa) >> PDRSHIFT) #definepa_to_pvh(pa) (&pv_table[pa_index(pa)]) #defineNPV_LIST_LOCKS MAXCPU ___ 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: r360956 - head/cddl/contrib/opensolaris/cmd/zfs
Andriy Gapon wrote: Author: avg Date: Tue May 12 09:04:57 2020 New Revision: 360956 URL: https://svnweb.freebsd.org/changeset/base/360956 Log: zfs allow/unallow should work with numeric uid/gid And that should work even (especially) if there is no matching user or group name. This change allows to see and modify delegations for deleted groups and users. The change is originally by Xin Li. illumos report: https://www.illumos.org/issues/6037 OpenZFS (ZoL) PR: https://github.com/openzfs/zfs/pull/10280 Obtained from: delphij MFC after: 2 weeks Also, PR: 200663. ___ 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: r360958 - head/usr.sbin/bhyve
Author: afedorov Date: Tue May 12 11:18:14 2020 New Revision: 360958 URL: https://svnweb.freebsd.org/changeset/base/360958 Log: Add a new bhyve network backend that allow to connect the VM to the netgraph(4) network. The backend uses the socket API with the PF_NETGRAPH protocol family, which is provided by the ng_socket(4). To use the new backend, provide the following bhyve option: -s X:Y:Z,[virtio-net|e1000],netgraph,socket=[ng_socket name],path=[destination node],hook=[our socket src hook],peerhook=[dst node hook] Reviewed by: vmaffione, lutz_donnerhacke.de Approved by: vmaffione (mentor) Sponsored by: vstack.com Differential Revision:https://reviews.freebsd.org/D24620 Modified: head/usr.sbin/bhyve/Makefile head/usr.sbin/bhyve/net_backends.c Modified: head/usr.sbin/bhyve/Makefile == --- head/usr.sbin/bhyve/MakefileTue May 12 09:31:48 2020 (r360957) +++ head/usr.sbin/bhyve/MakefileTue May 12 11:18:14 2020 (r360958) @@ -90,6 +90,10 @@ CFLAGS+=-DINET .if ${MK_INET6_SUPPORT} != "no" CFLAGS+=-DINET6 .endif +.if ${MK_NETGRAPH_SUPPORT} != "no" +CFLAGS+=-DNETGRAPH +LIBADD+=netgraph +.endif .if ${MK_OPENSSL} == "no" CFLAGS+=-DNO_OPENSSL .else Modified: head/usr.sbin/bhyve/net_backends.c == --- head/usr.sbin/bhyve/net_backends.c Tue May 12 09:31:48 2020 (r360957) +++ head/usr.sbin/bhyve/net_backends.c Tue May 12 11:18:14 2020 (r360958) @@ -69,6 +69,11 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef NETGRAPH +#include +#include +#include +#endif #include "debug.h" #include "iov.h" @@ -382,6 +387,194 @@ static struct net_backend vmnet_backend = { DATA_SET(net_backend_set, tap_backend); DATA_SET(net_backend_set, vmnet_backend); + +#ifdef NETGRAPH + +/* + * Netgraph backend + */ + +#define NG_SBUF_MAX_SIZE (4 * 1024 * 1024) + +static int +ng_init(struct net_backend *be, const char *devname, +const char *opts, net_be_rxeof_t cb, void *param) +{ + struct tap_priv *p = (struct tap_priv *)be->opaque; + struct ngm_connect ngc; + char *ngopts, *tofree; + char nodename[NG_NODESIZ]; + int sbsz; + int ctrl_sock; + int flags; + int path_provided; + int peerhook_provided; + int socket_provided; + unsigned long maxsbsz; + size_t msbsz; +#ifndef WITHOUT_CAPSICUM + cap_rights_t rights; +#endif + + if (cb == NULL) { + WPRINTF(("Netgraph backend requires non-NULL callback")); + return (-1); + } + + be->fd = -1; + + memset(&ngc, 0, sizeof(ngc)); + + strncpy(ngc.ourhook, "vmlink", NG_HOOKSIZ - 1); + + tofree = ngopts = strdup(opts); + + if (ngopts == NULL) { + WPRINTF(("strdup error")); + return (-1); + } + + socket_provided = 0; + path_provided = 0; + peerhook_provided = 0; + + (void)strsep(&ngopts, ","); + + while (ngopts != NULL) { + char *value = ngopts; + char *key; + + key = strsep(&value, "="); + if (value == NULL) + break; + ngopts = value; + (void) strsep(&ngopts, ","); + + if (strcmp(key, "socket") == 0) { + strncpy(nodename, value, NG_NODESIZ - 1); + socket_provided = 1; + } else if (strcmp(key, "path") == 0) { + strncpy(ngc.path, value, NG_PATHSIZ - 1); + path_provided = 1; + } else if (strcmp(key, "hook") == 0) { + strncpy(ngc.ourhook, value, NG_HOOKSIZ - 1); + } else if (strcmp(key, "peerhook") == 0) { + strncpy(ngc.peerhook, value, NG_HOOKSIZ - 1); + peerhook_provided = 1; + } + } + + free(tofree); + + if (!path_provided) { + WPRINTF(("path must be provided")); + return (-1); + } + + if (!peerhook_provided) { + WPRINTF(("peer hook must be provided")); + return (-1); + } + + if (NgMkSockNode(socket_provided ? nodename : NULL, + &ctrl_sock, &be->fd) < 0) { + WPRINTF(("can't get Netgraph sockets")); + return (-1); + } + + if (NgSendMsg(ctrl_sock, ".", + NGM_GENERIC_COOKIE, + NGM_CONNECT, &ngc, sizeof(ngc)) < 0) { + WPRINTF(("can't connect to node")); + close(ctrl_sock); + goto error; + } + + close(ctrl_sock); + + flags = fcntl(be->fd, F_GETFL); + + if (flags < 0) { + WPRINTF(("can't get socket flags")); + goto error; + } + + if (fc
svn commit: r360960 - in head/sys/fs: nfs nfsclient nfsserver
Author: freqlabs Date: Tue May 12 13:23:25 2020 New Revision: 360960 URL: https://svnweb.freebsd.org/changeset/base/360960 Log: nfs: Remove APPLESTATIC macro It is no longer useful. Reviewed by: rmacklem Approved by: mav (mentor) MFC after:1 week Sponsored by: iXsystems, Inc. Differential Revision:https://reviews.freebsd.org/D24811 Modified: head/sys/fs/nfs/nfs_commonacl.c head/sys/fs/nfs/nfs_commonsubs.c head/sys/fs/nfs/nfsport.h head/sys/fs/nfsclient/nfs_clcomsubs.c head/sys/fs/nfsclient/nfs_clport.c head/sys/fs/nfsclient/nfs_clrpcops.c head/sys/fs/nfsclient/nfs_clstate.c head/sys/fs/nfsserver/nfs_nfsdcache.c head/sys/fs/nfsserver/nfs_nfsdserv.c head/sys/fs/nfsserver/nfs_nfsdsocket.c head/sys/fs/nfsserver/nfs_nfsdstate.c head/sys/fs/nfsserver/nfs_nfsdsubs.c Modified: head/sys/fs/nfs/nfs_commonacl.c == --- head/sys/fs/nfs/nfs_commonacl.c Tue May 12 12:29:39 2020 (r360959) +++ head/sys/fs/nfs/nfs_commonacl.c Tue May 12 13:23:25 2020 (r360960) @@ -40,7 +40,7 @@ static int nfsrv_acemasktoperm(u_int32_t acetype, u_in /* * Handle xdr for an ace. */ -APPLESTATIC int +int nfsrv_dissectace(struct nfsrv_descript *nd, struct acl_entry *acep, int *aceerrp, int *acesizep, NFSPROC_T *p) { @@ -388,7 +388,7 @@ nfsrv_buildace(struct nfsrv_descript *nd, u_char *name /* * Build an NFSv4 ACL. */ -APPLESTATIC int +int nfsrv_buildacl(struct nfsrv_descript *nd, NFSACL_T *aclp, enum vtype type, NFSPROC_T *p) { @@ -451,7 +451,7 @@ nfsrv_buildacl(struct nfsrv_descript *nd, NFSACL_T *ac * Compare two NFSv4 acls. * Return 0 if they are the same, 1 if not the same. */ -APPLESTATIC int +int nfsrv_compareacl(NFSACL_T *aclp1, NFSACL_T *aclp2) { int i; Modified: head/sys/fs/nfs/nfs_commonsubs.c == --- head/sys/fs/nfs/nfs_commonsubs.cTue May 12 12:29:39 2020 (r360959) +++ head/sys/fs/nfs/nfs_commonsubs.cTue May 12 13:23:25 2020 (r360960) @@ -314,7 +314,7 @@ static int nfs_bigrequest[NFSV42_NPROCS] = { * Start building a request. Mostly just put the first file handle in * place. */ -APPLESTATIC void +void nfscl_reqstart(struct nfsrv_descript *nd, int procnum, struct nfsmount *nmp, u_int8_t *nfhp, int fhlen, u_int32_t **opcntpp, struct nfsclsession *sep, int vers, int minorvers) @@ -453,7 +453,7 @@ nfscl_reqstart(struct nfsrv_descript *nd, int procnum, /* * Put a state Id in the mbuf list. */ -APPLESTATIC void +void nfsm_stateidtom(struct nfsrv_descript *nd, nfsv4stateid_t *stateidp, int flag) { nfsv4stateid_t *st; @@ -689,7 +689,7 @@ out: * This is used by the macro NFSM_DISSECT for tough * cases. */ -APPLESTATIC void * +void * nfsm_dissct(struct nfsrv_descript *nd, int siz, int how) { struct mbuf *mp2; @@ -755,7 +755,7 @@ nfsm_dissct(struct nfsrv_descript *nd, int siz, int ho * here than check for offs > 0 for all calls to nfsm_advance. * If left == -1, it should be calculated here. */ -APPLESTATIC int +int nfsm_advance(struct nfsrv_descript *nd, int offs, int left) { int error = 0; @@ -803,7 +803,7 @@ out: * Copy a string into mbuf(s). * Return the number of bytes output, including XDR overheads. */ -APPLESTATIC int +int nfsm_strtom(struct nfsrv_descript *nd, const char *cp, int siz) { struct mbuf *m2; @@ -860,7 +860,7 @@ nfsm_strtom(struct nfsrv_descript *nd, const char *cp, /* * Called once to initialize data structures... */ -APPLESTATIC void +void newnfs_init(void) { static int nfs_inited = 0; @@ -890,7 +890,7 @@ newnfs_init(void) * set_true == 1 if there should be an newnfs_true prepended on the file handle. * Return the number of bytes output, including XDR overhead. */ -APPLESTATIC int +int nfsm_fhtom(struct nfsrv_descript *nd, u_int8_t *fhp, int size, int set_true) { u_int32_t *tl; @@ -933,7 +933,7 @@ nfsm_fhtom(struct nfsrv_descript *nd, u_int8_t *fhp, i * The AF_INET family is handled as a special case so that address mbufs * don't need to be saved to store "struct in_addr", which is only 4 bytes. */ -APPLESTATIC int +int nfsaddr_match(int family, union nethostaddr *haddr, NFSSOCKADDR_T nam) { #ifdef INET @@ -970,7 +970,7 @@ nfsaddr_match(int family, union nethostaddr *haddr, NF /* * Similar to the above, but takes to NFSSOCKADDR_T args. */ -APPLESTATIC int +int nfsaddr2_match(NFSSOCKADDR_T nam1, NFSSOCKADDR_T nam2) { struct sockaddr_in *addr1, *addr2; @@ -1007,7 +1007,7 @@ nfsaddr2_match(NFSSOCKADDR_T nam1, NFSSOCKADDR_T nam2) /* * Trim trailing data off the mbuf list being built. */ -APPLESTATIC void +void newnfs_trimtrailing(nd, mb, bpos) struct nfsrv_descript *nd; struct mbuf *mb; @@ -1026,7 +1026,7 @@ newnfs_trimtrailing(nd, mb, bpos) /* * Dissect a file handle on the
svn commit: r360961 - head/sys/netinet6
Author: gallatin Date: Tue May 12 14:01:12 2020 New Revision: 360961 URL: https://svnweb.freebsd.org/changeset/base/360961 Log: IPv6: sync IP_NO_SND_TAG_RL support from IPv4 The IP_NO_SND_TAG_RL flag to ip{,6}_output() means that the packets being sent should bypass hardware rate limiting. This is typically used by modern TCP stacks for rexmits. This support was added to IPv4 in r352657, but never added to IPv6, even though rack and bbr call ip6_output() with this flag. Reviewed by: rrs Sponsored by: Netflix Differential Revision:https://reviews.freebsd.org/D24822 Modified: head/sys/netinet6/ip6_output.c Modified: head/sys/netinet6/ip6_output.c == --- head/sys/netinet6/ip6_output.c Tue May 12 13:23:25 2020 (r360960) +++ head/sys/netinet6/ip6_output.c Tue May 12 14:01:12 2020 (r360961) @@ -322,7 +322,8 @@ ip6_fragment(struct ifnet *ifp, struct mbuf *m0, int h static int ip6_output_send(struct inpcb *inp, struct ifnet *ifp, struct ifnet *origifp, -struct mbuf *m, struct sockaddr_in6 *dst, struct route_in6 *ro) +struct mbuf *m, struct sockaddr_in6 *dst, struct route_in6 *ro, +bool stamp_tag) { #ifdef KERN_TLS struct ktls_session *tls = NULL; @@ -353,6 +354,10 @@ ip6_output_send(struct inpcb *inp, struct ifnet *ifp, error = EAGAIN; goto done; } + /* +* Always stamp tags that include NIC ktls. +*/ + stamp_tag = true; } #endif #ifdef RATELIMIT @@ -366,7 +371,7 @@ ip6_output_send(struct inpcb *inp, struct ifnet *ifp, mst = inp->inp_snd_tag; } #endif - if (mst != NULL) { + if (stamp_tag && mst != NULL) { KASSERT(m->m_pkthdr.rcvif == NULL, ("trying to add a send tag to a forwarded packet")); if (mst->ifp != ifp) { @@ -1165,7 +1170,8 @@ passout: m->m_pkthdr.len); ifa_free(&ia6->ia_ifa); } - error = ip6_output_send(inp, ifp, origifp, m, dst, ro); + error = ip6_output_send(inp, ifp, origifp, m, dst, ro, + (flags & IP_NO_SND_TAG_RL) ? false : true); goto done; } @@ -1256,7 +1262,8 @@ sendorfree: counter_u64_add(ia->ia_ifa.ifa_obytes, m->m_pkthdr.len); } - error = ip6_output_send(inp, ifp, origifp, m, dst, ro); + error = ip6_output_send(inp, ifp, origifp, m, dst, ro, + true); } else m_freem(m); } ___ 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: r360964 - in head: lib/libclang_rt lib/libthr lib/msun libexec/rtld-elf libexec/tftpd/tests share/mk stand stand/arm/uboot stand/efi stand/efi/boot1 stand/efi/loader stand/i386/boot2 st...
Author: vangyzen Date: Tue May 12 15:22:40 2020 New Revision: 360964 URL: https://svnweb.freebsd.org/changeset/base/360964 Log: Remove tests for obsolete compilers in the build system Assume gcc is at least 6.4, the oldest xtoolchain in the ports tree. Assume clang is at least 6, which was in 11.2-RELEASE. Drop conditions for older compilers. Reviewed by: imp (earlier version), emaste, jhb MFC after:2 weeks Sponsored by: Dell EMC Isilon Differential Revision:https://reviews.freebsd.org/D24802 Modified: head/lib/libclang_rt/Makefile.inc head/lib/libthr/Makefile head/lib/msun/Makefile head/libexec/rtld-elf/Makefile head/libexec/tftpd/tests/Makefile head/share/mk/bsd.compiler.mk head/share/mk/bsd.sys.mk head/stand/arm/uboot/Makefile head/stand/defs.mk head/stand/efi/Makefile head/stand/efi/boot1/Makefile head/stand/efi/loader/Makefile head/stand/i386/boot2/Makefile head/stand/i386/isoboot/Makefile head/stand/libsa/Makefile head/sys/conf/Makefile.arm head/sys/conf/Makefile.powerpc head/sys/conf/kern.mk head/sys/conf/kern.post.mk head/sys/conf/kern.pre.mk head/sys/conf/kmod.mk head/sys/modules/Makefile head/usr.sbin/acpi/acpidb/Makefile head/usr.sbin/trpt/Makefile head/usr.sbin/zic/zic/Makefile Modified: head/lib/libclang_rt/Makefile.inc == --- head/lib/libclang_rt/Makefile.inc Tue May 12 14:47:38 2020 (r360963) +++ head/lib/libclang_rt/Makefile.inc Tue May 12 15:22:40 2020 (r360964) @@ -32,7 +32,7 @@ CFLAGS+= ${PICFLAG} CFLAGS+= -fno-builtin CFLAGS+= -fno-exceptions CXXFLAGS+= -fno-rtti -.if ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} >= 30700 +.if ${COMPILER_TYPE} == clang CFLAGS+= -fno-sanitize=safe-stack .endif CFLAGS+= -fno-stack-protector Modified: head/lib/libthr/Makefile == --- head/lib/libthr/MakefileTue May 12 14:47:38 2020(r360963) +++ head/lib/libthr/MakefileTue May 12 15:22:40 2020(r360964) @@ -29,10 +29,7 @@ CFLAGS+=-Winline CFLAGS.thr_stack.c+= -Wno-cast-align CFLAGS.rtld_malloc.c+= -Wno-cast-align -.include -.if !(${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} < 40300) CFLAGS.thr_symbols.c+= -Wno-missing-variable-declarations -.endif .ifndef NO_THREAD_UNWIND_STACK CFLAGS+=-fexceptions Modified: head/lib/msun/Makefile == --- head/lib/msun/Makefile Tue May 12 14:47:38 2020(r360963) +++ head/lib/msun/Makefile Tue May 12 15:22:40 2020(r360964) @@ -108,13 +108,13 @@ COMMON_SRCS+= catrigl.c \ s_nextafterl.c s_nexttoward.c s_remquol.c s_rintl.c s_roundl.c \ s_scalbnl.c s_sinl.c s_sincosl.c \ s_tanhl.c s_tanl.c s_truncl.c w_cabsl.c -# Work around this warning from gcc 6: +# Work around this warning from gcc: # lib/msun/ld80/e_powl.c:275:1: error: floating constant exceeds range of # 'long double' [-Werror=overflow] # if( y >= LDBL_MAX ) # See also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=130067 .include -.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 6 +.if ${COMPILER_TYPE} == "gcc" CFLAGS.e_powl.c+= -Wno-error=overflow .endif .endif Modified: head/libexec/rtld-elf/Makefile == --- head/libexec/rtld-elf/Makefile Tue May 12 14:47:38 2020 (r360963) +++ head/libexec/rtld-elf/Makefile Tue May 12 15:22:40 2020 (r360964) @@ -90,8 +90,4 @@ ${PROG_FULL}: ${VERSION_MAP} # GCC warns about redeclarations even though they have __exported # and are therefore not identical to the ones from the system headers. CFLAGS+= -Wno-redundant-decls -.if ${COMPILER_VERSION} < 40300 -# Silence -Wshadow false positives in ancient GCC -CFLAGS+= -Wno-shadow -.endif .endif Modified: head/libexec/tftpd/tests/Makefile == --- head/libexec/tftpd/tests/Makefile Tue May 12 14:47:38 2020 (r360963) +++ head/libexec/tftpd/tests/Makefile Tue May 12 15:22:40 2020 (r360964) @@ -2,11 +2,8 @@ .include -# Skip on GCC 4.2, because it lacks __COUNTER__ -.if ${COMPILER_TYPE} != "gcc" || ${COMPILER_VERSION} >= 40300 ATF_TESTS_C= functional TEST_METADATA.functional+= timeout=15 -.endif LIBADD=util WARNS?=6 Modified: head/share/mk/bsd.compiler.mk == --- head/share/mk/bsd.compiler.mk Tue May 12 14:47:38 2020 (r360963) +++ head/share/mk/bsd.compiler.mk Tue May 12 15:22:40 2020 (r360964) @@ -205,20 +205,12 @@ ${X_}COMPILER_FREEBSD_VERSION=unknown ${X_}COMPILER_RESOURCE_DIR!= ${${cc}:N${CCACHE_
svn commit: r360966 - in head: share/man/man4 sys/dev/rtwn/usb sys/dev/usb
Author: markj Date: Tue May 12 16:10:07 2020 New Revision: 360966 URL: https://svnweb.freebsd.org/changeset/base/360966 Log: rtwn: Add a USB ID for the TP-Link TL-WN727N. PR: 246417 Submitted by: Viktor G. MFC after:1 week Modified: head/share/man/man4/rtwn_usb.4 head/sys/dev/rtwn/usb/rtwn_usb_attach.h head/sys/dev/usb/usbdevs Modified: head/share/man/man4/rtwn_usb.4 == --- head/share/man/man4/rtwn_usb.4 Tue May 12 16:05:21 2020 (r360965) +++ head/share/man/man4/rtwn_usb.4 Tue May 12 16:10:07 2020 (r360966) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\"/ -.Dd May 9, 2020 +.Dd May 12, 2020 .Dt RTWN_USB 4 .Os .Sh NAME @@ -103,6 +103,7 @@ based USB wireless network adapters, including: .It "TP-Link TL-WN722N v2" Ta RTL8188EU Ta USB 2.0 .It "TP-LINK TL-WN723N v3" Ta RTL8188EU Ta USB 2.0 .It "TP-LINK TL-WN725N v2" Ta RTL8188EU Ta USB 2.0 +.It "TP-LINK TL-WN727N v5" Ta RTL8188EU Ta USB 2.0 .It "TP-LINK TL-WN821N v4" Ta RTL8192CU Ta USB 2.0 .It "TP-LINK TL-WN821N v5" Ta RTL8192EU Ta USB 2.0 .It "TP-LINK TL-WN822N v4" Ta RTL8192EU Ta USB 2.0 Modified: head/sys/dev/rtwn/usb/rtwn_usb_attach.h == --- head/sys/dev/rtwn/usb/rtwn_usb_attach.h Tue May 12 16:05:21 2020 (r360965) +++ head/sys/dev/rtwn/usb/rtwn_usb_attach.h Tue May 12 16:10:07 2020 (r360966) @@ -120,6 +120,7 @@ static const STRUCT_USB_HOST_ID rtwn_devs[] = { RTWN_RTL8188EU_DEV(DLINK, DWA125D1), RTWN_RTL8188EU_DEV(ELECOM, WDC150SU2M), RTWN_RTL8188EU_DEV(TPLINK, WN722NV2), + RTWN_RTL8188EU_DEV(TPLINK, WN727NV5), RTWN_RTL8188EU_DEV(REALTEK, RTL8188ETV), RTWN_RTL8188EU_DEV(REALTEK, RTL8188EU), #undef RTWN_RTL8188EU_DEV Modified: head/sys/dev/usb/usbdevs == --- head/sys/dev/usb/usbdevsTue May 12 16:05:21 2020(r360965) +++ head/sys/dev/usb/usbdevsTue May 12 16:10:07 2020(r360966) @@ -4664,6 +4664,7 @@ product TPLINK WN821NV5 0x0107 TL-WN821N v5 product TPLINK WN822NV40x0108 TL-WN822N v4 product TPLINK WN823NV20x0109 TL-WN823N v2 product TPLINK WN722NV20x010c TL-WN722N v2 +product TPLINK WN727NV50x0111 TL-WN727N v5 product TPLINK T4UV2 0x010d Archer T4U ver 2 product TPLINK T4UHV1 0x0103 Archer T4UH ver 1 product TPLINK T4UHV2 0x010e Archer T4UH ver 2 ___ 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: r360967 - head/sys/netinet/libalias
Author: emaste Date: Tue May 12 16:33:04 2020 New Revision: 360967 URL: https://svnweb.freebsd.org/changeset/base/360967 Log: libalias: validate packet lengths before accessing headers admbugs: 956 Submitted by: ae Reported by: Lucas Leong (@_wmliang_) of Trend Micro Zero Day Initiative Reported by: Vishnu working with Trend Micro Zero Day Initiative Security: FreeBSD-SA-20:12.libalias Modified: head/sys/netinet/libalias/alias.c Modified: head/sys/netinet/libalias/alias.c == --- head/sys/netinet/libalias/alias.c Tue May 12 16:10:07 2020 (r360966) +++ head/sys/netinet/libalias/alias.c Tue May 12 16:33:04 2020 (r360967) @@ -442,10 +442,15 @@ fragment contained in ICMP data section */ static int IcmpAliasIn(struct libalias *la, struct ip *pip) { - int iresult; struct icmp *ic; + int dlen, iresult; LIBALIAS_LOCK_ASSERT(la); + + dlen = ntohs(pip->ip_len) - (pip->ip_hl << 2); + if (dlen < ICMP_MINLEN) + return (PKT_ALIAS_IGNORED); + /* Return if proxy-only mode is enabled */ if (la->packetAliasMode & PKT_ALIAS_PROXY_ONLY) return (PKT_ALIAS_OK); @@ -464,6 +469,9 @@ IcmpAliasIn(struct libalias *la, struct ip *pip) case ICMP_SOURCEQUENCH: case ICMP_TIMXCEED: case ICMP_PARAMPROB: + if (dlen < ICMP_ADVLENMIN || + dlen < ICMP_ADVLEN(ic)) + return (PKT_ALIAS_IGNORED); iresult = IcmpAliasIn2(la, pip); break; case ICMP_ECHO: @@ -732,10 +740,17 @@ UdpAliasIn(struct libalias *la, struct ip *pip) { struct udphdr *ud; struct alias_link *lnk; + int dlen; LIBALIAS_LOCK_ASSERT(la); + dlen = ntohs(pip->ip_len) - (pip->ip_hl << 2); + if (dlen < sizeof(struct udphdr)) + return (PKT_ALIAS_IGNORED); + ud = (struct udphdr *)ip_next(pip); + if (dlen < ntohs(ud->uh_ulen)) + return (PKT_ALIAS_IGNORED); lnk = FindUdpTcpIn(la, pip->ip_src, pip->ip_dst, ud->uh_sport, ud->uh_dport, @@ -824,12 +839,19 @@ UdpAliasOut(struct libalias *la, struct ip *pip, int m u_short dest_port; u_short proxy_server_port; int proxy_type; - int error; + int dlen, error; LIBALIAS_LOCK_ASSERT(la); /* Return if proxy-only mode is enabled and not proxyrule found.*/ + dlen = ntohs(pip->ip_len) - (pip->ip_hl << 2); + if (dlen < sizeof(struct udphdr)) + return (PKT_ALIAS_IGNORED); + ud = (struct udphdr *)ip_next(pip); + if (dlen < ntohs(ud->uh_ulen)) + return (PKT_ALIAS_IGNORED); + proxy_type = ProxyCheck(la, &proxy_server_address, &proxy_server_port, pip->ip_src, pip->ip_dst, ud->uh_dport, pip->ip_p); @@ -922,8 +944,13 @@ TcpAliasIn(struct libalias *la, struct ip *pip) { struct tcphdr *tc; struct alias_link *lnk; + int dlen; LIBALIAS_LOCK_ASSERT(la); + + dlen = ntohs(pip->ip_len) - (pip->ip_hl << 2); + if (dlen < sizeof(struct tcphdr)) + return (PKT_ALIAS_IGNORED); tc = (struct tcphdr *)ip_next(pip); lnk = FindUdpTcpIn(la, pip->ip_src, pip->ip_dst, @@ -1042,7 +1069,7 @@ TcpAliasIn(struct libalias *la, struct ip *pip) static int TcpAliasOut(struct libalias *la, struct ip *pip, int maxpacketsize, int create) { - int proxy_type, error; + int dlen, proxy_type, error; u_short dest_port; u_short proxy_server_port; struct in_addr dest_address; @@ -1051,6 +1078,10 @@ TcpAliasOut(struct libalias *la, struct ip *pip, int m struct alias_link *lnk; LIBALIAS_LOCK_ASSERT(la); + + dlen = ntohs(pip->ip_len) - (pip->ip_hl << 2); + if (dlen < sizeof(struct tcphdr)) + return (PKT_ALIAS_IGNORED); tc = (struct tcphdr *)ip_next(pip); if (create) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r360968 - head/sys/netinet/libalias
Author: emaste Date: Tue May 12 16:38:28 2020 New Revision: 360968 URL: https://svnweb.freebsd.org/changeset/base/360968 Log: libalias: fix potential memory disclosure from ftp module admbugs: 956 Submitted by: markj Reported by: Vishnu Dev TJ working with Trend Micro Zero Day Initiative Security: FreeBSD-SA-20:13.libalias Security: CVE-2020-7455 Security: ZDI-CAN-10849 Modified: head/sys/netinet/libalias/alias_ftp.c Modified: head/sys/netinet/libalias/alias_ftp.c == --- head/sys/netinet/libalias/alias_ftp.c Tue May 12 16:33:04 2020 (r360967) +++ head/sys/netinet/libalias/alias_ftp.c Tue May 12 16:38:28 2020 (r360968) @@ -754,7 +754,8 @@ NewFtpMessage(struct libalias *la, struct ip *pip, { u_short new_len; - new_len = htons(hlen + slen); + new_len = htons(hlen + + MIN(slen, maxpacketsize - hlen)); DifferentialChecksum(&pip->ip_sum, &new_len, &pip->ip_len, ___ 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: r360979 - head/lib/librtld_db
Author: markj Date: Tue May 12 17:00:47 2020 New Revision: 360979 URL: https://svnweb.freebsd.org/changeset/base/360979 Log: librtld_db: Fix shlib mapping offsets. kve_offset gives the offset into the backing file, which is not what we want since different segments may map the same page. Use the base of the mapping to determine the offset exported by librtld_db instead. PR: 244732 Reported by: Jenkins, Nicolò Mazzucato MFC after:2 weeks Sponsored by: The FreeBSD Foundation Modified: head/lib/librtld_db/rtld_db.c Modified: head/lib/librtld_db/rtld_db.c == --- head/lib/librtld_db/rtld_db.c Tue May 12 17:00:23 2020 (r360978) +++ head/lib/librtld_db/rtld_db.c Tue May 12 17:00:47 2020 (r360979) @@ -160,9 +160,12 @@ rd_err_e rd_loadobj_iter(rd_agent_t *rdap, rl_iter_f *cb, void *clnt_data) { struct kinfo_vmentry *kves, *kve; + const char *path; + uint64_t fileid; rd_loadobj_t rdl; rd_err_e ret; - int cnt, i, lastvn; + uintptr_t base; + int cnt, i; DPRINTF("%s\n", __func__); @@ -171,27 +174,38 @@ rd_loadobj_iter(rd_agent_t *rdap, rl_iter_f *cb, void return (RD_ERR); } + base = 0; + fileid = 0; + path = NULL; ret = RD_OK; - lastvn = 0; for (i = 0; i < cnt; i++) { - kve = kves + i; - if (kve->kve_type == KVME_TYPE_VNODE) - lastvn = i; + kve = &kves[i]; + /* +* Cache the base offset of the file mapping. The kve_offset +* field gives the file offset of a particular mapping into the +* file, but we want the mapping offset relative to the base +* mapping. +*/ + if (kve->kve_type == KVME_TYPE_VNODE && + kve->kve_vn_fileid != fileid) { + base = kve->kve_start; + fileid = kve->kve_vn_fileid; + path = kve->kve_path; + } memset(&rdl, 0, sizeof(rdl)); /* * Map the kinfo_vmentry struct to the rd_loadobj structure. */ rdl.rdl_saddr = kve->kve_start; rdl.rdl_eaddr = kve->kve_end; - rdl.rdl_offset = kve->kve_offset; + rdl.rdl_offset = kve->kve_start - base; if (kve->kve_protection & KVME_PROT_READ) rdl.rdl_prot |= RD_RDL_R; if (kve->kve_protection & KVME_PROT_WRITE) rdl.rdl_prot |= RD_RDL_W; if (kve->kve_protection & KVME_PROT_EXEC) rdl.rdl_prot |= RD_RDL_X; - strlcpy(rdl.rdl_path, kves[lastvn].kve_path, - sizeof(rdl.rdl_path)); + strlcpy(rdl.rdl_path, path, sizeof(rdl.rdl_path)); if ((*cb)(&rdl, clnt_data) != 0) { ret = RD_ERR; 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"
svn commit: r360980 - head/lib/libproc/tests
Author: markj Date: Tue May 12 17:05:55 2020 New Revision: 360980 URL: https://svnweb.freebsd.org/changeset/base/360980 Log: Re-enable proc_test:symbol_lookup after r360979. PR: 244732 MFC after:2 weeks Sponsored by: The FreeBSD Foundation Modified: head/lib/libproc/tests/proc_test.c Modified: head/lib/libproc/tests/proc_test.c == --- head/lib/libproc/tests/proc_test.c Tue May 12 17:00:47 2020 (r360979) +++ head/lib/libproc/tests/proc_test.c Tue May 12 17:05:55 2020 (r360980) @@ -270,9 +270,6 @@ ATF_TC_BODY(symbol_lookup, tc) u_long saved; int error; - if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) - atf_tc_skip("https://bugs.freebsd.org/244732";); - phdl = start_prog(tc, false); error = proc_name2sym(phdl, target_prog_file, "main", &main_sym, NULL); ___ 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: r360982 - head/sys/netinet6
Author: gallatin Date: Tue May 12 17:18:44 2020 New Revision: 360982 URL: https://svnweb.freebsd.org/changeset/base/360982 Log: IPv6: Fix a panic in the nd6 code with unmapped mbufs. If the neighbor entry for an IPv6 TCP session using unmapped mbufs times out, IPv6 will send an icmp6 dest. unreachable message. In doing this, it will try to do a software checksum on the reflected packet. If this is a TCP session using unmapped mbufs, then there will be a kernel panic. To fix this, just free packets with unmapped mbufs, rather than sending the icmp. Reviewed by: np, rrs Sponsored by: Netflix Differential Revision:https://reviews.freebsd.org/D24821 Modified: head/sys/netinet6/nd6.c Modified: head/sys/netinet6/nd6.c == --- head/sys/netinet6/nd6.c Tue May 12 17:07:28 2020(r360981) +++ head/sys/netinet6/nd6.c Tue May 12 17:18:44 2020(r360982) @@ -821,9 +821,27 @@ nd6_llinfo_timer(void *arg) clear_llinfo_pqueue(ln); } nd6_free(&ln, 0); - if (m != NULL) - icmp6_error2(m, ICMP6_DST_UNREACH, - ICMP6_DST_UNREACH_ADDR, 0, ifp); + if (m != NULL) { + struct mbuf *n = m; + + /* +* if there are any ummapped mbufs, we +* must free them, rather than using +* them for an ICMP, as they cannot be +* checksummed. +*/ + while ((n = n->m_next) != NULL) { + if (n->m_flags & M_EXTPG) + break; + } + if (n != NULL) { + m_freem(m); + m = NULL; + } else { + icmp6_error2(m, ICMP6_DST_UNREACH, + ICMP6_DST_UNREACH_ADDR, 0, ifp); + } + } } break; case ND6_LLINFO_REACHABLE: ___ 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: r360983 - head/include
Author: kib Date: Tue May 12 18:12:20 2020 New Revision: 360983 URL: https://svnweb.freebsd.org/changeset/base/360983 Log: Clear namespace pollution in include/malloc_np.h Do not include stdbool.h, it makes the header incompatible with some third-party code that typedefs bool manually. Remove inclusion of strings.h, which typically conflicts with the use of symbol 'index'. Separate inclusion of sys/cdefs.h is not needed because sys/types.h already handles that. Exp-run by: antoine (PR 245366) Sponsored by: The FreeBSD Foundation MFC after:1 week Differential revision:https://reviews.freebsd.org/D24297 Modified: head/include/malloc_np.h Modified: head/include/malloc_np.h == --- head/include/malloc_np.hTue May 12 17:18:44 2020(r360982) +++ head/include/malloc_np.hTue May 12 18:12:20 2020(r360983) @@ -33,29 +33,33 @@ #ifndef _MALLOC_NP_H_ #define_MALLOC_NP_H_ -#include + #include -#include -#include +#ifdef __cplusplus +#define__MyBoolbool +#else +#define__MyBool_Bool +#endif + __BEGIN_DECLS typedef struct extent_hooks_s extent_hooks_t; -typedef void *(extent_alloc_t)(extent_hooks_t *, void *, size_t, size_t, bool *, -bool *, unsigned); -typedef bool (extent_dalloc_t)(extent_hooks_t *, void *, size_t, bool, +typedef void *(extent_alloc_t)(extent_hooks_t *, void *, size_t, size_t, +__MyBool *, __MyBool *, unsigned); +typedef __MyBool (extent_dalloc_t)(extent_hooks_t *, void *, size_t, __MyBool, unsigned); -typedef void (extent_destroy_t)(extent_hooks_t *, void *, size_t, bool, +typedef void (extent_destroy_t)(extent_hooks_t *, void *, size_t, __MyBool, unsigned); -typedef bool (extent_commit_t)(extent_hooks_t *, void *, size_t, size_t, size_t, -unsigned); -typedef bool (extent_decommit_t)(extent_hooks_t *, void *, size_t, size_t, +typedef __MyBool (extent_commit_t)(extent_hooks_t *, void *, size_t, size_t, size_t, unsigned); -typedef bool (extent_purge_t)(extent_hooks_t *, void *, size_t, size_t, size_t, +typedef __MyBool (extent_decommit_t)(extent_hooks_t *, void *, size_t, size_t, +size_t, unsigned); +typedef __MyBool (extent_purge_t)(extent_hooks_t *, void *, size_t, size_t, size_t, unsigned); -typedef bool (extent_split_t)(extent_hooks_t *, void *, size_t, size_t, size_t, -bool, unsigned); -typedef bool (extent_merge_t)(extent_hooks_t *, void *, size_t, void *, size_t, -bool, unsigned); +typedef __MyBool (extent_split_t)(extent_hooks_t *, void *, size_t, size_t, size_t, +__MyBool, unsigned); +typedef __MyBool (extent_merge_t)(extent_hooks_t *, void *, size_t, void *, size_t, +__MyBool, unsigned); struct extent_hooks_s { extent_alloc_t *alloc; extent_dalloc_t *dalloc; @@ -119,5 +123,7 @@ void__dallocx(void *ptr, int flags); void __sdallocx(void *ptr, size_t size, int flags); size_t __nallocx(size_t size, int flags); __END_DECLS + +#undef __MyBool #endif /* _MALLOC_NP_H_ */ ___ 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: r360984 - head/include
Author: kib Date: Tue May 12 18:17:57 2020 New Revision: 360984 URL: https://svnweb.freebsd.org/changeset/base/360984 Log: Make include/malloc.h usable again. Lot of third-party Linux code uses #include , expecting to find the malloc extensions there. Instead of trying to fight them, accept that attempt to deprecate the header causes more troubles than solves potential portability issues, and provide our jemalloc extensions. PR: 155429 Reviewed by: imp, jhibbits, dab, hselasky, philip, emaste, jilles Exp-run by: antoine (PR 245366) Sponsored by: The FreeBSD Foundation MFC after:2 weeks Differential revision:https://reviews.freebsd.org/D24297 Modified: head/include/malloc.h Modified: head/include/malloc.h == --- head/include/malloc.h Tue May 12 18:12:20 2020(r360983) +++ head/include/malloc.h Tue May 12 18:17:57 2020(r360984) @@ -1,6 +1,6 @@ -/* $FreeBSD$ */ -#if __STDC__ -#error " has been replaced by " -#else +/*- + * This file is in the public domain. + * $FreeBSD$ + */ #include -#endif +#include ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r360964 - in head: lib/libclang_rt lib/libthr lib/msun libexec/rtld-elf libexec/tftpd/tests share/mk stand stand/arm/uboot stand/efi stand/efi/boot1 stand/efi/loader stand/i386/boot2 s
This feels like it deserves an UPDATING (and possibly a RELNOTES) entry. -Ravi (rpokala@) -Original Message- From: on behalf of Eric van Gyzen Date: 2020-05-12, Tuesday at 08:22 To: , , Subject: svn commit: r360964 - in head: lib/libclang_rt lib/libthr lib/msun libexec/rtld-elf libexec/tftpd/tests share/mk stand stand/arm/uboot stand/efi stand/efi/boot1 stand/efi/loader stand/i386/boot2 st... Author: vangyzen Date: Tue May 12 15:22:40 2020 New Revision: 360964 URL: https://svnweb.freebsd.org/changeset/base/360964 Log: Remove tests for obsolete compilers in the build system Assume gcc is at least 6.4, the oldest xtoolchain in the ports tree. Assume clang is at least 6, which was in 11.2-RELEASE. Drop conditions for older compilers. Reviewed by: imp (earlier version), emaste, jhb MFC after:2 weeks Sponsored by: Dell EMC Isilon Differential Revision:https://reviews.freebsd.org/D24802 Modified: head/lib/libclang_rt/Makefile.inc head/lib/libthr/Makefile head/lib/msun/Makefile head/libexec/rtld-elf/Makefile head/libexec/tftpd/tests/Makefile head/share/mk/bsd.compiler.mk head/share/mk/bsd.sys.mk head/stand/arm/uboot/Makefile head/stand/defs.mk head/stand/efi/Makefile head/stand/efi/boot1/Makefile head/stand/efi/loader/Makefile head/stand/i386/boot2/Makefile head/stand/i386/isoboot/Makefile head/stand/libsa/Makefile head/sys/conf/Makefile.arm head/sys/conf/Makefile.powerpc head/sys/conf/kern.mk head/sys/conf/kern.post.mk head/sys/conf/kern.pre.mk head/sys/conf/kmod.mk head/sys/modules/Makefile head/usr.sbin/acpi/acpidb/Makefile head/usr.sbin/trpt/Makefile head/usr.sbin/zic/zic/Makefile Modified: head/lib/libclang_rt/Makefile.inc == --- head/lib/libclang_rt/Makefile.inc Tue May 12 14:47:38 2020 (r360963) +++ head/lib/libclang_rt/Makefile.inc Tue May 12 15:22:40 2020 (r360964) @@ -32,7 +32,7 @@ CFLAGS+= ${PICFLAG} CFLAGS+= -fno-builtin CFLAGS+= -fno-exceptions CXXFLAGS+= -fno-rtti -.if ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} >= 30700 +.if ${COMPILER_TYPE} == clang CFLAGS+= -fno-sanitize=safe-stack .endif CFLAGS+= -fno-stack-protector Modified: head/lib/libthr/Makefile == --- head/lib/libthr/MakefileTue May 12 14:47:38 2020 (r360963) +++ head/lib/libthr/MakefileTue May 12 15:22:40 2020 (r360964) @@ -29,10 +29,7 @@ CFLAGS+=-Winline CFLAGS.thr_stack.c+= -Wno-cast-align CFLAGS.rtld_malloc.c+= -Wno-cast-align -.include -.if !(${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} < 40300) CFLAGS.thr_symbols.c+= -Wno-missing-variable-declarations -.endif .ifndef NO_THREAD_UNWIND_STACK CFLAGS+=-fexceptions Modified: head/lib/msun/Makefile == --- head/lib/msun/Makefile Tue May 12 14:47:38 2020(r360963) +++ head/lib/msun/Makefile Tue May 12 15:22:40 2020(r360964) @@ -108,13 +108,13 @@ COMMON_SRCS+= catrigl.c \ s_nextafterl.c s_nexttoward.c s_remquol.c s_rintl.c s_roundl.c \ s_scalbnl.c s_sinl.c s_sincosl.c \ s_tanhl.c s_tanl.c s_truncl.c w_cabsl.c -# Work around this warning from gcc 6: +# Work around this warning from gcc: # lib/msun/ld80/e_powl.c:275:1: error: floating constant exceeds range of # 'long double' [-Werror=overflow] # if( y >= LDBL_MAX ) # See also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=130067 .include -.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 6 +.if ${COMPILER_TYPE} == "gcc" CFLAGS.e_powl.c+= -Wno-error=overflow .endif .endif Modified: head/libexec/rtld-elf/Makefile == --- head/libexec/rtld-elf/Makefile Tue May 12 14:47:38 2020 (r360963) +++ head/libexec/rtld-elf/Makefile Tue May 12 15:22:40 2020 (r360964) @@ -90,8 +90,4 @@ ${PROG_FULL}: ${VERSION_MAP} # GCC warns about redeclarations even though they have __exported # and are therefore not identical to the ones from the system headers. CFLAGS+= -Wno-redundant-decls -.if ${COMPILER_VERSION} < 40300 -# Silence -Wshadow false positives in ancient GCC -CFLAGS+= -Wno-shadow -.endif .endif Modified: head/libexec/tftpd/tests/Makefile == --- head/libexec/tftpd/tests/Mak
Re: svn commit: r360983 - head/include
Why not just use _Bool and leave the compatibility definition only for C++ (#define _Bool bool)? On Tue, May 12, 2020 at 11:12 AM Konstantin Belousov wrote: > > Author: kib > Date: Tue May 12 18:12:20 2020 > New Revision: 360983 > URL: https://svnweb.freebsd.org/changeset/base/360983 > > Log: > Clear namespace pollution in include/malloc_np.h > > Do not include stdbool.h, it makes the header incompatible with some > third-party code that typedefs bool manually. > Remove inclusion of strings.h, which typically conflicts with the use > of symbol 'index'. > Separate inclusion of sys/cdefs.h is not needed because sys/types.h > already handles that. > > Exp-run by: antoine (PR 245366) > Sponsored by: The FreeBSD Foundation > MFC after:1 week > Differential revision:https://reviews.freebsd.org/D24297 > > Modified: > head/include/malloc_np.h > > Modified: head/include/malloc_np.h > == > --- head/include/malloc_np.hTue May 12 17:18:44 2020(r360982) > +++ head/include/malloc_np.hTue May 12 18:12:20 2020(r360983) > @@ -33,29 +33,33 @@ > > #ifndef _MALLOC_NP_H_ > #define_MALLOC_NP_H_ > -#include > + > #include > -#include > -#include > > +#ifdef __cplusplus > +#define__MyBoolbool > +#else > +#define__MyBool_Bool > +#endif > + > __BEGIN_DECLS > typedef struct extent_hooks_s extent_hooks_t; > -typedef void *(extent_alloc_t)(extent_hooks_t *, void *, size_t, size_t, > bool *, > -bool *, unsigned); > -typedef bool (extent_dalloc_t)(extent_hooks_t *, void *, size_t, bool, > +typedef void *(extent_alloc_t)(extent_hooks_t *, void *, size_t, size_t, > +__MyBool *, __MyBool *, unsigned); > +typedef __MyBool (extent_dalloc_t)(extent_hooks_t *, void *, size_t, > __MyBool, > unsigned); > -typedef void (extent_destroy_t)(extent_hooks_t *, void *, size_t, bool, > +typedef void (extent_destroy_t)(extent_hooks_t *, void *, size_t, __MyBool, > unsigned); > -typedef bool (extent_commit_t)(extent_hooks_t *, void *, size_t, size_t, > size_t, > -unsigned); > -typedef bool (extent_decommit_t)(extent_hooks_t *, void *, size_t, size_t, > +typedef __MyBool (extent_commit_t)(extent_hooks_t *, void *, size_t, size_t, > size_t, unsigned); > -typedef bool (extent_purge_t)(extent_hooks_t *, void *, size_t, size_t, > size_t, > +typedef __MyBool (extent_decommit_t)(extent_hooks_t *, void *, size_t, > size_t, > +size_t, unsigned); > +typedef __MyBool (extent_purge_t)(extent_hooks_t *, void *, size_t, size_t, > size_t, > unsigned); > -typedef bool (extent_split_t)(extent_hooks_t *, void *, size_t, size_t, > size_t, > -bool, unsigned); > -typedef bool (extent_merge_t)(extent_hooks_t *, void *, size_t, void *, > size_t, > -bool, unsigned); > +typedef __MyBool (extent_split_t)(extent_hooks_t *, void *, size_t, size_t, > size_t, > +__MyBool, unsigned); > +typedef __MyBool (extent_merge_t)(extent_hooks_t *, void *, size_t, void *, > size_t, > +__MyBool, unsigned); > struct extent_hooks_s { > extent_alloc_t *alloc; > extent_dalloc_t *dalloc; > @@ -119,5 +123,7 @@ void__dallocx(void *ptr, int flags); > void __sdallocx(void *ptr, size_t size, int flags); > size_t __nallocx(size_t size, int flags); > __END_DECLS > + > +#undef __MyBool > > #endif /* _MALLOC_NP_H_ */ ___ 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: r360983 - head/include
On Tue, May 12, 2020 at 11:39:17AM -0700, Conrad Meyer wrote: > Why not just use _Bool and leave the compatibility definition only for > C++ (#define _Bool bool)? There was such version in interim, see https://reviews.freebsd.org/D24297?vs=on&id=70906#toc Exp-run reported issues with this variant, please look at the bug trail yourself. ___ 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: r360990 - head/sys/arm64/arm64
Author: andrew Date: Tue May 12 21:00:13 2020 New Revision: 360990 URL: https://svnweb.freebsd.org/changeset/base/360990 Log: Fix the name reported when the core supports a 64-bit CCIDX Modified: head/sys/arm64/arm64/identcpu.c Modified: head/sys/arm64/arm64/identcpu.c == --- head/sys/arm64/arm64/identcpu.c Tue May 12 20:05:34 2020 (r360989) +++ head/sys/arm64/arm64/identcpu.c Tue May 12 21:00:13 2020 (r360990) @@ -601,7 +601,7 @@ static struct mrs_field_value id_aa64mmfr2_nv[] = { static struct mrs_field_value id_aa64mmfr2_ccidx[] = { MRS_FIELD_VALUE(ID_AA64MMFR2_CCIDX_32, "32bit CCIDX"), - MRS_FIELD_VALUE(ID_AA64MMFR2_CCIDX_64, "32bit CCIDX"), + MRS_FIELD_VALUE(ID_AA64MMFR2_CCIDX_64, "64bit CCIDX"), MRS_FIELD_VALUE_END, }; ___ 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: r360992 - head/bin/sh/tests/parser
Author: jilles Date: Tue May 12 21:59:21 2020 New Revision: 360992 URL: https://svnweb.freebsd.org/changeset/base/360992 Log: sh/tests: Test some obscure cases with aliasing keywords Added: head/bin/sh/tests/parser/alias19.0 (contents, props changed) head/bin/sh/tests/parser/alias19.0.stdout (contents, props changed) head/bin/sh/tests/parser/alias20.0 (contents, props changed) head/bin/sh/tests/parser/alias20.0.stdout (contents, props changed) Modified: head/bin/sh/tests/parser/Makefile Modified: head/bin/sh/tests/parser/Makefile == --- head/bin/sh/tests/parser/Makefile Tue May 12 21:51:56 2020 (r360991) +++ head/bin/sh/tests/parser/Makefile Tue May 12 21:59:21 2020 (r360992) @@ -25,6 +25,8 @@ ${PACKAGE}FILES+= alias15.0 alias15.0.stdout ${PACKAGE}FILES+= alias16.0 ${PACKAGE}FILES+= alias17.0 ${PACKAGE}FILES+= alias18.0 +${PACKAGE}FILES+= alias19.0 alias19.0.stdout +${PACKAGE}FILES+= alias20.0 alias20.0.stdout ${PACKAGE}FILES+= and-pipe-not.0 ${PACKAGE}FILES+= case1.0 ${PACKAGE}FILES+= case2.0 Added: head/bin/sh/tests/parser/alias19.0 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/parser/alias19.0 Tue May 12 21:59:21 2020 (r360992) @@ -0,0 +1,8 @@ +# $FreeBSD$ + +alias begin={ end=} +begin +cat
Re: svn commit: r360833 - head
On Mon, May 11, 2020 at 01:45:14PM -0500, Kyle Evans wrote: > On Mon, May 11, 2020 at 1:10 PM Brooks Davis wrote: > > > > On Sat, May 09, 2020 at 02:01:29AM +, Kyle Evans wrote: > > > Author: kevans > > > Date: Sat May 9 02:01:29 2020 > > > New Revision: 360833 > > > URL: https://svnweb.freebsd.org/changeset/base/360833 > > > > > > Log: > > > installworld: attempt a certctl rehash at the tail end > > > > > > This can be run as root or normal user with no problem; if they hadn't > > > twisted the WITHOUT_CAROOT knob, we'll attempt to use the host certctl > > > to > > > rehash the DESTDIR. This would allow one to build systems > > > WITHOUT_OPENSSL + > > > WITH_CAROOT with a populated /etc/ssl that they can then use with an > > > appropriate *ssl from somewhere else. > > > > > > Cross-builds are fine because this will always use the host certctl, or > > > just > > > nag if it's missing and it wasn't a WITHOUT_CAROOT build. > > > > > > MFC after: 1 week > > > Differential Revision: https://reviews.freebsd.org/D24641 > > > > > > Modified: > > > head/Makefile.inc1 > > > > > > Modified: head/Makefile.inc1 > > > == > > > --- head/Makefile.inc1Sat May 9 01:48:08 2020(r360832) > > > +++ head/Makefile.inc1Sat May 9 02:01:29 2020(r360833) > > > @@ -1403,6 +1403,16 @@ distributeworld installworld stageworld: > > > _installcheck > > > ${DESTDIR}/${DISTDIR}/${dist}.debug.meta > > > .endfor > > > .endif > > > +.elif make(installworld) && ${MK_CAROOT} != "no" > > > + # We could make certctl a bootstrap tool, but it requires OpenSSL > > > and > > > + # friends, which we likely don't want. We'll rehash on a > > > best-effort > > > + # basis, otherwise we'll just mention that we're not doing it to > > > raise > > > + # awareness. > > > + @if which certctl>/dev/null; then \ > > > + certctl rehash \ > > > > Does this update METALOG with the added links? > > > > It seems a little weird to rely on DESTDIR from the environment. > > > > In general I'm not enthusiastic about additions to installworld that do > > anything other than copying files, creating links, etc in simple ways. > > I will happily back this out if I can get some qualified eyes to > review/improve it. It does not update METALOG, and it probably should. > Agreed on DESTDIR. As for point #3, I guess we can continue spreading > `certctl rehash` all over the tree in various points that may need it; > the release(7) scripts will need to be done if we don't do it here at > a minimum, and I haven't put much thought into it beyond that. I'm not in a rush to back this out given that it's solving a real problem, but lets talk about improvements. I kind of feel like this belongs in distribution (which I think would deal with release scripts) or in etcupdate/mergemaster, but I'm not sure either of those are correct. I'd be happy to review changes to update the METALOG (I guess we'd extend certctl with an option to do that?) I think that's the most important things because we really should be routinely validating that DESTDIR only contains things in the METALOG. A quick and dirty fix for the DESTDIR weirdness might be adding "env DESTDIR=${DESTDIR}" so it's explicit. > The close-to-infuriating part of the caroot project has been that it's > incredibly hard to get almost anyone else (with some obvious > exceptions) to do more than informal discussion on the matter; actual > review, in particular, is difficult to obtain. Thanks for doing all this work! I'm afraid the whole thing gives me third-rail vibes (not the idea or the implementation, but the potential for things to go wrong) so I've veered away from the larger reviews. :( -- Brooks signature.asc Description: PGP signature
svn commit: r360993 - head/usr.bin/uname
Author: imp Date: Tue May 12 22:44:51 2020 New Revision: 360993 URL: https://svnweb.freebsd.org/changeset/base/360993 Log: Refine the history of uname. It appeared in 4.4BSD. It was not in v7 unix. It was one of the additions in PWB, and appeared in System III and later commercial versions of Unix. The different args to uname weren't aded until System III. Add a quick note to note the late entry into the BSD fork of Unix since PWB otherwise implies a pre-fork date. Modified: head/usr.bin/uname/uname.1 Modified: head/usr.bin/uname/uname.1 == --- head/usr.bin/uname/uname.1 Tue May 12 21:59:21 2020(r360992) +++ head/usr.bin/uname/uname.1 Tue May 12 22:44:51 2020(r360993) @@ -146,7 +146,11 @@ specification. .Sh HISTORY The .Nm -command appeared in PWB UNIX. +command appeared in PWB UNIX 1.0, however +.Bx 4.4 +was the first Berkeley release with the +.Nm +command. .Pp The .Fl K ___ 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: r360995 - head/sys/net/route
Author: imp Date: Tue May 12 23:46:52 2020 New Revision: 360995 URL: https://svnweb.freebsd.org/changeset/base/360995 Log: Kill trailing newline while I'm here... Modified: head/sys/net/route/route_ddb.c Modified: head/sys/net/route/route_ddb.c == --- head/sys/net/route/route_ddb.c Tue May 12 23:33:03 2020 (r360994) +++ head/sys/net/route/route_ddb.c Tue May 12 23:46:52 2020 (r360995) @@ -268,4 +268,3 @@ usage: " Currently accepts only IPv4 and IPv6 addresses\n"); db_skip_to_eol(); } - ___ 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: r360998 - in head/sys/dev/ath: . ath_rate/amrr ath_rate/onoe ath_rate/sample
Author: adrian Date: Wed May 13 00:05:11 2020 New Revision: 360998 URL: https://svnweb.freebsd.org/changeset/base/360998 Log: [ath] [ath_rate] Add some extra data into the rate control lookup. Right now (well, since I did this in 2011/2012) the rate control code makes some super bad choices for 11n aggregates/rates, and it tracks statistics even more questionably. It's been long enough and I'm now trying to use it again daily, so let's start by: * telling the rate control code if it's an aggregate or not; * being clearer about the TID - yes it can be extracted from the ath_buf but this way it can be overridden by the caller without changing the TID itself. (This is for doing experiments with voice/video QoS at some point..) * Return an optional field to limit how long the aggregate is in microseconds. Right now the rate control code supplies a rate table and the ath aggr form code will look at the rate table and limit the aggregate size to 4ms at the slowest rate. Yeah, this is pretty terrible. * Add some more TODO comments around handling txpower, rate and handling filtered frames status so if I continue to have spoons for this I can go poke at it. Modified: head/sys/dev/ath/ath_rate/amrr/amrr.c head/sys/dev/ath/ath_rate/onoe/onoe.c head/sys/dev/ath/ath_rate/sample/sample.c head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_ath_tx.c head/sys/dev/ath/if_athrate.h Modified: head/sys/dev/ath/ath_rate/amrr/amrr.c == --- head/sys/dev/ath/ath_rate/amrr/amrr.c Wed May 13 00:03:39 2020 (r360997) +++ head/sys/dev/ath/ath_rate/amrr/amrr.c Wed May 13 00:05:11 2020 (r360998) @@ -104,8 +104,8 @@ ath_rate_node_cleanup(struct ath_softc *sc, struct ath void ath_rate_findrate(struct ath_softc *sc, struct ath_node *an, - int shortPreamble, size_t frameLen, - u_int8_t *rix, int *try0, u_int8_t *txrate) + int shortPreamble, size_t frameLen, int tid, bool is_aggr, + u_int8_t *rix, int *try0, u_int8_t *txrate, int *maxdur) { struct amrr_node *amn = ATH_NODE_AMRR(an); @@ -115,6 +115,7 @@ ath_rate_findrate(struct ath_softc *sc, struct ath_nod *txrate = amn->amn_tx_rate0sp; else *txrate = amn->amn_tx_rate0; + maxdur = -1; } /* Modified: head/sys/dev/ath/ath_rate/onoe/onoe.c == --- head/sys/dev/ath/ath_rate/onoe/onoe.c Wed May 13 00:03:39 2020 (r360997) +++ head/sys/dev/ath/ath_rate/onoe/onoe.c Wed May 13 00:05:11 2020 (r360998) @@ -112,8 +112,8 @@ ath_rate_node_cleanup(struct ath_softc *sc, struct ath void ath_rate_findrate(struct ath_softc *sc, struct ath_node *an, - int shortPreamble, size_t frameLen, - u_int8_t *rix, int *try0, u_int8_t *txrate) + int shortPreamble, size_t frameLen, int tid, bool is_aggr, + u_int8_t *rix, int *try0, u_int8_t *txrate, int *maxdur) { struct onoe_node *on = ATH_NODE_ONOE(an); @@ -123,6 +123,7 @@ ath_rate_findrate(struct ath_softc *sc, struct ath_nod *txrate = on->on_tx_rate0sp; else *txrate = on->on_tx_rate0; + *maxdur = -1; } /* Modified: head/sys/dev/ath/ath_rate/sample/sample.c == --- head/sys/dev/ath/ath_rate/sample/sample.c Wed May 13 00:03:39 2020 (r360997) +++ head/sys/dev/ath/ath_rate/sample/sample.c Wed May 13 00:05:11 2020 (r360998) @@ -482,8 +482,9 @@ ath_rate_pick_seed_rate_ht(struct ath_softc *sc, struc void ath_rate_findrate(struct ath_softc *sc, struct ath_node *an, - int shortPreamble, size_t frameLen, - u_int8_t *rix0, int *try0, u_int8_t *txrate) + int shortPreamble, size_t frameLen, int tid, + bool is_aggr, u_int8_t *rix0, int *try0, + u_int8_t *txrate, int *maxdur) { #defineDOT11RATE(ix) (rt->info[ix].dot11Rate & IEEE80211_RATE_VAL) #defineMCS(ix) (rt->info[ix].dot11Rate | IEEE80211_RATE_MCS) @@ -497,6 +498,10 @@ ath_rate_findrate(struct ath_softc *sc, struct ath_nod unsigned average_tx_time; ath_rate_update_static_rix(sc, &an->an_node); + + /* For now don't take TID, is_aggr into account */ + /* Also for now don't calculate a max duration; that'll come later */ + *maxdur = -1; if (sn->currates != sc->sc_currates) { device_printf(sc->sc_dev, "%s: currates != sc_currates!\n", Modified: head/sys/dev/ath/if_ath.c == --- head/sys/dev/ath/if_ath.c Wed May 13 00:03:39 2020(r360997) +++ head/sys/dev/ath/if_ath.c Wed May 13 00:05:11 2020(r360998) @@ -4312,6 +
svn commit: r360999 - head/sys/cam/ata
Author: imp Date: Wed May 13 00:18:44 2020 New Revision: 360999 URL: https://svnweb.freebsd.org/changeset/base/360999 Log: Make the ata probe* and xpt* routines aprobe* and axpt* respectively. Often, in traiging core files, one only has a traceback of where a panic occurred. We have probe* and xpt* routines that live in both the scsi and ata layers with identical names. To make one or the other stand out, prefix all the probe and xpt routines in ata with an 'a'. I've left the scsi ones alone since they were there first and are more numerous. I also rejected using #define to do this as being too confusing. I chose this method because the CAM name for the probe device was already 'aprobe'. Normally, this doesn't matter because file scope protects one from interfering with the other. However, due to the indirect nature of CAM's state machine, you don't know if the following traceback is SCSI or ATA: xpt_done probedone xpt_done_process xpt_done_td fork_exit nvme and mmc already have unique names. MFC: 1 week Differential revision: https://reviews.freebsd.org/D24825 Modified: head/sys/cam/ata/ata_xpt.c Modified: head/sys/cam/ata/ata_xpt.c == --- head/sys/cam/ata/ata_xpt.c Wed May 13 00:05:11 2020(r360998) +++ head/sys/cam/ata/ata_xpt.c Wed May 13 00:18:44 2020(r360999) @@ -71,16 +71,16 @@ struct ata_quirk_entry { u_int maxtags; }; -static periph_init_t probe_periph_init; +static periph_init_t aprobe_periph_init; -static struct periph_driver probe_driver = +static struct periph_driver aprobe_driver = { - probe_periph_init, "aprobe", - TAILQ_HEAD_INITIALIZER(probe_driver.units), /* generation */ 0, + aprobe_periph_init, "aprobe", + TAILQ_HEAD_INITIALIZER(aprobe_driver.units), /* generation */ 0, CAM_PERIPH_DRV_EARLY }; -PERIPHDRIVER_DECLARE(aprobe, probe_driver); +PERIPHDRIVER_DECLARE(aprobe, aprobe_driver); typedef enum { PROBE_RESET, @@ -100,7 +100,7 @@ typedef enum { PROBE_IDENTIFY_SAFTE, PROBE_DONE, PROBE_INVALID -} probe_action; +} aprobe_action; static char *probe_action_text[] = { "PROBE_RESET", @@ -134,13 +134,13 @@ do { \ typedef enum { PROBE_NO_ANNOUNCE = 0x04 -} probe_flags; +} aprobe_flags; typedef struct { TAILQ_HEAD(, ccb_hdr) request_ccbs; struct ata_params ident_data; - probe_actionaction; - probe_flags flags; + aprobe_action action; + aprobe_flagsflags; uint32_tpm_pid; uint32_tpm_prv; int restart; @@ -162,19 +162,18 @@ static struct ata_quirk_entry ata_quirk_table[] = }, }; -static cam_status proberegister(struct cam_periph *periph, - void *arg); -static void probeschedule(struct cam_periph *probe_periph); -static void probestart(struct cam_periph *periph, union ccb *start_ccb); -static void proberequestdefaultnegotiation(struct cam_periph *periph); -static void probedone(struct cam_periph *periph, union ccb *done_ccb); -static void probecleanup(struct cam_periph *periph); +static cam_status aproberegister(struct cam_periph *periph, void *arg); +static void aprobeschedule(struct cam_periph *probe_periph); +static void aprobestart(struct cam_periph *periph, union ccb *start_ccb); +static void aproberequestdefaultnegotiation(struct cam_periph *periph); +static void aprobedone(struct cam_periph *periph, union ccb *done_ccb); +static void aprobecleanup(struct cam_periph *periph); static void ata_find_quirk(struct cam_ed *device); static void ata_scan_bus(struct cam_periph *periph, union ccb *ccb); static void ata_scan_lun(struct cam_periph *periph, struct cam_path *path, cam_flags flags, union ccb *ccb); -static void xptscandone(struct cam_periph *periph, union ccb *done_ccb); +static void axptscandone(struct cam_periph *periph, union ccb *done_ccb); static struct cam_ed * ata_alloc_device(struct cam_eb *bus, struct cam_et *target, lun_id_t lun_id); @@ -271,12 +270,12 @@ CAM_XPT_PROTO(ata_proto_satapm); CAM_XPT_PROTO(ata_proto_semb); static void -probe_periph_init() +aprobe_periph_init() { } static cam_status -proberegister(struct cam_periph *periph, void *arg) +aproberegister(struct cam_periph *periph, void *arg) { union ccb *request_ccb; /* CCB representing the probe request */ probe_softc *softc; @@ -307,12 +306,12 @@ proberegister(struct cam_periph *periph, void *arg) CAM_DEBUG(periph->path, CAM_DEBUG_PROBE, ("Probe started\n")); ata_device_transport(p
Re: svn commit: r360833 - head
On Tue, May 12, 2020 at 5:16 PM Brooks Davis wrote: > > On Mon, May 11, 2020 at 01:45:14PM -0500, Kyle Evans wrote: > > On Mon, May 11, 2020 at 1:10 PM Brooks Davis wrote: > > > > > > On Sat, May 09, 2020 at 02:01:29AM +, Kyle Evans wrote: > > > > Author: kevans > > > > Date: Sat May 9 02:01:29 2020 > > > > New Revision: 360833 > > > > URL: https://svnweb.freebsd.org/changeset/base/360833 > > > > > > > > Log: > > > > installworld: attempt a certctl rehash at the tail end > > > > > > > > This can be run as root or normal user with no problem; if they hadn't > > > > twisted the WITHOUT_CAROOT knob, we'll attempt to use the host > > > > certctl to > > > > rehash the DESTDIR. This would allow one to build systems > > > > WITHOUT_OPENSSL + > > > > WITH_CAROOT with a populated /etc/ssl that they can then use with an > > > > appropriate *ssl from somewhere else. > > > > > > > > Cross-builds are fine because this will always use the host certctl, > > > > or just > > > > nag if it's missing and it wasn't a WITHOUT_CAROOT build. > > > > > > > > MFC after: 1 week > > > > Differential Revision: https://reviews.freebsd.org/D24641 > > > > > > > > Modified: > > > > head/Makefile.inc1 > > > > > > > > Modified: head/Makefile.inc1 > > > > == > > > > --- head/Makefile.inc1Sat May 9 01:48:08 2020(r360832) > > > > +++ head/Makefile.inc1Sat May 9 02:01:29 2020(r360833) > > > > @@ -1403,6 +1403,16 @@ distributeworld installworld stageworld: > > > > _installcheck > > > > ${DESTDIR}/${DISTDIR}/${dist}.debug.meta > > > > .endfor > > > > .endif > > > > +.elif make(installworld) && ${MK_CAROOT} != "no" > > > > + # We could make certctl a bootstrap tool, but it requires OpenSSL > > > > and > > > > + # friends, which we likely don't want. We'll rehash on a > > > > best-effort > > > > + # basis, otherwise we'll just mention that we're not doing it to > > > > raise > > > > + # awareness. > > > > + @if which certctl>/dev/null; then \ > > > > + certctl rehash \ > > > > > > Does this update METALOG with the added links? > > > > > > It seems a little weird to rely on DESTDIR from the environment. > > > > > > In general I'm not enthusiastic about additions to installworld that do > > > anything other than copying files, creating links, etc in simple ways. > > > > I will happily back this out if I can get some qualified eyes to > > review/improve it. It does not update METALOG, and it probably should. > > Agreed on DESTDIR. As for point #3, I guess we can continue spreading > > `certctl rehash` all over the tree in various points that may need it; > > the release(7) scripts will need to be done if we don't do it here at > > a minimum, and I haven't put much thought into it beyond that. > > I'm not in a rush to back this out given that it's solving a real > problem, but lets talk about improvements. > > I kind of feel like this belongs in distribution (which I think would > deal with release scripts) or in etcupdate/mergemaster, but I'm not > sure either of those are correct. I'd be happy to review changes to > update the METALOG (I guess we'd extend certctl with an option to do > that?) I think that's the most important things because we really > should be routinely validating that DESTDIR only contains things in the > METALOG. A quick and dirty fix for the DESTDIR weirdness might be adding > "env DESTDIR=${DESTDIR}" so it's explicit. > Got it- not an egregious enough violation to promptly back out, but we will work towards a better solution. For the larger picture, distribution is probably the correct spot for this; we currently rehash at the following points: - mergemaster/etcupdate - freebsd-update - post-install of the caroot pkg (pkgbase) This leaves two primary final blind spots, which this commit was attempting to resolve: 1.) Install media (including VM images) 2.) Initial installs (e.g. from bsdinstall) #1 could be solved by directly adding it to the release(7) scripts and #2 could be solved by having bsdinstall do it at config time, but there seem to be multiple potential points that could instead hit both (with a single stone) while also making covering the array of other images that re@ produces (e.g. AWS images) and perhaps other points that we've not immediately considered. To this end, distribution or installworld are probably equally sufficient, but I'm incredibly unfamiliar with the former. My understanding from glancing at it over the years is that it may be executed into a tempdir and merged with mergemaster/etcupdate, or directly into the new root if we're looking at a new install that doesn't have potential local changes to merge in. Part of the problem that I see in my head is probably solved by just having a var that mergemaster/etcupdate can pass in to distribution to not bother with the rehash. We want to keep the merg
svn commit: r361000 - head/usr.sbin/inetd
Author: kevans Date: Wed May 13 02:17:27 2020 New Revision: 361000 URL: https://svnweb.freebsd.org/changeset/base/361000 Log: inetd(8): Provide HTTP proxy example using netcat One of the fortunes that are included in freebsd-tips talks about how the superserver can be used to proxy connections with netcat, but there are no examples provided. This commit adds an example with comment explaining what it does. Submitted by: debdrup MFC after:1 week Differential Revision:https://reviews.freebsd.org/D24800 Modified: head/usr.sbin/inetd/inetd.8 Modified: head/usr.sbin/inetd/inetd.8 == --- head/usr.sbin/inetd/inetd.8 Wed May 13 00:18:44 2020(r360999) +++ head/usr.sbin/inetd/inetd.8 Wed May 13 02:17:27 2020(r361000) @@ -28,7 +28,7 @@ .\" from: @(#)inetd.8 8.3 (Berkeley) 4/13/94 .\" $FreeBSD$ .\" -.Dd January 12, 2008 +.Dd May 12, 2020 .Dt INETD 8 .Os .Sh NAME @@ -800,6 +800,8 @@ shellstream tcp46 nowait root /usr/libexec/ tcpmux/+date stream tcp nowait guest /bin/datedate tcpmux/phonebook stream tcp nowait guest /usr/local/bin/phonebook phonebook rstatd/1-3 dgram rpc/udp wait root /usr/libexec/rpc.rstatd rpc.rstatd +# Use netcat as a one-shot HTTP proxy with nc (from freebsd-tips fortune) +http stream tcp nowait nobody /usr/bin/nc nc -N dest-ip 80 /var/run/echo stream unix nowait root internal #@ ipsec ah/require chargen stream tcp nowait root internal @@ -914,6 +916,7 @@ in the database. .El .Sh SEE ALSO +.Xr nc 1 , .Xr ipsec_set_policy 3 , .Xr hosts_access 5 , .Xr hosts_options 5 , ___ 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: r360964 - in head: lib/libclang_rt lib/libthr lib/msun libexec/rtld-elf libexec/tftpd/tests share/mk stand stand/arm/uboot stand/efi stand/efi/boot1 stand/efi/loader stand/i386/boot2 s
Why is this marked for MFC? FreeBSD 12 uses base GCC 4.2.1 on some platforms. On Tue, May 12, 2020, at 1:34 PM, Ravi Pokala wrote: > This feels like it deserves an UPDATING (and possibly a RELNOTES) entry. > > -Ravi (rpokala@) > > -Original Message- > From: on behalf of Eric van Gyzen > > Date: 2020-05-12, Tuesday at 08:22 > To: , , > > Subject: svn commit: r360964 - in head: lib/libclang_rt lib/libthr > lib/msun libexec/rtld-elf libexec/tftpd/tests share/mk stand > stand/arm/uboot stand/efi stand/efi/boot1 stand/efi/loader > stand/i386/boot2 st... > > Author: vangyzen > Date: Tue May 12 15:22:40 2020 > New Revision: 360964 > URL: https://svnweb.freebsd.org/changeset/base/360964 > > Log: > Remove tests for obsolete compilers in the build system > > Assume gcc is at least 6.4, the oldest xtoolchain in the ports tree. > Assume clang is at least 6, which was in 11.2-RELEASE. Drop conditions > for older compilers. > > Reviewed by:imp (earlier version), emaste, jhb > MFC after: 2 weeks > Sponsored by: Dell EMC Isilon > Differential Revision: https://reviews.freebsd.org/D24802 > > Modified: > head/lib/libclang_rt/Makefile.inc > head/lib/libthr/Makefile > head/lib/msun/Makefile > head/libexec/rtld-elf/Makefile > head/libexec/tftpd/tests/Makefile > head/share/mk/bsd.compiler.mk > head/share/mk/bsd.sys.mk > head/stand/arm/uboot/Makefile > head/stand/defs.mk > head/stand/efi/Makefile > head/stand/efi/boot1/Makefile > head/stand/efi/loader/Makefile > head/stand/i386/boot2/Makefile > head/stand/i386/isoboot/Makefile > head/stand/libsa/Makefile > head/sys/conf/Makefile.arm > head/sys/conf/Makefile.powerpc > head/sys/conf/kern.mk > head/sys/conf/kern.post.mk > head/sys/conf/kern.pre.mk > head/sys/conf/kmod.mk > head/sys/modules/Makefile > head/usr.sbin/acpi/acpidb/Makefile > head/usr.sbin/trpt/Makefile > head/usr.sbin/zic/zic/Makefile > > Modified: head/lib/libclang_rt/Makefile.inc > > == > --- head/lib/libclang_rt/Makefile.inc Tue May 12 14:47:38 > 2020 (r360963) > +++ head/lib/libclang_rt/Makefile.inc Tue May 12 15:22:40 > 2020 (r360964) > @@ -32,7 +32,7 @@ CFLAGS+=${PICFLAG} > CFLAGS+= -fno-builtin > CFLAGS+= -fno-exceptions > CXXFLAGS+= -fno-rtti > -.if ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} >= 30700 > +.if ${COMPILER_TYPE} == clang > CFLAGS+= -fno-sanitize=safe-stack > .endif > CFLAGS+= -fno-stack-protector > > Modified: head/lib/libthr/Makefile > > == > --- head/lib/libthr/Makefile Tue May 12 14:47:38 2020 > (r360963) > +++ head/lib/libthr/Makefile Tue May 12 15:22:40 2020 > (r360964) > @@ -29,10 +29,7 @@ CFLAGS+=-Winline > > CFLAGS.thr_stack.c+= -Wno-cast-align > CFLAGS.rtld_malloc.c+= -Wno-cast-align > -.include > -.if !(${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} < 40300) > CFLAGS.thr_symbols.c+= -Wno-missing-variable-declarations > -.endif > > .ifndef NO_THREAD_UNWIND_STACK > CFLAGS+=-fexceptions > > Modified: head/lib/msun/Makefile > > == > --- head/lib/msun/MakefileTue May 12 14:47:38 2020 > (r360963) > +++ head/lib/msun/MakefileTue May 12 15:22:40 2020 > (r360964) > @@ -108,13 +108,13 @@ COMMON_SRCS+= catrigl.c \ > s_nextafterl.c s_nexttoward.c s_remquol.c s_rintl.c s_roundl.c \ > s_scalbnl.c s_sinl.c s_sincosl.c \ > s_tanhl.c s_tanl.c s_truncl.c w_cabsl.c > -# Work around this warning from gcc 6: > +# Work around this warning from gcc: > # lib/msun/ld80/e_powl.c:275:1: error: floating constant > exceeds range of > # 'long double' [-Werror=overflow] > # if( y >= LDBL_MAX ) > # See also: > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=130067 > .include > -.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 6 > +.if ${COMPILER_TYPE} == "gcc" > CFLAGS.e_powl.c+= -Wno-error=overflow > .endif > .endif > > Modified: head/libexec/rtld-elf/Makefile > > == > --- head/libexec/rtld-elf/MakefileTue May 12 14:47:38 > 2020 (r360963) > +++ head/libexec/rtld-elf/MakefileTue May 12 15:22:40 > 2020 (r360964) > @@ -90,8 +90,4 @@ ${PROG_FULL}: ${VERSION_MAP} > # GCC warns about redeclarations even though they have __exported > # and are therefore not identical to the on
Re: svn commit: r360233 - in head: contrib/jemalloc . . . : This partially breaks a 2-socket 32-bit powerpc (old PowerMac G4) based on head -r360311
[Yet another new kind of experiment. But this looks like I can cause problems in fairly sort order on demand now. Finally! And with that I've much better evidence for kernel vs. user-space process for making the zeroed memory appear in, for example, nfsd.] I've managed to get: : /usr/src/contrib/jemalloc/include/jemalloc/internal/arena_inlines_b.h:258: Failed assertion: "slab == extent_slab_get(extent)" : /usr/src/contrib/jemalloc/include/jemalloc/internal/arena_inlines_b.h:258: Failed assertion: "slab == extent_slab_get(extent)" and eventually: [1] Segmentation fault (core dumped) stress -m 2 --vm-bytes 1700M from a user program (stress) while another machine was attempted an nfs mount during the stress activity: # mount -onoatime,soft ...:/ /mnt && umount /mnt && rpcinfo -s ... [tcp] ...:/: RPCPROG_MNT: RPC: Timed out (To get failure I may have to run the commands multiple times. Timing details against stress's activity seem to matter.) That failure lead to: # ls -ldT /*.core* -rw--- 1 root wheel 3899392 May 12 19:52:26 2020 /mountd.core # ls -ldT *.core* -rw--- 1 root wheel 2682880 May 12 20:00:26 2020 stress.core (Note which of nfsd, mountd, or rpcbind need not be fully repeatable. stress.core seems to be written twice, probably because of the -m 2 in use.) The context that let me do this was to first (on the 2 socket G4 with a full 2048 MiBYte RAM configuration): stress -m 2 --vm-bytes 1700M & Note that the stress command keeps the memory busy and causes paging to the swap/page space. I've not tried to make it just fit without paging or just barely paging or such. The original context did not involve paging or low RAM, so I do not expect paging to be required but can be involved. The stress program backtrace is different: 4827return (tls_get_addr_slow(dtvp, index, offset)); 4828} (gdb) bt -full #0 0x41831b04 in tls_get_addr_common (dtvp=0x4186c010, index=2, offset=4294937444) at /usr/src/libexec/rtld-elf/rtld.c:4824 dtv = 0x0 #1 0x4182bfcc in __tls_get_addr (ti=) at /usr/src/libexec/rtld-elf/powerpc/reloc.c:848 tp = p = #2 0x41a83464 in __get_locale () at /usr/src/lib/libc/locale/xlocale_private.h:199 No locals. #3 fprintf (fp=0x41b355f8, fmt=0x1804cbc "%s: FAIL: [%lli] (%d) ") at /usr/src/lib/libc/stdio/fprintf.c:57 ap = {{gpr = 2 '\002', fpr = 0 '\000', reserved = 20731, overflow_arg_area = 0xdb78, reg_save_area = 0xdae8}} ret = #4 0x01802348 in main (argc=, argv=) at stress.c:415 status = ret = 6 do_dryrun = 0 retval = 0 children = 1 do_backoff = do_hdd_bytes = do_hdd = do_vm_keep = 0 do_vm_hang = -1 do_vm_stride = 4096 do_vm_bytes = 1782579200 do_vm = 108174317627375616 do_io = do_cpu = do_timeout = 108176117243859333 starttime = 1589338322 i = forks = pid = 6140 stoptime = runtime = Apparently the asserts did not stop the code and it ran until a failure occurred (via dtv=0x0). Stress uses a mutex stored on a page that gets the "turns into zeros" problem, preventing the mprotect(ADDR,1,1) type of test because stress will write on the page. (I've not tried to find a minimal form of stress run.) The the same sort of globals are again zeroed, such as: (gdb) print/x __je_sz_size2index_tab $1 = {0x0 } Another attempt lost rpcbind instead instead of mountd: # ls -ldT /*.core -rw--- 1 root wheel 3899392 May 12 19:52:26 2020 /mountd.core -rw--- 1 root wheel 3170304 May 12 20:03:00 2020 /rpcbind.core I again find that when I use gdb 3 times to: attach ??? x/x __je_sz_size2index_tab print (int)mprotext(ADDRESS,1,1) quit for each of rpcbind, mountd, and nfsd master that those processes no longer fail during the mount/umount/rpcinfo (or are far less likely to). But it turns out that later when I "service nfsd stop" nfsd does get the zeroed Memory based assert and core dumps. (I'd done a bunch of the mount/umount/ rpcinfo sequences before the stop.) That the failure is during SIGUSR1 based shutdown, leads me to wonder if killing off some child process(es) is involved in the problem. There was *no* evidence of a signal for an attempt to write the page from the user process. It appears that the kernel is doing something that changes what the process sees --instead of the user-space programs stomping on its own memory content. I've no clue how to track down the kernel activity that changes what the process sees on some page(s) of memory. (Prior testing with a debug kernel did not report problems, despite getting an example failure. So that seems insufficient.) At least a procedure is now known that does not involved waiting hours or days. The procedure (adjusted for how much RAM is present and number of cpus/cores?) could be appropriate to run in other contexts than the 32-bit powerpc G
svn commit: r361001 - head/sys/dev/sound/pci/hda
Author: avg Date: Wed May 13 06:24:54 2020 New Revision: 361001 URL: https://svnweb.freebsd.org/changeset/base/361001 Log: sound/hda: newer AMD devices still require the same PCIe snoop So, replicate the ATI vendor snoop configuration for the AMD vendor. I think that this should fix a number of cases where users currently have to resort to polling or disabling MSI. MFC after:1 week Modified: head/sys/dev/sound/pci/hda/hdac.c Modified: head/sys/dev/sound/pci/hda/hdac.c == --- head/sys/dev/sound/pci/hda/hdac.c Wed May 13 02:17:27 2020 (r361000) +++ head/sys/dev/sound/pci/hda/hdac.c Wed May 13 06:24:54 2020 (r361001) @@ -197,6 +197,7 @@ static const struct { } hdac_pcie_snoop[] = { { INTEL_VENDORID, 0x00, 0x00, 0x00 }, {ATI_VENDORID, 0x42, 0xf8, 0x02 }, + {AMD_VENDORID, 0x42, 0xf8, 0x02 }, { NVIDIA_VENDORID, 0x4e, 0xf0, 0x0f }, }; ___ 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: r361002 - head/sys/dev/sound/pci/hda
Author: avg Date: Wed May 13 06:26:30 2020 New Revision: 361002 URL: https://svnweb.freebsd.org/changeset/base/361002 Log: snd_hda: fix typos related to quirks set via 'config' tunable One wrong quirk bit, one wrong variable name. MFC after:1 week Modified: head/sys/dev/sound/pci/hda/hdac.c Modified: head/sys/dev/sound/pci/hda/hdac.c == --- head/sys/dev/sound/pci/hda/hdac.c Wed May 13 06:24:54 2020 (r361001) +++ head/sys/dev/sound/pci/hda/hdac.c Wed May 13 06:26:30 2020 (r361002) @@ -65,7 +65,7 @@ static const struct { const char *key; uint32_t value; } hdac_quirks_tab[] = { - { "64bit", HDAC_QUIRK_DMAPOS }, + { "64bit", HDAC_QUIRK_64BIT }, { "dmapos", HDAC_QUIRK_DMAPOS }, { "msi", HDAC_QUIRK_MSI }, }; @@ -279,10 +279,10 @@ hdac_config_fetch(struct hdac_softc *sc, uint32_t *on, ); if (inv == 0) { *on |= hdac_quirks_tab[k].value; - *on &= ~hdac_quirks_tab[k].value; + *off &= ~hdac_quirks_tab[k].value; } else if (inv != 0) { *off |= hdac_quirks_tab[k].value; - *off &= ~hdac_quirks_tab[k].value; + *on &= ~hdac_quirks_tab[k].value; } 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"