svn commit: r364372 - in head/sys: cam/ctl compat/linux dev/xen/blkback fs/cd9660 fs/ext2fs fs/msdosfs fs/udf kern sys ufs/ffs vm
Author: mjg Date: Wed Aug 19 02:51:17 2020 New Revision: 364372 URL: https://svnweb.freebsd.org/changeset/base/364372 Log: vfs: drop the error parameter from vn_isdisk, introduce vn_isdisk_error Most consumers pass NULL. Modified: head/sys/cam/ctl/ctl_backend_block.c head/sys/compat/linux/linux_stats.c head/sys/dev/xen/blkback/blkback.c head/sys/fs/cd9660/cd9660_vfsops.c head/sys/fs/ext2fs/ext2_vfsops.c head/sys/fs/msdosfs/msdosfs_vfsops.c head/sys/fs/udf/udf_vfsops.c head/sys/kern/vfs_aio.c head/sys/kern/vfs_bio.c head/sys/kern/vfs_subr.c head/sys/sys/vnode.h head/sys/ufs/ffs/ffs_softdep.c head/sys/ufs/ffs/ffs_vfsops.c head/sys/vm/swap_pager.c head/sys/vm/vnode_pager.c Modified: head/sys/cam/ctl/ctl_backend_block.c == --- head/sys/cam/ctl/ctl_backend_block.cWed Aug 19 02:50:09 2020 (r364371) +++ head/sys/cam/ctl/ctl_backend_block.cWed Aug 19 02:51:17 2020 (r364372) @@ -2184,7 +2184,7 @@ again: be_lun->vn = nd.ni_vp; /* We only support disks and files. */ - if (vn_isdisk(be_lun->vn, )) { + if (vn_isdisk_error(be_lun->vn, )) { error = ctl_be_block_open_dev(be_lun, req); } else if (be_lun->vn->v_type == VREG) { error = ctl_be_block_open_file(be_lun, req); @@ -2547,7 +2547,7 @@ ctl_be_block_modify(struct ctl_be_block_softc *softc, control_softc->ha_mode == CTL_HA_MODE_SER_ONLY) { if (be_lun->vn == NULL) error = ctl_be_block_open(be_lun, req); - else if (vn_isdisk(be_lun->vn, )) + else if (vn_isdisk_error(be_lun->vn, )) error = ctl_be_block_open_dev(be_lun, req); else if (be_lun->vn->v_type == VREG) { vn_lock(be_lun->vn, LK_SHARED | LK_RETRY); Modified: head/sys/compat/linux/linux_stats.c == --- head/sys/compat/linux/linux_stats.c Wed Aug 19 02:50:09 2020 (r364371) +++ head/sys/compat/linux/linux_stats.c Wed Aug 19 02:51:17 2020 (r364372) @@ -65,7 +65,7 @@ translate_vnhook_major_minor(struct vnode *vp, struct { int major, minor; - if (vn_isdisk(vp, NULL)) { + if (vn_isdisk(vp)) { sb->st_mode &= ~S_IFMT; sb->st_mode |= S_IFBLK; } @@ -131,7 +131,7 @@ translate_fd_major_minor(struct thread *td, int fd, st fget(td, fd, _no_rights, ) != 0) return; vp = fp->f_vnode; - if (vp != NULL && vn_isdisk(vp, NULL)) { + if (vp != NULL && vn_isdisk(vp)) { buf->st_mode &= ~S_IFMT; buf->st_mode |= S_IFBLK; } Modified: head/sys/dev/xen/blkback/blkback.c == --- head/sys/dev/xen/blkback/blkback.c Wed Aug 19 02:50:09 2020 (r364371) +++ head/sys/dev/xen/blkback/blkback.c Wed Aug 19 02:51:17 2020 (r364372) @@ -2735,7 +2735,7 @@ xbb_open_backend(struct xbb_softc *xbb) xbb->vn = nd.ni_vp; /* We only support disks and files. */ - if (vn_isdisk(xbb->vn, )) { + if (vn_isdisk_error(xbb->vn, )) { error = xbb_open_dev(xbb); } else if (xbb->vn->v_type == VREG) { error = xbb_open_file(xbb); Modified: head/sys/fs/cd9660/cd9660_vfsops.c == --- head/sys/fs/cd9660/cd9660_vfsops.c Wed Aug 19 02:50:09 2020 (r364371) +++ head/sys/fs/cd9660/cd9660_vfsops.c Wed Aug 19 02:51:17 2020 (r364372) @@ -165,7 +165,7 @@ cd9660_mount(struct mount *mp) NDFREE(, NDF_ONLY_PNBUF); devvp = ndp.ni_vp; - if (!vn_isdisk(devvp, )) { + if (!vn_isdisk_error(devvp, )) { vput(devvp); return (error); } Modified: head/sys/fs/ext2fs/ext2_vfsops.c == --- head/sys/fs/ext2fs/ext2_vfsops.cWed Aug 19 02:50:09 2020 (r364371) +++ head/sys/fs/ext2fs/ext2_vfsops.cWed Aug 19 02:51:17 2020 (r364372) @@ -247,7 +247,7 @@ ext2_mount(struct mount *mp) NDFREE(ndp, NDF_ONLY_PNBUF); devvp = ndp->ni_vp; - if (!vn_isdisk(devvp, )) { + if (!vn_isdisk_error(devvp, )) { vput(devvp); return (error); } Modified: head/sys/fs/msdosfs/msdosfs_vfsops.c == --- head/sys/fs/msdosfs/msdosfs_vfsops.cWed Aug 19 02:50:09 2020 (r364371) +++ head/sys/fs/msdosfs/msdosfs_vfsops.cWed Aug 19 02:51:17 2020 (r364372) @@ -343,7 +343,7 @@ msdosfs_mount(struct mount *mp) devvp = ndp.ni_vp; NDFREE(,
svn commit: r364371 - head/sys/kern
Author: mjg Date: Wed Aug 19 02:50:09 2020 New Revision: 364371 URL: https://svnweb.freebsd.org/changeset/base/364371 Log: vfs: sanity check mount counters in vfs_op_enter Modified: head/sys/kern/vfs_mount.c Modified: head/sys/kern/vfs_mount.c == --- head/sys/kern/vfs_mount.c Wed Aug 19 02:18:11 2020(r364370) +++ head/sys/kern/vfs_mount.c Wed Aug 19 02:50:09 2020(r364371) @@ -1518,6 +1518,9 @@ vfs_op_enter(struct mount *mp) mp->mnt_writeopcount += zpcpu_replace_cpu(mp->mnt_writeopcount_pcpu, 0, cpu); } + if (mp->mnt_ref <= 0 || mp->mnt_lockref < 0 || mp->mnt_writeopcount < 0) + panic("%s: invalid count(s) on mp %p: ref %d lockref %d writeopcount %d\n", + __func__, mp, mp->mnt_ref, mp->mnt_lockref, mp->mnt_writeopcount); MNT_IUNLOCK(mp); vfs_assert_mount_counters(mp); } ___ 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: r364370 - head/sbin/devd
Author: imp Date: Wed Aug 19 02:18:11 2020 New Revision: 364370 URL: https://svnweb.freebsd.org/changeset/base/364370 Log: Three typos: Amiga is a proper noun Condition is traditionally spelled starting with 'c' Some, but not all, of the over/under-voltage instances were hyphenated. Since they are all adverb phrases, they all need to be hyphenated. Pointy hat: imp Modified: head/sbin/devd/devd.conf.5 Modified: head/sbin/devd/devd.conf.5 == --- head/sbin/devd/devd.conf.5 Wed Aug 19 00:09:39 2020(r364369) +++ head/sbin/devd/devd.conf.5 Wed Aug 19 02:18:11 2020(r364370) @@ -353,7 +353,7 @@ Thermal zone events. .Bl -column "System" "Subsystem" "1234567" -compact .Sy "System" Ta Sy "Subsystem" Ta Sy "Type" Ta Sy "Description" .It Li AEON Ta Li power Ta Li press Ta -The power button on an amiga has been pressed. +The power button on an Amiga has been pressed. .El .Pp .Bl -column "System" "Subsystem" "1234567" -compact @@ -481,7 +481,7 @@ Notification of events from various types of Power Man .It Li PMU Ta Li "AC" Ta Ta Notifications of AC power related events. .It Li PMU Ta Li "AC" Ta Li overvoltage Ta -An over voltage ondition was detected on the AC power line. +An over-voltage condition was detected on the AC power line. .It Li PMU Ta Li "AC" Ta Li plugged Ta Power has been applied to the AC power line. .It Li PMU Ta Li "AC" Ta Li unplugged Ta ___ 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: r364369 - head/sbin/bectl
Author: rew Date: Wed Aug 19 00:09:39 2020 New Revision: 364369 URL: https://svnweb.freebsd.org/changeset/base/364369 Log: bectl(8): Fix output of `bectl list` for the 'Mountpoint' column. Currently, the output of `bectl list` doesn't align the 'Mountpoint' column correctly when the 'mounted' property of a boot environment dataset is longer than the default column width. Set the 'Mountpoint' column width to the boot environment dataset with the longest 'mounted' property or to the default width, whichever is greater. PR: 241064 Reported by: verma...@interia.pl Reviewed by:kevans (mentor) Approved by:kevans (mentor) MFC after: 1 week Differential Revision:https://reviews.freebsd.org/D26048 Modified: head/sbin/bectl/bectl_list.c Modified: head/sbin/bectl/bectl_list.c == --- head/sbin/bectl/bectl_list.cTue Aug 18 22:46:46 2020 (r364368) +++ head/sbin/bectl/bectl_list.cWed Aug 19 00:09:39 2020 (r364369) @@ -292,19 +292,23 @@ print_headers(nvlist_t *props, struct printc *pc) nvpair_t *cur; nvlist_t *dsprops; char *propstr; - size_t be_maxcol; + size_t be_maxcol, mount_colsz; if (pc->show_all_datasets || pc->show_snaps) chosen_be_header = HEADER_BEPLUS; else chosen_be_header = HEADER_BE; be_maxcol = strlen(chosen_be_header); + mount_colsz = strlen(HEADER_MOUNT); for (cur = nvlist_next_nvpair(props, NULL); cur != NULL; cur = nvlist_next_nvpair(props, cur)) { be_maxcol = MAX(be_maxcol, strlen(nvpair_name(cur))); + nvpair_value_nvlist(cur, ); + + if (nvlist_lookup_string(dsprops, "mounted", ) == 0) + mount_colsz = MAX(mount_colsz, strlen(propstr)); if (!pc->show_all_datasets && !pc->show_snaps) continue; - nvpair_value_nvlist(cur, ); if (nvlist_lookup_string(dsprops, "dataset", ) != 0) continue; be_maxcol = MAX(be_maxcol, strlen(propstr) + INDENT_INCREMENT); @@ -316,10 +320,10 @@ print_headers(nvlist_t *props, struct printc *pc) pc->be_colsz = be_maxcol; pc->active_colsz_def = strlen(HEADER_ACTIVE); - pc->mount_colsz = strlen(HEADER_MOUNT); + pc->mount_colsz = mount_colsz; pc->space_colsz = strlen(HEADER_SPACE); - printf("%*s %s %s %s %s\n", -pc->be_colsz, chosen_be_header, - HEADER_ACTIVE, HEADER_MOUNT, HEADER_SPACE, HEADER_CREATED); + printf("%*s %s %*s %s %s\n", -pc->be_colsz, chosen_be_header, + HEADER_ACTIVE, -pc->mount_colsz, HEADER_MOUNT, HEADER_SPACE, HEADER_CREATED); /* * All other invocations in which we aren't using the default header ___ 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: r364368 - head/sys/netgraph
Author: zec Date: Tue Aug 18 22:46:46 2020 New Revision: 364368 URL: https://svnweb.freebsd.org/changeset/base/364368 Log: Increase BER to PER lookup table size in an attempt to mitigate panics with LRO and TSO. Reported by:rstone Modified: head/sys/netgraph/ng_pipe.h Modified: head/sys/netgraph/ng_pipe.h == --- head/sys/netgraph/ng_pipe.h Tue Aug 18 22:15:51 2020(r364367) +++ head/sys/netgraph/ng_pipe.h Tue Aug 18 22:46:46 2020(r364368) @@ -43,7 +43,7 @@ #define NG_PIPE_HOOK_UPPER "upper" #define NG_PIPE_HOOK_LOWER "lower" -#define MAX_FSIZE 16384/* Largest supported frame size, in bytes, for BER */ +#define MAX_FSIZE 65536/* Largest supported frame size, in bytes, for BER */ #define MAX_OHSIZE 256 /* Largest supported dummy-framing size, in bytes */ /* Statistics structure for one hook */ ___ 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: r364367 - head/share/man/man4
Author: zec Date: Tue Aug 18 22:15:51 2020 New Revision: 364367 URL: https://svnweb.freebsd.org/changeset/base/364367 Log: Fix ber parameter description. Modified: head/share/man/man4/ng_pipe.4 Modified: head/share/man/man4/ng_pipe.4 == --- head/share/man/man4/ng_pipe.4 Tue Aug 18 22:04:22 2020 (r364366) +++ head/share/man/man4/ng_pipe.4 Tue Aug 18 22:15:51 2020 (r364367) @@ -130,7 +130,7 @@ struct ng_pipe_cfg { /* Config structure for one hook */ struct ng_pipe_hookcfg { u_int64_t bandwidth; /* bits per second */ - u_int64_t ber; /* errors per 2^48 bits */ + u_int64_t ber; /* avg. interval between bit errors (1 / BER) */ u_int32_t qin_size_limit; /* number of queue items */ u_int32_t qout_size_limit; /* number of queue items */ u_int32_t duplicate; /* probability in % */ ___ 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: r364365 - in head/sys: amd64/linux arm64/linux i386/linux
Author: mjg Date: Tue Aug 18 22:03:55 2020 New Revision: 364365 URL: https://svnweb.freebsd.org/changeset/base/364365 Log: linux: consistently use LFREEPATH instead of open-coding it Modified: head/sys/amd64/linux/linux_machdep.c head/sys/arm64/linux/linux_machdep.c head/sys/i386/linux/linux_machdep.c Modified: head/sys/amd64/linux/linux_machdep.c == --- head/sys/amd64/linux/linux_machdep.cTue Aug 18 21:42:02 2020 (r364364) +++ head/sys/amd64/linux/linux_machdep.cTue Aug 18 22:03:55 2020 (r364365) @@ -104,7 +104,7 @@ linux_execve(struct thread *td, struct linux_execve_ar error = exec_copyin_args(, path, UIO_SYSSPACE, args->argp, args->envp); - free(path, M_TEMP); + LFREEPATH(path); if (error == 0) error = linux_common_execve(td, ); return (error); Modified: head/sys/arm64/linux/linux_machdep.c == --- head/sys/arm64/linux/linux_machdep.cTue Aug 18 21:42:02 2020 (r364364) +++ head/sys/arm64/linux/linux_machdep.cTue Aug 18 22:03:55 2020 (r364365) @@ -71,7 +71,7 @@ linux_execve(struct thread *td, struct linux_execve_ar error = exec_copyin_args(, path, UIO_SYSSPACE, uap->argp, uap->envp); - free(path, M_TEMP); + LFREEPATH(path); if (error == 0) error = linux_common_execve(td, ); return (error); Modified: head/sys/i386/linux/linux_machdep.c == --- head/sys/i386/linux/linux_machdep.c Tue Aug 18 21:42:02 2020 (r364364) +++ head/sys/i386/linux/linux_machdep.c Tue Aug 18 22:03:55 2020 (r364365) @@ -108,7 +108,7 @@ linux_execve(struct thread *td, struct linux_execve_ar error = exec_copyin_args(, newpath, UIO_SYSSPACE, args->argp, args->envp); - free(newpath, M_TEMP); + LFREEPATH(newpath); if (error == 0) error = linux_common_execve(td, ); return (error); ___ 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: r364366 - in head/sys: amd64/linux arm64/linux compat/linux i386/linux
Author: mjg Date: Tue Aug 18 22:04:22 2020 New Revision: 364366 URL: https://svnweb.freebsd.org/changeset/base/364366 Log: linux: add sysctl compat.linux.use_emul_path This is a step towards facilitating jails with only Linux binaries. Supporting emul_path adds path lookups which are completely spurious if the binary at hand runs in a Linux-based root directory. It defaults to on (== current behavior). make -C /root/linux-5.3-rc8 -s -j 1 bzImage: use_emul_path=1: 101.65s user 68.68s system 100% cpu 2:49.62 total use_emul_path=0: 101.41s user 64.32s system 100% cpu 2:45.02 total Modified: head/sys/amd64/linux/linux_machdep.c head/sys/arm64/linux/linux_machdep.c head/sys/compat/linux/linux_file.c head/sys/compat/linux/linux_mib.c head/sys/compat/linux/linux_misc.c head/sys/compat/linux/linux_stats.c head/sys/compat/linux/linux_uid16.c head/sys/compat/linux/linux_util.h head/sys/i386/linux/linux_machdep.c Modified: head/sys/amd64/linux/linux_machdep.c == --- head/sys/amd64/linux/linux_machdep.cTue Aug 18 22:03:55 2020 (r364365) +++ head/sys/amd64/linux/linux_machdep.cTue Aug 18 22:04:22 2020 (r364366) @@ -98,13 +98,17 @@ linux_execve(struct thread *td, struct linux_execve_ar char *path; int error; - LCONVPATHEXIST(td, args->path, ); - LINUX_CTR(execve); - error = exec_copyin_args(, path, UIO_SYSSPACE, args->argp, - args->envp); - LFREEPATH(path); + if (!LUSECONVPATH(td)) { + error = exec_copyin_args(, args->path, UIO_USERSPACE, + args->argp, args->envp); + } else { + LCONVPATHEXIST(td, args->path, ); + error = exec_copyin_args(, path, UIO_SYSSPACE, args->argp, + args->envp); + LFREEPATH(path); + } if (error == 0) error = linux_common_execve(td, ); return (error); Modified: head/sys/arm64/linux/linux_machdep.c == --- head/sys/arm64/linux/linux_machdep.cTue Aug 18 22:03:55 2020 (r364365) +++ head/sys/arm64/linux/linux_machdep.cTue Aug 18 22:04:22 2020 (r364366) @@ -67,11 +67,15 @@ linux_execve(struct thread *td, struct linux_execve_ar char *path; int error; - LCONVPATHEXIST(td, uap->path, ); - - error = exec_copyin_args(, path, UIO_SYSSPACE, uap->argp, - uap->envp); - LFREEPATH(path); + if (!LUSECONVPATH(td)) { + error = exec_copyin_args(, uap->path, UIO_USERSPACE, + uap->argp, uap->envp); + } else { + LCONVPATHEXIST(td, uap->path, ); + error = exec_copyin_args(, path, UIO_SYSSPACE, + uap->argp, uap->envp); + LFREEPATH(path); + } if (error == 0) error = linux_common_execve(td, ); return (error); Modified: head/sys/compat/linux/linux_file.c == --- head/sys/compat/linux/linux_file.c Tue Aug 18 22:03:55 2020 (r364365) +++ head/sys/compat/linux/linux_file.c Tue Aug 18 22:04:22 2020 (r364366) @@ -66,7 +66,8 @@ __FBSDID("$FreeBSD$"); #include #include -static int linux_common_open(struct thread *, int, char *, int, int); +static int linux_common_open(struct thread *, int, const char *, int, int, + enum uio_seg); static int linux_getdents_error(struct thread *, int, int); static struct bsd_to_linux_bitmap seal_bitmap[] = { @@ -107,17 +108,22 @@ linux_creat(struct thread *td, struct linux_creat_args char *path; int error; - LCONVPATHEXIST(td, args->path, ); - - error = kern_openat(td, AT_FDCWD, path, UIO_SYSSPACE, - O_WRONLY | O_CREAT | O_TRUNC, args->mode); - LFREEPATH(path); + if (!LUSECONVPATH(td)) { + error = kern_openat(td, AT_FDCWD, args->path, UIO_USERSPACE, + O_WRONLY | O_CREAT | O_TRUNC, args->mode); + } else { + LCONVPATHEXIST(td, args->path, ); + error = kern_openat(td, AT_FDCWD, path, UIO_SYSSPACE, + O_WRONLY | O_CREAT | O_TRUNC, args->mode); + LFREEPATH(path); + } return (error); } #endif static int -linux_common_open(struct thread *td, int dirfd, char *path, int l_flags, int mode) +linux_common_open(struct thread *td, int dirfd, const char *path, int l_flags, +int mode, enum uio_seg seg) { struct proc *p = td->td_proc; struct file *fp; @@ -163,7 +169,7 @@ linux_common_open(struct thread *td, int dirfd, char * bsd_flags |= O_DIRECTORY; /* XXX LINUX_O_NOATIME: unable to be easily implemented. */ - error =
svn commit: r364364 - head/sbin/devd
Author: imp Date: Tue Aug 18 21:42:02 2020 New Revision: 364364 URL: https://svnweb.freebsd.org/changeset/base/364364 Log: Fix two typos. Submitted by: rpokala@ MFC After: 3 days Modified: head/sbin/devd/devd.conf.5 Modified: head/sbin/devd/devd.conf.5 == --- head/sbin/devd/devd.conf.5 Tue Aug 18 21:26:58 2020(r364363) +++ head/sbin/devd/devd.conf.5 Tue Aug 18 21:42:02 2020(r364364) @@ -329,7 +329,7 @@ mechanism. .Bl -column "System" "Subsystem" "1234567" -compact .Sy "System" Ta Sy "Subsystem" Ta Sy "Type" Ta Sy "Description" .It Li ACPI Ta Ta Ta -Events related to the ACPI Sybsystem. +Events related to the ACPI Subsystem. .It Li ACPI Ta Li ACAD Ta Ta AC line state ($notify=0x00 is offline, 0x01 is online). .It Li ACPI Ta Li Button Ta Ta @@ -452,7 +452,7 @@ provider is destroyed. .It Li GEOM Ta Li DEV Ta Li GEOM::physpath Ta The physical path of a device has changed. .It Li GEOM Ta Li DEV Ta Li GEOM::rotation_rate Ta -The roation rate of the disk has changed. +The rotation rate of the disk has changed. .It Li GEOM Ta Li DEV Ta Li MEDIACHANGE Ta Physical media has changed. .It Li GEOM Ta Li DEV Ta Li SIZECHANGE Ta ___ 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: r364362 - head/sbin/devd
Author: imp Date: Tue Aug 18 21:26:54 2020 New Revision: 364362 URL: https://svnweb.freebsd.org/changeset/base/364362 Log: Document the AEON subsystem for the Amiga's power button. MFC After: 3 days Modified: head/sbin/devd/devd.conf.5 Modified: head/sbin/devd/devd.conf.5 == --- head/sbin/devd/devd.conf.5 Tue Aug 18 21:26:50 2020(r364361) +++ head/sbin/devd/devd.conf.5 Tue Aug 18 21:26:54 2020(r364362) @@ -352,6 +352,12 @@ Thermal zone events. .Pp .Bl -column "System" "Subsystem" "1234567" -compact .Sy "System" Ta Sy "Subsystem" Ta Sy "Type" Ta Sy "Description" +.It Li AEON Ta Li power Ta Li press Ta +The power button on an amiga has been pressed. +.El +.Pp +.Bl -column "System" "Subsystem" "1234567" -compact +.Sy "System" Ta Sy "Subsystem" Ta Sy "Type" Ta Sy "Description" .It Li CAM Ta Ta Ta Events related to the .Xr cam 4 ___ 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: r364361 - head/sbin/devd
Author: imp Date: Tue Aug 18 21:26:50 2020 New Revision: 364361 URL: https://svnweb.freebsd.org/changeset/base/364361 Log: Document the PMU system The pmu(4) and adb(4) drivers on powerpc generate PMU events. Document them. The allwinner power modules also generate these events. Document those as well. MFC After: 3 days Modified: head/sbin/devd/devd.conf.5 Modified: head/sbin/devd/devd.conf.5 == --- head/sbin/devd/devd.conf.5 Tue Aug 18 21:26:45 2020(r364360) +++ head/sbin/devd/devd.conf.5 Tue Aug 18 21:26:50 2020(r364361) @@ -470,6 +470,79 @@ Notification that a process has crashed and dumped cor .Pp .Bl -column "System" "Subsystem" "1234567" -compact .Sy "System" Ta Sy "Subsystem" Ta Sy "Type" Ta Sy "Description" +.It Li PMU Ta Ta Ta +Notification of events from various types of Power Management Units. +.It Li PMU Ta Li "AC" Ta Ta +Notifications of AC power related events. +.It Li PMU Ta Li "AC" Ta Li overvoltage Ta +An over voltage ondition was detected on the AC power line. +.It Li PMU Ta Li "AC" Ta Li plugged Ta +Power has been applied to the AC power line. +.It Li PMU Ta Li "AC" Ta Li unplugged Ta +Power has been removed from the AC power line. +.It Li PMU Ta Li Battery Ta Ta +.It Li PMU Ta Li Battery Ta absent Ta +Battery is no longer absent. +.It Li PMU Ta Li Battery Ta charged Ta +The battery has become charged. +.It Li PMU Ta Li Battery Ta charging Ta +The battery has started charging. +.It Li PMU Ta Li Battery Ta disconnected Ta +The battery has been disconnected. +.It Li PMU Ta Li Battery Ta high-temp Ta +The battery reported a temperature over the limit. +.It Li PMU Ta Li Battery Ta low-temp Ta +The battery reported a temperature under the limit. +.It Li PMU Ta Li Battery Ta plugged Ta +The battery has become plugged (eg connected). +.It Li PMU Ta Li Battery Ta shutdown-threshold Ta +The power in the battery has fallen below the shutdown threshold. +.It Li PMU Ta Li Battery Ta warning-threshold Ta +The power in the battery has fallen below the warn the user threshold. +.It Li PMU Ta Li Button Ta pressed Ta +A button on a +.Xr adb 4 +or +.Xr pmu 4 +has been pressed. +.It Li PMU Ta Li keys Ta Ta +One of the keys on the +.Xr adb 4 +keyboard has been pressed. +.It Li PMU Ta Li keys Ta brightness Ta +A brightness level change has been requested. +Direction is in the $notify variable. +.It Li PMU Ta Li keys Ta mute Ta +The mute key +.It Li PMU Ta Li keys Ta volume Ta +A volume level change has been requested. +Direction is in the $notify variable. +.It Li PMU Ta Li keys Ta eject Ta +An ejection has been requested. +.It Li PMU Ta Li lid Ta close Ta +The +.Xr pmc 4 +device has detected the lid closing. +.It Li PMU Ta Li lid Ta open Ta +The +.Xr pmc 4 +device has detected the lid openinging. +.It Li PMU Ta Li POWER Ta ACLINE Ta +The +.Xr pmc 4 +device has deteted an AC line state ($notify=0x00 is offline, 0x01 is online). +.It Li PMU Ta Li USB Ta overvoltage Ta +An over-voltage condition on the power lines for the USB power pins. +.It Li PMU Ta Li USB Ta plugged Ta +A device has been plugged into a USB device. +.It Li PMU Ta Li USB Ta undervoltage Ta +An under-voltage condition on the power lines for the USB power pins. +.It Li PMU Ta Li USB Ta unplugged Ta +A device has been unplugged into a USB device. +.El +.Pp +.Bl -column "System" "Subsystem" "1234567" -compact +.Sy "System" Ta Sy "Subsystem" Ta Sy "Type" Ta Sy "Description" .It Li RCTL Ta Ta Ta Events related to the .Xr rctl 8 @@ -492,7 +565,6 @@ USB interface is attached to a device. USB interface is detached from a device. .El .Pp - .\" .\" End of tables .\" ___ 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: r364363 - head/sbin/devd
Author: imp Date: Tue Aug 18 21:26:58 2020 New Revision: 364363 URL: https://svnweb.freebsd.org/changeset/base/364363 Log: Document the ZFS events as best I can. These are not well documented. MFC After: 3 days Modified: head/sbin/devd/devd.conf.5 Modified: head/sbin/devd/devd.conf.5 == --- head/sbin/devd/devd.conf.5 Tue Aug 18 21:26:54 2020(r364362) +++ head/sbin/devd/devd.conf.5 Tue Aug 18 21:26:58 2020(r364363) @@ -571,6 +571,17 @@ USB interface is attached to a device. USB interface is detached from a device. .El .Pp +.Bl -column "System" "Subsystem" "1234567" -compact +.Sy "System" Ta Sy "Subsystem" Ta Sy "Type" Ta Sy "Description" +.It Li ZFS Ta ZFS Ta Ta +Events about the ZFS subsystem. +See +.Xr zfsd 8 +and +.Pa /etc/devd/zfs.conf +for details. +.El +.Pp .\" .\" End of tables .\" ___ 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: r364360 - head/sbin/devd
Author: imp Date: Tue Aug 18 21:26:45 2020 New Revision: 364360 URL: https://svnweb.freebsd.org/changeset/base/364360 Log: GEOM::rotation_rate changes are also signaled via devctl. MFC After: 3 days Modified: head/sbin/devd/devd.conf.5 Modified: head/sbin/devd/devd.conf.5 == --- head/sbin/devd/devd.conf.5 Tue Aug 18 21:26:39 2020(r364359) +++ head/sbin/devd/devd.conf.5 Tue Aug 18 21:26:45 2020(r364360) @@ -445,6 +445,8 @@ A provider is destroyed. .It Li GEOM Ta Li DEV Ta Li GEOM::physpath Ta The physical path of a device has changed. +.It Li GEOM Ta Li DEV Ta Li GEOM::rotation_rate Ta +The roation rate of the disk has changed. .It Li GEOM Ta Li DEV Ta Li MEDIACHANGE Ta Physical media has changed. .It Li GEOM Ta Li DEV Ta Li SIZECHANGE Ta ___ 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: r364359 - head/sbin/devd
Author: imp Date: Tue Aug 18 21:26:39 2020 New Revision: 364359 URL: https://svnweb.freebsd.org/changeset/base/364359 Log: Move the possible event types into a column table to make it easier to read. Sort system type alphabetically. Remove some commas that aren't in the devd notification messages. MFC After: 3 days Reviewed by: 0mp (earlier versions), jhb (useful feedback on earlier versions) Differential Revision: https://reviews.freebsd.org/D26105 Modified: head/sbin/devd/devd.conf.5 Modified: head/sbin/devd/devd.conf.5 == --- head/sbin/devd/devd.conf.5 Tue Aug 18 20:59:10 2020(r364358) +++ head/sbin/devd/devd.conf.5 Tue Aug 18 21:26:39 2020(r364359) @@ -321,96 +321,112 @@ Vendor ID. A partial list of systems, subsystems, and types used within the .Ic notify mechanism. +.\" +.\" Please keep these tables sorted. Also, please use the same parameters +.\" for each of the tables so that things line up in columns nicely. +.\" Please do not omit the type column for notifiers that omit it. .Pp -.Bl -tag -width ".Li coretemp" -compact -.It Sy System -.It Li ACPI -Events related to the ACPI subsystem. -.Bl -tag -width ".Sy Subsystem" -compact -.It Sy Subsystem -.It Li ACAD +.Bl -column "System" "Subsystem" "1234567" -compact +.Sy "System" Ta Sy "Subsystem" Ta Sy "Type" Ta Sy "Description" +.It Li ACPI Ta Ta Ta +Events related to the ACPI Sybsystem. +.It Li ACPI Ta Li ACAD Ta Ta AC line state ($notify=0x00 is offline, 0x01 is online). -.It Li Button +.It Li ACPI Ta Li Button Ta Ta Button state ($notify=0x00 is power, 0x01 is sleep). -.It Li CMBAT +.It Li ACPI Ta Li CMBAT Ta Ta Battery events. -.It Li Dock +.It Li ACPI Ta Li Dock Ta Ta Dock state ($notify=0x00 is undocked, 0x01 is docked). -.It Li Lid +.It Li ACPI Ta Li Lid Ta Ta Lid state ($notify=0x00 is closed, 0x01 is open). -.It Li PROCESSOR +.It Li ACPI Ta Li PROCESSOR Ta Ta Processor state/configuration ($notify=0x81 is a change in available Cx states). -.It Li Resume +.It Li ACPI Ta Li Resume Ta Ta Resume notification. -.It Li Suspend +.It Li ACPI Ta Li Suspend Ta Ta Suspend notification. -.It Li Thermal +.It Li ACPI Ta Li Thermal Ta Ta Thermal zone events. .El .Pp -.It Li CARP +.Bl -column "System" "Subsystem" "1234567" -compact +.Sy "System" Ta Sy "Subsystem" Ta Sy "Type" Ta Sy "Description" +.It Li CAM Ta Ta Ta Events related to the +.Xr cam 4 +system. +.It Li CAM Ta Li periph Ta Ta +Events related to peripheral devices. +.It Li CAM Ta Li periph Ta Li error Ta +Generic errors. +.It Li CAM Ta Li periph Ta Li timeout Ta +Command timeouts. +.El +.Pp +.Bl -column "System" "Subsystem" "1234567" -compact +.Sy "System" Ta Sy "Subsystem" Ta Sy "Type" Ta Sy "Description" +.It Li CARP Ta Ta Ta +Events related to the .Xr carp 4 protocol. -.Bl -tag -width ".Sy Subsystem" -compact -.It Sy Subsystem -.It Ar vhid@interface +.It CARP Ta Ar vhid@inet Ta Ta The .Dq subsystem contains the actual CARP vhid and the name of the network interface on which the event took place. -.Bl -tag -width ".Li MASTER" -compact -.It Sy Type -.It Li MASTER +.It CARP Ta Ar vhid@inet Ta MASTER Ta Node become the master for a virtual host. -.It Li BACKUP +.It CARP Ta Ar vhid@inet Ta BACKUP Ta Node become the backup for a virtual host. .El +.Pp +.Bl -column "System" "Subsystem" "1234567" -compact +.Sy "System" Ta Sy "Subsystem" Ta Sy "Type" Ta Sy "Description" +.It Li coretemp Ta Ta Ta +Events related to the +.Xr coretemp 4 +device. +.It Li coretemp Ta Li Thermal Ta Ta +Notification that the CPU core has reached critical temperature. +.It Li coretemp Ta Li Thermal Ta Li temperature Ta +String containing the temperature of the core that has become too hot. .El .Pp +.Bl -column "System" "Subsystem" "1234567" -compact +.Sy "System" Ta Sy "Subsystem" Ta Sy "Type" Ta Sy "Description" .It Li IFNET -Events related to the network subsystem. -.Bl -tag -width ".Sy Subsystem" -compact -.It Sy Subsystem -.It Ar interface +.It Li IFNET Ta Ar inet Ta Ta The .Dq subsystem is the actual name of the network interface on which the event took place. -.Bl -tag -width ".Li LINK_DOWN" -compact -.It Sy Type -.It Li LINK_UP +.It Li IFNET Ta Ar inet Ta Li LINK_UP Ta Carrier status changed to UP. -.It Li LINK_DOWN +.It Li IFNET Ta Ar inet Ta Li LINK_DOWN Ta Carrier status changed to DOWN. -.It Li ATTACH +.It Li IFNET Ta Ar inet Ta Li ATTACH Ta The network interface is attached to the system. -.It Li DETACH +.It Li IFNET Ta Ar inet Ta Li DETACH Ta The network interface is detached from the system. .El -.El .Pp +.Bl -column "System" "Subsystem" "1234567" -compact +.Sy "System" Ta Sy "Subsystem" Ta Sy "Type" Ta Sy "Description" .It Li DEVFS -Events related to the -.Xr devfs 5 -filesystem. -.Bl -tag -width ".Sy Subsystem" -compact -.It Sy Subsystem -.It Li CDEV -.Bl -tag -width ".Li DESTROY" -compact -.It Sy Type -.It Li CREATE +.It Li DEVFS Ta Li CDEV Ta Li CREATE Ta
svn commit: r364358 - head/sys/gdb
Author: cem Date: Tue Aug 18 20:59:10 2020 New Revision: 364358 URL: https://svnweb.freebsd.org/changeset/base/364358 Log: gdb(4): Support empty qSupported queries Technically a client may send a qSupported query without specifying any client features. We should respond with our supported list in that case instead of bailing with error. Reported by: rlibby Reviewed by: emaste, rlibby, vangyzen Sponsored by: Isilon Differential Revision:https://reviews.freebsd.org/D26115 Modified: head/sys/gdb/gdb_main.c Modified: head/sys/gdb/gdb_main.c == --- head/sys/gdb/gdb_main.c Tue Aug 18 20:41:03 2020(r364357) +++ head/sys/gdb/gdb_main.c Tue Aug 18 20:59:10 2020(r364358) @@ -204,8 +204,14 @@ gdb_do_qsupported(uint32_t *feat) /* Parse supported host features */ *feat = 0; - if (gdb_rx_char() != ':') + switch (gdb_rx_char()) { + case ':': + break; + case EOF: + goto nofeatures; + default: goto error; + } while (gdb_rxsz > 0) { tok = gdb_rxp; @@ -250,6 +256,7 @@ gdb_do_qsupported(uint32_t *feat) *feat |= BIT(i); } +nofeatures: /* Send a supported feature list back */ gdb_tx_begin(0); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r364357 - stable/12/libexec/rc/rc.d
Author: cy Date: Tue Aug 18 20:41:03 2020 New Revision: 364357 URL: https://svnweb.freebsd.org/changeset/base/364357 Log: MFC r364133: When booting a system with WITHOUT_IPFILTER the following errors are encountered at boot time: rcorder: requirement `ipfs' in file `/etc/rc.d/netif' has no providers. rcorder: requirement `ipfilter' in file `/etc/rc.d/netif' has no providers. rcorder: requirement `ipfilter' in file `/etc/rc.d/netwait' has no providers. rcorder: requirement `ipfilter' in file `/etc/rc.d/net_watchdog' has no providers. rcorder: requirement `ipfilter' in file `/etc/rc.d/securelevel' has no providers. Listing its own requrements in BEFORE rather than use REQUIRE of non-optional scripts resolves this issue. The issue was discovered and patched by glebius at Netflix. Submitted by: glebius Reported by: glebius Modified: stable/12/libexec/rc/rc.d/ipfilter stable/12/libexec/rc/rc.d/ipmon stable/12/libexec/rc/rc.d/ipnat stable/12/libexec/rc/rc.d/netif stable/12/libexec/rc/rc.d/netwait stable/12/libexec/rc/rc.d/securelevel Directory Properties: stable/12/ (props changed) Modified: stable/12/libexec/rc/rc.d/ipfilter == --- stable/12/libexec/rc/rc.d/ipfilter Tue Aug 18 20:20:45 2020 (r364356) +++ stable/12/libexec/rc/rc.d/ipfilter Tue Aug 18 20:41:03 2020 (r364357) @@ -5,6 +5,7 @@ # PROVIDE: ipfilter # REQUIRE: FILESYSTEMS +# BEFORE: ipmon ipnat netif netwait securelevel # KEYWORD: nojailvnet . /etc/rc.subr Modified: stable/12/libexec/rc/rc.d/ipmon == --- stable/12/libexec/rc/rc.d/ipmon Tue Aug 18 20:20:45 2020 (r364356) +++ stable/12/libexec/rc/rc.d/ipmon Tue Aug 18 20:41:03 2020 (r364357) @@ -4,7 +4,7 @@ # # PROVIDE: ipmon -# REQUIRE: FILESYSTEMS hostname sysctl ipfilter +# REQUIRE: FILESYSTEMS hostname sysctl # BEFORE: SERVERS # KEYWORD: nojailvnet Modified: stable/12/libexec/rc/rc.d/ipnat == --- stable/12/libexec/rc/rc.d/ipnat Tue Aug 18 20:20:45 2020 (r364356) +++ stable/12/libexec/rc/rc.d/ipnat Tue Aug 18 20:41:03 2020 (r364357) @@ -4,7 +4,6 @@ # # PROVIDE: ipnat -# REQUIRE: ipfilter # KEYWORD: nojailvnet . /etc/rc.subr Modified: stable/12/libexec/rc/rc.d/netif == --- stable/12/libexec/rc/rc.d/netif Tue Aug 18 20:20:45 2020 (r364356) +++ stable/12/libexec/rc/rc.d/netif Tue Aug 18 20:41:03 2020 (r364357) @@ -27,7 +27,7 @@ # PROVIDE: netif # REQUIRE: FILESYSTEMS iovctl serial sppp sysctl -# REQUIRE: hostid ipfilter ipfs +# REQUIRE: hostid ipfs # KEYWORD: nojailvnet . /etc/rc.subr Modified: stable/12/libexec/rc/rc.d/netwait == --- stable/12/libexec/rc/rc.d/netwait Tue Aug 18 20:20:45 2020 (r364356) +++ stable/12/libexec/rc/rc.d/netwait Tue Aug 18 20:41:03 2020 (r364357) @@ -3,7 +3,7 @@ # $FreeBSD$ # # PROVIDE: netwait -# REQUIRE: devd ipfilter ipfw pf routing +# REQUIRE: devd ipfw pf routing # KEYWORD: nojail # # The netwait script helps handle two situations: Modified: stable/12/libexec/rc/rc.d/securelevel == --- stable/12/libexec/rc/rc.d/securelevel Tue Aug 18 20:20:45 2020 (r364356) +++ stable/12/libexec/rc/rc.d/securelevel Tue Aug 18 20:41:03 2020 (r364357) @@ -4,7 +4,7 @@ # # PROVIDE: securelevel -# REQUIRE: adjkerntz ipfw ipfilter pf +# REQUIRE: adjkerntz ipfw pf . /etc/rc.subr ___ 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: r364356 - head/sys/arm/allwinner
Author: imp Date: Tue Aug 18 20:20:45 2020 New Revision: 364356 URL: https://svnweb.freebsd.org/changeset/base/364356 Log: None of system, subsystem, or type may have spaces in them. Convert the spaces to dashes. Approved by: manu@ Modified: head/sys/arm/allwinner/axp209.c head/sys/arm/allwinner/axp81x.c Modified: head/sys/arm/allwinner/axp209.c == --- head/sys/arm/allwinner/axp209.c Tue Aug 18 19:48:04 2020 (r364355) +++ head/sys/arm/allwinner/axp209.c Tue Aug 18 20:20:45 2020 (r364356) @@ -863,9 +863,9 @@ axp2xx_intr(void *arg) if (reg & AXP2XX_IRQ2_BATT_DISCONN) devctl_notify("PMU", "Battery", "disconnected", NULL); if (reg & AXP2XX_IRQ2_BATT_TEMP_LOW) - devctl_notify("PMU", "Battery", "low temp", NULL); + devctl_notify("PMU", "Battery", "low-temp", NULL); if (reg & AXP2XX_IRQ2_BATT_TEMP_OVER) - devctl_notify("PMU", "Battery", "high temp", NULL); + devctl_notify("PMU", "Battery", "high-temp", NULL); axp2xx_write(sc->dev, AXP2XX_IRQ2_STATUS, AXP2XX_IRQ_ACK); } Modified: head/sys/arm/allwinner/axp81x.c == --- head/sys/arm/allwinner/axp81x.c Tue Aug 18 19:48:04 2020 (r364355) +++ head/sys/arm/allwinner/axp81x.c Tue Aug 18 20:20:45 2020 (r364356) @@ -1118,9 +1118,9 @@ axp8xx_intr(void *arg) if (bootverbose) device_printf(dev, "AXP_IRQSTAT4 val: %x\n", val); if (val & AXP_IRQSTAT4_BATLVL_LO0) - devctl_notify("PMU", "Battery", "shutdown threshold", NULL); + devctl_notify("PMU", "Battery", "shutdown-threshold", NULL); if (val & AXP_IRQSTAT4_BATLVL_LO1) - devctl_notify("PMU", "Battery", "warning threshold", NULL); + devctl_notify("PMU", "Battery", "warning-threshold", NULL); /* Acknowledge */ axp8xx_write(dev, AXP_IRQSTAT4, val); } ___ 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: r364355 - in head: stand/efi/loader stand/i386/loader stand/libsa/zfs stand/lua sys/cddl/boot/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common/...
Author: oshogbo Date: Tue Aug 18 19:48:04 2020 New Revision: 364355 URL: https://svnweb.freebsd.org/changeset/base/364355 Log: zfs: add an option to the bootloader to rewind the ZFS checkpoint The checkpoints are another way of keeping the state of ZFS. During the rewind, the pool has to be exported. This makes checkpoints unusable when using ZFS as root. Add the option to rewind the ZFS checkpoint at the boot time. If checkpoint exists, a new option for rewinding a checkpoint will appear in the bootloader menu. We fully support boot environments. If the rewind option is selected, the boot loader will show a list of boot environments that existed before the checkpoint. Reviewed by: tsoome, allanjude, kevans (ok with high-level overview) Differential Revision:https://reviews.freebsd.org/D24920 Modified: head/stand/efi/loader/main.c head/stand/i386/loader/main.c head/stand/libsa/zfs/libzfs.h head/stand/libsa/zfs/zfs.c head/stand/libsa/zfs/zfsimpl.c head/stand/lua/core.lua head/stand/lua/menu.lua head/sys/cddl/boot/zfs/zfsimpl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Modified: head/stand/efi/loader/main.c == --- head/stand/efi/loader/main.cTue Aug 18 19:34:31 2020 (r364354) +++ head/stand/efi/loader/main.cTue Aug 18 19:48:04 2020 (r364355) @@ -269,7 +269,7 @@ probe_zfs_currdev(uint64_t guid) currdev.root_guid = 0; set_currdev_devdesc((struct devdesc *)); devname = efi_fmtdev(); - init_zfs_bootenv(devname); + init_zfs_boot_options(devname); rv = sanity_check_currdev(); if (rv) { Modified: head/stand/i386/loader/main.c == --- head/stand/i386/loader/main.c Tue Aug 18 19:34:31 2020 (r364354) +++ head/stand/i386/loader/main.c Tue Aug 18 19:48:04 2020 (r364355) @@ -363,7 +363,7 @@ extract_currdev(void) #ifdef LOADER_ZFS_SUPPORT if (new_currdev.dd.d_dev->dv_type == DEVT_ZFS) - init_zfs_bootenv(zfs_fmtdev(_currdev)); + init_zfs_boot_options(zfs_fmtdev(_currdev)); #endif env_setenv("currdev", EV_VOLATILE, i386_fmtdev(_currdev), Modified: head/stand/libsa/zfs/libzfs.h == --- head/stand/libsa/zfs/libzfs.h Tue Aug 18 19:34:31 2020 (r364354) +++ head/stand/libsa/zfs/libzfs.h Tue Aug 18 19:48:04 2020 (r364355) @@ -123,7 +123,7 @@ int zfs_nextboot(void *vdev, char *buf, size_t size); intzfs_probe_dev(const char *devname, uint64_t *pool_guid); intzfs_list(const char *name); uint64_t ldi_get_size(void *); -void init_zfs_bootenv(const char *currdev); +void init_zfs_boot_options(const char *currdev); intzfs_bootenv(const char *name); intzfs_belist_add(const char *name, uint64_t __unused); intzfs_set_env(void); Modified: head/stand/libsa/zfs/zfs.c == --- head/stand/libsa/zfs/zfs.c Tue Aug 18 19:34:31 2020(r364354) +++ head/stand/libsa/zfs/zfs.c Tue Aug 18 19:48:04 2020(r364355) @@ -60,7 +60,10 @@ static off_t zfs_seek(struct open_file *f, off_t offse static int zfs_stat(struct open_file *f, struct stat *sb); static int zfs_readdir(struct open_file *f, struct dirent *d); -static voidzfs_bootenv_initial(const char *); +static voidzfs_bootenv_initial(const char *envname, spa_t *spa, + const char *name, const char *dsname, int checkpoint); +static voidzfs_checkpoints_initial(spa_t *spa, const char *name, + const char *dsname); struct devsw zfs_dev; @@ -1077,16 +1080,16 @@ zfs_fmtdev(void *vdev) return (buf); } -int -zfs_list(const char *name) +static int +split_devname(const char *name, char *poolname, size_t size, +const char **dsnamep) { - static char poolname[ZFS_MAXNAMELEN]; - uint64_tobjid; - spa_t *spa; - const char *dsname; - int len; - int rv; + const char *dsname; + size_t len; + ASSERT(name != NULL); + ASSERT(poolname != NULL); + len = strlen(name); dsname = strchr(name, '/'); if (dsname != NULL) { @@ -1094,9 +1097,30 @@ zfs_list(const char *name) dsname++; } else dsname = ""; - memcpy(poolname, name, len); - poolname[len] = '\0'; + if (len + 1 > size) + return (EINVAL); + + strlcpy(poolname, name, len + 1); + + if (dsnamep != NULL) + *dsnamep = dsname; + +
svn commit: r364354 - head/sys/netinet/cc
Author: rscheff Date: Tue Aug 18 19:34:31 2020 New Revision: 364354 URL: https://svnweb.freebsd.org/changeset/base/364354 Log: TCP Cubic: recalculate cwnd for every ACK. Since cubic calculates cwnd based on absolute time, retaining RFC3465 (ABC) once-per-window updates can lead to dramatic changes of cwnd in the convex region. Updating cwnd for each incoming ack minimizes this delta, preventing unintentional line-rate bursts. Reviewed by: chengc_netapp.com, tuexen (mentor) MFC after:2 weeks Sponsored by: NetApp, Inc. Differential Revision:https://reviews.freebsd.org/D26060 Modified: head/sys/netinet/cc/cc_cubic.c Modified: head/sys/netinet/cc/cc_cubic.c == --- head/sys/netinet/cc/cc_cubic.c Tue Aug 18 19:25:03 2020 (r364353) +++ head/sys/netinet/cc/cc_cubic.c Tue Aug 18 19:34:31 2020 (r364354) @@ -131,16 +131,11 @@ cubic_ack_received(struct cc_var *ccv, uint16_t type) cubic_record_rtt(ccv); /* -* Regular ACK and we're not in cong/fast recovery and we're cwnd -* limited and we're either not doing ABC or are just coming out -* from slow-start or were application limited or are slow starting -* or are doing ABC and we've sent a cwnd's worth of bytes. +* For a regular ACK and we're not in cong/fast recovery and +* we're cwnd limited, always recalculate cwnd. */ if (type == CC_ACK && !IN_RECOVERY(CCV(ccv, t_flags)) && - (ccv->flags & CCF_CWND_LIMITED) && (!V_tcp_do_rfc3465 || - (cubic_data->flags & (CUBICFLAG_IN_SLOWSTART | CUBICFLAG_IN_APPLIMIT)) || - CCV(ccv, snd_cwnd) <= CCV(ccv, snd_ssthresh) || - (V_tcp_do_rfc3465 && (ccv->flags & CCF_ABC_SENTAWND { + (ccv->flags & CCF_CWND_LIMITED)) { /* Use the logic in NewReno ack_received() for slow start. */ if (CCV(ccv, snd_cwnd) <= CCV(ccv, snd_ssthresh) || cubic_data->min_rtt_ticks == TCPTV_SRTTBASE) { @@ -193,15 +188,8 @@ cubic_ack_received(struct cc_var *ccv, uint16_t type) * cwnd growth. * Only update snd_cwnd, if it doesn't shrink. */ - if (V_tcp_do_rfc3465) - CCV(ccv, snd_cwnd) = ulmin(w_cubic_next, - INT_MAX); - else - CCV(ccv, snd_cwnd) += ulmax(1, - ((ulmin(w_cubic_next, INT_MAX) - - CCV(ccv, snd_cwnd)) * - CCV(ccv, t_maxseg)) / - CCV(ccv, snd_cwnd)); + CCV(ccv, snd_cwnd) = ulmin(w_cubic_next, + INT_MAX); } /* ___ 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: r364353 - head/sys/netinet
Author: tuexen Date: Tue Aug 18 19:25:03 2020 New Revision: 364353 URL: https://svnweb.freebsd.org/changeset/base/364353 Log: Fix two bugs I introduced in r362563. Found by running syzkaller. MFC after:3 days Modified: head/sys/netinet/sctp_usrreq.c Modified: head/sys/netinet/sctp_usrreq.c == --- head/sys/netinet/sctp_usrreq.c Tue Aug 18 17:30:51 2020 (r364352) +++ head/sys/netinet/sctp_usrreq.c Tue Aug 18 19:25:03 2020 (r364353) @@ -1124,7 +1124,7 @@ sctp_fill_up_addresses_vrf(struct sctp_inpcb *inp, if (actual + sizeof(struct sockaddr_in6) > limit) { return (actual); } - in6_sin_2_v4mapsin6(sin, (struct sockaddr_in6 *)); + in6_sin_2_v4mapsin6(sin, (struct sockaddr_in6 *)addr); ((struct sockaddr_in6 *)addr)->sin6_port = inp->sctp_lport; addr = (struct sockaddr *)((caddr_t)addr + sizeof(struct sockaddr_in6)); actual += sizeof(struct sockaddr_in6); @@ -2271,7 +2271,7 @@ flags_out: (net->ro._l_addr.sa.sa_family == AF_INET)) { /* Must map the address */ in6_sin_2_v4mapsin6(>ro._l_addr.sin, - (struct sockaddr_in6 *)); + (struct sockaddr_in6 *)addr); } else { memcpy(addr, >ro._l_addr, cpsz); } ___ 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: r364352 - head/share/man/man5
Author: gbe (doc committer) Date: Tue Aug 18 17:30:51 2020 New Revision: 364352 URL: https://svnweb.freebsd.org/changeset/base/364352 Log: pf.conf(5): Assorted fixes - new sentence new line - blank lines in fill mode Modified: head/share/man/man5/pf.conf.5 Modified: head/share/man/man5/pf.conf.5 == --- head/share/man/man5/pf.conf.5 Tue Aug 18 17:29:01 2020 (r364351) +++ head/share/man/man5/pf.conf.5 Tue Aug 18 17:30:51 2020 (r364352) @@ -499,12 +499,12 @@ For example: .Bd -literal -offset indent set block-policy return .Ed - .It Ar set fail-policy The .Ar fail-policy -option sets the behaviour of rules which should pass a packet but were unable to -do so. This might happen when a nat or route-to rule uses an empty table as list +option sets the behaviour of rules which should pass a packet but were +unable to do so. +This might happen when a nat or route-to rule uses an empty table as list of targets or if a rule fails to create state or source node. The following .Ar block @@ -523,7 +523,6 @@ For example: .Bd -literal -offset indent set fail-policy return .Ed - .It Ar set state-policy The .Ar state-policy ___ 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: r364351 - head/share/man/man4
Author: imp Date: Tue Aug 18 17:29:01 2020 New Revision: 364351 URL: https://svnweb.freebsd.org/changeset/base/364351 Log: bt(4) has already been removed. Add a deprecation notice. MFC After: 1 day Modified: head/share/man/man4/bt.4 Modified: head/share/man/man4/bt.4 == --- head/share/man/man4/bt.4Tue Aug 18 16:58:37 2020(r364350) +++ head/share/man/man4/bt.4Tue Aug 18 17:29:01 2020(r364351) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 15, 2017 +.Dd August 18, 2020 .Dt BT 4 .Os .Sh NAME @@ -46,6 +46,9 @@ In .Cd hint.bt.0.at="isa" .Cd hint.bt.0.port="0x330" .Ed +.Sh DEPRECATION NOTICE +This driver is scheduled for removal prior to the release of +.Fx 13.0 . .Sh DESCRIPTION This driver provides access to the .Tn SCSI ___ 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: r364350 - head/usr.bin/w
Author: fernape (ports committer) Date: Tue Aug 18 16:58:37 2020 New Revision: 364350 URL: https://svnweb.freebsd.org/changeset/base/364350 Log: uptime(1): Add EXAMPLES section Add a simple example Approved by: manpages (bcr@) Differential Revision:https://reviews.freebsd.org/D26063 Modified: head/usr.bin/w/uptime.1 Modified: head/usr.bin/w/uptime.1 == --- head/usr.bin/w/uptime.1 Tue Aug 18 16:51:04 2020(r364349) +++ head/usr.bin/w/uptime.1 Tue Aug 18 16:58:37 2020(r364350) @@ -28,7 +28,7 @@ .\" @(#)uptime.1 8.2 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd April 18, 1994 +.Dd August 18, 2020 .Dt UPTIME 1 .Os .Sh NAME @@ -48,6 +48,11 @@ the number of users, and the load average of the syste .It Pa /boot/kernel/kernel system name list .El +.Sh EXAMPLES +.Bd -literal -offset indent +$ uptime +11:23AM up 3:01, 8 users, load averages: 21.09, 15.43, 12.79 +.Ed .Sh SEE ALSO .Xr w 1 .Sh HISTORY ___ 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: r364349 - head/sys/riscv/riscv
Author: nick Date: Tue Aug 18 16:51:04 2020 New Revision: 364349 URL: https://svnweb.freebsd.org/changeset/base/364349 Log: riscv: Use global mimpid in identify_cpu() sbi_init() sets mimpid, we can use that value. Reviewed by: philip (mentor), kp (mentor) Approved by: philip (mentor), kp (mentor) Sponsored by: Axiado Differential Revision: https://reviews.freebsd.org/D26092 Modified: head/sys/riscv/riscv/identcpu.c Modified: head/sys/riscv/riscv/identcpu.c == --- head/sys/riscv/riscv/identcpu.c Tue Aug 18 16:06:16 2020 (r364348) +++ head/sys/riscv/riscv/identcpu.c Tue Aug 18 16:51:04 2020 (r364349) @@ -186,15 +186,13 @@ identify_cpu(void) const struct cpu_parts *cpu_partsp; uint32_t part_id; uint32_t impl_id; - uint64_t mimpid; uint64_t misa; u_int cpu; size_t i; cpu_partsp = NULL; - /* TODO: can we get mimpid and misa somewhere ? */ - mimpid = 0; + /* TODO: can we get misa somewhere ? */ misa = 0; cpu = PCPU_GET(cpuid); ___ 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: r364336 - in head: share/man/man4 sys/dev/pccard
On Tue, Aug 18, 2020, 9:27 AM Rodney W. Grimes wrote: > > Author: imp > > Date: Tue Aug 18 06:18:18 2020 > > New Revision: 364336 > > URL: https://svnweb.freebsd.org/changeset/base/364336 > > > > Log: > > Document that PC Card will likely be removed before 13. > > > > This was discussed in arch@ a while ago. Most of the 16-bit drivers > that it > > relied on have been removed. There's only a few other drivers > remaining that > > support it, and those are very rare the days (even the once > ubiquitious wi(1) > > is now quite rare). > > > > Indvidual drivers will be handled separately before pccard itself is > removed. > > MFC? I assume you plan to merge this to stable/12? > Yup. Warner > > Modified: > > head/share/man/man4/pccard.4 > > head/sys/dev/pccard/pccard.c > > > > Modified: head/share/man/man4/pccard.4 > > > == > > --- head/share/man/man4/pccard.4 Tue Aug 18 06:07:34 2020 > (r364335) > > +++ head/share/man/man4/pccard.4 Tue Aug 18 06:18:18 2020 > (r364336) > > @@ -23,7 +23,7 @@ > > .\" > > .\" $FreeBSD$ > > .\" > > -.Dd July 9, 2002 > > +.Dd August 18, 2020 > > .Dt PCCARD 4 > > .Os > > .Sh NAME > > @@ -31,6 +31,9 @@ > > .Nd PC Card bus driver > > .Sh SYNOPSIS > > .Cd device pccard > > +.Sh DEPRECATION NOTICE > > +This driver is scheduled for removal prior to the release of > > +.Fx 13.0 > > .Sh DESCRIPTION > > The > > .Nm > > > > Modified: head/sys/dev/pccard/pccard.c > > > == > > --- head/sys/dev/pccard/pccard.c Tue Aug 18 06:07:34 2020 > (r364335) > > +++ head/sys/dev/pccard/pccard.c Tue Aug 18 06:18:18 2020 > (r364336) > > @@ -845,6 +845,7 @@ pccard_attach(device_t dev) > > sc->sc_enabled_count = 0; > > if ((err = pccard_device_create(sc)) != 0) > > return (err); > > + gone_in(13, "PC Card to be removed."); > > STAILQ_INIT(>card.pf_head); > > return (bus_generic_attach(dev)); > > } > > > > -- > Rod Grimes > rgri...@freebsd.org > ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r364348 - head/sys/cam/scsi
Author: mjg Date: Tue Aug 18 16:06:16 2020 New Revision: 364348 URL: https://svnweb.freebsd.org/changeset/base/364348 Log: cam: add missing MAKEDEV_NOWAIT in passregister Reported by: dhw Modified: head/sys/cam/scsi/scsi_pass.c Modified: head/sys/cam/scsi/scsi_pass.c == --- head/sys/cam/scsi/scsi_pass.c Tue Aug 18 15:44:03 2020 (r364347) +++ head/sys/cam/scsi/scsi_pass.c Tue Aug 18 16:06:16 2020 (r364348) @@ -652,6 +652,7 @@ passregister(struct cam_periph *periph, void *arg) args.mda_gid = GID_OPERATOR; args.mda_mode = 0600; args.mda_si_drv1 = periph; + args.mda_flags = MAKEDEV_NOWAIT; error = make_dev_s(, >dev, "%s%d", periph->periph_name, periph->unit_number); if (error != 0) { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r364347 - head/sys/dev/usb/controller
Author: hselasky Date: Tue Aug 18 15:44:03 2020 New Revision: 364347 URL: https://svnweb.freebsd.org/changeset/base/364347 Log: Check the XHCI endpoint state before issuing XHCI endpoint commands. Differential Revision:https://reviews.freebsd.org/D26064 Reviewed by: kp@ and bz@ MFC after:1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/usb/controller/xhci.c Modified: head/sys/dev/usb/controller/xhci.c == --- head/sys/dev/usb/controller/xhci.c Tue Aug 18 14:17:14 2020 (r364346) +++ head/sys/dev/usb/controller/xhci.c Tue Aug 18 15:44:03 2020 (r364347) @@ -3808,6 +3808,28 @@ alloc_dma_set: } } +static uint8_t +xhci_get_endpoint_state(struct usb_device *udev, uint8_t epno) +{ + struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); + struct usb_page_search buf_dev; + struct xhci_hw_dev *hdev; + struct xhci_dev_ctx *pdev; + uint32_t temp; + + MPASS(epno != 0); + + hdev = >sc_hw.devs[udev->controller_slot_id]; + + usbd_get_page(>device_pc, 0, _dev); + pdev = buf_dev.buffer; + usb_pc_cpu_invalidate(>device_pc); + + temp = xhci_ctx_get_le32(sc, >ctx_ep[epno - 1].dwEpCtx0); + + return (XHCI_EPCTX_0_EPSTATE_GET(temp)); +} + static usb_error_t xhci_configure_reset_endpoint(struct usb_xfer *xfer) { @@ -3861,16 +3883,20 @@ xhci_configure_reset_endpoint(struct usb_xfer *xfer) * Get the endpoint into the stopped state according to the * endpoint context state diagram in the XHCI specification: */ - - err = xhci_cmd_stop_ep(sc, 0, epno, index); - - if (err != 0) - DPRINTF("Could not stop endpoint %u\n", epno); - - err = xhci_cmd_reset_ep(sc, 0, epno, index); - - if (err != 0) - DPRINTF("Could not reset endpoint %u\n", epno); + switch (xhci_get_endpoint_state(udev, epno)) { + case XHCI_EPCTX_0_EPSTATE_STOPPED: + break; + case XHCI_EPCTX_0_EPSTATE_HALTED: + err = xhci_cmd_reset_ep(sc, 0, epno, index); + if (err != 0) + DPRINTF("Could not reset endpoint %u\n", epno); + break; + default: + err = xhci_cmd_stop_ep(sc, 0, epno, index); + if (err != 0) + DPRINTF("Could not stop endpoint %u\n", epno); + break; + } err = xhci_cmd_set_tr_dequeue_ptr(sc, (pepext->physaddr + (stream_id * sizeof(struct xhci_trb) * ___ 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: r364336 - in head: share/man/man4 sys/dev/pccard
> Author: imp > Date: Tue Aug 18 06:18:18 2020 > New Revision: 364336 > URL: https://svnweb.freebsd.org/changeset/base/364336 > > Log: > Document that PC Card will likely be removed before 13. > > This was discussed in arch@ a while ago. Most of the 16-bit drivers that it > relied on have been removed. There's only a few other drivers remaining that > support it, and those are very rare the days (even the once ubiquitious > wi(1) > is now quite rare). > > Indvidual drivers will be handled separately before pccard itself is > removed. MFC? I assume you plan to merge this to stable/12? > Modified: > head/share/man/man4/pccard.4 > head/sys/dev/pccard/pccard.c > > Modified: head/share/man/man4/pccard.4 > == > --- head/share/man/man4/pccard.4 Tue Aug 18 06:07:34 2020 > (r364335) > +++ head/share/man/man4/pccard.4 Tue Aug 18 06:18:18 2020 > (r364336) > @@ -23,7 +23,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd July 9, 2002 > +.Dd August 18, 2020 > .Dt PCCARD 4 > .Os > .Sh NAME > @@ -31,6 +31,9 @@ > .Nd PC Card bus driver > .Sh SYNOPSIS > .Cd device pccard > +.Sh DEPRECATION NOTICE > +This driver is scheduled for removal prior to the release of > +.Fx 13.0 > .Sh DESCRIPTION > The > .Nm > > Modified: head/sys/dev/pccard/pccard.c > == > --- head/sys/dev/pccard/pccard.c Tue Aug 18 06:07:34 2020 > (r364335) > +++ head/sys/dev/pccard/pccard.c Tue Aug 18 06:18:18 2020 > (r364336) > @@ -845,6 +845,7 @@ pccard_attach(device_t dev) > sc->sc_enabled_count = 0; > if ((err = pccard_device_create(sc)) != 0) > return (err); > + gone_in(13, "PC Card to be removed."); > STAILQ_INIT(>card.pf_head); > return (bus_generic_attach(dev)); > } > -- Rod Grimes rgri...@freebsd.org ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r364346 - head/sys/compat/linux
Author: markj Date: Tue Aug 18 14:17:14 2020 New Revision: 364346 URL: https://svnweb.freebsd.org/changeset/base/364346 Log: Fix handling of ancillary data on non-AF_UNIX Linux sockets. After r340674, the "continue" would restart the loop without having updated clen, resulting in an infinite loop. Restore the old behaviour of simply ignoring all control messages on such sockets, since we currently only implement handling for AF_UNIX-specific messages. Reported by: syzkaller Reviewed by: tijl MFC after:1 week Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D26093 Modified: head/sys/compat/linux/linux_socket.c Modified: head/sys/compat/linux/linux_socket.c == --- head/sys/compat/linux/linux_socket.cTue Aug 18 14:09:49 2020 (r364345) +++ head/sys/compat/linux/linux_socket.cTue Aug 18 14:17:14 2020 (r364346) @@ -1067,7 +1067,7 @@ linux_sendmsg_common(struct thread *td, l_int s, struc * FreeBSD system call interface. */ if (sa_family != AF_UNIX) - continue; + goto next; if (cmsg->cmsg_type == SCM_CREDS) { len = sizeof(struct cmsgcred); @@ -1094,6 +1094,7 @@ linux_sendmsg_common(struct thread *td, l_int s, struc data = (char *)data + CMSG_SPACE(len); datalen += CMSG_SPACE(len); +next: if (clen <= LINUX_CMSG_ALIGN(linux_cmsg.cmsg_len)) 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"
Re: svn commit: r364310 - in head/sys: kern vm
On Tue, Aug 18, 2020 at 01:03:25AM +0300, Andriy Gapon wrote: > On 17/08/2020 18:37, Gleb Smirnoff wrote: > > Author: glebius > > Date: Mon Aug 17 15:37:08 2020 > > New Revision: 364310 > > URL: https://svnweb.freebsd.org/changeset/base/364310 > > > > Log: > > With INVARIANTS panic immediately if M_WAITOK is requested in a > > non-sleepable context. Previously only _sleep() would panic. > > This will catch misuse of M_WAITOK at development stage rather > > than at stress load stage. > > > > Reviewed by: markj > > Differential Revision:https://reviews.freebsd.org/D26027 > > I think that there is going to be a lot of fallout from this. > Will you handle it? > A warning from WITNESS is one thing, a panic is another. Indeed, based on a few reports from freebsd-current I reverted the commit. It seems there are a number of places in CAM that will require modification, particularly in async event handling. Note that CAM doneq threads execute handlers with TD_NO_SLEEPING. ___ 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: r364345 - in head/sys: kern vm
Author: markj Date: Tue Aug 18 14:09:49 2020 New Revision: 364345 URL: https://svnweb.freebsd.org/changeset/base/364345 Log: Revert r364310. Some of the resulting fallout in CAM does not appear straightforward to fix, so simply revert the commit for now in the absence of a better solution. Discussed with: mjg Reported by: dhw Modified: head/sys/kern/kern_malloc.c head/sys/vm/uma_core.c Modified: head/sys/kern/kern_malloc.c == --- head/sys/kern/kern_malloc.c Tue Aug 18 12:14:01 2020(r364344) +++ head/sys/kern/kern_malloc.c Tue Aug 18 14:09:49 2020(r364345) @@ -618,9 +618,6 @@ void * unsigned long osize = size; #endif - KASSERT((flags & M_WAITOK) == 0 || THREAD_CAN_SLEEP(), - ("malloc(M_WAITOK) in non-sleepable context")); - #ifdef MALLOC_DEBUG va = NULL; if (malloc_dbg(, , mtp, flags) != 0) Modified: head/sys/vm/uma_core.c == --- head/sys/vm/uma_core.c Tue Aug 18 12:14:01 2020(r364344) +++ head/sys/vm/uma_core.c Tue Aug 18 14:09:49 2020(r364345) @@ -3328,9 +3328,6 @@ uma_zalloc_smr(uma_zone_t zone, int flags) uma_cache_bucket_t bucket; uma_cache_t cache; - KASSERT((flags & M_WAITOK) == 0 || THREAD_CAN_SLEEP(), - ("uma_zalloc_smr(M_WAITOK) in non-sleepable context")); - #ifdef UMA_ZALLOC_DEBUG void *item; @@ -3354,9 +3351,6 @@ uma_zalloc_arg(uma_zone_t zone, void *udata, int flags { uma_cache_bucket_t bucket; uma_cache_t cache; - - KASSERT((flags & M_WAITOK) == 0 || THREAD_CAN_SLEEP(), - ("uma_zalloc(M_WAITOK) in non-sleepable context")); /* Enable entropy collection for RANDOM_ENABLE_UMA kernel option */ random_harvest_fast_uma(, sizeof(zone), RANDOM_UMA); ___ 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: r364344 - head/sys/dev/iicbus/mux
Author: avg Date: Tue Aug 18 12:14:01 2020 New Revision: 364344 URL: https://svnweb.freebsd.org/changeset/base/364344 Log: iicmux: fix a sign error in comparison Because pcell_t is unsigned both sides of the comparison were treated as such. Because of that error iicmux created all possible sub-buses even if only a subset was defined in the device tree. MFC after:1 week Modified: head/sys/dev/iicbus/mux/iicmux.c Modified: head/sys/dev/iicbus/mux/iicmux.c == --- head/sys/dev/iicbus/mux/iicmux.cTue Aug 18 11:36:38 2020 (r364343) +++ head/sys/dev/iicbus/mux/iicmux.cTue Aug 18 12:14:01 2020 (r364344) @@ -283,7 +283,7 @@ iicmux_attach_children(struct iicmux_softc *sc) } sc->childdevs[idx] = device_add_child(sc->dev, "iicbus", -1); sc->childnodes[idx] = child; - if (sc->maxbus < idx) + if (sc->maxbus < (int)idx) sc->maxbus = idx; } ___ 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: r364343 - in head/sys: amd64/amd64 amd64/vmm/intel i386/i386 x86/include
Author: grehan Date: Tue Aug 18 11:36:38 2020 New Revision: 364343 URL: https://svnweb.freebsd.org/changeset/base/364343 Log: Export a routine to provide the TSC_AUX MSR value and use this in vmm. Also, drop an unnecessary set of braces. Requested by: kib Reviewed by: kib MFC after:3 weeks Modified: head/sys/amd64/amd64/initcpu.c head/sys/amd64/vmm/intel/vmx_msr.c head/sys/i386/i386/initcpu.c head/sys/x86/include/x86_var.h Modified: head/sys/amd64/amd64/initcpu.c == --- head/sys/amd64/amd64/initcpu.c Tue Aug 18 10:30:55 2020 (r364342) +++ head/sys/amd64/amd64/initcpu.c Tue Aug 18 11:36:38 2020 (r364343) @@ -218,6 +218,15 @@ init_via(void) } /* + * The value for the TSC_AUX MSR and rdtscp/rdpid. + */ +u_int +cpu_auxmsr(void) +{ + return (PCPU_GET(cpuid)); +} + +/* * Initialize CPU control registers */ void @@ -283,7 +292,7 @@ initializecpu(void) if ((amd_feature & AMDID_RDTSCP) != 0 || (cpu_stdext_feature2 & CPUID_STDEXT2_RDPID) != 0) - wrmsr(MSR_TSC_AUX, PCPU_GET(cpuid)); + wrmsr(MSR_TSC_AUX, cpu_auxmsr()); } void Modified: head/sys/amd64/vmm/intel/vmx_msr.c == --- head/sys/amd64/vmm/intel/vmx_msr.c Tue Aug 18 10:30:55 2020 (r364342) +++ head/sys/amd64/vmm/intel/vmx_msr.c Tue Aug 18 11:36:38 2020 (r364343) @@ -365,9 +365,9 @@ void vmx_msr_guest_enter_tsc_aux(struct vmx *vmx, int vcpuid) { uint64_t guest_tsc_aux = vmx->guest_msrs[vcpuid][IDX_MSR_TSC_AUX]; - uint32_t cpuid = PCPU_GET(cpuid); + uint32_t host_aux = cpu_auxmsr(); - if (vmx_have_msr_tsc_aux(vmx) && (guest_tsc_aux != cpuid)) + if (vmx_have_msr_tsc_aux(vmx) && guest_tsc_aux != host_aux) wrmsr(MSR_TSC_AUX, guest_tsc_aux); } @@ -396,9 +396,9 @@ void vmx_msr_guest_exit_tsc_aux(struct vmx *vmx, int vcpuid) { uint64_t guest_tsc_aux = vmx->guest_msrs[vcpuid][IDX_MSR_TSC_AUX]; - uint32_t cpuid = PCPU_GET(cpuid); + uint32_t host_aux = cpu_auxmsr(); - if (vmx_have_msr_tsc_aux(vmx) && (guest_tsc_aux != cpuid)) + if (vmx_have_msr_tsc_aux(vmx) && guest_tsc_aux != host_aux) /* * Note that it is not necessary to save the guest value * here; vmx->guest_msrs[vcpuid][IDX_MSR_TSC_AUX] always @@ -406,7 +406,7 @@ vmx_msr_guest_exit_tsc_aux(struct vmx *vmx, int vcpuid * the guest writes to it (which is expected to be very * rare). */ - wrmsr(MSR_TSC_AUX, cpuid); + wrmsr(MSR_TSC_AUX, host_aux); } int Modified: head/sys/i386/i386/initcpu.c == --- head/sys/i386/i386/initcpu.cTue Aug 18 10:30:55 2020 (r364342) +++ head/sys/i386/i386/initcpu.cTue Aug 18 11:36:38 2020 (r364343) @@ -627,6 +627,15 @@ init_transmeta(void) } #endif +/* + * The value for the TSC_AUX MSR and rdtscp/rdpid. + */ +u_int +cpu_auxmsr(void) +{ + return (PCPU_GET(cpuid)); +} + extern int elf32_nxstack; void @@ -751,7 +760,7 @@ initializecpu(void) } if ((amd_feature & AMDID_RDTSCP) != 0 || (cpu_stdext_feature2 & CPUID_STDEXT2_RDPID) != 0) - wrmsr(MSR_TSC_AUX, PCPU_GET(cpuid)); + wrmsr(MSR_TSC_AUX, cpu_auxmsr()); } void Modified: head/sys/x86/include/x86_var.h == --- head/sys/x86/include/x86_var.h Tue Aug 18 10:30:55 2020 (r364342) +++ head/sys/x86/include/x86_var.h Tue Aug 18 11:36:38 2020 (r364343) @@ -115,6 +115,7 @@ typedef void alias_for_inthand_t(void); bool acpi_get_fadt_bootflags(uint16_t *flagsp); void *alloc_fpusave(int flags); void busdma_swi(void); +u_int cpu_auxmsr(void); vm_paddr_t cpu_getmaxphyaddr(void); bool cpu_mwait_usable(void); void cpu_probe_amdc1e(void); ___ 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: r364342 - head/share/man/man4
Author: 0mp (doc,ports committer) Date: Tue Aug 18 10:30:55 2020 New Revision: 364342 URL: https://svnweb.freebsd.org/changeset/base/364342 Log: Use complete OIDs to avoid confusion Submitted by: otis_sk.freebsd.org MFC after:1 week Differential Revision:https://reviews.freebsd.org/D26098 Modified: head/share/man/man4/bnxt.4 Modified: head/share/man/man4/bnxt.4 == --- head/share/man/man4/bnxt.4 Tue Aug 18 08:03:28 2020(r364341) +++ head/share/man/man4/bnxt.4 Tue Aug 18 10:30:55 2020(r364342) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 30, 2019 +.Dd August 18, 2020 .Dt BNXT 4 .Os .Sh NAME @@ -130,15 +130,15 @@ completion ring, and the size of the transmit ring res The completion ring should be at least twice the size of the transmit ring. These numbers must be powers of two, and zero means to use the default. Defaults to 0,0. -.It Va override_qs_enable +.It Va dev.bnxt.X.iflib.override_qs_enable When set, allows the number of transmit and receive queues to be different. If not set, the lower of the number of TX or RX queues will be used for both. -.It Va override_nrxqs +.It Va dev.bnxt.X.iflib.override_nrxqs Set the number of RX queues. If zero, the number of RX queues is derived from the number of cores on the socket connected to the controller. Defaults to 0. -.It Va override_ntxqs +.It Va dev.bnxt.X.iflib.override_ntxqs Set the number of TX queues. If zero, the number of TX queues is derived from the number of cores on the socket connected to the controller. ___ 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: r364340 - in head/sys/amd64: include vmm vmm/intel
On 8/18/20 6:48 PM, Konstantin Belousov wrote: On Tue, Aug 18, 2020 at 07:23:47AM +, Peter Grehan wrote: +void +vmx_msr_guest_exit_tsc_aux(struct vmx *vmx, int vcpuid) +{ + uint64_t guest_tsc_aux = vmx->guest_msrs[vcpuid][IDX_MSR_TSC_AUX]; + uint32_t cpuid = PCPU_GET(cpuid); + + if (vmx_have_msr_tsc_aux(vmx) && (guest_tsc_aux != cpuid)) This is quite unobvious place to look at if host TSC_AUX is ever going to provide something different from cpuid. Could you please add a comment at {i386/i386, No bhyve on i386. amd64/amd64}/initcpu.c::initializecpu() around TSC_AUX settings pointing out this code ? Sure, will do. later, Peter. ___ 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: r364340 - in head/sys/amd64: include vmm vmm/intel
On Tue, Aug 18, 2020 at 07:23:47AM +, Peter Grehan wrote: > +void > +vmx_msr_guest_exit_tsc_aux(struct vmx *vmx, int vcpuid) > +{ > + uint64_t guest_tsc_aux = vmx->guest_msrs[vcpuid][IDX_MSR_TSC_AUX]; > + uint32_t cpuid = PCPU_GET(cpuid); > + > + if (vmx_have_msr_tsc_aux(vmx) && (guest_tsc_aux != cpuid)) This is quite unobvious place to look at if host TSC_AUX is ever going to provide something different from cpuid. Could you please add a comment at {i386/i386,amd64/amd64}/initcpu.c::initializecpu() around TSC_AUX settings pointing out this code ? ___ 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"
Sale, fissuré, écaillé, à rénover : votre plafond refait dans la journée.
[ ]( # ) [ ]( # ) [ ]( # ) [ ]( # ) [ ]( http://www.alpesplafond.sitew.fr/?utm_source=sendinblue_campaign=mini_site_TEST_HARDBOUNCES_Rnovez_vos_plafonds_sans_travaux_sans_bouger_vos_meubles_medium=email ) [ ]( # ) RENOVER SON PLAFOND [ ]( # ) en 1 journée seulement [ ]( # ) sans déménager les meubles, sans poussière, sans peinture garantie 10 ans [ ]( # ) à un PRIX ABORDABLE [ ]( # ) C'EST POSSIBLE ! [ ]( # ) [ En savoir + ]( http://www.alpesplafond.sitew.fr/?utm_source=sendinblue_campaign=mini_site_TEST_HARDBOUNCES_Rnovez_vos_plafonds_sans_travaux_sans_bouger_vos_meubles_medium=email ) [ ]( # ) [ Cliquez pour voir nos réalisations : ]( http://www.alpesplafond.sitew.fr/?utm_source=sendinblue_campaign=mini_site_TEST_HARDBOUNCES_Rnovez_vos_plafonds_sans_travaux_sans_bouger_vos_meubles_medium=email ) [ ]( # ) [ ]( http://www.alpesplafond.sitew.fr/?utm_source=sendinblue_campaign=mini_site_TEST_HARDBOUNCES_Rnovez_vos_plafonds_sans_travaux_sans_bouger_vos_meubles_medium=email ) [ ]( # ) Spécialiste depuis + de 15 ans dans la pose de plafond tendu Isère, Savoie, Haute Savoie [ ]( # ) [ Consultez les avis de nos clients ]( https://www.societe-des-avis-garantis.fr/alpes-plafond-com/?utm_source=sendinblue_campaign=mini_site_TEST_HARDBOUNCES_Rnovez_vos_plafonds_sans_travaux_sans_bouger_vos_meubles_medium=email ) [ ]( # ) Alpes Plafond 04.76.00.93.06 19, boulevard des Alpes [ alpesplaf...@orange.fr ]( mailto:alpesplaf...@orange.fr ) 38240 MEYLAN [ www.alpes-plafond.com ]( http://www.alpes-plafond.com/?utm_source=sendinblue_campaign=mini_site_TEST_HARDBOUNCES_Rnovez_vos_plafonds_sans_travaux_sans_bouger_vos_meubles_medium=email ) [ ]( # ) [ Se désinscrire ]( http://r.email.alpes-plafond.com/mk/un/0_UqZuOJ2JV1lceYQzvmwj94ufE8WAtPG-Ic7COfZlAJdFBJ_3nWOLaBbAL3Og8-x4FWKsjdLpfEs1UOzjT8QVf8Br5ejOQq2Z3zyaiXU6qWs9geqUp1SrcxtzIwORYen-JP98ZFnQRgCIq9Oev3b2wXZQ ) ___ 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: r364341 - head/sys/dev/netmap
Author: vmaffione Date: Tue Aug 18 08:03:28 2020 New Revision: 364341 URL: https://svnweb.freebsd.org/changeset/base/364341 Log: netmap: fix parsing of legacy nmr->nr_ringid Code was checking for NETMAP_{SW,HW}_RING in req->nr_ringid which had already been masked by NETMAP_RING_MASK. Therefore, the comparisons always failed and set NR_REG_ALL_NIC. Check against the original nmr structure. Submitted by: bpo...@packetforensics.com Reported by: bpo...@packetforensics.com Reviewed by: giuseppe.letti...@unipi.it Approved by: vmaffione MFC after:1 week Modified: head/sys/dev/netmap/netmap_legacy.c Modified: head/sys/dev/netmap/netmap_legacy.c == --- head/sys/dev/netmap/netmap_legacy.c Tue Aug 18 07:23:47 2020 (r364340) +++ head/sys/dev/netmap/netmap_legacy.c Tue Aug 18 08:03:28 2020 (r364341) @@ -76,9 +76,9 @@ nmreq_register_from_legacy(struct nmreq *nmr, struct n /* Convert the older nmr->nr_ringid (original * netmap control API) to nmr->nr_flags. */ u_int regmode = NR_REG_DEFAULT; - if (req->nr_ringid & NETMAP_SW_RING) { + if (nmr->nr_ringid & NETMAP_SW_RING) { regmode = NR_REG_SW; - } else if (req->nr_ringid & NETMAP_HW_RING) { + } else if (nmr->nr_ringid & NETMAP_HW_RING) { regmode = NR_REG_ONE_NIC; } else { regmode = NR_REG_ALL_NIC; ___ 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: r364340 - in head/sys/amd64: include vmm vmm/intel
Author: grehan Date: Tue Aug 18 07:23:47 2020 New Revision: 364340 URL: https://svnweb.freebsd.org/changeset/base/364340 Log: Support guest rdtscp and rdpid instructions on Intel VT-x Enable any of rdtscp and/or rdpid for bhyve guests on Intel-based hosts that support the "enable RDTSCP" VM-execution control. Submitted by: adam_fenn.io Reported by: chuck Reviewed by: chuck, grehan, jhb Approved by: jhb (bhyve), grehan MFC after:3 weeks Relnotes: Yes Differential Revision:https://reviews.freebsd.org/D26003 Modified: head/sys/amd64/include/vmm.h head/sys/amd64/vmm/intel/vmx.c head/sys/amd64/vmm/intel/vmx.h head/sys/amd64/vmm/intel/vmx_msr.c head/sys/amd64/vmm/intel/vmx_msr.h head/sys/amd64/vmm/x86.c Modified: head/sys/amd64/include/vmm.h == --- head/sys/amd64/include/vmm.hTue Aug 18 07:08:17 2020 (r364339) +++ head/sys/amd64/include/vmm.hTue Aug 18 07:23:47 2020 (r364340) @@ -481,6 +481,8 @@ enum vm_cap_type { VM_CAP_UNRESTRICTED_GUEST, VM_CAP_ENABLE_INVPCID, VM_CAP_BPT_EXIT, + VM_CAP_RDPID, + VM_CAP_RDTSCP, VM_CAP_MAX }; Modified: head/sys/amd64/vmm/intel/vmx.c == --- head/sys/amd64/vmm/intel/vmx.c Tue Aug 18 07:08:17 2020 (r364339) +++ head/sys/amd64/vmm/intel/vmx.c Tue Aug 18 07:23:47 2020 (r364340) @@ -167,6 +167,14 @@ static int cap_pause_exit; SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, pause_exit, CTLFLAG_RD, _pause_exit, 0, "PAUSE triggers a VM-exit"); +static int cap_rdpid; +SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, rdpid, CTLFLAG_RD, _rdpid, 0, +"Guests are allowed to use RDPID"); + +static int cap_rdtscp; +SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, rdtscp, CTLFLAG_RD, _rdtscp, 0, +"Guests are allowed to use RDTSCP"); + static int cap_unrestricted_guest; SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, unrestricted_guest, CTLFLAG_RD, _unrestricted_guest, 0, "Unrestricted guests"); @@ -303,6 +311,18 @@ static void vmx_inject_pir(struct vlapic *vlapic); static int vmx_restore_tsc(void *arg, int vcpu, uint64_t now); #endif +static inline bool +host_has_rdpid(void) +{ + return ((cpu_stdext_feature2 & CPUID_STDEXT2_RDPID) != 0); +} + +static inline bool +host_has_rdtscp(void) +{ + return ((amd_feature & AMDID_RDTSCP) != 0); +} + #ifdef KTR static const char * exit_reason_to_str(int reason) @@ -755,6 +775,43 @@ vmx_init(int ipinum) PROCBASED_PAUSE_EXITING, 0, ) == 0); + /* +* Check support for RDPID and/or RDTSCP. +* +* Support a pass-through-based implementation of these via the +* "enable RDTSCP" VM-execution control and the "RDTSC exiting" +* VM-execution control. +* +* The "enable RDTSCP" VM-execution control applies to both RDPID +* and RDTSCP (see SDM volume 3, section 25.3, "Changes to +* Instruction Behavior in VMX Non-root operation"); this is why +* only this VM-execution control needs to be enabled in order to +* enable passing through whichever of RDPID and/or RDTSCP are +* supported by the host. +* +* The "RDTSC exiting" VM-execution control applies to both RDTSC +* and RDTSCP (again, per SDM volume 3, section 25.3), and is +* already set up for RDTSC and RDTSCP pass-through by the current +* implementation of RDTSC. +* +* Although RDPID and RDTSCP are optional capabilities, since there +* does not currently seem to be a use case for enabling/disabling +* these via libvmmapi, choose not to support this and, instead, +* just statically always enable or always disable this support +* across all vCPUs on all VMs. (Note that there may be some +* complications to providing this functionality, e.g., the MSR +* bitmap is currently per-VM rather than per-vCPU while the +* capability API wants to be able to control capabilities on a +* per-vCPU basis). +*/ + error = vmx_set_ctlreg(MSR_VMX_PROCBASED_CTLS2, + MSR_VMX_PROCBASED_CTLS2, + PROCBASED2_ENABLE_RDTSCP, 0, ); + cap_rdpid = error == 0 && host_has_rdpid(); + cap_rdtscp = error == 0 && host_has_rdtscp(); + if (cap_rdpid || cap_rdtscp) + procbased_ctls2 |= PROCBASED2_ENABLE_RDTSCP; + cap_unrestricted_guest = (vmx_set_ctlreg(MSR_VMX_PROCBASED_CTLS2, MSR_VMX_PROCBASED_CTLS2, PROCBASED2_UNRESTRICTED_GUEST, 0, @@ -1007,6 +1064,15 @@ vmx_vminit(struct vm *vm, pmap_t pmap) * the "use TSC offsetting" execution control is enabled
svn commit: r364339 - head/sys/amd64/vmm
Author: grehan Date: Tue Aug 18 07:08:17 2020 New Revision: 364339 URL: https://svnweb.freebsd.org/changeset/base/364339 Log: Allow guest device MMIO access from bootmem memory segments. Recent versions of UEFI have moved local APIC timer initialization into the early SEC phase which runs out of ROM, prior to self-relocating into RAM. This results in a hypervisor exit. Currently bhyve prevents instruction emulation from segments that aren't marked as "sysmem" aka guest RAM, with the vm_gpa_hold() routine failing. However, there is no reason for this restriction: the hypervisor already controls whether EPT mappings are marked as executable. Fix by dropping the redundant check of sysmem. MFC after:3 weeks Differential Revision:https://reviews.freebsd.org/D25955 Modified: head/sys/amd64/vmm/vmm.c Modified: head/sys/amd64/vmm/vmm.c == --- head/sys/amd64/vmm/vmm.cTue Aug 18 06:55:12 2020(r364338) +++ head/sys/amd64/vmm/vmm.cTue Aug 18 07:08:17 2020(r364339) @@ -999,8 +999,7 @@ vm_gpa_hold(struct vm *vm, int vcpuid, vm_paddr_t gpa, count = 0; for (i = 0; i < VM_MAX_MEMMAPS; i++) { mm = >mem_maps[i]; - if (sysmem_mapping(vm, mm) && gpa >= mm->gpa && - gpa < mm->gpa + mm->len) { + if (gpa >= mm->gpa && gpa < mm->gpa + mm->len) { count = vm_fault_quick_hold_pages(>vmspace->vm_map, trunc_page(gpa), PAGE_SIZE, reqprot, , 1); 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: r364338 - stable/12/usr.bin/tput
Author: gbe (doc committer) Date: Tue Aug 18 06:55:12 2020 New Revision: 364338 URL: https://svnweb.freebsd.org/changeset/base/364338 Log: MFC r364131: tput(1): Several enhancements for the manual page - a couple of descriptions are incomplete - synopsis doesn't show that all arguments are optional - missing an ENVIRONMENT section with TERM mentioned PR: 84670 Submitted by: Gary W. Swearingen Reviewed by: bcr Approved by: bcr Differential Revision:https://reviews.freebsd.org/D26009 Modified: stable/12/usr.bin/tput/tput.1 Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/tput/tput.1 == --- stable/12/usr.bin/tput/tput.1 Tue Aug 18 06:34:56 2020 (r364337) +++ stable/12/usr.bin/tput/tput.1 Tue Aug 18 06:55:12 2020 (r364338) @@ -38,22 +38,24 @@ .Sh SYNOPSIS .Nm .Op Fl T Ar term -.Ar attribute ... +.Op Ar attribute ... .Nm clear .Sh DESCRIPTION The .Nm utility makes terminal-dependent information available to users or shell applications. -When invoked as the +.Pp +The .Nm clear -utility, the screen will be cleared as if +utility executes the .Dl tput clear -had been executed. -The options to +command, ignoring any arguments. +.Pp +The only option to .Nm -are as follows: -.Bl -tag -width Ds +is: +.Bl -tag -width 2n .It Fl T The terminal name as specified in the .Xr termcap 5 @@ -65,7 +67,9 @@ If not specified, .Nm retrieves the .Dq Ev TERM -variable from the environment. +variable from the environment unless that too is not specified, +in which case an error message will be sent to standard error and +the error status will be 2. .El .Pp The @@ -83,45 +87,66 @@ If an is of type string, and takes arguments (e.g.\& cursor movement, the termcap .Dq cm -sequence) the arguments are taken from the command line immediately +capability) the arguments are taken from the command line immediately following the attribute. .Pp -The following special attributes are available: +The following special attributes are available. +The first three use the capabilities of the specified terminal, +and only work if compatible with the utility's terminal. .Bl -tag -width Ar .It Cm clear Clear the screen (the .Xr termcap 5 .Dq cl -sequence). +capability). .It Cm init Initialize the terminal (the .Xr termcap 5 .Dq is -sequence). -.It Cm longname -Print the descriptive name of the user's terminal type. +capability). .It Cm reset Reset the terminal (the .Xr termcap 5 .Dq rs -sequence). +capability). +.It Cm longname +Print the descriptive name of the user's terminal type. .El +.Sh ENVIRONMENT +.Bl -tag -width ".Ev TERM" +.It Ev TERM +The terminal name, if set and +.Fl T +is not used. +.El .Sh EXIT STATUS The exit status of .Nm is as follows: .Bl -tag -width indent .It 0 -If the last attribute +If the last .Ar attribute -argument is of type string or integer, its value was successfully written +is of type string or integer, its value was successfully written to standard output. -If the argument is of type boolean, the terminal has this attribute. +If the +.Ar attribute +is of type boolean, the terminal does have the +.Ar attribute . +Otherwise, no +.Ar attribute +was specified. .It 1 -This terminal does not have the specified boolean +If the last +.Ar attribute +is of type boolean, +this terminal does not have the .Ar attribute . .It 2 Usage error. +For example, see +.Fl T +description. .It 3 No information is available about the specified terminal type. .El ___ 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: r364337 - head/sys/dev/pccard
Author: imp Date: Tue Aug 18 06:34:56 2020 New Revision: 364337 URL: https://svnweb.freebsd.org/changeset/base/364337 Log: Use better gone_in_dev rather than just gone_in to print the device name. Modified: head/sys/dev/pccard/pccard.c Modified: head/sys/dev/pccard/pccard.c == --- head/sys/dev/pccard/pccard.cTue Aug 18 06:18:18 2020 (r364336) +++ head/sys/dev/pccard/pccard.cTue Aug 18 06:34:56 2020 (r364337) @@ -845,7 +845,7 @@ pccard_attach(device_t dev) sc->sc_enabled_count = 0; if ((err = pccard_device_create(sc)) != 0) return (err); - gone_in(13, "PC Card to be removed."); + gone_in_dev(dev, 13, "PC Card to be removed."); STAILQ_INIT(>card.pf_head); return (bus_generic_attach(dev)); } ___ 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: r364336 - in head: share/man/man4 sys/dev/pccard
Author: imp Date: Tue Aug 18 06:18:18 2020 New Revision: 364336 URL: https://svnweb.freebsd.org/changeset/base/364336 Log: Document that PC Card will likely be removed before 13. This was discussed in arch@ a while ago. Most of the 16-bit drivers that it relied on have been removed. There's only a few other drivers remaining that support it, and those are very rare the days (even the once ubiquitious wi(1) is now quite rare). Indvidual drivers will be handled separately before pccard itself is removed. Modified: head/share/man/man4/pccard.4 head/sys/dev/pccard/pccard.c Modified: head/share/man/man4/pccard.4 == --- head/share/man/man4/pccard.4Tue Aug 18 06:07:34 2020 (r364335) +++ head/share/man/man4/pccard.4Tue Aug 18 06:18:18 2020 (r364336) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 9, 2002 +.Dd August 18, 2020 .Dt PCCARD 4 .Os .Sh NAME @@ -31,6 +31,9 @@ .Nd PC Card bus driver .Sh SYNOPSIS .Cd device pccard +.Sh DEPRECATION NOTICE +This driver is scheduled for removal prior to the release of +.Fx 13.0 .Sh DESCRIPTION The .Nm Modified: head/sys/dev/pccard/pccard.c == --- head/sys/dev/pccard/pccard.cTue Aug 18 06:07:34 2020 (r364335) +++ head/sys/dev/pccard/pccard.cTue Aug 18 06:18:18 2020 (r364336) @@ -845,6 +845,7 @@ pccard_attach(device_t dev) sc->sc_enabled_count = 0; if ((err = pccard_device_create(sc)) != 0) return (err); + gone_in(13, "PC Card to be removed."); STAILQ_INIT(>card.pf_head); return (bus_generic_attach(dev)); } ___ 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: r364335 - head/sbin/devd
Author: imp Date: Tue Aug 18 06:07:34 2020 New Revision: 364335 URL: https://svnweb.freebsd.org/changeset/base/364335 Log: Modernize a bit. Remove PC Card specific information. It's of little value these days and on the way out after most of its drivers have been removed. Use iwn instead of wi device. Modified: head/sbin/devd/devd.conf.5 Modified: head/sbin/devd/devd.conf.5 == --- head/sbin/devd/devd.conf.5 Tue Aug 18 03:40:09 2020(r364334) +++ head/sbin/devd/devd.conf.5 Tue Aug 18 06:07:34 2020(r364335) @@ -40,7 +40,7 @@ .\" ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS .\" SOFTWARE. .\" -.Dd May 31, 2019 +.Dd August 18, 2020 .Dt DEVD.CONF 5 .Os .Sh NAME @@ -252,10 +252,6 @@ Device name of parent bus. Device node path if one is created by the .Xr devfs 5 filesystem. -.It Li cisproduct -CIS-product. -.It Li cisvendor -CIS-vendor. .It Li class Device class. .It Li comm @@ -284,8 +280,6 @@ Interface Protocol (USB). Interface Sub-class (USB). .It Li jail Jail name for the process triggering the rule (RCTL). -.It Li manufacturer -Manufacturer ID (pccard). .It Li mode Peripheral mode (USB). .It Li notify @@ -299,7 +293,7 @@ PID of the process triggering the rule (RCTL). .It Li port Hub port number (USB). .It Li product -Product ID (pccard/USB). +Product ID (USB). .It Li release Hardware revision (USB). .It Li ruid @@ -311,9 +305,9 @@ Serial Number (USB). .It Li slot Card slot. .It Li subvendor -Sub-vendor ID. +Sub-vendor ID (PCI). .It Li subdevice -Sub-device ID. +Sub-device ID (PCI). .It Li subsystem Matches a subsystem of a system, see below. .It Li system @@ -644,20 +638,20 @@ notify 0 { }; # -# Try to configure ath and wi devices with pccard_ether +# Try to configure ath and iwn devices with pccard_ether # as they are attached. # attach 0 { -device-name "(ath|wi)[0-9]+"; +device-name "(ath|iwn)[0-9]+"; action "/etc/pccard_ether $device-name start"; }; # -# Stop ath and wi devices as they are detached from +# Stop ath and iwn devices as they are detached from # the system. # detach 0 { -device-name "(ath|wi)[0-9]+"; +device-name "(ath|iwn)[0-9]+"; action "/etc/pccard_ether $device-name stop"; }; .Ed ___ 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"