svn commit: r361408 - stable/12/lib/libc/tests/sys
Author: markj Date: Sat May 23 03:32:08 2020 New Revision: 361408 URL: https://svnweb.freebsd.org/changeset/base/361408 Log: Revert mlock_helper.c test code changes from r361350. They were not intended to be merged, since the MFC did not change the max_wired sysctl name. This is a direct commit to stable/12. Reported by: lwhsu Modified: stable/12/lib/libc/tests/sys/mlock_helper.c Modified: stable/12/lib/libc/tests/sys/mlock_helper.c == --- stable/12/lib/libc/tests/sys/mlock_helper.c Fri May 22 22:17:44 2020 (r361407) +++ stable/12/lib/libc/tests/sys/mlock_helper.c Sat May 23 03:32:08 2020 (r361408) @@ -39,16 +39,16 @@ __FBSDID("$FreeBSD$"); #include #include -#defineVM_MAX_WIRED "vm.max_user_wired" +#defineVM_MAX_WIRED "vm.max_wired" static void -vm_max_wired_sysctl(u_long *old_value, u_long *new_value) +vm_max_wired_sysctl(int *old_value, int *new_value) { size_t old_len; - size_t new_len = (new_value == NULL ? 0 : sizeof(*new_value)); + size_t new_len = (new_value == NULL ? 0 : sizeof(int)); if (old_value == NULL) - printf("Setting the new value to %lu\n", *new_value); + printf("Setting the new value to %d\n", *new_value); else { ATF_REQUIRE_MSG(sysctlbyname(VM_MAX_WIRED, NULL, &old_len, new_value, new_len) == 0, @@ -60,14 +60,14 @@ vm_max_wired_sysctl(u_long *old_value, u_long *new_val "sysctlbyname(%s) failed: %s", VM_MAX_WIRED, strerror(errno)); if (old_value != NULL) - printf("Saved the old value (%lu)\n", *old_value); + printf("Saved the old value (%d)\n", *old_value); } void -set_vm_max_wired(u_long new_value) +set_vm_max_wired(int new_value) { FILE *fp; - u_long old_value; + int old_value; fp = fopen(VM_MAX_WIRED, "w"); if (fp == NULL) { @@ -78,7 +78,7 @@ set_vm_max_wired(u_long new_value) vm_max_wired_sysctl(&old_value, NULL); - ATF_REQUIRE_MSG(fprintf(fp, "%lu", old_value) > 0, + ATF_REQUIRE_MSG(fprintf(fp, "%d", old_value) > 0, "saving %s failed", VM_MAX_WIRED); fclose(fp); @@ -90,7 +90,7 @@ void restore_vm_max_wired(void) { FILE *fp; - u_long saved_max_wired; + int saved_max_wired; fp = fopen(VM_MAX_WIRED, "r"); if (fp == NULL) { @@ -98,14 +98,14 @@ restore_vm_max_wired(void) return; } - if (fscanf(fp, "%lu", &saved_max_wired) != 1) { + if (fscanf(fp, "%d", &saved_max_wired) != 1) { perror("fscanf failed\n"); fclose(fp); return; } fclose(fp); - printf("old value in %s: %lu\n", VM_MAX_WIRED, saved_max_wired); + printf("old value in %s: %d\n", VM_MAX_WIRED, saved_max_wired); if (saved_max_wired == 0) /* This will cripple the test host */ return; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361407 - stable/12/tests/sys/geom/class/multipath
Author: asomers Date: Fri May 22 22:17:44 2020 New Revision: 361407 URL: https://svnweb.freebsd.org/changeset/base/361407 Log: Reenable sys.geom.class.multipath.misc.fail_on_error on stable/12 The failing test was fixed by r361403. Direct commit to stable/12 because the test was never disabled on head. PR: 244158 Reported by: lwhsu Modified: stable/12/tests/sys/geom/class/multipath/misc.sh Modified: stable/12/tests/sys/geom/class/multipath/misc.sh == --- stable/12/tests/sys/geom/class/multipath/misc.shFri May 22 22:13:55 2020(r361406) +++ stable/12/tests/sys/geom/class/multipath/misc.shFri May 22 22:17:44 2020(r361407) @@ -176,10 +176,6 @@ fail_on_error_head() } fail_on_error_body() { - if [ "$(atf_config_get ci false)" = "true" ]; then - atf_skip "https://bugs.freebsd.org/244158"; - fi - load_gnop load_gmultipath md0=$(alloc_md) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361406 - stable/12/tests/sys/fs/fusefs
Author: asomers Date: Fri May 22 22:13:55 2020 New Revision: 361406 URL: https://svnweb.freebsd.org/changeset/base/361406 Log: MFC r360829: fusefs: fix two small bugs in the tests' expectations These two errors have been present since the tests' introduction. Coincidentally every test (I think there's only one) that cares about that field also works when the field's value is 0. Modified: stable/12/tests/sys/fs/fusefs/default_permissions.cc stable/12/tests/sys/fs/fusefs/default_permissions_privileged.cc Directory Properties: stable/12/ (props changed) Modified: stable/12/tests/sys/fs/fusefs/default_permissions.cc == --- stable/12/tests/sys/fs/fusefs/default_permissions.ccFri May 22 22:12:07 2020(r361405) +++ stable/12/tests/sys/fs/fusefs/default_permissions.ccFri May 22 22:13:55 2020(r361406) @@ -125,7 +125,7 @@ void expect_getattr(uint64_t ino, mode_t mode, uint64_ out.body.attr.attr.mode = mode; out.body.attr.attr.size = 0; out.body.attr.attr.uid = uid; - out.body.attr.attr.uid = gid; + out.body.attr.attr.gid = gid; out.body.attr.attr_valid = attr_valid; }))); } Modified: stable/12/tests/sys/fs/fusefs/default_permissions_privileged.cc == --- stable/12/tests/sys/fs/fusefs/default_permissions_privileged.cc Fri May 22 22:12:07 2020(r361405) +++ stable/12/tests/sys/fs/fusefs/default_permissions_privileged.cc Fri May 22 22:13:55 2020(r361406) @@ -85,7 +85,7 @@ void expect_getattr(uint64_t ino, mode_t mode, uint64_ out.body.attr.attr.mode = mode; out.body.attr.attr.size = 0; out.body.attr.attr.uid = uid; - out.body.attr.attr.uid = gid; + out.body.attr.attr.gid = gid; out.body.attr.attr_valid = attr_valid; }))); } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361405 - stable/12/sys/fs/fuse
Author: asomers Date: Fri May 22 22:12:07 2020 New Revision: 361405 URL: https://svnweb.freebsd.org/changeset/base/361405 Log: MFC r360828: fusefs: better dtrace probes for asynchronous invalidation operations Modified: stable/12/sys/fs/fuse/fuse_internal.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/fs/fuse/fuse_internal.c == --- stable/12/sys/fs/fuse/fuse_internal.c Fri May 22 20:52:36 2020 (r361404) +++ stable/12/sys/fs/fuse/fuse_internal.c Fri May 22 22:12:07 2020 (r361405) @@ -377,8 +377,8 @@ fuse_internal_fsync(struct vnode *vp, } /* Asynchronous invalidation */ -SDT_PROBE_DEFINE2(fusefs, , internal, invalidate_cache_hit, - "struct vnode*", "struct vnode*"); +SDT_PROBE_DEFINE3(fusefs, , internal, invalidate_entry, + "struct vnode*", "struct fuse_notify_inval_entry_out*", "char*"); int fuse_internal_invalidate_entry(struct mount *mp, struct uio *uio) { @@ -407,6 +407,7 @@ fuse_internal_invalidate_entry(struct mount *mp, struc else err = fuse_internal_get_cached_vnode( mp, fnieo.parent, LK_SHARED, &dvp); + SDT_PROBE3(fusefs, , internal, invalidate_entry, dvp, &fnieo, name); /* * If dvp is not in the cache, then it must've been reclaimed. And * since fuse_vnop_reclaim does a cache_purge, name's entry must've @@ -435,6 +436,8 @@ fuse_internal_invalidate_entry(struct mount *mp, struc return (0); } +SDT_PROBE_DEFINE2(fusefs, , internal, invalidate_inode, + "struct vnode*", "struct fuse_notify_inval_inode_out *"); int fuse_internal_invalidate_inode(struct mount *mp, struct uio *uio) { @@ -450,6 +453,7 @@ fuse_internal_invalidate_inode(struct mount *mp, struc else err = fuse_internal_get_cached_vnode(mp, fniio.ino, LK_SHARED, &vp); + SDT_PROBE2(fusefs, , internal, invalidate_inode, vp, &fniio); if (err != 0 || vp == NULL) return (err); /* ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361404 - head/sys/crypto/ccp
Author: jhb Date: Fri May 22 20:52:36 2020 New Revision: 361404 URL: https://svnweb.freebsd.org/changeset/base/361404 Log: Remove a workaround for GCM requests with an empty payload. This was copied from ccr(4) (which does require the workaround), but is reportedly not needed for ccp(4). Discussed with: cem Sponsored by: Netflix Modified: head/sys/crypto/ccp/ccp.c Modified: head/sys/crypto/ccp/ccp.c == --- head/sys/crypto/ccp/ccp.c Fri May 22 19:09:43 2020(r361403) +++ head/sys/crypto/ccp/ccp.c Fri May 22 20:52:36 2020(r361404) @@ -113,67 +113,6 @@ ccp_populate_sglist(struct sglist *sg, struct cryptop return (error); } -/* - * Handle a GCM request with an empty payload by performing the - * operation in software. - */ -static void -ccp_gcm_soft(struct ccp_session *s, struct cryptop *crp) -{ - struct aes_gmac_ctx gmac_ctx; - char block[GMAC_BLOCK_LEN]; - char digest[GMAC_DIGEST_LEN]; - char iv[AES_BLOCK_LEN]; - int i, len; - - /* -* This assumes a 12-byte IV from the crp. See longer comment -* above in ccp_gcm() for more details. -*/ - if ((crp->crp_flags & CRYPTO_F_IV_SEPARATE) == 0) { - crp->crp_etype = EINVAL; - goto out; - } - memcpy(iv, crp->crp_iv, 12); - *(uint32_t *)&iv[12] = htobe32(1); - - /* Initialize the MAC. */ - AES_GMAC_Init(&gmac_ctx); - AES_GMAC_Setkey(&gmac_ctx, s->blkcipher.enckey, s->blkcipher.key_len); - AES_GMAC_Reinit(&gmac_ctx, iv, sizeof(iv)); - - /* MAC the AAD. */ - for (i = 0; i < crp->crp_aad_length; i += sizeof(block)) { - len = imin(crp->crp_aad_length - i, sizeof(block)); - crypto_copydata(crp, crp->crp_aad_start + i, len, block); - bzero(block + len, sizeof(block) - len); - AES_GMAC_Update(&gmac_ctx, block, sizeof(block)); - } - - /* Length block. */ - bzero(block, sizeof(block)); - ((uint32_t *)block)[1] = htobe32(crp->crp_aad_length * 8); - AES_GMAC_Update(&gmac_ctx, block, sizeof(block)); - AES_GMAC_Final(digest, &gmac_ctx); - - if (CRYPTO_OP_IS_ENCRYPT(crp->crp_op)) { - crypto_copyback(crp, crp->crp_digest_start, sizeof(digest), - digest); - crp->crp_etype = 0; - } else { - char digest2[GMAC_DIGEST_LEN]; - - crypto_copydata(crp, crp->crp_digest_start, sizeof(digest2), - digest2); - if (timingsafe_bcmp(digest, digest2, sizeof(digest)) == 0) - crp->crp_etype = 0; - else - crp->crp_etype = EBADMSG; - } -out: - crypto_done(crp); -} - static int ccp_probe(device_t dev) { @@ -643,11 +582,6 @@ ccp_process(device_t dev, struct cryptop *crp, int hin error = ccp_authenc(qp, s, crp); break; case GCM: - if (crp->crp_payload_length == 0) { - mtx_unlock(&qp->cq_lock); - ccp_gcm_soft(s, crp); - return (0); - } if (s->pending != 0) { error = EAGAIN; break; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361403 - stable/12/tests/sys/geom/class/multipath
Author: asomers Date: Fri May 22 19:09:43 2020 New Revision: 361403 URL: https://svnweb.freebsd.org/changeset/base/361403 Log: MFC r360807: Fix the sys.geom.class.multipath.misc.fail_on_error test on stable/12 This test uses a gnop feature (delay probability) that isn't available on stable/12. But it's unnecessary; the test works fine without it. Removing it simplifies the test and, once MFCed, will allow it to pass on stable/12. PR: 244158 Reported by: lwhsu Modified: stable/12/tests/sys/geom/class/multipath/misc.sh Directory Properties: stable/12/ (props changed) Modified: stable/12/tests/sys/geom/class/multipath/misc.sh == --- stable/12/tests/sys/geom/class/multipath/misc.shFri May 22 18:54:56 2020(r361402) +++ stable/12/tests/sys/geom/class/multipath/misc.shFri May 22 19:09:43 2020(r361403) @@ -190,7 +190,7 @@ fail_on_error_body() atf_check -s exit:0 gmultipath create "$name" ${md0}.nop ${md1}.nop # The first I/O to the first path should fail, causing gmultipath to # fail over to the second path. - atf_check gnop configure -q 100 -r 100 -w 100 -x 100 ${md0}.nop + atf_check gnop configure -r 100 -w 100 ${md0}.nop atf_check -s exit:0 -o ignore -e ignore dd if=/dev/zero of=/dev/multipath/"$name" bs=4096 count=1 check_multipath_state ${md1}.nop "DEGRADED" "FAIL" "ACTIVE" } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361402 - head/sys/conf
Author: mhorne Date: Fri May 22 18:54:56 2020 New Revision: 361402 URL: https://svnweb.freebsd.org/changeset/base/361402 Log: Simplify the RISC-V kernel linker invocation Remove our custom SYSTEM_LD definition. This generates program headers that are more consistent with other architectures, and more importantly, are in line with what loader(8) expects when loading a kernel. As noted in https://reviews.freebsd.org/D22920, there is no apparent reason why the kernel would need a writable text segment, so removal of the -N flag isn't likely to cause issue. Reviewed by: kp, br MFC after:1 week Differential Revision:https://reviews.freebsd.org/D24909 Modified: head/sys/conf/Makefile.riscv Modified: head/sys/conf/Makefile.riscv == --- head/sys/conf/Makefile.riscvFri May 22 18:11:17 2020 (r361401) +++ head/sys/conf/Makefile.riscvFri May 22 18:54:56 2020 (r361402) @@ -35,12 +35,7 @@ INCLUDES+= -I$S/contrib/libfdt # We set this value using --defsym rather than hardcoding it in ldscript.riscv # so that different kernel configs can override the load address. KERNEL_LMA?= 0x8020 - -SYSTEM_LD= @${LD} -N -m ${LD_EMULATION} -Bdynamic -T ${LDSCRIPT} ${_LDFLAGS} \ - --no-warn-mismatch --warn-common --export-dynamic \ - --defsym='kernel_lma=${KERNEL_LMA}' \ - --dynamic-linker /red/herring \ - -o ${.TARGET} -X ${SYSTEM_OBJS} vers.o +LDFLAGS+= --defsym='kernel_lma=${KERNEL_LMA}' .if !empty(DDB_ENABLED) CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r361334 - in stable/12/sys: amd64/amd64 arm64/arm64 dev/acpica i386/i386 x86/acpica
On Fri, May 22, 2020 at 08:57:44AM -0700, John Baldwin wrote: > On 5/21/20 3:45 PM, Herbert J. Skuhra wrote: > > > > Until now it was possible to build a kernel (amd64) without 'device > > acpi'. After this commit it fails with this error: > > > > --- kernel.full --- > > linking kernel.full > > ld: error: undefined symbol: acpi_pxm_set_cpu_locality > referenced by mp_machdep.c:269 > (/usr/src/sys/amd64/amd64/mp_machdep.c:269) > mp_machdep.o:(cpu_mp_start) > > *** [kernel.full] Error code 1 > > > > Was that intended? > > I know Mark has already fixed this, but can you elaborate on your use case for > not compiling ACPI support into the kernel? Yes, thanks! I still use a Soekris Net6501-70 board. It shows the following errors when ACPI is enabled: Firmware Error (ACPI): A valid RSDP was not found (20200430/tbxfroot-369) [...] ACPI: Table initialisation failed: AE_NOT_FOUND ACPI: Try disabling either ACPI or apic support. It works fine without ACPI so I removed it. I need a custom kernel anyway (the kernel panics without 'device atpic'). -- Herbert ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361400 - head/sys/dev/iscsi
Author: mav Date: Fri May 22 18:10:46 2020 New Revision: 361400 URL: https://svnweb.freebsd.org/changeset/base/361400 Log: Do not try to fill socket send buffer to the last byte. Setting so_snd.sb_lowat to at least 1/8 of the socket buffer size allows send thread more actively use PDUs coalescing, that dramatically reduces TCP lock congestion and number of context switches, when the socket is full and PDUs are small. MFC after:1 week Sponsored by: iXsystems, Inc. Modified: head/sys/dev/iscsi/icl_soft.c Modified: head/sys/dev/iscsi/icl_soft.c == --- head/sys/dev/iscsi/icl_soft.c Fri May 22 18:03:14 2020 (r361399) +++ head/sys/dev/iscsi/icl_soft.c Fri May 22 18:10:46 2020 (r361400) @@ -914,7 +914,8 @@ icl_conn_send_pdus(struct icl_conn *ic, struct icl_pdu "have %ld, need %ld", available, size); #endif - so->so_snd.sb_lowat = size; + so->so_snd.sb_lowat = max(size, + so->so_snd.sb_hiwat / 8); SOCKBUF_UNLOCK(&so->so_snd); return; } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361401 - in head: sys/fs/fuse tests/sys/fs/fusefs
Author: asomers Date: Fri May 22 18:11:17 2020 New Revision: 361401 URL: https://svnweb.freebsd.org/changeset/base/361401 Log: Fix issues with FUSE_ACCESS when default_permissions is disabled This patch fixes two issues relating to FUSE_ACCESS when the default_permissions mount option is disabled: * VOP_ACCESS() calls with VADMIN set should never be sent to a fuse server in the form of FUSE_ACCESS operations. The FUSE protocol has no equivalent of VADMIN, so we must evaluate such things kernel-side, regardless of the default_permissions setting. * The FUSE protocol only requires FUSE_ACCESS to be sent for two purposes: for the access(2) syscall and to check directory permissions for searchability during lookup. FreeBSD sends it much more frequently, due to differences between our VFS and Linux's, for which FUSE was designed. But this patch does eliminate several cases not required by the FUSE protocol: * for any FUSE_*XATTR operation * when creating a new file * when deleting a file * when setting timestamps, such as by utimensat(2). * Additionally, when default_permissions is disabled, this patch removes one FUSE_GETATTR operation when deleting a file. PR: 245689 Reported by: MooseFS FreeBSD Team Reviewed by: cem MFC after:2 weeks Differential Revision:https://reviews.freebsd.org/D24777 Modified: head/sys/fs/fuse/fuse_internal.c head/sys/fs/fuse/fuse_vnops.c head/tests/sys/fs/fusefs/access.cc head/tests/sys/fs/fusefs/rename.cc head/tests/sys/fs/fusefs/rmdir.cc head/tests/sys/fs/fusefs/unlink.cc head/tests/sys/fs/fusefs/utils.cc head/tests/sys/fs/fusefs/utils.hh head/tests/sys/fs/fusefs/xattr.cc Modified: head/sys/fs/fuse/fuse_internal.c == --- head/sys/fs/fuse/fuse_internal.cFri May 22 18:10:46 2020 (r361400) +++ head/sys/fs/fuse/fuse_internal.cFri May 22 18:11:17 2020 (r361401) @@ -158,6 +158,7 @@ fuse_internal_get_cached_vnode(struct mount* mp, ino_t return 0; } +SDT_PROBE_DEFINE0(fusefs, , internal, access_vadmin); /* Synchronously send a FUSE_ACCESS operation */ int fuse_internal_access(struct vnode *vp, @@ -210,10 +211,18 @@ fuse_internal_access(struct vnode *vp, va.va_gid, mode, cred, NULL); } + if (mode & VADMIN) { + /* +* The FUSE protocol doesn't have an equivalent of VADMIN, so +* it's a bug if we ever reach this point with that bit set. +*/ + SDT_PROBE0(fusefs, , internal, access_vadmin); + } + if (!fsess_isimpl(mp, FUSE_ACCESS)) return 0; - if ((mode & (VWRITE | VAPPEND | VADMIN)) != 0) + if ((mode & (VWRITE | VAPPEND)) != 0) mask |= W_OK; if ((mode & VREAD) != 0) mask |= R_OK; Modified: head/sys/fs/fuse/fuse_vnops.c == --- head/sys/fs/fuse/fuse_vnops.c Fri May 22 18:10:46 2020 (r361400) +++ head/sys/fs/fuse/fuse_vnops.c Fri May 22 18:11:17 2020 (r361401) @@ -235,6 +235,7 @@ fuse_extattr_check_cred(struct vnode *vp, int ns, stru { struct mount *mp = vnode_mount(vp); struct fuse_data *data = fuse_get_mpdata(mp); + int default_permissions = data->dataflags & FSESS_DEFAULT_PERMISSIONS; /* * Kernel-invoked always succeeds. @@ -248,12 +249,15 @@ fuse_extattr_check_cred(struct vnode *vp, int ns, stru */ switch (ns) { case EXTATTR_NAMESPACE_SYSTEM: - if (data->dataflags & FSESS_DEFAULT_PERMISSIONS) { + if (default_permissions) { return (priv_check_cred(cred, PRIV_VFS_EXTATTR_SYSTEM)); } - /* FALLTHROUGH */ + return (0); case EXTATTR_NAMESPACE_USER: - return (fuse_internal_access(vp, accmode, td, cred)); + if (default_permissions) { + return (fuse_internal_access(vp, accmode, td, cred)); + } + return (0); default: return (EPERM); } @@ -985,6 +989,8 @@ fuse_vnop_lookup(struct vop_lookup_args *ap) int wantparent = flags & (LOCKPARENT | WANTPARENT); int islastcn = flags & ISLASTCN; struct mount *mp = vnode_mount(dvp); + struct fuse_data *data = fuse_get_mpdata(mp); + int default_permissions = data->dataflags & FSESS_DEFAULT_PERMISSIONS; int err = 0; int lookup_err = 0; @@ -1108,7 +1114,11 @@ fuse_vnop_lookup(struct vop_lookup_args *ap) if (lookup_err) { /* Entry not found */ if ((nameiop == CREATE || nameiop == RENAME) && islastcn) { - err = fuse_internal_access(dvp, VWRITE, t
svn commit: r361399 - head/sys/fs/fuse
Author: asomers Date: Fri May 22 18:03:14 2020 New Revision: 361399 URL: https://svnweb.freebsd.org/changeset/base/361399 Log: Disable nullfs cacheing on top of fusefs Nullfs cacheing can keep a large number of vnodes active. That results in more active FUSE file handles, causing some FUSE servers to use extra resources. Disable nullfs cacheing for fusefs, just like we already do for NFSv4. PR: 245688 Reported by: MooseFS FreeBSD Team MFC after:2 weeks Modified: head/sys/fs/fuse/fuse_vfsops.c Modified: head/sys/fs/fuse/fuse_vfsops.c == --- head/sys/fs/fuse/fuse_vfsops.c Fri May 22 17:52:09 2020 (r361398) +++ head/sys/fs/fuse/fuse_vfsops.c Fri May 22 18:03:14 2020 (r361399) @@ -425,6 +425,11 @@ fuse_vfsop_mount(struct mount *mp) */ mp->mnt_flag &= ~MNT_LOCAL; mp->mnt_kern_flag |= MNTK_USES_BCACHE; + /* +* Disable nullfs cacheing because it can consume too many resources in +* the FUSE server. +*/ + mp->mnt_kern_flag |= MNTK_NULL_NOCACHE; MNT_IUNLOCK(mp); /* We need this here as this slot is used by getnewvnode() */ mp->mnt_stat.f_iosize = maxbcachebuf; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361398 - in head: lib/libc/gen libexec/rtld-elf sys/sys
Author: kib Date: Fri May 22 17:52:09 2020 New Revision: 361398 URL: https://svnweb.freebsd.org/changeset/base/361398 Log: Implement Solaris-like link_map l_refname member. The implementation is based on the public documentation, in particular dlinfo(3) from Solaris. Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/lib/libc/gen/dlinfo.3 head/libexec/rtld-elf/rtld.c head/sys/sys/link_elf.h Modified: head/lib/libc/gen/dlinfo.3 == --- head/lib/libc/gen/dlinfo.3 Fri May 22 17:45:07 2020(r361397) +++ head/lib/libc/gen/dlinfo.3 Fri May 22 17:52:09 2020(r361398) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 19, 2020 +.Dd May 21, 2020 .Dt DLINFO 3 .Os .Sh NAME @@ -111,6 +111,7 @@ const void *l_ld; /* Pointer to .dynamic in m struct link_map *l_next, /* linked list of mapped libs */ *l_prev; caddr_t l_addr; /* Load Offset of library */ +const char *l_refname; /* Object this one filters for */ .Ed .Bl -tag -width ".Va l_addr" .It Va l_base @@ -133,6 +134,11 @@ structure on the link-map list. The load offset of the object, that is, the difference between the actual load address and the base virtual address the object was linked at. +.It Va l_refname +A name of the object this object filters for, if any. +If there are more then one filtee, a name from the first +.Dv DT_FILTER +dynamic entry is supplied. .El .It Dv RTLD_DI_SERINFO Retrieve the library search paths associated with the given Modified: head/libexec/rtld-elf/rtld.c == --- head/libexec/rtld-elf/rtld.cFri May 22 17:45:07 2020 (r361397) +++ head/libexec/rtld-elf/rtld.cFri May 22 17:52:09 2020 (r361398) @@ -1207,6 +1207,9 @@ digest_dynamic1(Obj_Entry *obj, int early, const Elf_D *needed_filtees_tail = nep; needed_filtees_tail = &nep->next; + + if (obj->linkmap.l_refname == NULL) + obj->linkmap.l_refname = (char *)dynp->d_un.d_val; } break; @@ -1402,6 +1405,10 @@ digest_dynamic1(Obj_Entry *obj, int early, const Elf_D } obj->dynsymcount += obj->symndx_gnu; } + +if (obj->linkmap.l_refname != NULL) + obj->linkmap.l_refname = obj->strtab + (unsigned long)obj-> + linkmap.l_refname; } static bool Modified: head/sys/sys/link_elf.h == --- head/sys/sys/link_elf.h Fri May 22 17:45:07 2020(r361397) +++ head/sys/sys/link_elf.h Fri May 22 17:52:09 2020(r361398) @@ -65,6 +65,7 @@ typedef struct link_map { const void *l_ld; /* Pointer to .dynamic in memory */ struct link_map *l_next, *l_prev; /* linked list of of mapped libs */ caddr_t l_addr; /* Load Offset of library */ + const char *l_refname; /* object we are filtering for */ } Link_map; struct r_debug { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361397 - head/usr.sbin/certctl
Author: brooks Date: Fri May 22 17:45:07 2020 New Revision: 361397 URL: https://svnweb.freebsd.org/changeset/base/361397 Log: Add an unprivileged mode where calls to install are passed appropriate flags. For ease of integration, use the same flags as install: -U unprivileged mode -D Specify DESTDIR (overrides the environment) -M Full path to METALOG file Reviewed by: kevans Obtained from:CheriBSD Sponsored by: DARPA Differential Revision:https://reviews.freebsd.org/D24932 Modified: head/usr.sbin/certctl/certctl.8 head/usr.sbin/certctl/certctl.sh Modified: head/usr.sbin/certctl/certctl.8 == --- head/usr.sbin/certctl/certctl.8 Fri May 22 17:30:36 2020 (r361396) +++ head/usr.sbin/certctl/certctl.8 Fri May 22 17:45:07 2020 (r361397) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 19, 2019 +.Dd May 22, 2020 .Dt CERTCTL 8 .Os .Sh NAME @@ -40,7 +40,9 @@ .Op Fl v .Ic blacklisted .Nm -.Op Fl nv +.Op Fl nUv +.Op Fl D Ar destdir +.Op Fl M Ar metalog .Ic rehash .Nm .Op Fl nv @@ -56,10 +58,17 @@ applications that use OpenSSL. .Pp Flags: .Bl -tag -width 4n +.It Fl D Ar destdir +Specify the DESTDIR (overriding values from the environment). +.It Fl M Ar metalog +Specify the path of the METALOG file (default: $DESTDIR/METALOG). .It Fl n No-Op mode, do not actually perform any actions. .It Fl v be verbose, print details about actions before performing them. +.It Fl U +Unprivileged mode, do not change the ownership of created links. +Do record the ownership in the METALOG file. .El .Pp Primary command functions: Modified: head/usr.sbin/certctl/certctl.sh == --- head/usr.sbin/certctl/certctl.shFri May 22 17:30:36 2020 (r361396) +++ head/usr.sbin/certctl/certctl.shFri May 22 17:45:07 2020 (r361397) @@ -30,10 +30,6 @@ CONFIGURATION : ${DESTDIR:=} -: ${TRUSTPATH:=${DESTDIR}/usr/share/certs/trusted:${DESTDIR}/usr/local/share/certs:${DESTDIR}/usr/local/etc/ssl/certs} -: ${BLACKLISTPATH:=${DESTDIR}/usr/share/certs/blacklisted:${DESTDIR}/usr/local/etc/ssl/blacklisted} -: ${CERTDESTDIR:=${DESTDIR}/etc/ssl/certs} -: ${BLACKLISTDESTDIR:=${DESTDIR}/etc/ssl/blacklisted} : ${FILEPAT:="\.pem$|\.crt$|\.cer$|\.crl$|\.0$"} : ${VERBOSE:=0} @@ -42,6 +38,7 @@ SCRIPTNAME="${0##*/}" ERRORS=0 NOOP=0 +UNPRIV=0 FUNCTIONS @@ -69,7 +66,7 @@ create_trusted_link() return 1 fi [ $VERBOSE -gt 0 ] && echo "Adding $hash.0 to trust store" - [ $NOOP -eq 0 ] && install -lrs $(realpath "$1") "$CERTDESTDIR/$hash.0" + [ $NOOP -eq 0 ] && install ${INSTALLFLAGS} -lrs $(realpath "$1") "$CERTDESTDIR/$hash.0" } create_blacklisted() @@ -88,7 +85,7 @@ create_blacklisted() return fi [ $VERBOSE -gt 0 ] && echo "Adding $filename to blacklist" - [ $NOOP -eq 0 ] && install -lrs "$srcfile" "$BLACKLISTDESTDIR/$filename" + [ $NOOP -eq 0 ] && install ${INSTALLFLAGS} -lrs "$srcfile" "$BLACKLISTDESTDIR/$filename" } do_scan() @@ -105,7 +102,7 @@ do_scan() [ -d "$CPATH" ] || continue echo "Scanning $CPATH for certificates..." for CFILE in $(ls -1 "${CPATH}" | grep -Ee "${FILEPAT}"); do - [ -e "$CPATH/$CFILE" ] || continue + [ -e "$CPATH/$CFILE" && $UNPRIV -eq 0 ] || continue [ $VERBOSE -gt 0 ] && echo "Reading $CFILE" "$CFUNC" "$CPATH/$CFILE" done @@ -209,7 +206,7 @@ usage() echo " List trusted certificates" echo " $SCRIPTNAME [-v] blacklisted" echo " List blacklisted certificates" - echo " $SCRIPTNAME [-nv] rehash" + echo " $SCRIPTNAME [-nUv] [-D ] [-M ] rehash" echo " Generate hash links for all certificates" echo " $SCRIPTNAME [-nv] blacklist " echo " Add to the list of blacklisted certificates" @@ -220,13 +217,24 @@ usage() MAIN -while getopts nv flag; do +while getopts D:M:nUv flag; do case "$flag" in + D) DESTDIR=${OPTARG} ;; + M) METALOG=${OPTARG} ;; n) NOOP=1 ;; + U) UNPRIV=1 ;; v) VERBOSE=$(( $VERBOSE + 1 )) ;; esac done shift $(( $OPTIND - 1 )) + +: ${METALOG:=${DESTDIR}/METALOG} +INSTALLFLAGS= +[ $UNPRIV -eq 1 ] && INSTALLFLAGS=-U -M ${METALOG} -D ${DESTDIR} +: ${TRUSTPATH:=${DESTDIR}/usr/share/certs/trusted:${DESTDIR}/usr/local/share/certs:${DESTDIR}/usr/local/etc/ssl/certs} +: ${BLACKLISTPATH:=${DESTDIR}/usr/share/certs/blacklisted:${DESTDIR}/usr/local/etc/ssl/blacklisted} +: ${CE
svn commit: r361396 - releng/11.4/etc/ntp
Author: delphij Date: Fri May 22 17:30:36 2020 New Revision: 361396 URL: https://svnweb.freebsd.org/changeset/base/361396 Log: MFS r361354: MFC r361260: Update leap-seconds to leap-seconds.3676924800. Approved by: re (gjb) Modified: releng/11.4/etc/ntp/leap-seconds Directory Properties: releng/11.4/ (props changed) Modified: releng/11.4/etc/ntp/leap-seconds == --- releng/11.4/etc/ntp/leap-secondsFri May 22 17:23:43 2020 (r361395) +++ releng/11.4/etc/ntp/leap-secondsFri May 22 17:30:36 2020 (r361396) @@ -204,10 +204,10 @@ # current -- the update time stamp, the data and the name of the file # will not change. # -# Updated through IERS Bulletin C58 -# File expires on: 28 June 2020 +# Updated through IERS Bulletin C59 +# File expires on: 28 December 2020 # -#@ 3802291200 +#@ 3818102400 # 2272060800 10 # 1 Jan 1972 2287785600 11 # 1 Jul 1972 @@ -252,4 +252,4 @@ # the hash line is also ignored in the # computation. # -#h f28827d2 f263b6c3 ec0f19eb a3e0dbf0 97f3fa30 +#h a1c168ae 27c79a7d 9dddcfc3 bcfe616b 2e2c44ea ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361395 - head/sys/ufs/ffs
Author: jhb Date: Fri May 22 17:23:43 2020 New Revision: 361395 URL: https://svnweb.freebsd.org/changeset/base/361395 Log: Update name of description of vfs.ffs.setsize in comment. Previously it used the name 'adjsize' instead of 'setsize'. Modified: head/sys/ufs/ffs/ffs_alloc.c Modified: head/sys/ufs/ffs/ffs_alloc.c == --- head/sys/ufs/ffs/ffs_alloc.cFri May 22 17:23:09 2020 (r361394) +++ head/sys/ufs/ffs/ffs_alloc.cFri May 22 17:23:43 2020 (r361395) @@ -3065,7 +3065,7 @@ ffs_fserr(fs, inum, cp) * the count to zero will cause the inode to be freed. * adjblkcnt(inode, amt) - adjust the number of blocks used by the * inode by the specified amount. - * adjsize(inode, size) - set the size of the inode to the + * setsize(inode, size) - set the size of the inode to the * specified size. * adjndir, adjbfree, adjifree, adjffree, adjnumclusters(amt) - * adjust the superblock summary. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361394 - head/libexec/rtld-elf
Author: kib Date: Fri May 22 17:23:09 2020 New Revision: 361394 URL: https://svnweb.freebsd.org/changeset/base/361394 Log: Convert linkmap_add() and linkmap_delete() to style(8). Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/rtld.c == --- head/libexec/rtld-elf/rtld.cFri May 22 17:21:22 2020 (r361393) +++ head/libexec/rtld-elf/rtld.cFri May 22 17:23:09 2020 (r361394) @@ -4028,49 +4028,50 @@ rtld_dirname_abs(const char *path, char *base) static void linkmap_add(Obj_Entry *obj) { -struct link_map *l = &obj->linkmap; -struct link_map *prev; + struct link_map *l, *prev; -obj->linkmap.l_name = obj->path; -obj->linkmap.l_base = obj->mapbase; -obj->linkmap.l_ld = obj->dynamic; -obj->linkmap.l_addr = obj->relocbase; + l = &obj->linkmap; + l->l_name = obj->path; + l->l_base = obj->mapbase; + l->l_ld = obj->dynamic; + l->l_addr = obj->relocbase; -if (r_debug.r_map == NULL) { - r_debug.r_map = l; - return; -} + if (r_debug.r_map == NULL) { + r_debug.r_map = l; + return; + } -/* - * Scan to the end of the list, but not past the entry for the - * dynamic linker, which we want to keep at the very end. - */ -for (prev = r_debug.r_map; - prev->l_next != NULL && prev->l_next != &obj_rtld.linkmap; - prev = prev->l_next) - ; + /* +* Scan to the end of the list, but not past the entry for the +* dynamic linker, which we want to keep at the very end. +*/ + for (prev = r_debug.r_map; + prev->l_next != NULL && prev->l_next != &obj_rtld.linkmap; +prev = prev->l_next) + ; -/* Link in the new entry. */ -l->l_prev = prev; -l->l_next = prev->l_next; -if (l->l_next != NULL) - l->l_next->l_prev = l; -prev->l_next = l; + /* Link in the new entry. */ + l->l_prev = prev; + l->l_next = prev->l_next; + if (l->l_next != NULL) + l->l_next->l_prev = l; + prev->l_next = l; } static void linkmap_delete(Obj_Entry *obj) { -struct link_map *l = &obj->linkmap; + struct link_map *l; -if (l->l_prev == NULL) { - if ((r_debug.r_map = l->l_next) != NULL) - l->l_next->l_prev = NULL; - return; -} + l = &obj->linkmap; + if (l->l_prev == NULL) { + if ((r_debug.r_map = l->l_next) != NULL) + l->l_next->l_prev = NULL; + return; + } -if ((l->l_prev->l_next = l->l_next) != NULL) - l->l_next->l_prev = l->l_prev; + if ((l->l_prev->l_next = l->l_next) != NULL) + l->l_next->l_prev = l->l_prev; } /* ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361393 - head/sys/opencrypto
Author: jhb Date: Fri May 22 17:21:22 2020 New Revision: 361393 URL: https://svnweb.freebsd.org/changeset/base/361393 Log: Correct the minimum key length for Camellia to 16 bytes (128 bits). MFC after:1 week Modified: head/sys/opencrypto/cryptodev.h Modified: head/sys/opencrypto/cryptodev.h == --- head/sys/opencrypto/cryptodev.h Fri May 22 16:53:39 2020 (r361392) +++ head/sys/opencrypto/cryptodev.h Fri May 22 17:21:22 2020 (r361393) @@ -134,7 +134,7 @@ #defineAES_MAX_KEY RIJNDAEL_MAX_KEY #defineAES_XTS_MIN_KEY (2 * AES_MIN_KEY) #defineAES_XTS_MAX_KEY (2 * AES_MAX_KEY) -#defineCAMELLIA_MIN_KEY8 +#defineCAMELLIA_MIN_KEY16 #defineCAMELLIA_MAX_KEY32 /* Maximum hash algorithm result length */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361392 - head/secure/lib/libcrypto
Author: gordon Date: Fri May 22 16:53:39 2020 New Revision: 361392 URL: https://svnweb.freebsd.org/changeset/base/361392 Log: Remove support for SSLv3 from the OpenSSL build. This is the default configuration in OpenSSL 1.1.1 already. This moves to align with that default. Reported by: jmg Approved by: jkim, cem, emaste, philip Differential Revision:https://reviews.freebsd.org/D24945 Modified: head/secure/lib/libcrypto/opensslconf.h.in Modified: head/secure/lib/libcrypto/opensslconf.h.in == --- head/secure/lib/libcrypto/opensslconf.h.in Fri May 22 16:51:00 2020 (r361391) +++ head/secure/lib/libcrypto/opensslconf.h.in Fri May 22 16:53:39 2020 (r361392) @@ -76,6 +76,12 @@ extern "C" { #ifndef OPENSSL_NO_SSL_TRACE # define OPENSSL_NO_SSL_TRACE #endif +#ifndef OPENSSL_NO_SSL3 +# define OPENSSL_NO_SSL3 +#endif +#ifndef OPENSSL_NO_SSL3_METHOD +# define OPENSSL_NO_SSL3_METHOD +#endif #ifndef OPENSSL_NO_UBSAN # define OPENSSL_NO_UBSAN #endif ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361391 - in stable/12: cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/cmd/zpool cddl/contrib/opensolaris/cmd/ztest cddl/contrib/opensolaris/...
Author: avg Date: Fri May 22 16:51:00 2020 New Revision: 361391 URL: https://svnweb.freebsd.org/changeset/base/361391 Log: MFC r354941,r354948: 10601 10757 Pool allocation classes MFV r354382,r354385: 10601 10757 Pool allocation classes illumos/illumos-gate@663207adb1669640c01c5ec6949ce78fd806efae https://github.com/illumos/illumos-gate/commit/663207adb1669640c01c5ec6949ce78fd806efae 10601 Pool allocation classes https://www.illumos.org/issues/10601 illumos port of ZoL Pool allocation classes. Includes at least these two commits: 441709695 Pool allocation classes misplacing small file blocks cc99f275a Pool allocation classes 10757 Add -gLp to zpool subcommands for alt vdev names https://www.illumos.org/issues/10757 Port from ZoL of d2f3e292d Add -gLp to zpool subcommands for alt vdev names Note that a subsequent ZoL commit changed -p to -P a77f29f93 Change full path subcommand flag from -p to -P Portions contributed by: Jerry Jelinek Portions contributed by: Håkan Johansson Portions contributed by: Richard Yao Portions contributed by: Chunwei Chen Portions contributed by: loli10K Author: Don Brady 11541 allocation_classes feature must be enabled to add log device illumos/illumos-gate@c1064fd7ce62fe763a4475e9988ffea3b22137de https://github.com/illumos/illumos-gate/commit/c1064fd7ce62fe763a4475e9988ffea3b22137de https://www.illumos.org/issues/11541 After the allocation_classes feature was integrated, one can no longer add a log device to a pool unless that feature is enabled. There is an explicit check for this, but it is unnecessary in the case of log devices, so we should handle this better instead of forcing the feature to be enabled. Author: Jerry Jelinek FreeBSD notes. I faithfully added the new -g, -L, -P flags, but only -g does something: vdev GUIDs are displayed instead of device names. -L, resolve symlinks, and -P, display full disk paths, do nothing at the moment. The use of special vdevs is backward compatible for read-only access, so root pools should be bootable, but exercise caution. MFV r354383: 10592 misc. metaslab and vdev related ZoL bug fixes illumos/illumos-gate@555d674d5d4b8191dc83723188349d28278b2431 https://github.com/illumos/illumos-gate/commit/555d674d5d4b8191dc83723188349d28278b2431 https://www.illumos.org/issues/10592 This is a collection of recent fixes from ZoL: 8eef997679b Error path in metaslab_load_impl() forgets to drop ms_sync_lock 928e8ad47d3 Introduce auxiliary metaslab histograms 425d3237ee8 Get rid of space_map_update() for ms_synced_length 6c926f426a2 Simplify log vdev removal code 21e7cf5da89 zdb -L should skip leak detection altogether df72b8bebe0 Rename range_tree_verify to range_tree_verify_not_present 75058f33034 Remove unused vdev_t fields Modified: stable/12/cddl/contrib/opensolaris/cmd/zdb/zdb.8 stable/12/cddl/contrib/opensolaris/cmd/zdb/zdb.c stable/12/cddl/contrib/opensolaris/cmd/zfs/zfs.8 stable/12/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 stable/12/cddl/contrib/opensolaris/cmd/zpool/zpool.8 stable/12/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c stable/12/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c stable/12/cddl/contrib/opensolaris/cmd/ztest/ztest.c stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c stable/12/cddl/contrib/opensolaris/lib/libzpool/common/util.c stable/12/stand/libsa/zfs/zfsimpl.c stable/12/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c stable/12/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h stable/12/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/range_tree.c stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_checkpoint.c stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab.h stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab_impl.h stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/range_tree.h stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h stable/12/sys/cddl/contrib/op
svn commit: r361390 - in head: share/man/man7 sys/crypto/chacha20 sys/opencrypto
Author: jhb Date: Fri May 22 16:29:09 2020 New Revision: 361390 URL: https://svnweb.freebsd.org/changeset/base/361390 Log: Improve support for stream ciphers in the software encryption interface. Add a 'native_blocksize' member to 'struct enc_xform' that ciphers can use if they support a partial final block. This is particular useful for stream ciphers, but can also apply to other ciphers. cryptosoft will only pass in native blocks to the encrypt and decrypt hooks. For the final partial block, 'struct enc_xform' now has new encrypt_last/decrypt_last hooks which accept the length of the final block. The multi_block methods are also retired. Mark AES-ICM (AES-CTR) as a stream cipher. This has some interesting effects on IPsec in that FreeBSD can now properly receive all packets sent by Linux when using AES-CTR, but FreeBSD can no longer interoperate with OpenBSD and older verisons of FreeBSD which assume AES-CTR packets have a payload padded to a 16-byte boundary. Kornel has offered to work on a patch to add a compatiblity sysctl to enforce additional padding for AES-CTR in esp_output to permit compatibility with OpenBSD and older versions of FreeBSD. AES-XTS continues to use a block size of a single AES block length. It is possible to adjust it to support partial final blocks by implementing cipher text stealing via encrypt_last/decrypt_last hooks, but I have not done so. Reviewed by: cem (earlier version) Tested by:Kornel Dulęba (AES-CTR with IPsec) Sponsored by: Netflix Differential Revision:https://reviews.freebsd.org/D24906 Modified: head/share/man/man7/crypto.7 head/sys/crypto/chacha20/chacha-sw.c head/sys/opencrypto/cryptosoft.c head/sys/opencrypto/xform_aes_icm.c head/sys/opencrypto/xform_enc.h Modified: head/share/man/man7/crypto.7 == --- head/share/man/man7/crypto.7Fri May 22 16:22:01 2020 (r361389) +++ head/share/man/man7/crypto.7Fri May 22 16:29:09 2020 (r361390) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 3, 2020 +.Dd May 22, 2020 .Dt CRYPTO 7 .Os .Sh NAME @@ -82,7 +82,7 @@ Note: You must provide an IV on every call. .It IV size : 16 .It Block size : -1 (aesni), 16 (software) +1 .It Key size : 16, 24 or 32 .El Modified: head/sys/crypto/chacha20/chacha-sw.c == --- head/sys/crypto/chacha20/chacha-sw.cFri May 22 16:22:01 2020 (r361389) +++ head/sys/crypto/chacha20/chacha-sw.cFri May 22 16:29:09 2020 (r361390) @@ -28,11 +28,11 @@ static void chacha20_xform_crypt(void *ctx, const uint8_t *in, uint8_t *out) { - chacha_encrypt_bytes(ctx, in, out, 1); + chacha_encrypt_bytes(ctx, in, out, CHACHA_BLOCKLEN); } static void -chacha20_xform_crypt_multi(void *ctx, const uint8_t *in, uint8_t *out, +chacha20_xform_crypt_last(void *ctx, const uint8_t *in, uint8_t *out, size_t len) { @@ -44,6 +44,7 @@ struct enc_xform enc_xform_chacha20 = { .name = "chacha20", .ctxsize = sizeof(struct chacha_ctx), .blocksize = 1, + .native_blocksize = CHACHA_BLOCKLEN, .ivsize = CHACHA_NONCELEN + CHACHA_CTRLEN, .minkey = CHACHA_MINKEYLEN, .maxkey = 32, @@ -51,6 +52,6 @@ struct enc_xform enc_xform_chacha20 = { .decrypt = chacha20_xform_crypt, .setkey = chacha20_xform_setkey, .reinit = chacha20_xform_reinit, - .encrypt_multi = chacha20_xform_crypt_multi, - .decrypt_multi = chacha20_xform_crypt_multi, + .encrypt_last = chacha20_xform_crypt_last, + .decrypt_last = chacha20_xform_crypt_last, }; Modified: head/sys/opencrypto/cryptosoft.c == --- head/sys/opencrypto/cryptosoft.cFri May 22 16:22:01 2020 (r361389) +++ head/sys/opencrypto/cryptosoft.cFri May 22 16:29:09 2020 (r361390) @@ -117,13 +117,17 @@ swcr_encdec(struct swcr_session *ses, struct cryptop * sw = &ses->swcr_encdec; exf = sw->sw_exf; - blks = exf->blocksize; ivlen = exf->ivsize; - /* Check for non-padded data */ - if ((crp->crp_payload_length % blks) != 0) - return EINVAL; + if (exf->native_blocksize == 0) { + /* Check for non-padded data */ + if ((crp->crp_payload_length % exf->blocksize) != 0) + return (EINVAL); + blks = exf->blocksize; + } else + blks = exf->native_blocksize; + if (exf == &enc_xform_aes_icm && (crp->crp_flags & CRYPTO_F_IV_SEPARATE) == 0) return (EINVAL); @@ -182,7 +186,7 @@ swcr_encdec(struct swcr_session *ses, struct cryptop * i = crp->crp_payload_length; encrypting = CRYPTO_OP_IS_ENCRYPT(crp->crp_op);
svn commit: r361388 - vendor/llvm-project/llvmorg-10.0.1-rc1-0-gf79cd71e145
Author: dim Date: Fri May 22 16:13:03 2020 New Revision: 361388 URL: https://svnweb.freebsd.org/changeset/base/361388 Log: Tag llvm-project branch release/10.x llvmorg-10.0.1-rc1-0-gf79cd71e145. Added: vendor/llvm-project/llvmorg-10.0.1-rc1-0-gf79cd71e145/ - copied from r361387, vendor/llvm-project/release-10.x/ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r361275 - in head/sys: conf dev/hyperv/hvsock dev/hyperv/include dev/hyperv/vmbus modules/hyperv modules/hyperv/hvsock sys
On Wed, May 20, 2020 at 6:04 AM Wei Hu wrote: > > Author: whu > Date: Wed May 20 11:03:59 2020 > New Revision: 361275 > URL: https://svnweb.freebsd.org/changeset/base/361275 > > Log: > HyperV socket implementation for FreeBSD > > This change adds Hyper-V socket feature in FreeBSD. New socket address > family AF_HYPERV and its kernel support are added. > > [... snip ...] > +void > +hvs_trans_init(void) > +{ > + /* Skip initialization of globals for non-default instances. */ > + if (!IS_DEFAULT_VNET(curvnet)) > + return; > + > + if (vm_guest != VM_GUEST_HV) > + return; > + > + HVSOCK_DBG(HVSOCK_DBG_VERBOSE, > + "%s: HyperV Socket hvs_trans_init called\n", __func__); > + > + /* Initialize Globals */ > + previous_auto_bound_port = MAX_PORT; > + sx_init(&hvs_trans_socks_sx, "hvs_trans_sock_sx"); > + mtx_init(&hvs_trans_socks_mtx, > + "hvs_trans_socks_mtx", NULL, MTX_DEF); > + LIST_INIT(&hvs_trans_bound_socks); > + LIST_INIT(&hvs_trans_connected_socks); > +} > + I have a suspicion that all of these should really be per-vnet for correct semantics with VIMAGE, with the IS_DEFAULT_VNET check earlier dropped completely. I haven't read around the rest all that much, but this would at least seem to prevent port re-use by a different vnet, which is perhaps "good enough" but I think this is something that should be fixed in the mid-term. Thanks, Kyle Evans ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361387 - in vendor/llvm-project/release-10.x: clang/include/clang/AST clang/include/clang/Basic clang/lib/AST clang/lib/CodeGen clang/lib/Driver/ToolChains clang/lib/Format clang/lib/S...
Author: dim Date: Fri May 22 16:12:18 2020 New Revision: 361387 URL: https://svnweb.freebsd.org/changeset/base/361387 Log: Vendor import of llvm-project branch release/10.x llvmorg-10.0.1-rc1-0-gf79cd71e145. Modified: vendor/llvm-project/release-10.x/clang/include/clang/AST/DeclBase.h vendor/llvm-project/release-10.x/clang/include/clang/Basic/Attr.td vendor/llvm-project/release-10.x/clang/lib/AST/DeclBase.cpp vendor/llvm-project/release-10.x/clang/lib/AST/ExprConstant.cpp vendor/llvm-project/release-10.x/clang/lib/AST/RawCommentList.cpp vendor/llvm-project/release-10.x/clang/lib/CodeGen/CGVTables.cpp vendor/llvm-project/release-10.x/clang/lib/CodeGen/CodeGenModule.cpp vendor/llvm-project/release-10.x/clang/lib/Driver/ToolChains/Darwin.cpp vendor/llvm-project/release-10.x/clang/lib/Driver/ToolChains/Gnu.cpp vendor/llvm-project/release-10.x/clang/lib/Driver/ToolChains/Gnu.h vendor/llvm-project/release-10.x/clang/lib/Driver/ToolChains/Hurd.cpp vendor/llvm-project/release-10.x/clang/lib/Driver/ToolChains/Hurd.h vendor/llvm-project/release-10.x/clang/lib/Driver/ToolChains/Linux.cpp vendor/llvm-project/release-10.x/clang/lib/Driver/ToolChains/Linux.h vendor/llvm-project/release-10.x/clang/lib/Format/TokenAnnotator.cpp vendor/llvm-project/release-10.x/clang/lib/Sema/SemaTemplateInstantiate.cpp vendor/llvm-project/release-10.x/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp vendor/llvm-project/release-10.x/clang/lib/Sema/TreeTransform.h vendor/llvm-project/release-10.x/compiler-rt/lib/profile/GCDAProfiling.c vendor/llvm-project/release-10.x/lld/COFF/MarkLive.cpp vendor/llvm-project/release-10.x/lld/ELF/Driver.cpp vendor/llvm-project/release-10.x/lld/ELF/InputSection.cpp vendor/llvm-project/release-10.x/lld/ELF/InputSection.h vendor/llvm-project/release-10.x/lld/ELF/OutputSections.cpp vendor/llvm-project/release-10.x/lld/ELF/Writer.cpp vendor/llvm-project/release-10.x/llvm/include/llvm/Analysis/ValueLattice.h vendor/llvm-project/release-10.x/llvm/include/llvm/DebugInfo/CodeView/GlobalTypeTableBuilder.h vendor/llvm-project/release-10.x/llvm/lib/Analysis/LazyValueInfo.cpp vendor/llvm-project/release-10.x/llvm/lib/Analysis/ValueLattice.cpp vendor/llvm-project/release-10.x/llvm/lib/CodeGen/MachineSink.cpp vendor/llvm-project/release-10.x/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp vendor/llvm-project/release-10.x/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp vendor/llvm-project/release-10.x/llvm/lib/DebugInfo/CodeView/MergingTypeTableBuilder.cpp vendor/llvm-project/release-10.x/llvm/lib/DebugInfo/CodeView/TypeStreamMerger.cpp vendor/llvm-project/release-10.x/llvm/lib/DebugInfo/PDB/Native/TpiStreamBuilder.cpp vendor/llvm-project/release-10.x/llvm/lib/MC/MCObjectFileInfo.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/ARM/ARMISelLowering.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/BPF/BPFMISimplifyPatchable.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/PowerPC/PPCISelLowering.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/X86/X86ISelLowering.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/X86/X86IndirectBranchTracking.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/X86/X86TargetMachine.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/X86/X86TargetMachine.h vendor/llvm-project/release-10.x/llvm/lib/Transforms/Coroutines/CoroSplit.cpp vendor/llvm-project/release-10.x/llvm/lib/Transforms/IPO/GlobalOpt.cpp vendor/llvm-project/release-10.x/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp vendor/llvm-project/release-10.x/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp vendor/llvm-project/release-10.x/llvm/tools/llvm-objcopy/ELF/Object.cpp vendor/llvm-project/release-10.x/llvm/tools/llvm-objcopy/llvm-objcopy.cpp Modified: vendor/llvm-project/release-10.x/clang/include/clang/AST/DeclBase.h == --- vendor/llvm-project/release-10.x/clang/include/clang/AST/DeclBase.h Fri May 22 15:42:45 2020(r361386) +++ vendor/llvm-project/release-10.x/clang/include/clang/AST/DeclBase.h Fri May 22 16:12:18 2020(r361387) @@ -856,14 +856,15 @@ class alignas(8) Decl { (public) return getParentFunctionOrMethod() == nullptr; } - /// Returns true if this declaration lexically is inside a function. - /// It recognizes non-defining declarations as well as members of local - /// classes: + /// Returns true if this declaration is lexically inside a function or inside + /// a variable initializer. It recognizes non-defining declarations as well + /// as members of local classes: /// \code /// void foo() { void bar(); } /// void foo2() { class ABC { void bar(); }; } + /// inline int x = [](){ return 0; }; /// \endcode - bool isLexicallyWithinFunctionOrMethod() const; + bool isInLocalSco
Re: svn commit: r361334 - in stable/12/sys: amd64/amd64 arm64/arm64 dev/acpica i386/i386 x86/acpica
On 5/21/20 3:45 PM, Herbert J. Skuhra wrote: > > Until now it was possible to build a kernel (amd64) without 'device > acpi'. After this commit it fails with this error: > > --- kernel.full --- > linking kernel.full > ld: error: undefined symbol: acpi_pxm_set_cpu_locality referenced by mp_machdep.c:269 (/usr/src/sys/amd64/amd64/mp_machdep.c:269) mp_machdep.o:(cpu_mp_start) > *** [kernel.full] Error code 1 > > Was that intended? I know Mark has already fixed this, but can you elaborate on your use case for not compiling ACPI support into the kernel? -- John Baldwin ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r361352 - in head/sys: amd64/amd64 i386/i386
On 5/22/20 8:37 AM, Mark Johnston wrote: > On Fri, May 22, 2020 at 06:10:59PM +0300, Konstantin Belousov wrote: >> On Fri, May 22, 2020 at 01:18:55AM +, Mark Johnston wrote: >>> Author: markj >>> Date: Fri May 22 01:18:55 2020 >>> New Revision: 361352 >>> URL: https://svnweb.freebsd.org/changeset/base/361352 >>> >>> Log: >>> Fix the build after r361033 when ACPI is disabled. >> What is the sense in doing this for amd64 ? I doubt that we can boot >> with ACPI disabled. > > It is possible to boot in virtualized environments without ACPI. I'm > not sure why it is especially useful, but I wanted to avoid regressing a > stable branch since at least one person noticed the breakage fairly > quickly, and it is easy to fix. I agree it mostly seems dubious. I believe at one point that NetApp at least was using FreeBSD/amd64 on gear that didn't have a "real" BIOS and didn't have ACPI. That was probably 10 years ago though when I last heard that, so it may no longer be true. That said, even the !ACPI code we have now is a runtime check so it should still fallback if ACPI isn't detected at runtime or is disabled via a hint. I'm not sure how much we should go out of our way to permit compiling without ACPI. On any modern consumer hardware you are going to want ACPI. -- John Baldwin ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r361360 - head/sys/dev/hyperv/hvsock
On Fri, May 22, 2020 at 4:17 AM Wei Hu wrote: > > Author: whu > Date: Fri May 22 09:17:07 2020 > New Revision: 361360 > URL: https://svnweb.freebsd.org/changeset/base/361360 > > Log: > Socket AF_HYPERV should return failure when it is not running on HyperV > > [... snip ...] > @@ -354,6 +354,9 @@ hvs_trans_attach(struct socket *so, int proto, struct > { > struct hvs_pcb *pcb = so2hvspcb(so); > > + if (vm_guest != VM_GUEST_HV) > + return (ESOCKTNOSUPPORT); > + > HVSOCK_DBG(HVSOCK_DBG_VERBOSE, > "%s: HyperV Socket hvs_trans_attach called\n", __func__); > This one may be OK, but none of these other methods should be able to be invoked if the attach failed. See this comment at around ^/sys/kern/uipc_socket.c#50: 50 * pru_detach() disassociates protocol layer state from an attached socket, 51 * and will be called exactly once for sockets in which pru_attach() has 52 * been successfully called. If pru_attach() returned an error, 53 * pru_detach() will not be called. Socket layer private. That said, I wonder if VNET_DOMAIN_SET provides the correct semantics here at all. You can't fail domain_init, but I don't think there's any value in this domain actually getting registered on non-HyperV guests, a fact which presumably won't change at runtime. I have some concerns about how hvsock works out with vnets, but I'll drop those on the initial commit thread. Thanks, Kyle Evans ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361386 - in stable/12/sys: amd64/amd64 i386/i386
Author: markj Date: Fri May 22 15:42:45 2020 New Revision: 361386 URL: https://svnweb.freebsd.org/changeset/base/361386 Log: MFC r361352: Fix the build after r361033 when ACPI is disabled. Modified: stable/12/sys/amd64/amd64/mp_machdep.c stable/12/sys/i386/i386/mp_machdep.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/amd64/mp_machdep.c == --- stable/12/sys/amd64/amd64/mp_machdep.c Fri May 22 15:30:14 2020 (r361385) +++ stable/12/sys/amd64/amd64/mp_machdep.c Fri May 22 15:42:45 2020 (r361386) @@ -29,6 +29,7 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_acpi.h" #include "opt_cpu.h" #include "opt_ddb.h" #include "opt_kstack_pages.h" @@ -78,8 +79,10 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef DEV_ACPI #include #include +#endif #define WARMBOOT_TARGET0 #define WARMBOOT_OFF (KERNBASE + 0x0467) @@ -266,7 +269,9 @@ cpu_mp_start(void) set_interrupt_apic_ids(); +#if defined(DEV_ACPI) && MAXMEMDOM > 1 acpi_pxm_set_cpu_locality(); +#endif } /* Modified: stable/12/sys/i386/i386/mp_machdep.c == --- stable/12/sys/i386/i386/mp_machdep.cFri May 22 15:30:14 2020 (r361385) +++ stable/12/sys/i386/i386/mp_machdep.cFri May 22 15:42:45 2020 (r361386) @@ -28,6 +28,7 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_acpi.h" #include "opt_apic.h" #include "opt_cpu.h" #include "opt_kstack_pages.h" @@ -83,8 +84,10 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef DEV_ACPI #include #include +#endif #define WARMBOOT_TARGET0 #define WARMBOOT_OFF (PMAP_MAP_LOW + 0x0467) @@ -203,7 +206,7 @@ cpu_mp_start(void) set_interrupt_apic_ids(); -#if MAXMEMDOM > 1 +#if defined(DEV_ACPI) && MAXMEMDOM > 1 acpi_pxm_set_cpu_locality(); #endif } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r361352 - in head/sys: amd64/amd64 i386/i386
On Fri, May 22, 2020 at 06:10:59PM +0300, Konstantin Belousov wrote: > On Fri, May 22, 2020 at 01:18:55AM +, Mark Johnston wrote: > > Author: markj > > Date: Fri May 22 01:18:55 2020 > > New Revision: 361352 > > URL: https://svnweb.freebsd.org/changeset/base/361352 > > > > Log: > > Fix the build after r361033 when ACPI is disabled. > What is the sense in doing this for amd64 ? I doubt that we can boot > with ACPI disabled. It is possible to boot in virtualized environments without ACPI. I'm not sure why it is especially useful, but I wanted to avoid regressing a stable branch since at least one person noticed the breakage fairly quickly, and it is easy to fix. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361385 - head/contrib/tzcode/stdtime
Author: cem Date: Fri May 22 15:30:14 2020 New Revision: 361385 URL: https://svnweb.freebsd.org/changeset/base/361385 Log: ctime.3: Use ASCII asterisks for C, not special unicode math glyphs PR: 246656 Reported by: danfe Modified: head/contrib/tzcode/stdtime/ctime.3 Modified: head/contrib/tzcode/stdtime/ctime.3 == --- head/contrib/tzcode/stdtime/ctime.3 Fri May 22 14:46:23 2020 (r361384) +++ head/contrib/tzcode/stdtime/ctime.3 Fri May 22 15:30:14 2020 (r361385) @@ -30,7 +30,7 @@ .\" From: @(#)ctime.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd January 2, 1999 +.Dd May 22, 2020 .Dt CTIME 3 .Os .Sh NAME @@ -266,17 +266,17 @@ External declarations as well as the tm structure defi include file. The tm structure includes at least the following fields: .Bd -literal -offset indent -int tm_sec;/\(** seconds (0 - 60) \(**/ -int tm_min;/\(** minutes (0 - 59) \(**/ -int tm_hour; /\(** hours (0 - 23) \(**/ -int tm_mday; /\(** day of month (1 - 31) \(**/ -int tm_mon;/\(** month of year (0 - 11) \(**/ -int tm_year; /\(** year \- 1900 \(**/ -int tm_wday; /\(** day of week (Sunday = 0) \(**/ -int tm_yday; /\(** day of year (0 - 365) \(**/ -int tm_isdst; /\(** is summer time in effect? \(**/ -char \(**tm_zone; /\(** abbreviation of timezone name \(**/ -long tm_gmtoff;/\(** offset from UTC in seconds \(**/ +int tm_sec;/* seconds (0 - 60) */ +int tm_min;/* minutes (0 - 59) */ +int tm_hour; /* hours (0 - 23) */ +int tm_mday; /* day of month (1 - 31) */ +int tm_mon;/* month of year (0 - 11) */ +int tm_year; /* year \- 1900 */ +int tm_wday; /* day of week (Sunday = 0) */ +int tm_yday; /* day of year (0 - 365) */ +int tm_isdst; /* is summer time in effect? */ +char *tm_zone; /* abbreviation of timezone name */ +long tm_gmtoff;/* offset from UTC in seconds */ .Ed .Pp The ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r361363 - in head/lib/libprocstat: . zfs
On 22/05/2020 18:23, Andriy Gapon wrote: > On 22/05/2020 18:15, Conrad Meyer wrote: >> Hi Andriy, >> >> Would it make sense to also export sizes of those members? Currently >> the code assumes the members may be relocated in the struct, but never >> changed in size. If they can be moved around, maybe they might be >> enlarged or shrunk at some time too? Maybe not; I am not very >> familiar with ZFS. > I think that's less likely to happen. I mean, moving around may be as simple > as > adding a new field in the middle of the struct and people typically don't give > much thought to such changes. Changing a member's type is more likely to > prompt > a check of possible uses. > But less likely does not equal will never happen, of course. > So, I think that this is a good suggestion. > OTOH, z_id and z_size probably won't grow larger than 64-bit soon. Size of mode_t has been pretty stable over the years as well. So, this is not a priority for now. -- Andriy Gapon ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r361363 - in head/lib/libprocstat: . zfs
On 22/05/2020 18:15, Conrad Meyer wrote: > Hi Andriy, > > Would it make sense to also export sizes of those members? Currently > the code assumes the members may be relocated in the struct, but never > changed in size. If they can be moved around, maybe they might be > enlarged or shrunk at some time too? Maybe not; I am not very > familiar with ZFS. I think that's less likely to happen. I mean, moving around may be as simple as adding a new field in the middle of the struct and people typically don't give much thought to such changes. Changing a member's type is more likely to prompt a check of possible uses. But less likely does not equal will never happen, of course. So, I think that this is a good suggestion. > On Fri, May 22, 2020 at 4:20 AM Andriy Gapon wrote: >> >> Author: avg >> Date: Fri May 22 11:20:23 2020 >> New Revision: 361363 >> URL: https://svnweb.freebsd.org/changeset/base/361363 >> >> Log: >> libprocstat: fix ZFS support >> >> First of all, znode_phys_t hasn't been used for storing file attributes >> for a long time now. Modern ZFS versions use a System Attribute table >> with a flexible layout. But more importantly all the required >> information is available in znode_t itself. >> >> It's not easy to include zfs_znode.h in userland without breaking code >> because the most interesting parts of the header are kernel-only. And >> hardcoding field offsets is too fragile. So, I created a new >> compilation unit that includes zfs_znode.h using some mild kludges to >> get it and its dependencies to compile in userland. The compilation >> unit exports interesting field offsets and does not have any other code. >> >> PR: 194117 >> Reviewed by: markj >> MFC after:2 weeks >> Sponsored by: Panzura -- Andriy Gapon ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r361363 - in head/lib/libprocstat: . zfs
Hi Andriy, Would it make sense to also export sizes of those members? Currently the code assumes the members may be relocated in the struct, but never changed in size. If they can be moved around, maybe they might be enlarged or shrunk at some time too? Maybe not; I am not very familiar with ZFS. Best, Conrad On Fri, May 22, 2020 at 4:20 AM Andriy Gapon wrote: > > Author: avg > Date: Fri May 22 11:20:23 2020 > New Revision: 361363 > URL: https://svnweb.freebsd.org/changeset/base/361363 > > Log: > libprocstat: fix ZFS support > > First of all, znode_phys_t hasn't been used for storing file attributes > for a long time now. Modern ZFS versions use a System Attribute table > with a flexible layout. But more importantly all the required > information is available in znode_t itself. > > It's not easy to include zfs_znode.h in userland without breaking code > because the most interesting parts of the header are kernel-only. And > hardcoding field offsets is too fragile. So, I created a new > compilation unit that includes zfs_znode.h using some mild kludges to > get it and its dependencies to compile in userland. The compilation > unit exports interesting field offsets and does not have any other code. > > PR: 194117 > Reviewed by: markj > MFC after:2 weeks > Sponsored by: Panzura > Differential Revision: https://reviews.freebsd.org/D24941 > > Added: > head/lib/libprocstat/zfs_defs.c (contents, props changed) > head/lib/libprocstat/zfs_defs.h (contents, props changed) > Modified: > head/lib/libprocstat/Makefile > head/lib/libprocstat/zfs.c > head/lib/libprocstat/zfs/Makefile > > Modified: head/lib/libprocstat/Makefile > == > --- head/lib/libprocstat/Makefile Fri May 22 10:50:29 2020 > (r361362) > +++ head/lib/libprocstat/Makefile Fri May 22 11:20:23 2020 > (r361363) > @@ -57,16 +57,17 @@ MLINKS+=libprocstat.3 procstat_close.3 \ > # XXX This is a hack. > .if ${MK_CDDL} != "no" > CFLAGS+= -DLIBPROCSTAT_ZFS > -OBJS+= zfs/zfs.o > -SOBJS+=zfs/zfs.pico > -POBJS+=zfs/zfs.po > +SRCS+= zfs.c > +OBJS+= zfs/zfs_defs.o > +SOBJS+=zfs/zfs_defs.pico > +POBJS+=zfs/zfs_defs.po > SUBDIR=zfs > -zfs/zfs.o: .PHONY > - @cd ${.CURDIR}/zfs && ${MAKE} zfs.o > -zfs/zfs.pico: .PHONY > - @cd ${.CURDIR}/zfs && ${MAKE} zfs.pico > -zfs/zfs.po: .PHONY > - @cd ${.CURDIR}/zfs && ${MAKE} zfs.po > +zfs/zfs_defs.o: .PHONY > + @cd ${.CURDIR}/zfs && ${MAKE} zfs_defs.o > +zfs/zfs_defs.pico: .PHONY > + @cd ${.CURDIR}/zfs && ${MAKE} zfs_defs.pico > +zfs/zfs_defs.po: .PHONY > + @cd ${.CURDIR}/zfs && ${MAKE} zfs_defs.po > .endif > > .include > > Modified: head/lib/libprocstat/zfs.c > == > --- head/lib/libprocstat/zfs.c Fri May 22 10:50:29 2020(r361362) > +++ head/lib/libprocstat/zfs.c Fri May 22 11:20:23 2020(r361363) > @@ -31,22 +31,13 @@ > #include > #define _KERNEL > #include > -#include > #undef _KERNEL > +#include > +#include > #include > +#include > +#include > > -#undef lbolt > -#undef lbolt64 > -#undef gethrestime_sec > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > - > #include > > #include > @@ -57,24 +48,15 @@ > #define ZFS > #include "libprocstat.h" > #include "common_kvm.h" > +#include "zfs_defs.h" > > -/* > - * Offset calculations that are used to get data from znode without having > the > - * definition. > - */ > -#define LOCATION_ZID (2 * sizeof(void *)) > -#define LOCATION_ZPHYS(zsize) ((zsize) - (2 * sizeof(void *) + sizeof(struct > task))) > - > int > zfs_filestat(kvm_t *kd, struct vnode *vp, struct vnstat *vn) > { > > - znode_phys_t zphys; > struct mount mount, *mountptr; > - uint64_t *zid; > - void *znodeptr, *vnodeptr; > + void *znodeptr; > char *dataptr; > - void *zphys_addr; > size_t len; > int size; > > @@ -83,33 +65,27 @@ zfs_filestat(kvm_t *kd, struct vnode *vp, struct vnsta > warnx("error getting sysctl"); > return (1); > } > - znodeptr = malloc(size); > - if (znodeptr == NULL) { > + dataptr = malloc(size); > + if (dataptr == NULL) { > warnx("error allocating memory for znode storage"); > return (1); > } > - /* Since we have problems including vnode.h, we'll use the wrappers. > */ > - vnodeptr = getvnodedata(vp); > - if (!kvm_read_all(kd, (unsigned long)vnodeptr, znodeptr, > - (size_t)size)) { > - warnx("can't read znode at %p", (void *)vnodeptr); > + > + if ((size_t)size < offsetof_z_id + sizeof(uint64_t) || > + (size_t)size < offsetof_z_mode + sizeof(mode_t) || > +
Re: svn commit: r361352 - in head/sys: amd64/amd64 i386/i386
On Fri, May 22, 2020 at 01:18:55AM +, Mark Johnston wrote: > Author: markj > Date: Fri May 22 01:18:55 2020 > New Revision: 361352 > URL: https://svnweb.freebsd.org/changeset/base/361352 > > Log: > Fix the build after r361033 when ACPI is disabled. What is the sense in doing this for amd64 ? I doubt that we can boot with ACPI disabled. > > Reported by:Herbert J. Skuhra > > Modified: > head/sys/amd64/amd64/mp_machdep.c > head/sys/i386/i386/mp_machdep.c > > Modified: head/sys/amd64/amd64/mp_machdep.c > == > --- head/sys/amd64/amd64/mp_machdep.c Fri May 22 00:00:55 2020 > (r361351) > +++ head/sys/amd64/amd64/mp_machdep.c Fri May 22 01:18:55 2020 > (r361352) > @@ -29,6 +29,7 @@ > #include > __FBSDID("$FreeBSD$"); > > +#include "opt_acpi.h" > #include "opt_cpu.h" > #include "opt_ddb.h" > #include "opt_kstack_pages.h" > @@ -78,8 +79,10 @@ __FBSDID("$FreeBSD$"); > #include > #include > > +#ifdef DEV_ACPI > #include > #include > +#endif > > #define WARMBOOT_TARGET 0 > #define WARMBOOT_OFF (KERNBASE + 0x0467) > @@ -265,7 +268,9 @@ cpu_mp_start(void) > > set_interrupt_apic_ids(); > > +#if defined(DEV_ACPI) && MAXMEMDOM > 1 > acpi_pxm_set_cpu_locality(); > +#endif > } > > /* > > Modified: head/sys/i386/i386/mp_machdep.c > == > --- head/sys/i386/i386/mp_machdep.c Fri May 22 00:00:55 2020 > (r361351) > +++ head/sys/i386/i386/mp_machdep.c Fri May 22 01:18:55 2020 > (r361352) > @@ -28,6 +28,7 @@ > #include > __FBSDID("$FreeBSD$"); > > +#include "opt_acpi.h" > #include "opt_apic.h" > #include "opt_cpu.h" > #include "opt_kstack_pages.h" > @@ -83,8 +84,10 @@ __FBSDID("$FreeBSD$"); > #include > #include > > +#ifdef DEV_ACPI > #include > #include > +#endif > > #define WARMBOOT_TARGET 0 > #define WARMBOOT_OFF (PMAP_MAP_LOW + 0x0467) > @@ -202,7 +205,7 @@ cpu_mp_start(void) > > set_interrupt_apic_ids(); > > -#if MAXMEMDOM > 1 > +#if defined(DEV_ACPI) && MAXMEMDOM > 1 > acpi_pxm_set_cpu_locality(); > #endif > } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361384 - head/bin/sh
Author: jilles Date: Fri May 22 14:46:23 2020 New Revision: 361384 URL: https://svnweb.freebsd.org/changeset/base/361384 Log: sh: Remove a comment that was obsoleted by r358152 Since r358152, the read builtin has used a buffer. Also, remove a space at the end of the line in a comment. No functional change is intended. Modified: head/bin/sh/miscbltin.c Modified: head/bin/sh/miscbltin.c == --- head/bin/sh/miscbltin.c Fri May 22 13:27:02 2020(r361383) +++ head/bin/sh/miscbltin.c Fri May 22 14:46:23 2020(r361384) @@ -124,7 +124,7 @@ fdctx_destroy(struct fdctx *fdc) * Reposition the file offset. Here is the layout of buf: * * | off -* v +* v * |*|---| * buf ep buf+buflen * |<- residue ->| @@ -142,8 +142,6 @@ fdctx_destroy(struct fdctx *fdc) /* * The read builtin. The -r option causes backslashes to be treated like * ordinary characters. - * - * This uses unbuffered input, which may be avoidable in some cases. * * Note that if IFS=' :' then read x y should work so that: * 'a b' x='a', y='b' ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361383 - in stable/12: cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/zhack cddl/contrib/opensolaris/cmd/zpool cddl/contrib/opensolaris/cmd/ztest cddl/contrib/opensolari...
Author: avg Date: Fri May 22 13:27:02 2020 New Revision: 361383 URL: https://svnweb.freebsd.org/changeset/base/361383 Log: MFC r354804,r354806,r354807,r354885: 10499 Multi-modifier protection (MMP) MFV r354378,r354379,r354386: 10499 Multi-modifier protection (MMP) 10499 Multi-modifier protection (MMP) illumos/illumos-gate@e0f1c0afa46cc84d4b1e40124032a9a87310386e https://github.com/illumos/illumos-gate/commit/e0f1c0afa46cc84d4b1e40124032a9a87310386e https://www.illumos.org/issues/10499 Port the following ZFS commits from ZoL to illumos. 379ca9cf2 Multi-modifier protection (MMP) bbffb59ef Fix multihost stale cache file import 0d398b256 Do not initiate MMP writes while pool is suspended 10701 Correct lock ASSERTs in vdev_label_read/write illumos/illumos-gate@58447f688d5e308373ab16a3b129bc0ba0fbc154 https://github.com/illumos/illumos-gate/commit/58447f688d5e308373ab16a3b129bc0ba0fbc154 https://www.illumos.org/issues/10701 Port of ZoL commit: 0091d66f4e Correct lock ASSERTs in vdev_label_read/write At a minimum, this fixes a blown assert during an MMP test run when running on a DEBUG build. 11770 additional mmp fixes illumos/illumos-gate@4348eb901228d2f8fa50bb132a34248e8662074e https://github.com/illumos/illumos-gate/commit/4348eb901228d2f8fa50bb132a34248e8662074e https://www.illumos.org/issues/11770 Port a few additional MMP fixes from ZoL that came in after our initial MMP port. 4ca457b065 ZTS: Fix mmp_interval failure ca95f70dff zpool import progress kstat (only minimal changes from above can be pulled in right now) 060f0226e6 MMP interval and fail_intervals in uberblock Note from the committer (me). I do not have any use for this feature and I have not tested it. I only did smoke testing with multihost=off. Please be aware. I merged the code only to make future merges easier. Since r354804 libzpool depends on libzfs for get_system_hostid symbol. Except for zstreamdump, all binaries linked with libzpool were already linked with libzfs. So, zstreamdump is the only fall-out. Added: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/mmp.c - copied unchanged from r354804, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/mmp.c stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/mmp.h - copied unchanged from r354804, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/mmp.h Modified: stable/12/cddl/contrib/opensolaris/cmd/zdb/zdb.c stable/12/cddl/contrib/opensolaris/cmd/zhack/zhack.c stable/12/cddl/contrib/opensolaris/cmd/zpool/zpool.8 stable/12/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c stable/12/cddl/contrib/opensolaris/cmd/ztest/ztest.c stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_status.c stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c stable/12/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c stable/12/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h stable/12/cddl/lib/libzpool/Makefile stable/12/cddl/usr.bin/zstreamdump/Makefile stable/12/cddl/usr.bin/ztest/Makefile stable/12/sys/cddl/contrib/opensolaris/common/zfs/zfs_comutil.h stable/12/sys/cddl/contrib/opensolaris/common/zfs/zpool_prop.c stable/12/sys/cddl/contrib/opensolaris/uts/common/Makefile.files stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/uberblock.h stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/uberblock_impl.h stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/uberblock.c stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c stable/12/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h stable/12/sys/conf
svn commit: r361382 - in stable/11: include lib/libc/gen libexec/rtld-elf
Author: kib Date: Fri May 22 13:18:43 2020 New Revision: 361382 URL: https://svnweb.freebsd.org/changeset/base/361382 Log: MFC r361073: Implement RTLD_DEEPBIND. PR: 246462 Modified: stable/11/include/dlfcn.h stable/11/lib/libc/gen/dlopen.3 stable/11/libexec/rtld-elf/rtld.c stable/11/libexec/rtld-elf/rtld.h Directory Properties: stable/11/ (props changed) Modified: stable/11/include/dlfcn.h == --- stable/11/include/dlfcn.h Fri May 22 13:17:57 2020(r361381) +++ stable/11/include/dlfcn.h Fri May 22 13:18:43 2020(r361382) @@ -45,6 +45,8 @@ #defineRTLD_TRACE 0x200 /* Trace loaded objects and exit. */ #defineRTLD_NODELETE 0x01000 /* Do not remove members. */ #defineRTLD_NOLOAD 0x02000 /* Do not load if not already loaded. */ +#defineRTLD_DEEPBIND 0x04000 /* Put symbols from the dso ahead of + the global list */ /* * Request arguments for dlinfo(). Modified: stable/11/lib/libc/gen/dlopen.3 == --- stable/11/lib/libc/gen/dlopen.3 Fri May 22 13:17:57 2020 (r361381) +++ stable/11/lib/libc/gen/dlopen.3 Fri May 22 13:18:43 2020 (r361382) @@ -32,7 +32,7 @@ .\" @(#) dlopen.3 1.6 90/01/31 SMI .\" $FreeBSD$ .\" -.Dd January 2, 2019 +.Dd May 14, 2020 .Dt DLOPEN 3 .Os .Sh NAME @@ -162,6 +162,9 @@ the process address space, otherwise is returned. Other mode flags may be specified, which will be applied for promotion for the found object. +.It Dv RTLD_DEEPBIND +Symbols from the loaded library are put before global symbols when +resolving symbolic references originated from the library. .El .Pp If Modified: stable/11/libexec/rtld-elf/rtld.c == --- stable/11/libexec/rtld-elf/rtld.c Fri May 22 13:17:57 2020 (r361381) +++ stable/11/libexec/rtld-elf/rtld.c Fri May 22 13:18:43 2020 (r361382) @@ -3300,6 +3300,8 @@ rtld_dlopen(const char *name, int fd, int mode) lo_flags |= RTLD_LO_NODELETE; if (mode & RTLD_NOLOAD) lo_flags |= RTLD_LO_NOLOAD; +if (mode & RTLD_DEEPBIND) + lo_flags |= RTLD_LO_DEEPBIND; if (ld_tracing != NULL) lo_flags |= RTLD_LO_TRACE; @@ -3351,6 +3353,8 @@ dlopen_object(const char *name, int fd, Obj_Entry *ref if (globallist_next(old_obj_tail) != NULL) { /* We loaded something new. */ assert(globallist_next(old_obj_tail) == obj); + if ((lo_flags & RTLD_LO_DEEPBIND) != 0) + obj->symbolic = true; result = 0; if ((lo_flags & RTLD_LO_EARLY) == 0 && obj->static_tls && !allocate_tls_offset(obj)) { Modified: stable/11/libexec/rtld-elf/rtld.h == --- stable/11/libexec/rtld-elf/rtld.h Fri May 22 13:17:57 2020 (r361381) +++ stable/11/libexec/rtld-elf/rtld.h Fri May 22 13:18:43 2020 (r361382) @@ -303,6 +303,7 @@ TAILQ_HEAD(obj_entry_q, Struct_Obj_Entry); #defineRTLD_LO_FILTEES 0x10/* Loading filtee. */ #defineRTLD_LO_EARLY 0x20/* Do not call ctors, postpone it to the initialization during the image start. */ +#defineRTLD_LO_DEEPBIND 0x80 /* Force symbolic for this object */ /* * Symbol cache entry used during relocation to avoid multiple lookups ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361381 - stable/11/lib/libc/gen
Author: kib Date: Fri May 22 13:17:57 2020 New Revision: 361381 URL: https://svnweb.freebsd.org/changeset/base/361381 Log: MFC r342743 (by romain): Add man page for dlvsym(3). Modified: stable/11/lib/libc/gen/Makefile.inc stable/11/lib/libc/gen/dlopen.3 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/gen/Makefile.inc == --- stable/11/lib/libc/gen/Makefile.inc Fri May 22 13:14:21 2020 (r361380) +++ stable/11/lib/libc/gen/Makefile.inc Fri May 22 13:17:57 2020 (r361381) @@ -321,7 +321,8 @@ MLINKS+=dlopen.3 fdlopen.3 \ dlopen.3 dlclose.3 \ dlopen.3 dlerror.3 \ dlopen.3 dlfunc.3 \ - dlopen.3 dlsym.3 + dlopen.3 dlsym.3 \ + dlopen.3 dlvsym.3 MLINKS+=err.3 err_set_exit.3 \ err.3 err_set_file.3 \ err.3 errc.3 \ Modified: stable/11/lib/libc/gen/dlopen.3 == --- stable/11/lib/libc/gen/dlopen.3 Fri May 22 13:14:21 2020 (r361380) +++ stable/11/lib/libc/gen/dlopen.3 Fri May 22 13:17:57 2020 (r361381) @@ -32,13 +32,14 @@ .\" @(#) dlopen.3 1.6 90/01/31 SMI .\" $FreeBSD$ .\" -.Dd July 7, 2017 +.Dd January 2, 2019 .Dt DLOPEN 3 .Os .Sh NAME .Nm dlopen , .Nm fdlopen , .Nm dlsym , +.Nm dlvsym , .Nm dlfunc , .Nm dlerror , .Nm dlclose @@ -53,6 +54,8 @@ .Fn fdlopen "int fd" "int mode" .Ft void * .Fn dlsym "void * restrict handle" "const char * restrict symbol" +.Ft void * +.Fn dlvsym "void * restrict handle" "const char * restrict symbol" "const char * restrict version" .Ft dlfunc_t .Fn dlfunc "void * restrict handle" "const char * restrict symbol" .Ft char * @@ -74,7 +77,8 @@ provides access to the shared object in .Fa path , returning a descriptor that can be used for later references to the object in calls to -.Fn dlsym +.Fn dlsym , +.Fn dlvsym and .Fn dlclose . If @@ -300,6 +304,16 @@ condition which may be queried with .Fn dlerror . .Pp The +.Fn dlvsym +function behaves like +.Fn dlsym , +but takes an extra argument +.Fa version : +a null-terminated character string which is used to request a specific version +of +.Fa symbol . +.Pp +The .Fn dlfunc function implements all of the behavior of @@ -328,6 +342,7 @@ occurred during a call to .Fn dladdr , .Fn dlinfo , .Fn dlsym , +.Fn dlvsym , .Fn dlfunc , or .Fn dlclose . @@ -375,7 +390,10 @@ using the option to .Xr ld 1 for symbols defined in the executable to become visible to -.Fn dlsym . +.Fn dlsym , +.Fn dlvsym +or +.Fn dlfunc .Pp Other ELF platforms require linking with .Lb libdl @@ -397,6 +415,7 @@ The .Fn dlopen , .Fn fdlopen , .Fn dlsym , +.Fn dlvsym , and .Fn dlfunc functions ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361380 - in stable/12: include lib/libc/gen libexec/rtld-elf
Author: kib Date: Fri May 22 13:14:21 2020 New Revision: 361380 URL: https://svnweb.freebsd.org/changeset/base/361380 Log: MFC r361073: Implement RTLD_DEEPBIND. PR: 246462 Modified: stable/12/include/dlfcn.h stable/12/lib/libc/gen/dlopen.3 stable/12/libexec/rtld-elf/rtld.c stable/12/libexec/rtld-elf/rtld.h Directory Properties: stable/12/ (props changed) Modified: stable/12/include/dlfcn.h == --- stable/12/include/dlfcn.h Fri May 22 13:13:34 2020(r361379) +++ stable/12/include/dlfcn.h Fri May 22 13:14:21 2020(r361380) @@ -47,6 +47,8 @@ #defineRTLD_TRACE 0x200 /* Trace loaded objects and exit. */ #defineRTLD_NODELETE 0x01000 /* Do not remove members. */ #defineRTLD_NOLOAD 0x02000 /* Do not load if not already loaded. */ +#defineRTLD_DEEPBIND 0x04000 /* Put symbols from the dso ahead of + the global list */ /* * Request arguments for dlinfo(). Modified: stable/12/lib/libc/gen/dlopen.3 == --- stable/12/lib/libc/gen/dlopen.3 Fri May 22 13:13:34 2020 (r361379) +++ stable/12/lib/libc/gen/dlopen.3 Fri May 22 13:14:21 2020 (r361380) @@ -32,7 +32,7 @@ .\" @(#) dlopen.3 1.6 90/01/31 SMI .\" $FreeBSD$ .\" -.Dd January 2, 2019 +.Dd May 14, 2020 .Dt DLOPEN 3 .Os .Sh NAME @@ -162,6 +162,9 @@ the process address space, otherwise is returned. Other mode flags may be specified, which will be applied for promotion for the found object. +.It Dv RTLD_DEEPBIND +Symbols from the loaded library are put before global symbols when +resolving symbolic references originated from the library. .El .Pp If Modified: stable/12/libexec/rtld-elf/rtld.c == --- stable/12/libexec/rtld-elf/rtld.c Fri May 22 13:13:34 2020 (r361379) +++ stable/12/libexec/rtld-elf/rtld.c Fri May 22 13:14:21 2020 (r361380) @@ -3319,6 +3319,8 @@ rtld_dlopen(const char *name, int fd, int mode) lo_flags |= RTLD_LO_NODELETE; if (mode & RTLD_NOLOAD) lo_flags |= RTLD_LO_NOLOAD; +if (mode & RTLD_DEEPBIND) + lo_flags |= RTLD_LO_DEEPBIND; if (ld_tracing != NULL) lo_flags |= RTLD_LO_TRACE | RTLD_LO_IGNSTLS; @@ -3370,6 +3372,8 @@ dlopen_object(const char *name, int fd, Obj_Entry *ref if (globallist_next(old_obj_tail) != NULL) { /* We loaded something new. */ assert(globallist_next(old_obj_tail) == obj); + if ((lo_flags & RTLD_LO_DEEPBIND) != 0) + obj->symbolic = true; result = 0; if ((lo_flags & (RTLD_LO_EARLY | RTLD_LO_IGNSTLS)) == 0 && obj->static_tls && !allocate_tls_offset(obj)) { Modified: stable/12/libexec/rtld-elf/rtld.h == --- stable/12/libexec/rtld-elf/rtld.h Fri May 22 13:13:34 2020 (r361379) +++ stable/12/libexec/rtld-elf/rtld.h Fri May 22 13:14:21 2020 (r361380) @@ -310,6 +310,7 @@ TAILQ_HEAD(obj_entry_q, Struct_Obj_Entry); #defineRTLD_LO_EARLY 0x20/* Do not call ctors, postpone it to the initialization during the image start. */ #defineRTLD_LO_IGNSTLS 0x40/* Do not allocate static TLS */ +#defineRTLD_LO_DEEPBIND 0x80 /* Force symbolic for this object */ /* * Symbol cache entry used during relocation to avoid multiple lookups ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361379 - stable/12/lib/libc/gen
Author: kib Date: Fri May 22 13:13:34 2020 New Revision: 361379 URL: https://svnweb.freebsd.org/changeset/base/361379 Log: MFC r342743 (by romain): Add man page for dlvsym(3). Modified: stable/12/lib/libc/gen/Makefile.inc stable/12/lib/libc/gen/dlopen.3 Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/gen/Makefile.inc == --- stable/12/lib/libc/gen/Makefile.inc Fri May 22 12:53:41 2020 (r361378) +++ stable/12/lib/libc/gen/Makefile.inc Fri May 22 13:13:34 2020 (r361379) @@ -342,7 +342,8 @@ MLINKS+=dlopen.3 fdlopen.3 \ dlopen.3 dlclose.3 \ dlopen.3 dlerror.3 \ dlopen.3 dlfunc.3 \ - dlopen.3 dlsym.3 + dlopen.3 dlsym.3 \ + dlopen.3 dlvsym.3 MLINKS+=err.3 err_set_exit.3 \ err.3 err_set_file.3 \ err.3 errc.3 \ Modified: stable/12/lib/libc/gen/dlopen.3 == --- stable/12/lib/libc/gen/dlopen.3 Fri May 22 12:53:41 2020 (r361378) +++ stable/12/lib/libc/gen/dlopen.3 Fri May 22 13:13:34 2020 (r361379) @@ -32,13 +32,14 @@ .\" @(#) dlopen.3 1.6 90/01/31 SMI .\" $FreeBSD$ .\" -.Dd July 7, 2017 +.Dd January 2, 2019 .Dt DLOPEN 3 .Os .Sh NAME .Nm dlopen , .Nm fdlopen , .Nm dlsym , +.Nm dlvsym , .Nm dlfunc , .Nm dlerror , .Nm dlclose @@ -53,6 +54,8 @@ .Fn fdlopen "int fd" "int mode" .Ft void * .Fn dlsym "void * restrict handle" "const char * restrict symbol" +.Ft void * +.Fn dlvsym "void * restrict handle" "const char * restrict symbol" "const char * restrict version" .Ft dlfunc_t .Fn dlfunc "void * restrict handle" "const char * restrict symbol" .Ft char * @@ -74,7 +77,8 @@ provides access to the shared object in .Fa path , returning a descriptor that can be used for later references to the object in calls to -.Fn dlsym +.Fn dlsym , +.Fn dlvsym and .Fn dlclose . If @@ -300,6 +304,16 @@ condition which may be queried with .Fn dlerror . .Pp The +.Fn dlvsym +function behaves like +.Fn dlsym , +but takes an extra argument +.Fa version : +a null-terminated character string which is used to request a specific version +of +.Fa symbol . +.Pp +The .Fn dlfunc function implements all of the behavior of @@ -328,6 +342,7 @@ occurred during a call to .Fn dladdr , .Fn dlinfo , .Fn dlsym , +.Fn dlvsym , .Fn dlfunc , or .Fn dlclose . @@ -375,7 +390,10 @@ using the option to .Xr ld 1 for symbols defined in the executable to become visible to -.Fn dlsym . +.Fn dlsym , +.Fn dlvsym +or +.Fn dlfunc .Pp Other ELF platforms require linking with .Lb libdl @@ -397,6 +415,7 @@ The .Fn dlopen , .Fn fdlopen , .Fn dlsym , +.Fn dlvsym , and .Fn dlfunc functions ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361378 - releng/11.4/usr.sbin/bsdinstall/scripts
Author: emaste Date: Fri May 22 12:53:41 2020 New Revision: 361378 URL: https://svnweb.freebsd.org/changeset/base/361378 Log: MFS11 r361305 (dteske): bsdinstall: fix wpa_supplicant.conf indentation Approved by: re (delphij) Modified: releng/11.4/usr.sbin/bsdinstall/scripts/wlanconfig Directory Properties: releng/11.4/ (props changed) Modified: releng/11.4/usr.sbin/bsdinstall/scripts/wlanconfig == --- releng/11.4/usr.sbin/bsdinstall/scripts/wlanconfig Fri May 22 12:25:57 2020(r361377) +++ releng/11.4/usr.sbin/bsdinstall/scripts/wlanconfig Fri May 22 12:53:41 2020(r361378) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2011 Nathan Whitehorn -# Copyright (c) 2013-2016 Devin Teske +# Copyright (c) 2013-2020 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -60,8 +60,7 @@ country_set() 'wpa_supplicant -B -i "%s" -c "%s/wpa_supplicant.conf"' \ "$WLAN_IFACE" "$BSDINSTALL_TMPETC" if [ "$error_str" ]; then - $DIALOG \ - --title "$msg_error" \ + $DIALOG --title "$msg_error" \ --backtitle "$DIALOG_BACKTITLE" \ --yes-label Change \ --no-label Ignore \ @@ -70,8 +69,7 @@ country_set() 0 0 || return $SUCCESS # Skip return $FAILURE # Restart else - awk 'sub(/^\t\t/,"")||1' \ - > "$BSDINSTALL_TMPETC/rc.conf.net.wlan" <<-EOF + cat > "$BSDINSTALL_TMPETC/rc.conf.net.wlan" <<-EOF create_args_$WLAN_IFACE="$ifconfig_args" EOF fi @@ -101,7 +99,8 @@ dialog_country_select() sub(/Country codes:/, ""), sub(/Regulatory.*/, "") { while (match($0, /[[:upper:]][[:upper:][:digit:]] /)) { country = substr($0, RSTART) - sub(/ [[:upper:]][[:upper:][:digit:]].*/, "", country) + sub(/ [[:upper:]][[:upper:][:digit:]].*/, "", + country) code = substr(country, 1, 2) desc = substr(country, 4) sub(/[[:space:]]*$/, "", desc) @@ -153,7 +152,7 @@ dialog_country_select() : > "$BSDINSTALL_TMPETC/wpa_supplicant.conf" chmod 0600 "$BSDINSTALL_TMPETC/wpa_supplicant.conf" -cat >> "$BSDINSTALL_TMPETC/wpa_supplicant.conf" << EOF +cat >> "$BSDINSTALL_TMPETC/wpa_supplicant.conf" <&1 >&$DIALOG_TERMINAL_PASSTHRU_FD ) || exec "$0" "$@" - awk 'sub(/^\t/,"")||1' \ - >> "$BSDINSTALL_TMPETC/wpa_supplicant.conf" <> "$BSDINSTALL_TMPETC/wpa_supplicant.conf" <<-EOF + network={ + \ ssid="$NETWORK" + \ scan_ssid=$SCANSSID + \ psk="$PASS" + \ priority=5 + } + EOF elif echo "$ENCRYPTION" | grep -q EAP; then USERPASS=$( $DIALOG \ --title "WPA-Enterprise Setup" \ @@ -300,19 +299,19 @@ elif echo "$ENCRYPTION" | grep -q EAP; then "Password" 3 0 "" 3 12 25 63 1 \ 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD ) || exec "$0" "$@" - awk 'sub(/^\t/,"")||1' \ - >> "$BSDINSTALL_TMPETC/wpa_supplicant.conf" <> "$BSDINSTALL_TMPETC/wpa_supplicant.conf" <<-EOF + network={ + \ ssid="$NETWORK" + \ scan_ssid=$SCANSSID + \ key_mgmt=WPA-EAP$( + echo "$USERPASS" | awk ' + NR == 1 { printf "\n\tidentity=\"%s\"", $1 } + NR == 2 { printf "\n\tpassword=\"%s\"", $1 } + ' ) + \ priority=5 + } + EOF elif echo "$ENCRYPTION" | grep -q WEP; then WEPKEY=$( $DIALOG \ --title "WEP Setup" \ @@ -324,31 +323,31 @@ elif echo "$ENCRYPTION" | grep -q WEP; then "WEP Key 0" 2 0 "" 2 12 15 0 1 \ 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD ) || exec "$0" "$@" - awk 'sub(/^\t/,"")||1' \ - >> "$BSDINSTALL_TMPETC/wpa_supplicant.conf" <> "$BSDINSTALL_TMPETC/wpa_supplicant.conf" <<-EOF + network={ + \ ssid="$NETWORK" + \ scan_ssid=$SCANSSID + \ key_mgmt=NONE + \ wep_key0="$WEPKEY" + \ wep_tx_keyidx=0 + \ priority=5 + } + EOF else # Open - awk 'sub(/^\t/,"")||1' \ - >> "$BSDINSTALL_TMPETC/wpa_supplicant.conf" <> "$BSDINSTALL_TMPETC/wpa_supplicant.conf" <<-EOF + network={ + \ ssid="$NETWORK" + \ scan_ssid=$SCANSSID + \ key_mgmt=NONE + \ priority=5 + } + EOF fi # Connect to any open networks policy -cat >> "$BSDINSTALL_TMPE
svn commit: r361377 - in stable/12/sys/cddl: compat/opensolaris/kern compat/opensolaris/sys contrib/opensolaris/uts/common/fs/zfs contrib/opensolaris/uts/common/fs/zfs/sys
Author: avg Date: Fri May 22 12:25:57 2020 New Revision: 361377 URL: https://svnweb.freebsd.org/changeset/base/361377 Log: MFC r354333,r354359: zfs: enable SPA_PROCESS on the kernel side The purpose of this change is to group kernel threads specific to a particular ZFS pool under a kernel process. There can be many dozens of threads per pool. This change improves observability of those threads. This change consists of several subchanges: 1. illumos taskq_create_proc can now pass its process parameter to taskqueue. Also, use zfsproc instead of NULL for taskq_create. Caveat: zfsproc might not be initialized yet. But in that case it is still NULL, so not worse than before. 2. illumos sys/proc.h: kthread id is stored in t_did field, not t_tid. 3. zfs: enable SPA_PROCESS on the kernel side. The change is a bit hairy as newproc() is implemented privately to spa.c. I couldn't think of a better way to populate process name than to poke inside the argument for the process routine. 4. illumos thread_create: allow assigning thread to process other than zfsproc. 5. zfs: expose spa_proc to other users, assign sync and quiesce threads to it. Pool-specific threads created using (relatively new) zthr mechanism are still assigned to the zfskern process rather than to a respective zpool-xxx process. I am going to address this a bit later. Modified: stable/12/sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c stable/12/sys/cddl/compat/opensolaris/sys/proc.h stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c == --- stable/12/sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c Fri May 22 12:20:50 2020(r361376) +++ stable/12/sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c Fri May 22 12:25:57 2020(r361377) @@ -42,6 +42,8 @@ static uma_zone_t taskq_zone; taskq_t *system_taskq = NULL; +struct proc *system_proc; + static void system_taskq_init(void *arg) { @@ -62,9 +64,9 @@ system_taskq_fini(void *arg) } SYSUNINIT(system_taskq_fini, SI_SUB_CONFIGURE, SI_ORDER_ANY, system_taskq_fini, NULL); -taskq_t * -taskq_create(const char *name, int nthreads, pri_t pri, int minalloc __unused, -int maxalloc __unused, uint_t flags) +static taskq_t * +taskq_create_impl(const char *name, int nthreads, pri_t pri, proc_t *proc, +uint_t flags) { taskq_t *tq; @@ -74,17 +76,24 @@ taskq_create(const char *name, int nthreads, pri_t pri tq = kmem_alloc(sizeof(*tq), KM_SLEEP); tq->tq_queue = taskqueue_create(name, M_WAITOK, taskqueue_thread_enqueue, &tq->tq_queue); - (void) taskqueue_start_threads(&tq->tq_queue, nthreads, pri, "%s", name); + (void) taskqueue_start_threads_in_proc(&tq->tq_queue, nthreads, pri, + proc, "%s", name); return ((taskq_t *)tq); } taskq_t * -taskq_create_proc(const char *name, int nthreads, pri_t pri, int minalloc, -int maxalloc, proc_t *proc __unused, uint_t flags) +taskq_create(const char *name, int nthreads, pri_t pri, int minalloc __unused, +int maxalloc __unused, uint_t flags) { + return (taskq_create_impl(name, nthreads, pri, system_proc, flags)); +} - return (taskq_create(name, nthreads, pri, minalloc, maxalloc, flags)); +taskq_t * +taskq_create_proc(const char *name, int nthreads, pri_t pri, int minalloc, +int maxalloc, proc_t *proc, uint_t flags) +{ + return (taskq_create_impl(name, nthreads, pri, proc, flags)); } void Modified: stable/12/sys/cddl/compat/opensolaris/sys/proc.h == --- stable/12/sys/cddl/compat/opensolaris/sys/proc.hFri May 22 12:20:50 2020(r361376) +++ stable/12/sys/cddl/compat/opensolaris/sys/proc.hFri May 22 12:25:57 2020(r361377) @@ -47,12 +47,13 @@ #definemaxclsyspri PVM #definemax_ncpus (mp_maxid + 1) #defineboot_max_ncpus (mp_maxid + 1) +#definesyscid 1 #defineTS_RUN 0 #definep0 proc0 -#definet_tid td_tid +#definet_did td_tid typedefshort pri_t; typedefstruct thread _kthread; @@ -60,13 +61,14 @@ typedef struct thread kthread_t; typedef struct thread *kthread_id_t; typedef struct procproc_t; -extern struct proc *zfsproc; +extern struct proc *system_proc; static
svn commit: r361376 - stable/12/share/man/man9
Author: avg Date: Fri May 22 12:20:50 2020 New Revision: 361376 URL: https://svnweb.freebsd.org/changeset/base/361376 Log: MFC r353679: document taskqueue_start_threads_in_proc While here, fix taskqueue_start_threads_cpuset that was documented under old name of taskqueue_start_threads_pinned. Modified: stable/12/share/man/man9/Makefile stable/12/share/man/man9/taskqueue.9 Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man9/Makefile == --- stable/12/share/man/man9/Makefile Fri May 22 12:10:16 2020 (r361375) +++ stable/12/share/man/man9/Makefile Fri May 22 12:20:50 2020 (r361376) @@ -2076,7 +2076,8 @@ MLINKS+=taskqueue.9 TASK_INIT.9 \ taskqueue.9 taskqueue_run.9 \ taskqueue.9 taskqueue_set_callback.9 \ taskqueue.9 taskqueue_start_threads.9 \ - taskqueue.9 taskqueue_start_threads_pinned.9 \ + taskqueue.9 taskqueue_start_threads_cpuset.9 \ + taskqueue.9 taskqueue_start_threads_in_proc.9 \ taskqueue.9 taskqueue_unblock.9 \ taskqueue.9 TIMEOUT_TASK_INIT.9 MLINKS+=tcp_functions.9 register_tcp_functions.9 \ Modified: stable/12/share/man/man9/taskqueue.9 == --- stable/12/share/man/man9/taskqueue.9Fri May 22 12:10:16 2020 (r361375) +++ stable/12/share/man/man9/taskqueue.9Fri May 22 12:20:50 2020 (r361376) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 21, 2018 +.Dd October 17, 2019 .Dt TASKQUEUE 9 .Os .Sh NAME @@ -69,10 +69,15 @@ struct timeout_task; .Ft int .Fn taskqueue_start_threads "struct taskqueue **tqp" "int count" "int pri" "const char *name" "..." .Ft int -.Fo taskqueue_start_threads_pinned -.Fa "struct taskqueue **tqp" "int count" "int pri" "int cpu_id" +.Fo taskqueue_start_threads_cpuset +.Fa "struct taskqueue **tqp" "int count" "int pri" "cpuset_t *mask" .Fa "const char *name" "..." .Fc +.Ft int +.Fo taskqueue_start_threads_in_proc +.Fa "struct taskqueue **tqp" "int count" "int pri" "struct proc *proc" +.Fa "const char *name" "..." +.Fc .Ft void .Fn taskqueue_set_callback "struct taskqueue *queue" "enum taskqueue_callback_type cb_type" "taskqueue_callback_fn callback" "void *context" .Ft void @@ -152,14 +157,20 @@ Any tasks that are on the queue will be executed at th which the thread servicing the queue will be signaled that it should exit. .Pp Once a taskqueue has been created, its threads should be started using -.Fn taskqueue_start_threads +.Fn taskqueue_start_threads , +.Fn taskqueue_start_threads_cpuset or -.Fn taskqueue_start_threads_pinned . -.Fn taskqueue_start_threads_pinned +.Fn taskqueue_start_threads_in_proc . +.Fn taskqueue_start_threads_cpuset takes a -.Va cpu_id +.Va cpuset argument which will cause the threads which are started for the taskqueue -to be pinned to run on the given CPU. +to be restricted to run on the given CPUs. +.Fn taskqueue_start_threads_in_proc +takes a +.Va proc +argument which will cause the threads which are started for the taskqueue +to be assigned to the given kernel process. Callbacks may optionally be registered using .Fn taskqueue_set_callback . Currently, callbacks may be registered for the following purposes: ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361375 - stable/12/sys/compat/linuxkpi/common/include/linux
Author: avg Date: Fri May 22 12:10:16 2020 New Revision: 361375 URL: https://svnweb.freebsd.org/changeset/base/361375 Log: MFC r361006: linuxkpi: print stack trace in WARN_ON macros Modified: stable/12/sys/compat/linuxkpi/common/include/linux/kernel.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linuxkpi/common/include/linux/kernel.h == --- stable/12/sys/compat/linuxkpi/common/include/linux/kernel.h Fri May 22 12:08:31 2020(r361374) +++ stable/12/sys/compat/linuxkpi/common/include/linux/kernel.h Fri May 22 12:10:16 2020(r361375) @@ -107,6 +107,7 @@ if (__ret) { \ printf("WARNING %s failed at %s:%d\n", \ __stringify(cond), __FILE__, __LINE__); \ + linux_dump_stack(); \ }\ unlikely(__ret); \ }) @@ -120,6 +121,7 @@ __warn_on_once = 1; \ printf("WARNING %s failed at %s:%d\n", \ __stringify(cond), __FILE__, __LINE__); \ + linux_dump_stack(); \ }\ unlikely(__ret); \ }) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361374 - stable/12/sys/dev/sound/pci/hda
Author: avg Date: Fri May 22 12:08:31 2020 New Revision: 361374 URL: https://svnweb.freebsd.org/changeset/base/361374 Log: MFC r361002: snd_hda: fix typos related to quirks set via 'config' tunable Modified: stable/12/sys/dev/sound/pci/hda/hdac.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/sound/pci/hda/hdac.c == --- stable/12/sys/dev/sound/pci/hda/hdac.c Fri May 22 12:06:53 2020 (r361373) +++ stable/12/sys/dev/sound/pci/hda/hdac.c Fri May 22 12:08:31 2020 (r361374) @@ -66,7 +66,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 }, }; @@ -278,10 +278,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-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361373 - stable/12/sys/dev/sound/pci/hda
Author: avg Date: Fri May 22 12:06:53 2020 New Revision: 361373 URL: https://svnweb.freebsd.org/changeset/base/361373 Log: MFC r361001: 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. Modified: stable/12/sys/dev/sound/pci/hda/hdac.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/sound/pci/hda/hdac.c == --- stable/12/sys/dev/sound/pci/hda/hdac.c Fri May 22 12:05:01 2020 (r361372) +++ stable/12/sys/dev/sound/pci/hda/hdac.c Fri May 22 12:06:53 2020 (r361373) @@ -193,6 +193,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-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361372 - stable/12/sys/dev/gpio
Author: avg Date: Fri May 22 12:05:01 2020 New Revision: 361372 URL: https://svnweb.freebsd.org/changeset/base/361372 Log: MFC r360779: gpioiic_attach: fix a NULL pointer crash on hints-based systems The attach method uses GPIO_GET_BUS() to get a "newbus" device that provides a pin. But on hints-based systems a GPIO controller driver might not be fully initialized yet and it does not know gpiobus hanging off it. Thus, GPIO_GET_BUS() cannot be called yet. The reason is that controller drivers typically create a child gpiobus using gpiobus_attach_bus() and that leads to the following call chain: gpiobus_attach_bus() -> gpiobus_attach() -> bus_generic_attach(gpiobus) -> gpioiic_attach(). So, gpioiic_attach() is called before gpiobus_attach_bus() returns. I observed this bug with nctgpio driver on amd64. I think that the problem was introduced in r355276. The fix is to avoid calling GPIO_GET_BUS() from the attach method. Instead, we know that on hints-based systems only the parent gpiobus can provide the pins. Nothing is changed for FDT-based systems. Modified: stable/12/sys/dev/gpio/gpioiic.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/gpio/gpioiic.c == --- stable/12/sys/dev/gpio/gpioiic.cFri May 22 12:03:17 2020 (r361371) +++ stable/12/sys/dev/gpio/gpioiic.cFri May 22 12:05:01 2020 (r361372) @@ -303,10 +303,20 @@ gpioiic_attach(device_t dev) return (ENXIO); } - /* Say what we came up with for pin config. */ + /* +* Say what we came up with for pin config. +* NB: in the !FDT case the controller driver might not be set up enough +* for GPIO_GET_BUS() to work. Also, our parent is the only gpiobus +* that can provide our pins. +*/ device_printf(dev, "SCL pin: %s:%d, SDA pin: %s:%d\n", +#ifdef FDT device_get_nameunit(GPIO_GET_BUS(sc->sclpin->dev)), sc->sclpin->pin, device_get_nameunit(GPIO_GET_BUS(sc->sdapin->dev)), sc->sdapin->pin); +#else + device_get_nameunit(device_get_parent(dev)), sc->sclpin->pin, + device_get_nameunit(device_get_parent(dev)), sc->sdapin->pin); +#endif /* Add the bitbang driver as our only child; it will add iicbus. */ device_add_child(sc->dev, "iicbb", -1); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361371 - stable/12/sys/dev/usb
Author: avg Date: Fri May 22 12:03:17 2020 New Revision: 361371 URL: https://svnweb.freebsd.org/changeset/base/361371 Log: MFC r360692: usbhid: add several missing usages from Digitizer page Modified: stable/12/sys/dev/usb/usbhid.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/usb/usbhid.h == --- stable/12/sys/dev/usb/usbhid.h Fri May 22 12:01:29 2020 (r361370) +++ stable/12/sys/dev/usb/usbhid.h Fri May 22 12:03:17 2020 (r361371) @@ -174,7 +174,10 @@ struct usb_hid_descriptor { #defineHUD_CONTACTCOUNT0x0054 #defineHUD_CONTACT_MAX 0x0055 #defineHUD_SCAN_TIME 0x0056 +#defineHUD_SURFACE_SWITCH 0x0057 +#defineHUD_BUTTONS_SWITCH 0x0058 #defineHUD_BUTTON_TYPE 0x0059 +#defineHUD_LATENCY_MODE0x0060 /* Usages, Consumer */ #defineHUC_AC_PAN 0x0238 ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361370 - stable/12/sys/dev/ichiic
Author: avg Date: Fri May 22 12:01:29 2020 New Revision: 361370 URL: https://svnweb.freebsd.org/changeset/base/361370 Log: MFC r360499: ig4iic_acpi_probe: remove set but unused variable Modified: stable/12/sys/dev/ichiic/ig4_acpi.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/ichiic/ig4_acpi.c == --- stable/12/sys/dev/ichiic/ig4_acpi.c Fri May 22 11:59:50 2020 (r361369) +++ stable/12/sys/dev/ichiic/ig4_acpi.c Fri May 22 12:01:29 2020 (r361370) @@ -68,9 +68,7 @@ static char *ig4iic_ids[] = { static int ig4iic_acpi_probe(device_t dev) { - ig4iic_softc_t *sc; - sc = device_get_softc(dev); if (acpi_disabled("ig4iic")) return (ENXIO); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361369 - stable/12/sys/dev/acpica
Author: avg Date: Fri May 22 11:59:50 2020 New Revision: 361369 URL: https://svnweb.freebsd.org/changeset/base/361369 Log: MFC r360246: acpi_video: fix a crash in detach with an LCD output The crash happened because of a video output object was removed from a wrong container, crt_units instead of lcd_units. Modified: stable/12/sys/dev/acpica/acpi_video.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/acpica/acpi_video.c == --- stable/12/sys/dev/acpica/acpi_video.c Fri May 22 11:57:48 2020 (r361368) +++ stable/12/sys/dev/acpica/acpi_video.c Fri May 22 11:59:50 2020 (r361369) @@ -640,7 +640,10 @@ acpi_video_vo_destroy(struct acpi_video_output *vo) switch (vo->adr & DOD_DEVID_MASK) { case DOD_DEVID_MONITOR: - voqh = &crt_units; + if ((vo->adr & DOD_DEVID_MASK_FULL) == DOD_DEVID_LCD) + voqh = &lcd_units; + else + voqh = &crt_units; break; case DOD_DEVID_TV: voqh = &tv_units; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361368 - stable/12/sys/dev/iicbus
Author: avg Date: Fri May 22 11:57:48 2020 New Revision: 361368 URL: https://svnweb.freebsd.org/changeset/base/361368 Log: MFC r360242: acpi_iicbus: set device description in the probe method Kernel prints the device announcement before the attach method is called, so if the correct description is not set by the probe method, then the announcement would have an incorrect one. Modified: stable/12/sys/dev/iicbus/acpi_iicbus.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/iicbus/acpi_iicbus.c == --- stable/12/sys/dev/iicbus/acpi_iicbus.c Fri May 22 11:55:54 2020 (r361367) +++ stable/12/sys/dev/iicbus/acpi_iicbus.c Fri May 22 11:57:48 2020 (r361368) @@ -573,6 +573,7 @@ acpi_iicbus_probe(device_t dev) if (handle == NULL) return (ENXIO); + device_set_desc(dev, "Philips I2C bus (ACPI-hinted)"); return (BUS_PROBE_DEFAULT); } @@ -581,8 +582,6 @@ acpi_iicbus_attach(device_t dev) { struct acpi_iicbus_softc *sc = device_get_softc(dev); int error; - - device_set_desc(dev, "Philips I2C bus (ACPI-hinted)"); if (ACPI_FAILURE(acpi_iicbus_enumerate_children(dev))) device_printf(dev, "children enumeration failed\n"); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361367 - stable/12/sys/dev/ichiic
Author: avg Date: Fri May 22 11:55:54 2020 New Revision: 361367 URL: https://svnweb.freebsd.org/changeset/base/361367 Log: MFC r360241: ig4: ensure that drivers always attach in correct order Use DRIVER_MODULE_ORDERED(SI_ORDER_ANY) so that ig4's ACPI attachment happens after iicbus and acpi_iicbus drivers are registered. Modified: stable/12/sys/dev/ichiic/ig4_acpi.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/ichiic/ig4_acpi.c == --- stable/12/sys/dev/ichiic/ig4_acpi.c Fri May 22 11:53:07 2020 (r361366) +++ stable/12/sys/dev/ichiic/ig4_acpi.c Fri May 22 11:55:54 2020 (r361367) @@ -192,5 +192,6 @@ static driver_t ig4iic_acpi_driver = { sizeof(struct ig4iic_softc), }; -DRIVER_MODULE(ig4iic, acpi, ig4iic_acpi_driver, ig4iic_devclass, 0, 0); +DRIVER_MODULE_ORDERED(ig4iic, acpi, ig4iic_acpi_driver, ig4iic_devclass, 0, 0, +SI_ORDER_ANY); MODULE_DEPEND(ig4iic, acpi, 1, 1, 1); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361366 - stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: avg Date: Fri May 22 11:53:07 2020 New Revision: 361366 URL: https://svnweb.freebsd.org/changeset/base/361366 Log: MFC r358381: use ZFS_MAX_DATASET_NAME_LEN instead of MAXPATHLEN for dataset names The change affects only FreeBSD specific code as the common code already mostly uses the more idiomatic and correct ZFS_MAX_DATASET_NAME_LEN. Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c == --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Fri May 22 11:41:08 2020(r361365) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Fri May 22 11:53:07 2020(r361366) @@ -2528,16 +2528,16 @@ dsl_dataset_rename_snapshot_sync_impl(dsl_pool_t *dp, #ifdef __FreeBSD__ #ifdef _KERNEL - oldname = kmem_alloc(MAXPATHLEN, KM_SLEEP); - newname = kmem_alloc(MAXPATHLEN, KM_SLEEP); - snprintf(oldname, MAXPATHLEN, "%s@%s", ddrsa->ddrsa_fsname, - ddrsa->ddrsa_oldsnapname); - snprintf(newname, MAXPATHLEN, "%s@%s", ddrsa->ddrsa_fsname, - ddrsa->ddrsa_newsnapname); + oldname = kmem_alloc(ZFS_MAX_DATASET_NAME_LEN, KM_SLEEP); + newname = kmem_alloc(ZFS_MAX_DATASET_NAME_LEN, KM_SLEEP); + snprintf(oldname, ZFS_MAX_DATASET_NAME_LEN, "%s@%s", + ddrsa->ddrsa_fsname, ddrsa->ddrsa_oldsnapname); + snprintf(newname, ZFS_MAX_DATASET_NAME_LEN, "%s@%s", + ddrsa->ddrsa_fsname, ddrsa->ddrsa_newsnapname); zfsvfs_update_fromname(oldname, newname); zvol_rename_minors(oldname, newname); - kmem_free(newname, MAXPATHLEN); - kmem_free(oldname, MAXPATHLEN); + kmem_free(newname, ZFS_MAX_DATASET_NAME_LEN); + kmem_free(oldname, ZFS_MAX_DATASET_NAME_LEN); #endif #endif dsl_dataset_rele(ds, FTAG); @@ -3090,8 +3090,8 @@ dsl_dataset_promote_sync(void *arg, dmu_tx_t *tx) /* Take the spa_namespace_lock early so zvol renames don't deadlock. */ mutex_enter(&spa_namespace_lock); - oldname = kmem_alloc(MAXPATHLEN, KM_SLEEP); - newname = kmem_alloc(MAXPATHLEN, KM_SLEEP); + oldname = kmem_alloc(ZFS_MAX_DATASET_NAME_LEN, KM_SLEEP); + newname = kmem_alloc(ZFS_MAX_DATASET_NAME_LEN, KM_SLEEP); #endif /* move snapshots to this dir */ @@ -3179,8 +3179,8 @@ dsl_dataset_promote_sync(void *arg, dmu_tx_t *tx) #if defined(__FreeBSD__) && defined(_KERNEL) mutex_exit(&spa_namespace_lock); - kmem_free(newname, MAXPATHLEN); - kmem_free(oldname, MAXPATHLEN); + kmem_free(newname, ZFS_MAX_DATASET_NAME_LEN); + kmem_free(oldname, ZFS_MAX_DATASET_NAME_LEN); #endif /* * Change space accounting. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361365 - stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: avg Date: Fri May 22 11:41:08 2020 New Revision: 361365 URL: https://svnweb.freebsd.org/changeset/base/361365 Log: MFC r358380,r358382: dsl_dataset_promote_sync: populate 'oldname' before using it It's very unlikely that zfsvfs_update_fromname() and zvol_rename_minors() ever did anything during the promote operation as the old name was not initialized. Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c == --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Fri May 22 11:25:45 2020(r361364) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Fri May 22 11:41:08 2020(r361365) @@ -3109,6 +3109,10 @@ dsl_dataset_promote_sync(void *arg, dmu_tx_t *tx) ds->ds_objset = NULL; } +#if defined(__FreeBSD__) && defined(_KERNEL) + dsl_dataset_name(ds, oldname); +#endif + /* move snap name entry */ VERIFY0(dsl_dataset_get_snapname(ds)); VERIFY0(dsl_dataset_snap_remove(origin_head, ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361364 - head/sys/net80211
Author: avg Date: Fri May 22 11:25:45 2020 New Revision: 361364 URL: https://svnweb.freebsd.org/changeset/base/361364 Log: net80211: post RTM_IFINFO notification after toggling IFF_DRV_RUNNING This is useful when a wireless driver is stopped or started in response to events like an RF Kill button press. Applications like wpa_supplicant depend on such events to have a correct view of interface state. Reviewed by: adrian, cy, melifaro MFC after:1 week Differential Revision: https://reviews.freebsd.org/D24925 Modified: head/sys/net80211/ieee80211_freebsd.c head/sys/net80211/ieee80211_proto.c head/sys/net80211/ieee80211_proto.h Modified: head/sys/net80211/ieee80211_freebsd.c == --- head/sys/net80211/ieee80211_freebsd.c Fri May 22 11:20:23 2020 (r361363) +++ head/sys/net80211/ieee80211_freebsd.c Fri May 22 11:25:45 2020 (r361364) @@ -963,6 +963,19 @@ ieee80211_notify_radio(struct ieee80211com *ic, int st } void +ieee80211_notify_ifnet_change(struct ieee80211vap *vap) +{ + struct ifnet *ifp = vap->iv_ifp; + + IEEE80211_DPRINTF(vap, IEEE80211_MSG_DEBUG, "%s\n", + "interface state change"); + + CURVNET_SET(ifp->if_vnet); + rt_ifmsg(ifp); + CURVNET_RESTORE(); +} + +void ieee80211_load_module(const char *modname) { Modified: head/sys/net80211/ieee80211_proto.c == --- head/sys/net80211/ieee80211_proto.c Fri May 22 11:20:23 2020 (r361363) +++ head/sys/net80211/ieee80211_proto.c Fri May 22 11:25:45 2020 (r361364) @@ -1511,6 +1511,8 @@ ieee80211_start_locked(struct ieee80211vap *vap) * back in here and complete the work. */ ifp->if_drv_flags |= IFF_DRV_RUNNING; + ieee80211_notify_ifnet_change(vap); + /* * We are not running; if this we are the first vap * to be brought up auto-up the parent if necessary. @@ -1624,6 +1626,7 @@ ieee80211_stop_locked(struct ieee80211vap *vap) ieee80211_new_state_locked(vap, IEEE80211_S_INIT, -1); if (ifp->if_drv_flags & IFF_DRV_RUNNING) { ifp->if_drv_flags &= ~IFF_DRV_RUNNING; /* mark us stopped */ + ieee80211_notify_ifnet_change(vap); if (--ic->ic_nrunning == 0) { IEEE80211_DPRINTF(vap, IEEE80211_MSG_STATE | IEEE80211_MSG_DEBUG, Modified: head/sys/net80211/ieee80211_proto.h == --- head/sys/net80211/ieee80211_proto.h Fri May 22 11:20:23 2020 (r361363) +++ head/sys/net80211/ieee80211_proto.h Fri May 22 11:25:45 2020 (r361364) @@ -455,4 +455,5 @@ voidieee80211_notify_node_auth(struct ieee80211_node void ieee80211_notify_country(struct ieee80211vap *, const uint8_t [], const uint8_t cc[2]); void ieee80211_notify_radio(struct ieee80211com *, int); +void ieee80211_notify_ifnet_change(struct ieee80211vap *); #endif /* _NET80211_IEEE80211_PROTO_H_ */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361363 - in head/lib/libprocstat: . zfs
Author: avg Date: Fri May 22 11:20:23 2020 New Revision: 361363 URL: https://svnweb.freebsd.org/changeset/base/361363 Log: libprocstat: fix ZFS support First of all, znode_phys_t hasn't been used for storing file attributes for a long time now. Modern ZFS versions use a System Attribute table with a flexible layout. But more importantly all the required information is available in znode_t itself. It's not easy to include zfs_znode.h in userland without breaking code because the most interesting parts of the header are kernel-only. And hardcoding field offsets is too fragile. So, I created a new compilation unit that includes zfs_znode.h using some mild kludges to get it and its dependencies to compile in userland. The compilation unit exports interesting field offsets and does not have any other code. PR: 194117 Reviewed by: markj MFC after:2 weeks Sponsored by: Panzura Differential Revision: https://reviews.freebsd.org/D24941 Added: head/lib/libprocstat/zfs_defs.c (contents, props changed) head/lib/libprocstat/zfs_defs.h (contents, props changed) Modified: head/lib/libprocstat/Makefile head/lib/libprocstat/zfs.c head/lib/libprocstat/zfs/Makefile Modified: head/lib/libprocstat/Makefile == --- head/lib/libprocstat/Makefile Fri May 22 10:50:29 2020 (r361362) +++ head/lib/libprocstat/Makefile Fri May 22 11:20:23 2020 (r361363) @@ -57,16 +57,17 @@ MLINKS+=libprocstat.3 procstat_close.3 \ # XXX This is a hack. .if ${MK_CDDL} != "no" CFLAGS+= -DLIBPROCSTAT_ZFS -OBJS+= zfs/zfs.o -SOBJS+=zfs/zfs.pico -POBJS+=zfs/zfs.po +SRCS+= zfs.c +OBJS+= zfs/zfs_defs.o +SOBJS+=zfs/zfs_defs.pico +POBJS+=zfs/zfs_defs.po SUBDIR=zfs -zfs/zfs.o: .PHONY - @cd ${.CURDIR}/zfs && ${MAKE} zfs.o -zfs/zfs.pico: .PHONY - @cd ${.CURDIR}/zfs && ${MAKE} zfs.pico -zfs/zfs.po: .PHONY - @cd ${.CURDIR}/zfs && ${MAKE} zfs.po +zfs/zfs_defs.o: .PHONY + @cd ${.CURDIR}/zfs && ${MAKE} zfs_defs.o +zfs/zfs_defs.pico: .PHONY + @cd ${.CURDIR}/zfs && ${MAKE} zfs_defs.pico +zfs/zfs_defs.po: .PHONY + @cd ${.CURDIR}/zfs && ${MAKE} zfs_defs.po .endif .include Modified: head/lib/libprocstat/zfs.c == --- head/lib/libprocstat/zfs.c Fri May 22 10:50:29 2020(r361362) +++ head/lib/libprocstat/zfs.c Fri May 22 11:20:23 2020(r361363) @@ -31,22 +31,13 @@ #include #define _KERNEL #include -#include #undef _KERNEL +#include +#include #include +#include +#include -#undef lbolt -#undef lbolt64 -#undef gethrestime_sec -#include -#include -#include -#include -#include -#include -#include -#include - #include #include @@ -57,24 +48,15 @@ #define ZFS #include "libprocstat.h" #include "common_kvm.h" +#include "zfs_defs.h" -/* - * Offset calculations that are used to get data from znode without having the - * definition. - */ -#define LOCATION_ZID (2 * sizeof(void *)) -#define LOCATION_ZPHYS(zsize) ((zsize) - (2 * sizeof(void *) + sizeof(struct task))) - int zfs_filestat(kvm_t *kd, struct vnode *vp, struct vnstat *vn) { - znode_phys_t zphys; struct mount mount, *mountptr; - uint64_t *zid; - void *znodeptr, *vnodeptr; + void *znodeptr; char *dataptr; - void *zphys_addr; size_t len; int size; @@ -83,33 +65,27 @@ zfs_filestat(kvm_t *kd, struct vnode *vp, struct vnsta warnx("error getting sysctl"); return (1); } - znodeptr = malloc(size); - if (znodeptr == NULL) { + dataptr = malloc(size); + if (dataptr == NULL) { warnx("error allocating memory for znode storage"); return (1); } - /* Since we have problems including vnode.h, we'll use the wrappers. */ - vnodeptr = getvnodedata(vp); - if (!kvm_read_all(kd, (unsigned long)vnodeptr, znodeptr, - (size_t)size)) { - warnx("can't read znode at %p", (void *)vnodeptr); + + if ((size_t)size < offsetof_z_id + sizeof(uint64_t) || + (size_t)size < offsetof_z_mode + sizeof(mode_t) || + (size_t)size < offsetof_z_size + sizeof(uint64_t)) { + warnx("znode_t size is too small"); goto bad; } - /* -* z_id field is stored in the third pointer. We therefore skip the two -* first bytes. -* -* Pointer to the z_phys structure is the next last pointer. Therefore -* go back two bytes from the end. -*/ - dataptr = znodeptr; - zid = (uint64_t *)(dataptr + LOCATION_ZID); - zphys_addr = *(void **)(dataptr + LOCATION_ZPHYS(size)); + if ((size_t)size != sizeof_znode_t) + warnx("znode_t size mismatch, dat
svn commit: r361362 - head/sys/sys
Author: whu Date: Fri May 22 10:50:29 2020 New Revision: 361362 URL: https://svnweb.freebsd.org/changeset/base/361362 Log: Bump __FreeBSD_version after r361275, HyperV socket support Sponsored by: Microsoft Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h == --- head/sys/sys/param.hFri May 22 09:38:44 2020(r361361) +++ head/sys/sys/param.hFri May 22 10:50:29 2020(r361362) @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1300094 /* Master, propagated to newvers */ +#define __FreeBSD_version 1300095 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361361 - head/share/misc
Author: bapt Date: Fri May 22 09:38:44 2020 New Revision: 361361 URL: https://svnweb.freebsd.org/changeset/base/361361 Log: Update pciids to 2020.05.22 MFC after:2 days Modified: head/share/misc/pci_vendors Modified: head/share/misc/pci_vendors == --- head/share/misc/pci_vendors Fri May 22 09:17:07 2020(r361360) +++ head/share/misc/pci_vendors Fri May 22 09:38:44 2020(r361361) @@ -2,8 +2,8 @@ # List of PCI ID's # -# Version: 2020.02.22 -# Date:2020-02-22 03:15:04 +# Version: 2020.05.22 +# Date:2020-05-22 03:15:02 # # Maintained by Albert Pool, Martin Mares, and other volunteers from # the PCI ID Project at https://pci-ids.ucw.cz/. @@ -438,8 +438,8 @@ 1028 1fd1 PERC H730P MX 17aa 1052 ThinkServer RAID 720i 17aa 1053 ThinkServer RAID 720ix - 1bd4 0014 6G SAS3108 2G - 1bd4 0015 6G SAS3108 4G + 1bd4 0014 12G SAS3108 2G + 1bd4 0015 12G SAS3108 4G 1d49 0600 ThinkSystem RAID 730-8i 1GB Cache PCIe 12Gb Adapter 1d49 0608 ThinkSystem RAID 730-8i 2GB Flash PCIe 12Gb Adapter 1d49 0609 ThinkSystem RAID 730-8i 4GB Flash PCIe 12Gb Adapter @@ -456,6 +456,7 @@ 1028 1f4c PERC H330 Mini (for blades) 1028 1f4d PERC H330 Embedded (for monolithic) 1054 306a SAS 3004 iMR ROMB + 1734 1211 PRAID CP400i [D3307-A12] 1d49 04db ServeRAID M1210 SAS/SATA Controller 1d49 0504 ThinkSystem RAID 520-8i PCIe 12Gb Adapter 0060 MegaRAID SAS 1078 @@ -655,10 +656,13 @@ 1028 1fd3 HBA330 MMZ # Supermicro AOC-S3008L-L8e uses 0808 for their SAS3008 SAS controller 15d9 0808 AOC-S3008L-L8e + 1bd4 0008 12G SAS3008IMR Onboard 1bd4 000b 12G SAS3008IR 1bd4 000c 12G SAS3008IT 1bd4 0011 Inspur 12Gb 8i-3008 IT SAS HBA 1bd4 0012 12Gb SAS3008IR UDM + 1bd4 001f 12G SAS3008IR Onboard + 1bd4 0020 12G SAS3008IT Onboard 1bd4 0026 12G SAS3008IT RACK 1bd4 0027 12G SAS3008IMR RACK 1bd4 0028 12G SAS3008IR RACK @@ -929,11 +933,13 @@ 1561 Anubis 15d8 Picasso 103c 8615 Pavilion Laptop 15-cw1xxx + 17aa 5124 ThinkPad E595 15dd Raven Ridge [Radeon Vega Series / Radeon Vega Mobile Series] 103c 83c6 Radeon Vega 8 Mobile 1458 d000 Radeon RX Vega 11 15de Raven/Raven2/Fenghuang HDMI/DP Audio Controller 103c 8615 Pavilion Laptop 15-cw1xxx + 17aa 5124 ThinkPad E595 15df Raven/Raven2/Fenghuang/Renoir Cryptographic Coprocessor 103c 8615 Pavilion Laptop 15-cw1xxx 15ff Fenghuang [Zhongshan Subor Z+] @@ -1120,6 +1126,7 @@ 105b 0e13 N15235/A74MX mainboard / AMD SB700 1179 ff50 Satellite P305D-S8995E 1458 a022 GA-MA770-DS3rev2.0 Motherboard + 1458 a102 GA-880GMA-USB3 17f2 5000 KI690-AM2 Motherboard 4384 SBx00 PCI to PCI Bridge 4385 SBx00 SMBus Controller @@ -1190,6 +1197,7 @@ 1043 8443 M5A88-V EVO 1043 84dd M5A99X EVO (R1.0) SB950 105b 0e13 N15235/A74MX mainboard / AMD SB700 + 1458 b002 GA-880GMA-USB3 174b 1001 PURE Fusion Mini 4392 SB7x0/SB8x0/SB9x0 SATA Controller [Non-RAID5 mode] 105b 0e13 N15235/A74MX mainboard / AMD SB700 @@ -1203,6 +1211,7 @@ 1043 82ef M3A78-EH Motherboard 1043 8443 M5A88-V EVO 105b 0e13 N15235/A74MX mainboard / AMD SB700 + 1458 5004 GA-880GMA-USB3 15d9 a811 H8DGU 174b 1001 PURE Fusion Mini 4397 SB7x0/SB8x0/SB9x0 USB OHCI0 Controller @@ -1212,6 +1221,7 @@ 1043 82ef M3A78-EH Motherboard 1043 8443 M5A88-V EVO 105b 0e13 N15235/A74MX mainboard / AMD SB700 + 1458 5004 GA-880GMA-USB3 15d9 a811 H8DGU 174b 1001 PURE Fusion Mini 4398 SB7x0 USB OHCI1 Controller @@ -1224,6 +1234,7 @@ 1043 82ef M3A78-EH Motherboard 1043 8443 M5A88-V EVO 105b 0e13 N15235/A74MX mainboard / AMD SB700 + 1458 5004 GA-880GMA-USB3 174b 1001 PURE Fusion Mini 439c SB7x0/SB8x0/SB9x0 IDE Controller 1002 4392 MSI MS-7713 motherboard @@ -1878,9 +1889,9 @@ 1642 3c81 Radeon HD 8670 1642 3c91 Radeon HD 8670 1642 3f09 Radeon R7 350 - 6611 Oland [
svn commit: r361360 - head/sys/dev/hyperv/hvsock
Author: whu Date: Fri May 22 09:17:07 2020 New Revision: 361360 URL: https://svnweb.freebsd.org/changeset/base/361360 Log: Socket AF_HYPERV should return failure when it is not running on HyperV Reported by: pho Sponsored by: Microsoft Modified: head/sys/dev/hyperv/hvsock/hv_sock.c Modified: head/sys/dev/hyperv/hvsock/hv_sock.c == --- head/sys/dev/hyperv/hvsock/hv_sock.cFri May 22 09:02:40 2020 (r361359) +++ head/sys/dev/hyperv/hvsock/hv_sock.cFri May 22 09:17:07 2020 (r361360) @@ -354,6 +354,9 @@ hvs_trans_attach(struct socket *so, int proto, struct { struct hvs_pcb *pcb = so2hvspcb(so); + if (vm_guest != VM_GUEST_HV) + return (ESOCKTNOSUPPORT); + HVSOCK_DBG(HVSOCK_DBG_VERBOSE, "%s: HyperV Socket hvs_trans_attach called\n", __func__); @@ -380,6 +383,9 @@ hvs_trans_detach(struct socket *so) { struct hvs_pcb *pcb; + if (vm_guest != VM_GUEST_HV) + return; + HVSOCK_DBG(HVSOCK_DBG_VERBOSE, "%s: HyperV Socket hvs_trans_detach called\n", __func__); @@ -589,6 +595,9 @@ hvs_trans_disconnect(struct socket *so) { struct hvs_pcb *pcb; + if (vm_guest != VM_GUEST_HV) + return (ESOCKTNOSUPPORT); + HVSOCK_DBG(HVSOCK_DBG_VERBOSE, "%s: HyperV Socket hvs_trans_disconnect called\n", __func__); @@ -916,6 +925,9 @@ hvs_trans_close(struct socket *so) { struct hvs_pcb *pcb; + if (vm_guest != VM_GUEST_HV) + return; + HVSOCK_DBG(HVSOCK_DBG_VERBOSE, "%s: HyperV Socket hvs_trans_close called\n", __func__); @@ -956,6 +968,9 @@ void hvs_trans_abort(struct socket *so) { struct hvs_pcb *pcb = so2hvspcb(so); + + if (vm_guest != VM_GUEST_HV) + return; HVSOCK_DBG(HVSOCK_DBG_VERBOSE, "%s: HyperV Socket hvs_trans_abort called\n", __func__); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361359 - stable/9/sys/kern
Author: hselasky Date: Fri May 22 09:02:40 2020 New Revision: 361359 URL: https://svnweb.freebsd.org/changeset/base/361359 Log: MFC r361075: Assign process group of the TTY under the "proctree_lock". This fixes a race where concurrent calls to doenterpgrp() and leavepgrp() while TIOCSCTTY is executing may result in tp->t_pgrp changing value so that tty_rel_pgrp() misses clearing it to NULL. For more details refer to the use of pgdelete() in the kernel. No functional change intended. Panic backtrace: __mtx_lock_sleep() # page fault due to using destroyed mutex tty_signal_pgrp() tty_ioctl() ptsdev_ioctl() kern_ioctl() sys_ioctl() amd64_syscall() Sponsored by: Mellanox Technologies Modified: stable/9/sys/kern/tty.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/tty.c == --- stable/9/sys/kern/tty.c Fri May 22 09:01:26 2020(r361358) +++ stable/9/sys/kern/tty.c Fri May 22 09:02:40 2020(r361359) @@ -1611,7 +1611,6 @@ tty_generic_ioctl(struct tty *tp, u_long cmd, void *da tp->t_session = p->p_session; tp->t_session->s_ttyp = tp; tp->t_sessioncnt++; - sx_xunlock(&proctree_lock); /* Assign foreground process group. */ tp->t_pgrp = p->p_pgrp; @@ -1619,6 +1618,7 @@ tty_generic_ioctl(struct tty *tp, u_long cmd, void *da p->p_flag |= P_CONTROLT; PROC_UNLOCK(p); + sx_xunlock(&proctree_lock); return (0); } case TIOCSPGRP: { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361358 - stable/10/sys/kern
Author: hselasky Date: Fri May 22 09:01:26 2020 New Revision: 361358 URL: https://svnweb.freebsd.org/changeset/base/361358 Log: MFC r361075: Assign process group of the TTY under the "proctree_lock". This fixes a race where concurrent calls to doenterpgrp() and leavepgrp() while TIOCSCTTY is executing may result in tp->t_pgrp changing value so that tty_rel_pgrp() misses clearing it to NULL. For more details refer to the use of pgdelete() in the kernel. No functional change intended. Panic backtrace: __mtx_lock_sleep() # page fault due to using destroyed mutex tty_signal_pgrp() tty_ioctl() ptsdev_ioctl() kern_ioctl() sys_ioctl() amd64_syscall() Sponsored by: Mellanox Technologies Modified: stable/10/sys/kern/tty.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/tty.c == --- stable/10/sys/kern/tty.cFri May 22 09:00:22 2020(r361357) +++ stable/10/sys/kern/tty.cFri May 22 09:01:26 2020(r361358) @@ -1721,7 +1721,6 @@ tty_generic_ioctl(struct tty *tp, u_long cmd, void *da tp->t_session = p->p_session; tp->t_session->s_ttyp = tp; tp->t_sessioncnt++; - sx_xunlock(&proctree_lock); /* Assign foreground process group. */ tp->t_pgrp = p->p_pgrp; @@ -1729,6 +1728,7 @@ tty_generic_ioctl(struct tty *tp, u_long cmd, void *da p->p_flag |= P_CONTROLT; PROC_UNLOCK(p); + sx_xunlock(&proctree_lock); return (0); } case TIOCSPGRP: { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361357 - stable/11/sys/kern
Author: hselasky Date: Fri May 22 09:00:22 2020 New Revision: 361357 URL: https://svnweb.freebsd.org/changeset/base/361357 Log: MFC r361075: Assign process group of the TTY under the "proctree_lock". This fixes a race where concurrent calls to doenterpgrp() and leavepgrp() while TIOCSCTTY is executing may result in tp->t_pgrp changing value so that tty_rel_pgrp() misses clearing it to NULL. For more details refer to the use of pgdelete() in the kernel. No functional change intended. Panic backtrace: __mtx_lock_sleep() # page fault due to using destroyed mutex tty_signal_pgrp() tty_ioctl() ptsdev_ioctl() kern_ioctl() sys_ioctl() amd64_syscall() Sponsored by: Mellanox Technologies Modified: stable/11/sys/kern/tty.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/tty.c == --- stable/11/sys/kern/tty.cFri May 22 08:59:12 2020(r361356) +++ stable/11/sys/kern/tty.cFri May 22 09:00:22 2020(r361357) @@ -1807,7 +1807,6 @@ tty_generic_ioctl(struct tty *tp, u_long cmd, void *da tp->t_session = p->p_session; tp->t_session->s_ttyp = tp; tp->t_sessioncnt++; - sx_xunlock(&proctree_lock); /* Assign foreground process group. */ tp->t_pgrp = p->p_pgrp; @@ -1815,6 +1814,7 @@ tty_generic_ioctl(struct tty *tp, u_long cmd, void *da p->p_flag |= P_CONTROLT; PROC_UNLOCK(p); + sx_xunlock(&proctree_lock); return (0); } case TIOCSPGRP: { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361356 - stable/12/sys/kern
Author: hselasky Date: Fri May 22 08:59:12 2020 New Revision: 361356 URL: https://svnweb.freebsd.org/changeset/base/361356 Log: MFC r361075: Assign process group of the TTY under the "proctree_lock". This fixes a race where concurrent calls to doenterpgrp() and leavepgrp() while TIOCSCTTY is executing may result in tp->t_pgrp changing value so that tty_rel_pgrp() misses clearing it to NULL. For more details refer to the use of pgdelete() in the kernel. No functional change intended. Panic backtrace: __mtx_lock_sleep() # page fault due to using destroyed mutex tty_signal_pgrp() tty_ioctl() ptsdev_ioctl() kern_ioctl() sys_ioctl() amd64_syscall() Sponsored by: Mellanox Technologies Modified: stable/12/sys/kern/tty.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/tty.c == --- stable/12/sys/kern/tty.cFri May 22 03:13:29 2020(r361355) +++ stable/12/sys/kern/tty.cFri May 22 08:59:12 2020(r361356) @@ -1808,7 +1808,6 @@ tty_generic_ioctl(struct tty *tp, u_long cmd, void *da tp->t_session = p->p_session; tp->t_session->s_ttyp = tp; tp->t_sessioncnt++; - sx_xunlock(&proctree_lock); /* Assign foreground process group. */ tp->t_pgrp = p->p_pgrp; @@ -1816,6 +1815,7 @@ tty_generic_ioctl(struct tty *tp, u_long cmd, void *da p->p_flag |= P_CONTROLT; PROC_UNLOCK(p); + sx_xunlock(&proctree_lock); return (0); } case TIOCSPGRP: { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"