svn commit: r360089 - stable/12/sys/dev/acpica
Author: cperciva Date: Sun Apr 19 02:49:05 2020 New Revision: 360089 URL: https://svnweb.freebsd.org/changeset/base/360089 Log: MFC r360025: Alert devd when acpi_video brightness changes 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 Sun Apr 19 02:20:39 2020 (r360088) +++ stable/12/sys/dev/acpica/acpi_video.c Sun Apr 19 02:49:05 2020 (r360089) @@ -1034,6 +1034,7 @@ vo_get_brightness(ACPI_HANDLE handle) static void vo_set_brightness(ACPI_HANDLE handle, int level) { + char notify_buf[16]; ACPI_STATUS status; ACPI_SERIAL_ASSERT(video_output); @@ -1041,6 +1042,8 @@ vo_set_brightness(ACPI_HANDLE handle, int level) if (ACPI_FAILURE(status)) printf("can't evaluate %s._BCM - %s\n", acpi_name(handle), AcpiFormatException(status)); + snprintf(notify_buf, sizeof(notify_buf), "notify=%d", level); + devctl_notify("ACPI", "Video", "brightness", notify_buf); } static UINT32 ___ 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: r360077 - head/cddl/usr.sbin/zfsd
Definitely if there were some meaningful information in it. But an empty file? I'm not sure. I'm only sure that I can fix the bad .Xr faster by removing it. -Alan On Sat, Apr 18, 2020 at 8:25 PM Rodney W. Grimes wrote: > > Author: asomers > > Date: Sat Apr 18 19:47:38 2020 > > New Revision: 360077 > > URL: https://svnweb.freebsd.org/changeset/base/360077 > > > > Log: > > zfsd.8: fix orphan .Xr > > > > Though ZFS is a kernel module, it has no man page in section 4. > > Wouldn't of been better to create a section 4 man page for zfs, > even if it was empty/TBD? > > > Reported by:phk > > MFC after: 2 weeks > > > > Modified: > > head/cddl/usr.sbin/zfsd/zfsd.8 > > > > Modified: head/cddl/usr.sbin/zfsd/zfsd.8 > > > == > > --- head/cddl/usr.sbin/zfsd/zfsd.8Sat Apr 18 18:25:30 2020 > (r360076) > > +++ head/cddl/usr.sbin/zfsd/zfsd.8Sat Apr 18 19:47:38 2020 > (r360077) > > @@ -25,7 +25,7 @@ > > .\" > > .\" $FreeBSD$ > > .\" > > -.Dd May 26, 2016 > > +.Dd April 18, 2020 > > .Dt ZFSD 8 > > .Os > > .Sh NAME > > @@ -96,8 +96,7 @@ If a leaf vdev generates more than 50 I/O errors in a > > .Nm > > will mark that vdev as > > .Em FAULTED . > > -.Xr zfs 4 > > -will no longer issue any I/Os to it. > > +ZFS will no longer issue any I/Os to it. > > .Nm > > will activate a hotspare if one is available. > > .It Checksum errors > > @@ -106,8 +105,7 @@ period, then > > .Nm > > will mark that vdev as > > .Em DEGRADED . > > -.Xr zfs 4 > > -will still use it, but zfsd will activate a spare anyway. > > +ZFS will still use it, but zfsd will activate a spare anyway. > > .It Spare addition > > If the system administrator adds a hotspare to a pool that is already > degraded, > > .Nm > > @@ -138,7 +136,6 @@ then reads them back in when next it starts up. > > .El > > .Sh SEE ALSO > > .Xr devctl 4 , > > -.Xr zfs 4 , > > .Xr zpool 8 > > .Sh HISTORY > > .Nm > > > > -- > 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"
Re: svn commit: r360077 - head/cddl/usr.sbin/zfsd
> Author: asomers > Date: Sat Apr 18 19:47:38 2020 > New Revision: 360077 > URL: https://svnweb.freebsd.org/changeset/base/360077 > > Log: > zfsd.8: fix orphan .Xr > > Though ZFS is a kernel module, it has no man page in section 4. Wouldn't of been better to create a section 4 man page for zfs, even if it was empty/TBD? > Reported by:phk > MFC after: 2 weeks > > Modified: > head/cddl/usr.sbin/zfsd/zfsd.8 > > Modified: head/cddl/usr.sbin/zfsd/zfsd.8 > == > --- head/cddl/usr.sbin/zfsd/zfsd.8Sat Apr 18 18:25:30 2020 > (r360076) > +++ head/cddl/usr.sbin/zfsd/zfsd.8Sat Apr 18 19:47:38 2020 > (r360077) > @@ -25,7 +25,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd May 26, 2016 > +.Dd April 18, 2020 > .Dt ZFSD 8 > .Os > .Sh NAME > @@ -96,8 +96,7 @@ If a leaf vdev generates more than 50 I/O errors in a > .Nm > will mark that vdev as > .Em FAULTED . > -.Xr zfs 4 > -will no longer issue any I/Os to it. > +ZFS will no longer issue any I/Os to it. > .Nm > will activate a hotspare if one is available. > .It Checksum errors > @@ -106,8 +105,7 @@ period, then > .Nm > will mark that vdev as > .Em DEGRADED . > -.Xr zfs 4 > -will still use it, but zfsd will activate a spare anyway. > +ZFS will still use it, but zfsd will activate a spare anyway. > .It Spare addition > If the system administrator adds a hotspare to a pool that is already > degraded, > .Nm > @@ -138,7 +136,6 @@ then reads them back in when next it starts up. > .El > .Sh SEE ALSO > .Xr devctl 4 , > -.Xr zfs 4 , > .Xr zpool 8 > .Sh HISTORY > .Nm > -- 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: r360088 - in head: . contrib/openbsm/bin/auditd lib/libauditd share/mk
Author: asomers Date: Sun Apr 19 02:20:39 2020 New Revision: 360088 URL: https://svnweb.freebsd.org/changeset/base/360088 Log: libauditd: make it a PRIVATELIB According to the upstream man page (which we don't install), none of libauditd's symbols are intended to be public. Also, I can't find any evidence for a port that uses libauditd. Therefore, we should treat it like other such libraries and use PRIVATELIB. Reported by: phk Reviewed by: cem, emaste MFC after:2 weeks Modified: head/ObsoleteFiles.inc head/contrib/openbsm/bin/auditd/auditd.8 head/lib/libauditd/Makefile head/share/mk/src.libnames.mk Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Sun Apr 19 02:18:40 2020(r360087) +++ head/ObsoleteFiles.inc Sun Apr 19 02:20:39 2020(r360088) @@ -36,6 +36,12 @@ # xargs -n1 | sort | uniq -d; # done +# 20200418: Make libauditd private +OLD_FILES+=usr/lib/libauditd.a +OLD_FILES+=usr/lib/libauditd.so +OLD_LIBS+=usr/lib/libauditd.so.5 +OLD_FILES+=usr/lib/libauditd_p.a + # 20200418: Remove bogus man links OLD_FILES+=usr/share/man/man3/getauusernam_R.3.gz OLD_FILES+=usr/share/man/man3/getauclassnam_3.3.gz Modified: head/contrib/openbsm/bin/auditd/auditd.8 == --- head/contrib/openbsm/bin/auditd/auditd.8Sun Apr 19 02:18:40 2020 (r360087) +++ head/contrib/openbsm/bin/auditd/auditd.8Sun Apr 19 02:20:39 2020 (r360088) @@ -25,7 +25,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd July 25, 2015 +.Dd April 18, 2020 .Dt AUDITD 8 .Os .Sh NAME @@ -113,7 +113,6 @@ and are no longer available as arguments to .Nm . .Sh SEE ALSO .Xr asl 3 , -.Xr libauditd 3 , .Xr audit 4 , .Xr audit_class 5 , .Xr audit_control 5 , Modified: head/lib/libauditd/Makefile == --- head/lib/libauditd/Makefile Sun Apr 19 02:18:40 2020(r360087) +++ head/lib/libauditd/Makefile Sun Apr 19 02:20:39 2020(r360088) @@ -18,6 +18,7 @@ SRCS= auditd_lib.c CFLAGS+= -I${OPENBSMDIR} -I${_LIBBSMDIR} WARNS?=3 +PRIVATELIB=true MAN= Modified: head/share/mk/src.libnames.mk == --- head/share/mk/src.libnames.mk Sun Apr 19 02:18:40 2020 (r360087) +++ head/share/mk/src.libnames.mk Sun Apr 19 02:20:39 2020 (r360088) @@ -15,6 +15,7 @@ : _PRIVATELIBS= \ atf_c \ atf_cxx \ + auditd \ bsdstat \ devdctl \ event \ @@ -72,7 +73,6 @@ _LIBRARIES= \ alias \ archive \ asn1 \ - auditd \ avl \ be \ begemot \ ___ 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: r360087 - in head: . lib/libbsm
Author: asomers Date: Sun Apr 19 02:18:40 2020 New Revision: 360087 URL: https://svnweb.freebsd.org/changeset/base/360087 Log: libbsm: fix some MLINKS Add missing MLINKS entries for a few functions. Remove some old typo entries. Reported by: phk Reviewed by: cem MFC after:2 weeks Modified: head/ObsoleteFiles.inc head/lib/libbsm/Makefile Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Sun Apr 19 01:43:59 2020(r360086) +++ head/ObsoleteFiles.inc Sun Apr 19 02:18:40 2020(r360087) @@ -36,6 +36,10 @@ # xargs -n1 | sort | uniq -d; # done +# 20200418: Remove bogus man links +OLD_FILES+=usr/share/man/man3/getauusernam_R.3.gz +OLD_FILES+=usr/share/man/man3/getauclassnam_3.3.gz + # 20200401: Remove procfs-based process debugging OLD_FILES+=usr/include/sys/pioctl.h Modified: head/lib/libbsm/Makefile == --- head/lib/libbsm/MakefileSun Apr 19 01:43:59 2020(r360086) +++ head/lib/libbsm/MakefileSun Apr 19 02:18:40 2020(r360087) @@ -75,10 +75,11 @@ MAN+= audit.2 \ setauid.2 MLINKS=libbsm.3 bsm.3 \ + libbsm.3 au_fcntl_cmd_to_bsm.3 \ au_class.3 getauclassent.3 \ au_class.3 getauclassent_r.3\ au_class.3 getauclassnam.3 \ - au_class.3 getauclassnam_3.3\ + au_class.3 getauclassnam_r.3\ au_class.3 setauclass.3 \ au_class.3 endauclass.3 \ au_control.3 setac.3\ @@ -127,6 +128,7 @@ MLINKS= libbsm.3 bsm.3 \ au_token.3 au_to_arg32.3\ au_token.3 au_to_arg64.3\ au_token.3 au_to_arg.3 \ + au_token.3 au_to_attr32.3 \ au_token.3 au_to_attr64.3 \ au_token.3 au_to_data.3 \ au_token.3 au_to_exit.3 \ @@ -155,6 +157,7 @@ MLINKS= libbsm.3 bsm.3 \ au_token.3 au_to_sock_inet32.3 \ au_token.3 au_to_sock_inet128.3 \ au_token.3 au_to_sock_inet.3\ + au_token.3 au_to_socket_ex.3\ au_token.3 au_to_subject32.3\ au_token.3 au_to_subject64.3\ au_token.3 au_to_subject.3 \ @@ -166,6 +169,7 @@ MLINKS= libbsm.3 bsm.3 \ au_token.3 au_to_exec_env.3 \ au_token.3 au_to_header.3 \ au_token.3 au_to_header32.3 \ + au_token.3 au_to_header32_ex.3 \ au_token.3 au_to_header64.3 \ au_token.3 au_to_trailer.3 \ au_token.3 au_to_zonename.3 \ @@ -174,7 +178,7 @@ MLINKS= libbsm.3 bsm.3 \ au_user.3 getauuserent.3\ au_user.3 getauuserent_r.3 \ au_user.3 getauusernam.3\ - au_user.3 getauusernam_R.3 \ + au_user.3 getauusernam_r.3 \ au_user.3 au_user_mask.3\ au_user.3 getfauditflags.3 \ getaudit.2 getaudit_addr.2 \ ___ 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: r360086 - head/sbin/bectl
Author: asomers Date: Sun Apr 19 01:43:59 2020 New Revision: 360086 URL: https://svnweb.freebsd.org/changeset/base/360086 Log: bectl.8: correctly sort SEE ALSO section after 360078 Reported by: yuripv MFC after:2 weeks MFC with: 360078 Modified: head/sbin/bectl/bectl.8 Modified: head/sbin/bectl/bectl.8 == --- head/sbin/bectl/bectl.8 Sun Apr 19 00:34:49 2020(r360085) +++ head/sbin/bectl/bectl.8 Sun Apr 19 01:43:59 2020(r360086) @@ -343,8 +343,8 @@ is specified. To fill in with jail upgrade example when behavior is firm. .El .Sh SEE ALSO -.Xr beinstall.sh 8 , .Xr libbe 3 , +.Xr beinstall.sh 8 , .Xr jail 8 , .Xr zfs 8 , .Xr zpool 8 ___ 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: r360085 - head/sys/riscv/riscv
Author: mhorne Date: Sun Apr 19 00:34:49 2020 New Revision: 360085 URL: https://svnweb.freebsd.org/changeset/base/360085 Log: RISC-V: provide the correct value for kernstart pmap_bootstrap() expects the kernel's physical load address, but we have been providing the start of physical memory. This had the nice effect of protecting the memory used by the SBI runtime firmware, but now that we have alternate means of achieving that, we should provide the correct value. This will free up any memory between the SBI firmware and the kernel for allocation. Reviewed by: markj Differential Revision:https://reviews.freebsd.org/D24156 Modified: head/sys/riscv/riscv/machdep.c Modified: head/sys/riscv/riscv/machdep.c == --- head/sys/riscv/riscv/machdep.c Sun Apr 19 00:33:05 2020 (r360084) +++ head/sys/riscv/riscv/machdep.c Sun Apr 19 00:34:49 2020 (r360085) @@ -851,7 +851,7 @@ initriscv(struct riscv_bootparams *rvbp) /* Bootstrap enough of pmap to enter the kernel proper */ kernlen = (lastaddr - KERNBASE); - pmap_bootstrap(rvbp->kern_l1pt, mem_regions[0].mr_start, kernlen); + pmap_bootstrap(rvbp->kern_l1pt, rvbp->kern_phys, kernlen); #ifdef FDT /* ___ 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: r360084 - head/sys/riscv/riscv
Author: mhorne Date: Sun Apr 19 00:33:05 2020 New Revision: 360084 URL: https://svnweb.freebsd.org/changeset/base/360084 Log: RISC-V: exclude reserved memory regions The device tree may contain a "reserved-memory" node, whose purpose is to communicate sections of physical memory that should not be used for general allocations. Add the logic to parse and exclude these regions. The particular motivation for this is protection of the SBI runtime firmware. Currently, there is no mechanism through which the SBI can communicate the details of its reserved memory region(s) to a supervisor payload. There has been some discussion recently on how this can be achieved [1], and it seems that the path going forward will be to add an entry to the reserved-memory node. This hasn't caused any issues for us yet, since we exclude all physical memory below the kernel's load address from being allocated, and on all currently supported platforms this covers the SBI firmware region. This will change in another commit, so as a safety measure, ensure that the lowest 2MB of memory is excluded if this region has not been reported. [1] https://github.com/riscv/riscv-sbi-doc/pull/37 Reviewed by: markj, nick (older version) Differential Revision:https://reviews.freebsd.org/D24155 Modified: head/sys/riscv/riscv/machdep.c Modified: head/sys/riscv/riscv/machdep.c == --- head/sys/riscv/riscv/machdep.c Sun Apr 19 00:18:16 2020 (r360083) +++ head/sys/riscv/riscv/machdep.c Sun Apr 19 00:33:05 2020 (r360084) @@ -84,6 +84,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -827,6 +828,15 @@ initriscv(struct riscv_bootparams *rvbp) #ifdef FDT try_load_dtb(kmdp); + /* +* Exclude reserved memory specified by the device tree. Typically, +* this contains an entry for memory used by the runtime SBI firmware. +*/ + if (fdt_get_reserved_mem(mem_regions, &mem_regions_sz) == 0) { + physmem_exclude_regions(mem_regions, mem_regions_sz, + EXFLAG_NODUMP | EXFLAG_NOALLOC); + } + /* Grab physical memory regions information from device tree. */ if (fdt_get_mem_regions(mem_regions, &mem_regions_sz, NULL) != 0) { panic("Cannot get physical memory regions"); @@ -843,6 +853,21 @@ initriscv(struct riscv_bootparams *rvbp) kernlen = (lastaddr - KERNBASE); pmap_bootstrap(rvbp->kern_l1pt, mem_regions[0].mr_start, kernlen); +#ifdef FDT + /* +* XXX: Exclude the lowest 2MB of physical memory, if it hasn't been +* already, as this area is assumed to contain the SBI firmware. This +* is a little fragile, but it is consistent with the platforms we +* support so far. +* +* TODO: remove this when the all regular booting methods properly +* report their reserved memory in the device tree. +*/ + if (mem_regions[0].mr_start == physmap[0]) { + physmem_exclude_region(mem_regions[0].mr_start, L2_SIZE, + EXFLAG_NODUMP | EXFLAG_NOALLOC); + } +#endif physmem_init_kernel_globals(); /* Establish static device mappings */ ___ 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: r360083 - in head/sys: conf riscv/include riscv/riscv
Author: mhorne Date: Sun Apr 19 00:18:16 2020 New Revision: 360083 URL: https://svnweb.freebsd.org/changeset/base/360083 Log: RISC-V: use physmem to manage physical memory Replace our hand-rolled functions with the generic ones provided by kern/subr_physmem.c. This greatly simplifies the initialization of physical memory regions and kernel globals. Tested by:nick Differential Revision:https://reviews.freebsd.org/D24154 Modified: head/sys/conf/files.riscv head/sys/riscv/include/machdep.h head/sys/riscv/riscv/machdep.c head/sys/riscv/riscv/pmap.c Modified: head/sys/conf/files.riscv == --- head/sys/conf/files.riscv Sun Apr 19 00:12:30 2020(r360082) +++ head/sys/conf/files.riscv Sun Apr 19 00:18:16 2020(r360083) @@ -20,6 +20,7 @@ kern/pic_if.m standard kern/subr_devmap.c standard kern/subr_dummy_vdso_tc.c standard kern/subr_intr.c standard +kern/subr_physmem.cstandard libkern/bcmp.c standard libkern/bcopy.cstandard libkern/ffs.c standard Modified: head/sys/riscv/include/machdep.h == --- head/sys/riscv/include/machdep.hSun Apr 19 00:12:30 2020 (r360082) +++ head/sys/riscv/include/machdep.hSun Apr 19 00:18:16 2020 (r360083) @@ -44,7 +44,7 @@ struct riscv_bootparams { vm_offset_t dtbp_virt; /* Device tree blob virtual addr */ }; -extern vm_paddr_t physmap[]; +extern vm_paddr_t physmap[PHYS_AVAIL_ENTRIES]; extern u_int physmap_idx; vm_offset_t fake_preload_metadata(struct riscv_bootparams *rbp); Modified: head/sys/riscv/riscv/machdep.c == --- head/sys/riscv/riscv/machdep.c Sun Apr 19 00:12:30 2020 (r360082) +++ head/sys/riscv/riscv/machdep.c Sun Apr 19 00:18:16 2020 (r360083) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -108,8 +109,6 @@ static struct trapframe proc0_tf; int early_boot = 1; int cold = 1; -long realmem = 0; -long Maxmem = 0; #defineDTB_SIZE_MAX(1024 * 1024) @@ -673,74 +672,6 @@ init_proc0(vm_offset_t kstack) pcpup->pc_curpcb = thread0.td_pcb; } -static int -add_physmap_entry(uint64_t base, uint64_t length, vm_paddr_t *physmap, -u_int *physmap_idxp) -{ - u_int i, insert_idx, _physmap_idx; - - _physmap_idx = *physmap_idxp; - - if (length == 0) - return (1); - - /* -* Find insertion point while checking for overlap. Start off by -* assuming the new entry will be added to the end. -*/ - insert_idx = _physmap_idx; - for (i = 0; i <= _physmap_idx; i += 2) { - if (base < physmap[i + 1]) { - if (base + length <= physmap[i]) { - insert_idx = i; - break; - } - if (boothowto & RB_VERBOSE) - printf( - "Overlapping memory regions, ignoring second region\n"); - return (1); - } - } - - /* See if we can prepend to the next entry. */ - if (insert_idx <= _physmap_idx && - base + length == physmap[insert_idx]) { - physmap[insert_idx] = base; - return (1); - } - - /* See if we can append to the previous entry. */ - if (insert_idx > 0 && base == physmap[insert_idx - 1]) { - physmap[insert_idx - 1] += length; - return (1); - } - - _physmap_idx += 2; - *physmap_idxp = _physmap_idx; - if (_physmap_idx == PHYS_AVAIL_ENTRIES) { - printf( - "Too many segments in the physical address map, giving up\n"); - return (0); - } - - /* -* Move the last 'N' entries down to make room for the new -* entry if needed. -*/ - for (i = _physmap_idx; i > insert_idx; i -= 2) { - physmap[i] = physmap[i - 2]; - physmap[i + 1] = physmap[i - 1]; - } - - /* Insert the new entry. */ - physmap[insert_idx] = base; - physmap[insert_idx + 1] = base + length; - - printf("physmap[%d] = 0x%016lx\n", insert_idx, base); - printf("physmap[%d] = 0x%016lx\n", insert_idx + 1, base + length); - return (1); -} - #ifdef FDT static void try_load_dtb(caddr_t kmdp) @@ -864,7 +795,6 @@ initriscv(struct riscv_bootparams *rvbp) vm_offset_t lastaddr; vm_size_t kernlen; caddr_t kmdp; - int i; TSRAW(&thread0, TS_ENTER, __func__, NULL); @@ -896,20 +826,12 @@ initriscv(struct r
svn commit: r360082 - in head/sys: arm/arm arm/include arm64/arm64 conf kern sys
Author: mhorne Date: Sun Apr 19 00:12:30 2020 New Revision: 360082 URL: https://svnweb.freebsd.org/changeset/base/360082 Log: Convert arm's physmem interface to MI code The arm_physmem interface found in arm's MD code provides a convenient set of routines for adding/excluding physical memory regions and initializing important kernel globals such as Maxmem, realmem, phys_avail[], and dump_avail[]. It is especially convenient for FDT systems, since we can use FDT parsing functions and pass the result directly to one of these physmem routines. This interface is already in use on arm and arm64, and can be used to simplify this early initialization on RISC-V as well. This requires only a couple trivial changes: - Move arm_physmem_kernel_addr to arm/machdep.c. It is unused on arm64, and manipulated entirely in arm MD code. - Convert arm32_btop/arm64_btop to atop. This is equivalently defined on all architectures. - Drop the "arm" prefix. Reviewed by: manu, emaste ("looks reasonable") MFC after:2 weeks Differential Revision:https://reviews.freebsd.org/D24153 Added: head/sys/kern/subr_physmem.c - copied, changed from r360081, head/sys/arm/arm/physmem.c head/sys/sys/physmem.h - copied, changed from r360081, head/sys/arm/include/physmem.h Deleted: head/sys/arm/arm/physmem.c head/sys/arm/include/physmem.h Modified: head/sys/arm/arm/machdep.c head/sys/arm/arm/machdep_boot.c head/sys/arm/arm/mp_machdep.c head/sys/arm/arm/pmap-v6.c head/sys/arm/include/md_var.h head/sys/arm64/arm64/machdep.c head/sys/arm64/arm64/pmap.c head/sys/conf/files.arm head/sys/conf/files.arm64 Modified: head/sys/arm/arm/machdep.c == --- head/sys/arm/arm/machdep.c Sat Apr 18 23:46:58 2020(r360081) +++ head/sys/arm/arm/machdep.c Sun Apr 19 00:12:30 2020(r360082) @@ -66,6 +66,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -83,7 +84,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -123,6 +123,9 @@ uint32_t cpu_reset_address = 0; int cold = 1; vm_offset_t vector_page; +/* The address at which the kernel was loaded. Set early in initarm(). */ +vm_paddr_t arm_physmem_kernaddr; + int (*_arm_memcpy)(void *, void *, int, int) = NULL; int (*_arm_bzero)(void *, int, int) = NULL; int _min_memcpy_size = 0; @@ -160,7 +163,6 @@ static void *delay_arg; #endif struct kva_md_info kmi; - /* * arm32_vector_init: * @@ -237,7 +239,7 @@ cpu_startup(void *dummy) (uintmax_t)arm32_ptob(vm_free_count()), (uintmax_t)arm32_ptob(vm_free_count()) / mbyte); if (bootverbose) { - arm_physmem_print_tables(); + physmem_print_tables(); devmap_print_table(); } @@ -870,11 +872,11 @@ initarm(struct arm_boot_params *abp) /* Grab physical memory regions information from device tree. */ if (fdt_get_mem_regions(mem_regions, &mem_regions_sz, &memsize) != 0) panic("Cannot get physical memory regions"); - arm_physmem_hardware_regions(mem_regions, mem_regions_sz); + physmem_hardware_regions(mem_regions, mem_regions_sz); /* Grab reserved memory regions information from device tree. */ if (fdt_get_reserved_regions(mem_regions, &mem_regions_sz) == 0) - arm_physmem_exclude_regions(mem_regions, mem_regions_sz, + physmem_exclude_regions(mem_regions, mem_regions_sz, EXFLAG_NODUMP | EXFLAG_NOALLOC); /* Platform-specific initialisation */ @@ -1081,9 +1083,9 @@ initarm(struct arm_boot_params *abp) * * Prepare the list of physical memory available to the vm subsystem. */ - arm_physmem_exclude_region(abp->abp_physaddr, + physmem_exclude_region(abp->abp_physaddr, (virtual_avail - KERNVIRTADDR), EXFLAG_NOALLOC); - arm_physmem_init_kernel_globals(); + physmem_init_kernel_globals(); init_param2(physmem); dbg_monitor_init(); @@ -1149,11 +1151,11 @@ initarm(struct arm_boot_params *abp) if (fdt_get_mem_regions(mem_regions, &mem_regions_sz,NULL) != 0) panic("Cannot get physical memory regions"); } - arm_physmem_hardware_regions(mem_regions, mem_regions_sz); + physmem_hardware_regions(mem_regions, mem_regions_sz); /* Grab reserved memory regions information from device tree. */ if (fdt_get_reserved_regions(mem_regions, &mem_regions_sz) == 0) - arm_physmem_exclude_regions(mem_regions, mem_regions_sz, + physmem_exclude_regions(mem_regions, mem_regions_sz, EXFLAG_NODUMP | EXFLAG_NOALLOC); /* @@ -1288,9 +1290,9 @@ initarm(struct arm_boot_params *abp) *
svn commit: r360081 - head/usr.sbin/nfscbd
Author: rmacklem Date: Sat Apr 18 23:46:58 2020 New Revision: 360081 URL: https://svnweb.freebsd.org/changeset/base/360081 Log: Change the type of "len" to avoid warnings. The "len" variable is used as the last argument to getsockname(2) and accept(2). It was declared an "int" and this patch changes it to "socklen_t". Modified: head/usr.sbin/nfscbd/nfscbd.c Modified: head/usr.sbin/nfscbd/nfscbd.c == --- head/usr.sbin/nfscbd/nfscbd.c Sat Apr 18 20:55:43 2020 (r360080) +++ head/usr.sbin/nfscbd/nfscbd.c Sat Apr 18 23:46:58 2020 (r360081) @@ -101,13 +101,14 @@ main(int argc, char *argv[]) struct nfsd_nfscbd_args nfscbdargs2; struct sockaddr_in inetaddr, inetpeer; fd_set ready, sockbits; - int ch, connect_type_cnt, len, maxsock, msgsock, error; + int ch, connect_type_cnt, maxsock, msgsock, error; int nfssvc_flag, on, sock, tcpsock, ret, mustfreeai = 0; char *cp, princname[128]; char myname[MAXHOSTNAMELEN], *myfqdnname = NULL; struct addrinfo *aip, hints; pid_t pid; short myport = NFSV4_CBPORT; + socklen_t len; if (modfind("nfscl") < 0) { /* Not present in kernel, try loading it */ ___ 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: r360078 - in head: sbin/bectl share/man/man8
Alan Somers wrote: Author: asomers Date: Sat Apr 18 19:53:47 2020 New Revision: 360078 URL: https://svnweb.freebsd.org/changeset/base/360078 Log: bectl.8, beinstall.sh.8: fix man page section of beinstall.sh Reported by: phk MFC after: 2 weeks Modified: head/sbin/bectl/bectl.8 head/share/man/man8/beinstall.8 Modified: head/sbin/bectl/bectl.8 == --- head/sbin/bectl/bectl.8 Sat Apr 18 19:47:38 2020(r360077) +++ head/sbin/bectl/bectl.8 Sat Apr 18 19:53:47 2020(r360078) @@ -17,7 +17,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 11, 2019 +.Dd April 18, 2020 .Dt BECTL 8 .Os .Sh NAME @@ -343,7 +343,7 @@ is specified. To fill in with jail upgrade example when behavior is firm. .El .Sh SEE ALSO -.Xr beinstall.sh 1 , +.Xr beinstall.sh 8 , .Xr libbe 3 , .Xr jail 8 , .Xr zfs 8 , This breaks the sorting used in SEE ALSO: $ mandoc -Tlint -Wwarning sbin/bectl/bectl.8 mandoc: sbin/bectl/bectl.8:347:2: WARNING: unusual Xr order: libbe(3) after beinstall.sh(8) We don't have the man style guide (that I know of, at least), but keeping it consistent would be nice. Modified: head/share/man/man8/beinstall.8 == --- head/share/man/man8/beinstall.8 Sat Apr 18 19:47:38 2020 (r360077) +++ head/share/man/man8/beinstall.8 Sat Apr 18 19:53:47 2020 (r360078) @@ -25,8 +25,8 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd August 20, 2018 -.Dt BEINSTALL.SH 1 +.Dd April 18, 2020 +.Dt BEINSTALL.SH 8 .Os .Sh NAME .Nm beinstall.sh ___ 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: r360080 - head/cddl/contrib/opensolaris/cmd/zfs
Author: asomers Date: Sat Apr 18 20:55:43 2020 New Revision: 360080 URL: https://svnweb.freebsd.org/changeset/base/360080 Log: zfs-program.8: fix orphan .Xr Reported by: phk Reviewed by: avg MFC after:2 weeks Differential Revision:https://reviews.freebsd.org/D24488 Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs-program.8 Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs-program.8 == --- head/cddl/contrib/opensolaris/cmd/zfs/zfs-program.8 Sat Apr 18 20:13:43 2020(r360079) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs-program.8 Sat Apr 18 20:55:43 2020(r360080) @@ -11,7 +11,7 @@ .\" Copyright (c) 2016, 2017 by Delphix. All rights reserved. .\" Copyright (c) 2018 Datto Inc. .\" -.Dd October 02, 2017 +.Dd April 18, 2020 .Dt ZFS-PROGRAM 8 .Os .Sh NAME @@ -289,7 +289,7 @@ EBADF EXDEV EFBIG .Ss API Functions For detailed descriptions of the exact behavior of any zfs administrative operations, see the main -.Xr zfs 1 +.Xr zfs 8 manual page. .Bl -tag -width "xx" .It Em zfs.debug(msg) ___ 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: r360073 - head/tests/sys/kqueue/libkqueue
On Sat, 18 Apr 2020 at 20:13, Conrad Meyer wrote: > > Hi Alex, > > We usually do not use "extern" for function declarations in headers. > > Best, > Conrad Hi Conrad, I decided to follow the style that was used in the header already, but I agree those externs should probably be dropped. I can commit a follow-up change to remove them on Monday. Alex > > On Sat, Apr 18, 2020 at 5:55 AM Alex Richardson > wrote: > > > > Author: arichardson > > Date: Sat Apr 18 12:54:47 2020 > > New Revision: 360073 > > URL: https://svnweb.freebsd.org/changeset/base/360073 > > > > Log: > > Fix various warnings in tests/sys/kqueue and bump WARNS > > > > Reviewed By: kevans > > Differential Revision: https://reviews.freebsd.org/D24296 > > > > Modified: > > head/tests/sys/kqueue/libkqueue/Makefile > > head/tests/sys/kqueue/libkqueue/common.h > > head/tests/sys/kqueue/libkqueue/main.c > > head/tests/sys/kqueue/libkqueue/proc.c > > head/tests/sys/kqueue/libkqueue/read.c > > head/tests/sys/kqueue/libkqueue/signal.c > > head/tests/sys/kqueue/libkqueue/timer.c > > head/tests/sys/kqueue/libkqueue/user.c > > head/tests/sys/kqueue/libkqueue/vnode.c > > > > Modified: head/tests/sys/kqueue/libkqueue/Makefile > > == > > --- head/tests/sys/kqueue/libkqueue/MakefileSat Apr 18 12:54:40 2020 > > (r360072) > > +++ head/tests/sys/kqueue/libkqueue/MakefileSat Apr 18 12:54:47 2020 > > (r360073) > > @@ -16,6 +16,5 @@ SRCS.kqtest= \ > > proc.c \ > > signal.c\ > > user.c > > -WARNS?=2 > > > > .include > > > > Modified: head/tests/sys/kqueue/libkqueue/common.h > > == > > --- head/tests/sys/kqueue/libkqueue/common.hSat Apr 18 12:54:40 2020 > > (r360072) > > +++ head/tests/sys/kqueue/libkqueue/common.hSat Apr 18 12:54:47 2020 > > (r360073) > > @@ -40,7 +40,6 @@ > > > > #include > > > > -extern char *cur_test_id; > > extern int vnode_fd; > > extern int kqfd; > > > > @@ -76,5 +75,14 @@ extern void test_no_kevents_quietly(void); > > > > extern void test_begin(const char *); > > extern void success(void); > > + > > +extern void test_evfilt_read(void); > > +extern void test_evfilt_signal(void); > > +extern void test_evfilt_vnode(void); > > +extern void test_evfilt_timer(void); > > +extern void test_evfilt_proc(void); > > +#if HAVE_EVFILT_USER > > +extern void test_evfilt_user(void); > > +#endif > > > > #endif /* _COMMON_H */ > > > > Modified: head/tests/sys/kqueue/libkqueue/main.c > > == > > --- head/tests/sys/kqueue/libkqueue/main.c Sat Apr 18 12:54:40 2020 > > (r360072) > > +++ head/tests/sys/kqueue/libkqueue/main.c Sat Apr 18 12:54:47 2020 > > (r360073) > > @@ -21,21 +21,12 @@ > > #include "config.h" > > #include "common.h" > > > > -int testnum = 1; > > -char *cur_test_id = NULL; > > int kqfd; > > +static char *cur_test_id = NULL; > > +static int testnum = 1; > > > > -extern void test_evfilt_read(); > > -extern void test_evfilt_signal(); > > -extern void test_evfilt_vnode(); > > -extern void test_evfilt_timer(); > > -extern void test_evfilt_proc(); > > -#if HAVE_EVFILT_USER > > -extern void test_evfilt_user(); > > -#endif > > - > > /* Checks if any events are pending, which is an error. */ > > -void > > +void > > test_no_kevents(void) > > { > > int nfds; > > @@ -58,7 +49,7 @@ test_no_kevents(void) > > /* Checks if any events are pending, which is an error. Do not print > > * out anything unless events are found. > > */ > > -void > > +void > > test_no_kevents_quietly(void) > > { > > int nfds; > > @@ -79,7 +70,7 @@ test_no_kevents_quietly(void) > > > > /* Retrieve a single kevent */ > > struct kevent * > > -kevent_get(int kqfd) > > +kevent_get(int fd) > > { > > int nfds; > > struct kevent *kev; > > @@ -87,7 +78,7 @@ kevent_get(int kqfd) > > if ((kev = calloc(1, sizeof(*kev))) == NULL) > > err(1, "out of memory"); > > > > -nfds = kevent(kqfd, NULL, 0, kev, 1, NULL); > > +nfds = kevent(fd, NULL, 0, kev, 1, NULL); > > if (nfds < 1) > > err(1, "kevent(2)"); > > > > @@ -96,7 +87,7 @@ kevent_get(int kqfd) > > > > /* Retrieve a single kevent, specifying a maximum time to wait for it. */ > > struct kevent * > > -kevent_get_timeout(int kqfd, int seconds) > > +kevent_get_timeout(int fd, int seconds) > > { > > int nfds; > > struct kevent *kev; > > @@ -105,7 +96,7 @@ kevent_get_timeout(int kqfd, int seconds) > > if ((kev = calloc(1, sizeof(*kev))) == NULL) > > err(1, "out of memory"); > > > > -nfds = kevent(kqfd, NULL, 0, kev, 1, &timeout); > > +nfds = kevent(fd, NULL, 0, kev, 1, &timeout); > > if (nfds < 0) { > > err(1, "kevent(2)"); > > } else if (nfds
svn commit: r360079 - head/lib/libcasper/services/cap_dns
Author: asomers Date: Sat Apr 18 20:13:43 2020 New Revision: 360079 URL: https://svnweb.freebsd.org/changeset/base/360079 Log: cap_dns.3: fix some orphan .Xr links Reported by: phk MFC after:2 weeks Modified: head/lib/libcasper/services/cap_dns/cap_dns.3 Modified: head/lib/libcasper/services/cap_dns/cap_dns.3 == --- head/lib/libcasper/services/cap_dns/cap_dns.3 Sat Apr 18 19:53:47 2020(r360078) +++ head/lib/libcasper/services/cap_dns/cap_dns.3 Sat Apr 18 20:13:43 2020(r360079) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 18, 2018 +.Dd April 18, 2020 .Dt CAP_DNS 3 .Os .Sh NAME @@ -77,11 +77,11 @@ The functions and .Fn cap_getnameinfo are respectively equivalent to -.Xr gethostbyname 2 , -.Xr gethostbyname2 2 , -.Xr gethostbyaddr 2 +.Xr gethostbyname 3 , +.Xr gethostbyname2 3 , +.Xr gethostbyaddr 3 and -.Xr getnameinfo 2 +.Xr getnameinfo 3 except that the connection to the .Nm system.dns service needs to be provided. ___ 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: r360078 - in head: sbin/bectl share/man/man8
Author: asomers Date: Sat Apr 18 19:53:47 2020 New Revision: 360078 URL: https://svnweb.freebsd.org/changeset/base/360078 Log: bectl.8, beinstall.sh.8: fix man page section of beinstall.sh Reported by: phk MFC after:2 weeks Modified: head/sbin/bectl/bectl.8 head/share/man/man8/beinstall.8 Modified: head/sbin/bectl/bectl.8 == --- head/sbin/bectl/bectl.8 Sat Apr 18 19:47:38 2020(r360077) +++ head/sbin/bectl/bectl.8 Sat Apr 18 19:53:47 2020(r360078) @@ -17,7 +17,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 11, 2019 +.Dd April 18, 2020 .Dt BECTL 8 .Os .Sh NAME @@ -343,7 +343,7 @@ is specified. To fill in with jail upgrade example when behavior is firm. .El .Sh SEE ALSO -.Xr beinstall.sh 1 , +.Xr beinstall.sh 8 , .Xr libbe 3 , .Xr jail 8 , .Xr zfs 8 , Modified: head/share/man/man8/beinstall.8 == --- head/share/man/man8/beinstall.8 Sat Apr 18 19:47:38 2020 (r360077) +++ head/share/man/man8/beinstall.8 Sat Apr 18 19:53:47 2020 (r360078) @@ -25,8 +25,8 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd August 20, 2018 -.Dt BEINSTALL.SH 1 +.Dd April 18, 2020 +.Dt BEINSTALL.SH 8 .Os .Sh NAME .Nm beinstall.sh ___ 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: r360077 - head/cddl/usr.sbin/zfsd
Author: asomers Date: Sat Apr 18 19:47:38 2020 New Revision: 360077 URL: https://svnweb.freebsd.org/changeset/base/360077 Log: zfsd.8: fix orphan .Xr Though ZFS is a kernel module, it has no man page in section 4. Reported by: phk MFC after:2 weeks Modified: head/cddl/usr.sbin/zfsd/zfsd.8 Modified: head/cddl/usr.sbin/zfsd/zfsd.8 == --- head/cddl/usr.sbin/zfsd/zfsd.8 Sat Apr 18 18:25:30 2020 (r360076) +++ head/cddl/usr.sbin/zfsd/zfsd.8 Sat Apr 18 19:47:38 2020 (r360077) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 26, 2016 +.Dd April 18, 2020 .Dt ZFSD 8 .Os .Sh NAME @@ -96,8 +96,7 @@ If a leaf vdev generates more than 50 I/O errors in a .Nm will mark that vdev as .Em FAULTED . -.Xr zfs 4 -will no longer issue any I/Os to it. +ZFS will no longer issue any I/Os to it. .Nm will activate a hotspare if one is available. .It Checksum errors @@ -106,8 +105,7 @@ period, then .Nm will mark that vdev as .Em DEGRADED . -.Xr zfs 4 -will still use it, but zfsd will activate a spare anyway. +ZFS will still use it, but zfsd will activate a spare anyway. .It Spare addition If the system administrator adds a hotspare to a pool that is already degraded, .Nm @@ -138,7 +136,6 @@ then reads them back in when next it starts up. .El .Sh SEE ALSO .Xr devctl 4 , -.Xr zfs 4 , .Xr zpool 8 .Sh HISTORY .Nm ___ 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: r360073 - head/tests/sys/kqueue/libkqueue
Hi Alex, We usually do not use "extern" for function declarations in headers. Best, Conrad On Sat, Apr 18, 2020 at 5:55 AM Alex Richardson wrote: > > Author: arichardson > Date: Sat Apr 18 12:54:47 2020 > New Revision: 360073 > URL: https://svnweb.freebsd.org/changeset/base/360073 > > Log: > Fix various warnings in tests/sys/kqueue and bump WARNS > > Reviewed By: kevans > Differential Revision: https://reviews.freebsd.org/D24296 > > Modified: > head/tests/sys/kqueue/libkqueue/Makefile > head/tests/sys/kqueue/libkqueue/common.h > head/tests/sys/kqueue/libkqueue/main.c > head/tests/sys/kqueue/libkqueue/proc.c > head/tests/sys/kqueue/libkqueue/read.c > head/tests/sys/kqueue/libkqueue/signal.c > head/tests/sys/kqueue/libkqueue/timer.c > head/tests/sys/kqueue/libkqueue/user.c > head/tests/sys/kqueue/libkqueue/vnode.c > > Modified: head/tests/sys/kqueue/libkqueue/Makefile > == > --- head/tests/sys/kqueue/libkqueue/MakefileSat Apr 18 12:54:40 2020 > (r360072) > +++ head/tests/sys/kqueue/libkqueue/MakefileSat Apr 18 12:54:47 2020 > (r360073) > @@ -16,6 +16,5 @@ SRCS.kqtest= \ > proc.c \ > signal.c\ > user.c > -WARNS?=2 > > .include > > Modified: head/tests/sys/kqueue/libkqueue/common.h > == > --- head/tests/sys/kqueue/libkqueue/common.hSat Apr 18 12:54:40 2020 > (r360072) > +++ head/tests/sys/kqueue/libkqueue/common.hSat Apr 18 12:54:47 2020 > (r360073) > @@ -40,7 +40,6 @@ > > #include > > -extern char *cur_test_id; > extern int vnode_fd; > extern int kqfd; > > @@ -76,5 +75,14 @@ extern void test_no_kevents_quietly(void); > > extern void test_begin(const char *); > extern void success(void); > + > +extern void test_evfilt_read(void); > +extern void test_evfilt_signal(void); > +extern void test_evfilt_vnode(void); > +extern void test_evfilt_timer(void); > +extern void test_evfilt_proc(void); > +#if HAVE_EVFILT_USER > +extern void test_evfilt_user(void); > +#endif > > #endif /* _COMMON_H */ > > Modified: head/tests/sys/kqueue/libkqueue/main.c > == > --- head/tests/sys/kqueue/libkqueue/main.c Sat Apr 18 12:54:40 2020 > (r360072) > +++ head/tests/sys/kqueue/libkqueue/main.c Sat Apr 18 12:54:47 2020 > (r360073) > @@ -21,21 +21,12 @@ > #include "config.h" > #include "common.h" > > -int testnum = 1; > -char *cur_test_id = NULL; > int kqfd; > +static char *cur_test_id = NULL; > +static int testnum = 1; > > -extern void test_evfilt_read(); > -extern void test_evfilt_signal(); > -extern void test_evfilt_vnode(); > -extern void test_evfilt_timer(); > -extern void test_evfilt_proc(); > -#if HAVE_EVFILT_USER > -extern void test_evfilt_user(); > -#endif > - > /* Checks if any events are pending, which is an error. */ > -void > +void > test_no_kevents(void) > { > int nfds; > @@ -58,7 +49,7 @@ test_no_kevents(void) > /* Checks if any events are pending, which is an error. Do not print > * out anything unless events are found. > */ > -void > +void > test_no_kevents_quietly(void) > { > int nfds; > @@ -79,7 +70,7 @@ test_no_kevents_quietly(void) > > /* Retrieve a single kevent */ > struct kevent * > -kevent_get(int kqfd) > +kevent_get(int fd) > { > int nfds; > struct kevent *kev; > @@ -87,7 +78,7 @@ kevent_get(int kqfd) > if ((kev = calloc(1, sizeof(*kev))) == NULL) > err(1, "out of memory"); > > -nfds = kevent(kqfd, NULL, 0, kev, 1, NULL); > +nfds = kevent(fd, NULL, 0, kev, 1, NULL); > if (nfds < 1) > err(1, "kevent(2)"); > > @@ -96,7 +87,7 @@ kevent_get(int kqfd) > > /* Retrieve a single kevent, specifying a maximum time to wait for it. */ > struct kevent * > -kevent_get_timeout(int kqfd, int seconds) > +kevent_get_timeout(int fd, int seconds) > { > int nfds; > struct kevent *kev; > @@ -105,7 +96,7 @@ kevent_get_timeout(int kqfd, int seconds) > if ((kev = calloc(1, sizeof(*kev))) == NULL) > err(1, "out of memory"); > > -nfds = kevent(kqfd, NULL, 0, kev, 1, &timeout); > +nfds = kevent(fd, NULL, 0, kev, 1, &timeout); > if (nfds < 0) { > err(1, "kevent(2)"); > } else if (nfds == 0) { > @@ -116,7 +107,7 @@ kevent_get_timeout(int kqfd, int seconds) > return (kev); > } > > -char * > +static char * > kevent_fflags_dump(struct kevent *kev) > { > char *buf; > @@ -166,7 +157,7 @@ kevent_fflags_dump(struct kevent *kev) > return (buf); > } > > -char * > +static char * > kevent_flags_dump(struct kevent *kev) > { > char *buf; > @@ -227,7 +218,7 @@ kevent_to_str(struct kevent *kev) > } > > void > -kevent_add(int kqfd, struct kevent *kev, > +kevent_add(int fd, struct kevent *kev, > uintptr_t iden
svn commit: r360076 - head/sys/dev/sound/pci/hda
Author: emaste Date: Sat Apr 18 18:25:30 2020 New Revision: 360076 URL: https://svnweb.freebsd.org/changeset/base/360076 Log: hda: remove hda*_lockowned macros These are not used anywhere. Modified: head/sys/dev/sound/pci/hda/hdaa.c head/sys/dev/sound/pci/hda/hdac.c head/sys/dev/sound/pci/hda/hdacc.c Modified: head/sys/dev/sound/pci/hda/hdaa.c == --- head/sys/dev/sound/pci/hda/hdaa.c Sat Apr 18 15:05:10 2020 (r360075) +++ head/sys/dev/sound/pci/hda/hdaa.c Sat Apr 18 18:25:30 2020 (r360076) @@ -52,7 +52,6 @@ SND_DECLARE_FILE("$FreeBSD$"); #define hdaa_lock(devinfo) snd_mtxlock((devinfo)->lock) #define hdaa_unlock(devinfo) snd_mtxunlock((devinfo)->lock) #define hdaa_lockassert(devinfo) snd_mtxassert((devinfo)->lock) -#define hdaa_lockowned(devinfo)mtx_owned((devinfo)->lock) static const struct { const char *key; Modified: head/sys/dev/sound/pci/hda/hdac.c == --- head/sys/dev/sound/pci/hda/hdac.c Sat Apr 18 15:05:10 2020 (r360075) +++ head/sys/dev/sound/pci/hda/hdac.c Sat Apr 18 18:25:30 2020 (r360076) @@ -56,7 +56,6 @@ SND_DECLARE_FILE("$FreeBSD$"); #define hdac_lock(sc) snd_mtxlock((sc)->lock) #define hdac_unlock(sc)snd_mtxunlock((sc)->lock) #define hdac_lockassert(sc)snd_mtxassert((sc)->lock) -#define hdac_lockowned(sc) mtx_owned((sc)->lock) #define HDAC_QUIRK_64BIT (1 << 0) #define HDAC_QUIRK_DMAPOS (1 << 1) Modified: head/sys/dev/sound/pci/hda/hdacc.c == --- head/sys/dev/sound/pci/hda/hdacc.c Sat Apr 18 15:05:10 2020 (r360075) +++ head/sys/dev/sound/pci/hda/hdacc.c Sat Apr 18 18:25:30 2020 (r360076) @@ -65,7 +65,6 @@ struct hdacc_softc { #define hdacc_lock(codec) snd_mtxlock((codec)->lock) #define hdacc_unlock(codec)snd_mtxunlock((codec)->lock) #define hdacc_lockassert(codec)snd_mtxassert((codec)->lock) -#define hdacc_lockowned(codec) mtx_owned((codec)->lock) MALLOC_DEFINE(M_HDACC, "hdacc", "HDA CODEC"); ___ 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: r360075 - head/sys/dev/usb/controller
Author: hselasky Date: Sat Apr 18 15:05:10 2020 New Revision: 360075 URL: https://svnweb.freebsd.org/changeset/base/360075 Log: Set the maximum exit latency to 0 for XHCI USB 3.0 devices, because we don't implement link power management, LPM. This fixes error code XHCI_TRB_ERROR_BANDWIDTH for isochronous USB 3.0 transactions. Submitted by: Horse Ma 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 Sat Apr 18 13:29:54 2020 (r360074) +++ head/sys/dev/usb/controller/xhci.c Sat Apr 18 15:05:10 2020 (r360075) @@ -2665,23 +2665,6 @@ xhci_configure_device(struct usb_device *udev) sc->sc_hw.devs[index].nports); } - switch (udev->speed) { - case USB_SPEED_SUPER: - switch (sc->sc_hw.devs[index].state) { - case XHCI_ST_ADDRESSED: - case XHCI_ST_CONFIGURED: - /* enable power save */ - temp |= XHCI_SCTX_1_MAX_EL_SET(sc->sc_exit_lat_max); - break; - default: - /* disable power save */ - break; - } - break; - default: - break; - } - xhci_ctx_set_le32(sc, &pinp->ctx_slot.dwSctx1, temp); temp = XHCI_SCTX_2_IRQ_TARGET_SET(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: r360074 - head/usr.bin/find
Author: 0mp (doc,ports committer) Date: Sat Apr 18 13:29:54 2020 New Revision: 360074 URL: https://svnweb.freebsd.org/changeset/base/360074 Log: Use the Ic macro for find(1) primaries consistently MFC after:3 days Modified: head/usr.bin/find/find.1 Modified: head/usr.bin/find/find.1 == --- head/usr.bin/find/find.1Sat Apr 18 12:54:47 2020(r360073) +++ head/usr.bin/find/find.1Sat Apr 18 13:29:54 2020(r360074) @@ -31,7 +31,7 @@ .\"@(#)find.1 8.7 (Berkeley) 5/9/95 .\" $FreeBSD$ .\" -.Dd January 24, 2017 +.Dd April 18, 2020 .Dt FIND 1 .Os .Sh NAME @@ -480,7 +480,7 @@ is being executed and the latter matches any file syst mounted read-only. .It Ic -gid Ar gname The same thing as -.Ar -group Ar gname +.Ic -group Ar gname for compatibility with GNU find. GNU find imposes a restriction that .Ar gname ___ 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: r360072 - in head/sys: conf modules/linux modules/linux64 modules/vmm
Author: arichardson Date: Sat Apr 18 12:54:40 2020 New Revision: 360072 URL: https://svnweb.freebsd.org/changeset/base/360072 Log: More fixes to build the kernel with a compiler that defaults to -fno-common Using the same approach as the last commit for the files used by genassym.sh. Obtained from:CheriBSD Modified: head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/modules/linux/Makefile head/sys/modules/linux64/Makefile head/sys/modules/vmm/Makefile Modified: head/sys/conf/files.amd64 == --- head/sys/conf/files.amd64 Sat Apr 18 12:54:35 2020(r360071) +++ head/sys/conf/files.amd64 Sat Apr 18 12:54:40 2020(r360072) @@ -38,7 +38,7 @@ cloudabi64_vdso_blob.ooptional compat_cloudabi64 \ # linux32_genassym.o optionalcompat_linux32 \ dependency "$S/amd64/linux32/linux32_genassym.c offset.inc" \ - compile-with"${CC} ${CFLAGS:N-flto:N-fno-common} -c ${.IMPSRC}" \ + compile-with"${CC} ${CFLAGS:N-flto:N-fno-common} -fcommon -c ${.IMPSRC}" \ no-obj no-implicit-rule \ clean "linux32_genassym.o" # @@ -62,7 +62,7 @@ linux32_vdso.so optionalcompat_linux32 \ # ia32_genassym.ostandard \ dependency "$S/compat/ia32/ia32_genassym.c offset.inc" \ - compile-with"${CC} ${CFLAGS:N-flto:N-fno-common} -c ${.IMPSRC}" \ + compile-with"${CC} ${CFLAGS:N-flto:N-fno-common} -fcommon -c ${.IMPSRC}" \ no-obj no-implicit-rule \ clean "ia32_genassym.o" # Modified: head/sys/conf/files.i386 == --- head/sys/conf/files.i386Sat Apr 18 12:54:35 2020(r360071) +++ head/sys/conf/files.i386Sat Apr 18 12:54:40 2020(r360072) @@ -25,7 +25,7 @@ cloudabi32_vdso_blob.ooptional compat_cloudabi32 \ # linux_genassym.o optionalcompat_linux\ dependency "$S/i386/linux/linux_genassym.c offset.inc" \ - compile-with"${CC} ${CFLAGS:N-flto:N-fno-common} -c ${.IMPSRC}" \ + compile-with"${CC} ${CFLAGS:N-flto:N-fno-common} -fcommon -c ${.IMPSRC}" \ no-obj no-implicit-rule \ clean "linux_genassym.o" # Modified: head/sys/modules/linux/Makefile == --- head/sys/modules/linux/Makefile Sat Apr 18 12:54:35 2020 (r360071) +++ head/sys/modules/linux/Makefile Sat Apr 18 12:54:40 2020 (r360072) @@ -78,7 +78,7 @@ ${VDSO}.so: linux${SFX}_locore.o .endif linux${SFX}_genassym.o: offset.inc - ${CC} -c ${CFLAGS:N-flto:N-fno-common} ${.IMPSRC} + ${CC} -c ${CFLAGS:N-flto:N-fno-common} -fcommon ${.IMPSRC} .if !defined(KERNBUILDDIR) .warning Building Linuxulator outside of a kernel does not make sense Modified: head/sys/modules/linux64/Makefile == --- head/sys/modules/linux64/Makefile Sat Apr 18 12:54:35 2020 (r360071) +++ head/sys/modules/linux64/Makefile Sat Apr 18 12:54:40 2020 (r360072) @@ -53,7 +53,7 @@ linux_support.o: assym.inc linux_assym.h ${.IMPSRC} -o ${.TARGET} linux_genassym.o: offset.inc - ${CC} -c ${CFLAGS:N-flto:N-fno-common} ${.IMPSRC} + ${CC} -c ${CFLAGS:N-flto:N-fno-common} -fcommon ${.IMPSRC} .if !defined(KERNBUILDDIR) .warning Building Linuxulator outside of a kernel does not make sense Modified: head/sys/modules/vmm/Makefile == --- head/sys/modules/vmm/Makefile Sat Apr 18 12:54:35 2020 (r360071) +++ head/sys/modules/vmm/Makefile Sat Apr 18 12:54:40 2020 (r360072) @@ -75,9 +75,9 @@ svm_support.o: ${.IMPSRC} -o ${.TARGET} vmx_genassym.o: offset.inc - ${CC} -c ${CFLAGS:N-flto:N-fno-common} ${.IMPSRC} + ${CC} -c ${CFLAGS:N-flto:N-fno-common} -fcommon ${.IMPSRC} svm_genassym.o: offset.inc - ${CC} -c ${CFLAGS:N-flto:N-fno-common} ${.IMPSRC} + ${CC} -c ${CFLAGS:N-flto:N-fno-common} -fcommon ${.IMPSRC} .include ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r360071 - head/sys/conf
Author: arichardson Date: Sat Apr 18 12:54:35 2020 New Revision: 360071 URL: https://svnweb.freebsd.org/changeset/base/360071 Log: Allow kernel modules to build with a compiler that defaults to -fno-common This uses the same approach as r359691. Reviewed By: brooks Differential Revision: https://reviews.freebsd.org/D24405 Modified: head/sys/conf/kmod.mk Modified: head/sys/conf/kmod.mk == --- head/sys/conf/kmod.mk Sat Apr 18 08:29:16 2020(r360070) +++ head/sys/conf/kmod.mk Sat Apr 18 12:54:35 2020(r360071) @@ -524,13 +524,13 @@ assym.inc: ${SYSDIR}/kern/genassym.sh sh ${SYSDIR}/kern/genassym.sh genassym.o > ${.TARGET} genassym.o: ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c offset.inc genassym.o: ${SRCS:Mopt_*.h} - ${CC} -c ${CFLAGS:N-flto:N-fno-common} \ + ${CC} -c ${CFLAGS:N-flto:N-fno-common} -fcommon \ ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c offset.inc: ${SYSDIR}/kern/genoffset.sh genoffset.o sh ${SYSDIR}/kern/genoffset.sh genoffset.o > ${.TARGET} genoffset.o: ${SYSDIR}/kern/genoffset.c genoffset.o: ${SRCS:Mopt_*.h} - ${CC} -c ${CFLAGS:N-flto:N-fno-common} \ + ${CC} -c ${CFLAGS:N-flto:N-fno-common} -fcommon \ ${SYSDIR}/kern/genoffset.c CLEANDEPENDFILES+= ${_ILINKS} ___ 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: r360073 - head/tests/sys/kqueue/libkqueue
Author: arichardson Date: Sat Apr 18 12:54:47 2020 New Revision: 360073 URL: https://svnweb.freebsd.org/changeset/base/360073 Log: Fix various warnings in tests/sys/kqueue and bump WARNS Reviewed By: kevans Differential Revision: https://reviews.freebsd.org/D24296 Modified: head/tests/sys/kqueue/libkqueue/Makefile head/tests/sys/kqueue/libkqueue/common.h head/tests/sys/kqueue/libkqueue/main.c head/tests/sys/kqueue/libkqueue/proc.c head/tests/sys/kqueue/libkqueue/read.c head/tests/sys/kqueue/libkqueue/signal.c head/tests/sys/kqueue/libkqueue/timer.c head/tests/sys/kqueue/libkqueue/user.c head/tests/sys/kqueue/libkqueue/vnode.c Modified: head/tests/sys/kqueue/libkqueue/Makefile == --- head/tests/sys/kqueue/libkqueue/MakefileSat Apr 18 12:54:40 2020 (r360072) +++ head/tests/sys/kqueue/libkqueue/MakefileSat Apr 18 12:54:47 2020 (r360073) @@ -16,6 +16,5 @@ SRCS.kqtest= \ proc.c \ signal.c\ user.c -WARNS?=2 .include Modified: head/tests/sys/kqueue/libkqueue/common.h == --- head/tests/sys/kqueue/libkqueue/common.hSat Apr 18 12:54:40 2020 (r360072) +++ head/tests/sys/kqueue/libkqueue/common.hSat Apr 18 12:54:47 2020 (r360073) @@ -40,7 +40,6 @@ #include -extern char *cur_test_id; extern int vnode_fd; extern int kqfd; @@ -76,5 +75,14 @@ extern void test_no_kevents_quietly(void); extern void test_begin(const char *); extern void success(void); + +extern void test_evfilt_read(void); +extern void test_evfilt_signal(void); +extern void test_evfilt_vnode(void); +extern void test_evfilt_timer(void); +extern void test_evfilt_proc(void); +#if HAVE_EVFILT_USER +extern void test_evfilt_user(void); +#endif #endif /* _COMMON_H */ Modified: head/tests/sys/kqueue/libkqueue/main.c == --- head/tests/sys/kqueue/libkqueue/main.c Sat Apr 18 12:54:40 2020 (r360072) +++ head/tests/sys/kqueue/libkqueue/main.c Sat Apr 18 12:54:47 2020 (r360073) @@ -21,21 +21,12 @@ #include "config.h" #include "common.h" -int testnum = 1; -char *cur_test_id = NULL; int kqfd; +static char *cur_test_id = NULL; +static int testnum = 1; -extern void test_evfilt_read(); -extern void test_evfilt_signal(); -extern void test_evfilt_vnode(); -extern void test_evfilt_timer(); -extern void test_evfilt_proc(); -#if HAVE_EVFILT_USER -extern void test_evfilt_user(); -#endif - /* Checks if any events are pending, which is an error. */ -void +void test_no_kevents(void) { int nfds; @@ -58,7 +49,7 @@ test_no_kevents(void) /* Checks if any events are pending, which is an error. Do not print * out anything unless events are found. */ -void +void test_no_kevents_quietly(void) { int nfds; @@ -79,7 +70,7 @@ test_no_kevents_quietly(void) /* Retrieve a single kevent */ struct kevent * -kevent_get(int kqfd) +kevent_get(int fd) { int nfds; struct kevent *kev; @@ -87,7 +78,7 @@ kevent_get(int kqfd) if ((kev = calloc(1, sizeof(*kev))) == NULL) err(1, "out of memory"); -nfds = kevent(kqfd, NULL, 0, kev, 1, NULL); +nfds = kevent(fd, NULL, 0, kev, 1, NULL); if (nfds < 1) err(1, "kevent(2)"); @@ -96,7 +87,7 @@ kevent_get(int kqfd) /* Retrieve a single kevent, specifying a maximum time to wait for it. */ struct kevent * -kevent_get_timeout(int kqfd, int seconds) +kevent_get_timeout(int fd, int seconds) { int nfds; struct kevent *kev; @@ -105,7 +96,7 @@ kevent_get_timeout(int kqfd, int seconds) if ((kev = calloc(1, sizeof(*kev))) == NULL) err(1, "out of memory"); -nfds = kevent(kqfd, NULL, 0, kev, 1, &timeout); +nfds = kevent(fd, NULL, 0, kev, 1, &timeout); if (nfds < 0) { err(1, "kevent(2)"); } else if (nfds == 0) { @@ -116,7 +107,7 @@ kevent_get_timeout(int kqfd, int seconds) return (kev); } -char * +static char * kevent_fflags_dump(struct kevent *kev) { char *buf; @@ -166,7 +157,7 @@ kevent_fflags_dump(struct kevent *kev) return (buf); } -char * +static char * kevent_flags_dump(struct kevent *kev) { char *buf; @@ -227,7 +218,7 @@ kevent_to_str(struct kevent *kev) } void -kevent_add(int kqfd, struct kevent *kev, +kevent_add(int fd, struct kevent *kev, uintptr_t ident, short filter, u_short flags, @@ -237,8 +228,8 @@ kevent_add(int kqfd, struct kevent *kev, { char *kev_str; -EV_SET(kev, ident, filter, flags, fflags, data, NULL); -if (kevent(kqfd, kev, 1, NULL, 0, NULL) < 0) { +EV_SET(kev, ident, filter, flags, fflags, data, udata); +if (kevent(fd, kev, 1, NULL, 0, NULL) < 0) { kev_str = kevent_to_str(kev); printf("Unabl
Re: svn commit: r360064 - in head: share/man/man4 sys/dev/amr
On Sat, Apr 18, 2020, 12:02 AM Rodney W. Grimes wrote: > > Author: imp > > Date: Sat Apr 18 02:53:19 2020 > > New Revision: 360064 > > URL: https://svnweb.freebsd.org/changeset/base/360064 > > > > Log: > > Add deprecation notice to amr(4) > > > > I take it this group of deprecations is also MFC: 3 days? > More likely a week. Warner > > -- > 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: r360070 - head/usr.sbin/bluetooth/hccontrol
Author: hselasky Date: Sat Apr 18 08:29:16 2020 New Revision: 360070 URL: https://svnweb.freebsd.org/changeset/base/360070 Log: Add missing feature descriptions to hci_features2str(). The list of possible features in hccontrol/features2str() is incomplete. Refer to "Bluetooth Core Specification 5.2 Vol. 2 Part C. 3.3 Feature Mask Definition". Submitted by: Marc Veldman PR: 245354 MFC after:1 week Sponsored by: Mellanox Technologies Modified: head/usr.sbin/bluetooth/hccontrol/info.c head/usr.sbin/bluetooth/hccontrol/link_control.c head/usr.sbin/bluetooth/hccontrol/node.c head/usr.sbin/bluetooth/hccontrol/util.c Modified: head/usr.sbin/bluetooth/hccontrol/info.c == --- head/usr.sbin/bluetooth/hccontrol/info.cSat Apr 18 08:00:58 2020 (r360069) +++ head/usr.sbin/bluetooth/hccontrol/info.cSat Apr 18 08:29:16 2020 (r360070) @@ -78,7 +78,7 @@ hci_read_local_supported_features(int s, int argc, cha { ng_hci_read_local_features_rp rp; int n; - charbuffer[1024]; + charbuffer[2048]; n = sizeof(rp); if (hci_simple_request(s, NG_HCI_OPCODE(NG_HCI_OGF_INFO, Modified: head/usr.sbin/bluetooth/hccontrol/link_control.c == --- head/usr.sbin/bluetooth/hccontrol/link_control.cSat Apr 18 08:00:58 2020(r360069) +++ head/usr.sbin/bluetooth/hccontrol/link_control.cSat Apr 18 08:29:16 2020(r360070) @@ -612,7 +612,7 @@ hci_read_remote_supported_features(int s, int argc, ch char b[512]; ng_hci_read_remote_features_cp cp; ng_hci_event_pkt_t *e = (ng_hci_event_pkt_t *) b; - char buffer[1024]; + char buffer[2048]; /* parse command parameters */ switch (argc) { Modified: head/usr.sbin/bluetooth/hccontrol/node.c == --- head/usr.sbin/bluetooth/hccontrol/node.cSat Apr 18 08:00:58 2020 (r360069) +++ head/usr.sbin/bluetooth/hccontrol/node.cSat Apr 18 08:29:16 2020 (r360070) @@ -153,7 +153,7 @@ hci_read_node_features(int s, int argc, char **argv) { struct ng_btsocket_hci_raw_node_featuresr; int n; - charbuffer[1024]; + charbuffer[2048]; memset(&r, 0, sizeof(r)); if (ioctl(s, SIOC_HCI_RAW_NODE_GET_FEATURES, &r, sizeof(r)) < 0) Modified: head/usr.sbin/bluetooth/hccontrol/util.c == --- head/usr.sbin/bluetooth/hccontrol/util.cSat Apr 18 08:00:58 2020 (r360069) +++ head/usr.sbin/bluetooth/hccontrol/util.cSat Apr 18 08:29:16 2020 (r360070) @@ -289,7 +289,57 @@ hci_features2str(uint8_t *features, char *buffer, int /* 4 */ " ", /* 5 */ " ", /* 6 */ " ", - /* 7 */ " " + /* 7 */ " " + }, + { /* byte 3 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 4 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ "<3-Slot EDR ACL packets> " + }, + { /* byte 5 */ + /* 0 */ "<5-Slot EDR ACL packets> ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ "<3-Slot EDR eSCO packets> " + }, + { /* byte 6 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 7 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " }}; if (buffer != NULL && size > 0) { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any
Re: svn commit: r359985 - stable/12/sys/dev/atkbdc
> On 2020-04-16 03:04, Warner Losh wrote: > > > > > > On Wed, Apr 15, 2020, 6:51 PM Rodney W. Grimes > > mailto:free...@gndrsh.dnsmgr.net>> wrote: > > > > [ Charset UTF-8 unsupported, converting... ] > > > Author: zeising (doc,ports committer) > > > Date: Wed Apr 15 19:47:19 2020 > > > New Revision: 359985 > > > URL: https://svnweb.freebsd.org/changeset/base/359985 > > > > > > Log: > > >? ?MFC r348873: Enable touch and trackpads by default > > > > > >? ?Enable synaptics and elantech touchpads, as well as IBM/Lenovo > > TrackPoints > > >? ?by default, instead of having users find and toggle a loader > > tunable. > > >? ?This makes things like two finger scroll and other modern > > features work out > > >? ?of the box with X.? By enabling these settings by default, we > > get a better > > >? ?desktop experience in X, since xserver and evdev can make use > > of the more > > >? ?advanced synaptics and elantech features. > > > > > >? ?Approved by:? ? ? ? imp > > > > RELNOTES: Y? > > > > > > Yea. This is a release notes item. > > > > Yes, this should have been marked with relnotes, my bad. How can I fix > this? Did we create the RELNOTES file, and if so, should I commit to > that one directly in 12, or first in head and then MFC? I do not know what the RE@ decision was on how to handle the RELNOTES file in stabe/X branches. CC:'ed to re@ so they can answer > Niclas Zeising -- 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: r360069 - head/sys/net
Author: kp Date: Sat Apr 18 08:00:58 2020 New Revision: 360069 URL: https://svnweb.freebsd.org/changeset/base/360069 Log: bridge: Simplify mac address generation Unconditionally use ether_gen_addr() to generate bridge mac addresses. This function is now less likely to generate duplicate mac addresses across jails. The old hand rolled hostid based code adds no value. Reviewed by: bz Differential Revision:https://reviews.freebsd.org/D24432 Modified: head/sys/net/if_bridge.c Modified: head/sys/net/if_bridge.c == --- head/sys/net/if_bridge.cSat Apr 18 07:50:30 2020(r360068) +++ head/sys/net/if_bridge.cSat Apr 18 08:00:58 2020(r360069) @@ -676,10 +676,8 @@ SYSCTL_PROC(_net_link_bridge, OID_AUTO, ipfw, static int bridge_clone_create(struct if_clone *ifc, int unit, caddr_t params) { - struct bridge_softc *sc, *sc2; - struct ifnet *bifp, *ifp; - int fb, retry; - unsigned long hostid; + struct bridge_softc *sc; + struct ifnet *ifp; sc = malloc(sizeof(*sc), M_DEVBUF, M_WAITOK|M_ZERO); ifp = sc->sc_ifp = if_alloc(IFT_ETHER); @@ -709,41 +707,7 @@ bridge_clone_create(struct if_clone *ifc, int unit, ca ifp->if_init = bridge_init; ifp->if_type = IFT_BRIDGE; - /* -* Generate an ethernet address with a locally administered address. -* -* Since we are using random ethernet addresses for the bridge, it is -* possible that we might have address collisions, so make sure that -* this hardware address isn't already in use on another bridge. -* The first try uses the hostid and falls back to arc4rand(). -*/ - fb = 0; - getcredhostid(curthread->td_ucred, &hostid); - do { - if (fb || hostid == 0) { - ether_gen_addr(ifp, &sc->sc_defaddr); - } else { - sc->sc_defaddr.octet[0] = 0x2; - sc->sc_defaddr.octet[1] = (hostid >> 24) & 0xff; - sc->sc_defaddr.octet[2] = (hostid >> 16) & 0xff; - sc->sc_defaddr.octet[3] = (hostid >> 8 ) & 0xff; - sc->sc_defaddr.octet[4] = hostid& 0xff; - sc->sc_defaddr.octet[5] = ifp->if_dunit & 0xff; - } - - fb = 1; - retry = 0; - BRIDGE_LIST_LOCK(); - LIST_FOREACH(sc2, &V_bridge_list, sc_list) { - bifp = sc2->sc_ifp; - if (memcmp(sc->sc_defaddr.octet, - IF_LLADDR(bifp), ETHER_ADDR_LEN) == 0) { - retry = 1; - break; - } - } - BRIDGE_LIST_UNLOCK(); - } while (retry == 1); + ether_gen_addr(ifp, &sc->sc_defaddr); bstp_attach(&sc->sc_stp, &bridge_ops); ether_ifattach(ifp, sc->sc_defaddr.octet); ___ 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: r360068 - in head/sys: kern net sys
Author: kp Date: Sat Apr 18 07:50:30 2020 New Revision: 360068 URL: https://svnweb.freebsd.org/changeset/base/360068 Log: ethersubr: Make the mac address generation more robust If we create two (vnet) jails and create a bridge interface in each we end up with the same mac address on both bridge interfaces. These very often conflicts, resulting in same mac address in both jails. Mitigate this problem by including the jail name in the mac address. Reviewed by: kevans, melifaro MFC after:1 week Differential Revision:https://reviews.freebsd.org/D24383 Modified: head/sys/kern/kern_jail.c head/sys/net/if_ethersubr.c head/sys/sys/jail.h Modified: head/sys/kern/kern_jail.c == --- head/sys/kern/kern_jail.c Sat Apr 18 03:14:16 2020(r360067) +++ head/sys/kern/kern_jail.c Sat Apr 18 07:50:30 2020(r360068) @@ -2920,6 +2920,15 @@ getcredhostid(struct ucred *cred, unsigned long *hosti mtx_unlock(&cred->cr_prison->pr_mtx); } +void +getjailname(struct ucred *cred, char *name, size_t len) +{ + + mtx_lock(&cred->cr_prison->pr_mtx); + strlcpy(name, cred->cr_prison->pr_name, len); + mtx_unlock(&cred->cr_prison->pr_mtx); +} + #ifdef VIMAGE /* * Determine whether the prison represented by cred owns Modified: head/sys/net/if_ethersubr.c == --- head/sys/net/if_ethersubr.c Sat Apr 18 03:14:16 2020(r360067) +++ head/sys/net/if_ethersubr.c Sat Apr 18 07:50:30 2020(r360068) @@ -1419,27 +1419,39 @@ ether_8021q_frame(struct mbuf **mp, struct ifnet *ife, /* * Allocate an address from the FreeBSD Foundation OUI. This uses a - * cryptographic hash function on the containing jail's UUID and the interface - * name to attempt to provide a unique but stable address. Pseudo-interfaces - * which require a MAC address should use this function to allocate - * non-locally-administered addresses. + * cryptographic hash function on the containing jail's name, UUID and the + * interface name to attempt to provide a unique but stable address. + * Pseudo-interfaces which require a MAC address should use this function to + * allocate non-locally-administered addresses. */ void ether_gen_addr(struct ifnet *ifp, struct ether_addr *hwaddr) { -#defineETHER_GEN_ADDR_BUFSIZ HOSTUUIDLEN + IFNAMSIZ + 2 SHA1_CTX ctx; - char buf[ETHER_GEN_ADDR_BUFSIZ]; + char *buf; char uuid[HOSTUUIDLEN + 1]; uint64_t addr; int i, sz; char digest[SHA1_RESULTLEN]; + char jailname[MAXHOSTNAMELEN]; getcredhostuuid(curthread->td_ucred, uuid, sizeof(uuid)); - sz = snprintf(buf, ETHER_GEN_ADDR_BUFSIZ, "%s-%s", uuid, ifp->if_xname); + /* If each (vnet) jail would also have a unique hostuuid this would not +* be necessary. */ + getjailname(curthread->td_ucred, jailname, sizeof(jailname)); + sz = asprintf(&buf, M_TEMP, "%s-%s-%s", uuid, if_name(ifp), + jailname); + if (sz < 0) { + /* Fall back to a random mac address. */ + arc4rand(hwaddr, sizeof(*hwaddr), 0); + hwaddr->octet[0] = 0x02; + return; + } + SHA1Init(&ctx); SHA1Update(&ctx, buf, sz); SHA1Final(digest, &ctx); + free(buf, M_TEMP); addr = ((digest[0] << 16) | (digest[1] << 8) | digest[2]) & OUI_FREEBSD_GENERATED_MASK; Modified: head/sys/sys/jail.h == --- head/sys/sys/jail.h Sat Apr 18 03:14:16 2020(r360067) +++ head/sys/sys/jail.h Sat Apr 18 07:50:30 2020(r360068) @@ -382,6 +382,7 @@ void getcredhostname(struct ucred *, char *, size_t); void getcreddomainname(struct ucred *, char *, size_t); void getcredhostuuid(struct ucred *, char *, size_t); void getcredhostid(struct ucred *, unsigned long *); +void getjailname(struct ucred *cred, char *name, size_t len); void prison0_init(void); int prison_allow(struct ucred *, unsigned); int prison_check(struct ucred *cred1, struct ucred *cred2); ___ 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: r359985 - stable/12/sys/dev/atkbdc
On 2020-04-16 03:04, Warner Losh wrote: On Wed, Apr 15, 2020, 6:51 PM Rodney W. Grimes mailto:free...@gndrsh.dnsmgr.net>> wrote: [ Charset UTF-8 unsupported, converting... ] > Author: zeising (doc,ports committer) > Date: Wed Apr 15 19:47:19 2020 > New Revision: 359985 > URL: https://svnweb.freebsd.org/changeset/base/359985 > > Log: > MFC r348873: Enable touch and trackpads by default > > Enable synaptics and elantech touchpads, as well as IBM/Lenovo TrackPoints > by default, instead of having users find and toggle a loader tunable. > This makes things like two finger scroll and other modern features work out > of the box with X. By enabling these settings by default, we get a better > desktop experience in X, since xserver and evdev can make use of the more > advanced synaptics and elantech features. > > Approved by: imp RELNOTES: Y? Yea. This is a release notes item. Yes, this should have been marked with relnotes, my bad. How can I fix this? Did we create the RELNOTES file, and if so, should I commit to that one directly in 12, or first in head and then MFC? Regards -- Niclas Zeising ___ 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"