svn commit: r365625 - head/tests/sys/kern
Author: lwhsu Date: Fri Sep 11 05:45:27 2020 New Revision: 365625 URL: https://svnweb.freebsd.org/changeset/base/365625 Log: Revert r365592 and r365603 as the tests are fixed by r365593 PR: 249236 Sponsored by: The FreeBSD Foundation Modified: head/tests/sys/kern/memfd_test.c Modified: head/tests/sys/kern/memfd_test.c == --- head/tests/sys/kern/memfd_test.cFri Sep 11 02:02:15 2020 (r365624) +++ head/tests/sys/kern/memfd_test.cFri Sep 11 05:45:27 2020 (r365625) @@ -43,9 +43,6 @@ ATF_TC_BODY(basic, tc) int fd; char buf[8]; - if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) - atf_tc_skip("https://bugs.freebsd.org/249236;); - ATF_REQUIRE((fd = memfd_create("...", 0)) != -1); /* write(2) should grow us out automatically. */ @@ -102,9 +99,6 @@ ATF_TC_BODY(write_seal, tc) int fd; char *addr, buf[BUF_SIZE]; - if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) - atf_tc_skip("https://bugs.freebsd.org/249236;); - ATF_REQUIRE((fd = memfd_create("...", MFD_ALLOW_SEALING)) != -1); ATF_REQUIRE(ftruncate(fd, BUF_SIZE) == 0); @@ -134,9 +128,6 @@ ATF_TC_BODY(mmap_write_seal, tc) int fd; char *addr, *paddr, *raddr; - if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) - atf_tc_skip("https://bugs.freebsd.org/249236;); - ATF_REQUIRE((fd = memfd_create("...", MFD_ALLOW_SEALING)) != -1); ATF_REQUIRE(ftruncate(fd, BUF_SIZE) == 0); @@ -202,9 +193,6 @@ ATF_TC_WITHOUT_HEAD(truncate_seals); ATF_TC_BODY(truncate_seals, tc) { - if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) - atf_tc_skip("https://bugs.freebsd.org/249236;); - ATF_REQUIRE(memfd_truncate_test(4, 8, F_SEAL_GROW) == EPERM); ATF_REQUIRE(memfd_truncate_test(8, 4, F_SEAL_SHRINK) == EPERM); ATF_REQUIRE(memfd_truncate_test(8, 4, F_SEAL_GROW) == 0); @@ -240,9 +228,6 @@ ATF_TC_BODY(dup_seals, tc) char buf[8]; int fd, fdx; int seals; - - if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) - atf_tc_skip("https://bugs.freebsd.org/249236;); ATF_REQUIRE((fd = memfd_create("...", MFD_ALLOW_SEALING)) != -1); ATF_REQUIRE((fdx = dup(fd)) != -1); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365623 - head/sys/dev/usb/net
Author: jmg Date: Fri Sep 11 02:02:13 2020 New Revision: 365623 URL: https://svnweb.freebsd.org/changeset/base/365623 Log: Don't clear reserved bits per RealTek MFC after:3 days Modified: head/sys/dev/usb/net/if_ure.c Modified: head/sys/dev/usb/net/if_ure.c == --- head/sys/dev/usb/net/if_ure.c Fri Sep 11 00:12:05 2020 (r365622) +++ head/sys/dev/usb/net/if_ure.c Fri Sep 11 02:02:13 2020 (r365623) @@ -816,9 +816,10 @@ ure_rxfilter(struct usb_ether *ue) URE_LOCK_ASSERT(sc, MA_OWNED); - rxmode = URE_RCR_APM; - if (ifp->if_flags & IFF_BROADCAST) -rxmode |= URE_RCR_AB; + rxmode = ure_read_4(sc, URE_PLA_RCR, URE_MCU_TYPE_PLA); + rxmode &= ~(URE_RCR_AAP | URE_RCR_AM); + rxmode |= URE_RCR_APM; /* accept physical match packets */ + rxmode |= URE_RCR_AB; /* always accept broadcasts */ if (ifp->if_flags & (IFF_ALLMULTI | IFF_PROMISC)) { if (ifp->if_flags & IFF_PROMISC) rxmode |= URE_RCR_AAP; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365624 - head/lib/libc/sys
Author: kevans Date: Fri Sep 11 02:02:15 2020 New Revision: 365624 URL: https://svnweb.freebsd.org/changeset/base/365624 Log: memfd_create: simplify HUGETLB support a little bit This also fixes a minor issue that was missed in the initial review; the layout of the MFD_HUGE_* flags is actually not 1:1 bit:flag -- it instead borrowed the Linux convention of how this is laid out since it was originally implemented on Linux, the top 6 bits represent the shift required for the requested page size. This allows us to remove the flag <-> pgsize mapping table and simplify the logic just prior to validation of the requested page size. While we're here, fix two small nits: - HUGETLB memfd shouldn't exhibit the SHM_GROW_ON_WRITE behavior. We can only grow largepage shm by appropriately aligned (i.e. requested pagesize) sizes, so it can't work in the typical/sane fashion. Furthermore, Linux does the same, so let's be compatible. - We don't allow MFD_HUGETLB without specifying a pagesize, so no need to check for that later. Reviewed by: kib (slightly earlier version) Modified: head/lib/libc/sys/shm_open.c Modified: head/lib/libc/sys/shm_open.c == --- head/lib/libc/sys/shm_open.cFri Sep 11 02:02:13 2020 (r365623) +++ head/lib/libc/sys/shm_open.cFri Sep 11 02:02:15 2020 (r365624) @@ -81,27 +81,6 @@ shm_create_largepage(const char *path, int flags, int return (fd); } -#defineK(x)((size_t)(x) * 1024) -#defineM(x)(K(x) * 1024) -#defineG(x)(M(x) * 1024) -static const struct { - int mask; - size_t pgsize; -} mfd_huge_sizes[] = { - { .mask = MFD_HUGE_64KB,.pgsize = K(64) }, - { .mask = MFD_HUGE_512KB, .pgsize = K(512) }, - { .mask = MFD_HUGE_1MB, .pgsize = M(1) }, - { .mask = MFD_HUGE_2MB, .pgsize = M(2) }, - { .mask = MFD_HUGE_8MB, .pgsize = M(8) }, - { .mask = MFD_HUGE_16MB,.pgsize = M(16) }, - { .mask = MFD_HUGE_32MB,.pgsize = M(32) }, - { .mask = MFD_HUGE_256MB, .pgsize = M(256) }, - { .mask = MFD_HUGE_512MB, .pgsize = M(512) }, - { .mask = MFD_HUGE_1GB, .pgsize = G(1) }, - { .mask = MFD_HUGE_2GB, .pgsize = G(2) }, - { .mask = MFD_HUGE_16GB,.pgsize = G(16) }, -}; - /* * The path argument is passed to the kernel, but the kernel doesn't currently * do anything with it. Linux exposes it in linprocfs for debugging purposes @@ -111,9 +90,9 @@ int memfd_create(const char *name, unsigned int flags) { char memfd_name[NAME_MAX + 1]; - size_t namelen, *pgs; + size_t namelen, *pgs, pgsize; struct shm_largepage_conf slc; - int error, fd, i, npgs, oflags, pgidx, saved_errno, shmflags; + int error, fd, npgs, oflags, pgidx, saved_errno, shmflags; if (name == NULL) { errno = EBADF; @@ -130,8 +109,7 @@ memfd_create(const char *name, unsigned int flags) return (-1); } /* Size specified but no HUGETLB. */ - if (((flags & MFD_HUGE_MASK) != 0 && (flags & MFD_HUGETLB) == 0) || - __bitcount(flags & MFD_HUGE_MASK) > 1) { + if ((flags & MFD_HUGE_MASK) != 0 && (flags & MFD_HUGETLB) == 0) { errno = EINVAL; return (-1); } @@ -139,13 +117,15 @@ memfd_create(const char *name, unsigned int flags) /* We've already validated that we're sufficiently sized. */ snprintf(memfd_name, NAME_MAX + 1, "%s%s", MEMFD_NAME_PREFIX, name); oflags = O_RDWR; - shmflags = SHM_GROW_ON_WRITE; + shmflags = 0; if ((flags & MFD_CLOEXEC) != 0) oflags |= O_CLOEXEC; if ((flags & MFD_ALLOW_SEALING) != 0) shmflags |= SHM_ALLOW_SEALING; if ((flags & MFD_HUGETLB) != 0) shmflags |= SHM_LARGEPAGE; + else + shmflags |= SHM_GROW_ON_WRITE; fd = __sys_shm_open2(SHM_ANON, oflags, 0, shmflags, memfd_name); if (fd == -1 || (flags & MFD_HUGETLB) == 0) return (fd); @@ -160,25 +140,14 @@ memfd_create(const char *name, unsigned int flags) error = getpagesizes(pgs, npgs); if (error == -1) goto clean; - if ((flags & MFD_HUGE_MASK) == 0) { - if (npgs == 1) { - errno = EOPNOTSUPP; - goto clean; - } - pgidx = 1; - } else { - for (i = 0; i < nitems(mfd_huge_sizes); i++) { - if (mfd_huge_sizes[i].mask == (flags & MFD_HUGE_MASK)) - break; - } - for (pgidx = 0; pgidx < npgs; pgidx++) { - if (mfd_huge_sizes[i].pgsize == pgs[pgidx]) -
svn commit: r365620 - head/sys/riscv/conf
Author: jhb Date: Fri Sep 11 00:06:16 2020 New Revision: 365620 URL: https://svnweb.freebsd.org/changeset/base/365620 Log: Disable WITNESS for spin locks by default. This matches all other architectures and removes substantial overhead. Reported by: arichardson (indirectly) Reviewed by: imp, arichardson Obtained from:CheriBSD Sponsored by: DARPA Differential Revision:https://reviews.freebsd.org/D26403 Modified: head/sys/riscv/conf/GENERIC Modified: head/sys/riscv/conf/GENERIC == --- head/sys/riscv/conf/GENERIC Fri Sep 11 00:04:23 2020(r365619) +++ head/sys/riscv/conf/GENERIC Fri Sep 11 00:06:16 2020(r365620) @@ -140,7 +140,7 @@ options DEADLKRES # Enable the deadlock resolver optionsINVARIANTS # Enable calls of extra sanity checking optionsINVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS optionsWITNESS # Enable checks to detect deadlocks and cycles -# options WITNESS_SKIPSPIN# Don't run witness on spinlocks for speed +optionsWITNESS_SKIPSPIN# Don't run witness on spinlocks for speed optionsMALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones # options EARLY_PRINTF optionsVERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365617 - head/sys/dev/ice
Author: erj Date: Thu Sep 10 23:46:13 2020 New Revision: 365617 URL: https://svnweb.freebsd.org/changeset/base/365617 Log: ice(4): Update to 0.26.16 Summary of changes: - Assorted bug fixes - Support for newer versions of the device firmware - Suspend/resume support - Support for Lenient Link Mode for E82X devices (e.g. can try to link with SFP/QSFP modules with bad EEPROMs) - Adds port-level rx_discards sysctl, similar to ixl(4)'s This version of the driver is intended to be used with DDP package 1.3.16.0, which has already been updated in a previous commit. Tested by:Jeffrey Pieper MFC after:3 days MFC with: r365332, r365550 Sponsored by: Intel Corporation Differential Revision:https://reviews.freebsd.org/D26322 Modified: head/sys/dev/ice/ice_adminq_cmd.h head/sys/dev/ice/ice_bitops.h head/sys/dev/ice/ice_common.c head/sys/dev/ice/ice_common.h head/sys/dev/ice/ice_controlq.c head/sys/dev/ice/ice_controlq.h head/sys/dev/ice/ice_dcb.c head/sys/dev/ice/ice_dcb.h head/sys/dev/ice/ice_drv_info.h head/sys/dev/ice/ice_flex_pipe.c head/sys/dev/ice/ice_flex_pipe.h head/sys/dev/ice/ice_flex_type.h head/sys/dev/ice/ice_flow.c head/sys/dev/ice/ice_flow.h head/sys/dev/ice/ice_hw_autogen.h head/sys/dev/ice/ice_lan_tx_rx.h head/sys/dev/ice/ice_lib.c head/sys/dev/ice/ice_lib.h head/sys/dev/ice/ice_nvm.c head/sys/dev/ice/ice_nvm.h head/sys/dev/ice/ice_protocol_type.h head/sys/dev/ice/ice_sched.c head/sys/dev/ice/ice_sched.h head/sys/dev/ice/ice_status.h head/sys/dev/ice/ice_strings.c head/sys/dev/ice/ice_switch.c head/sys/dev/ice/ice_switch.h head/sys/dev/ice/ice_type.h head/sys/dev/ice/if_ice_iflib.c head/sys/dev/ice/virtchnl.h head/sys/dev/ice/virtchnl_inline_ipsec.h Modified: head/sys/dev/ice/ice_adminq_cmd.h == --- head/sys/dev/ice/ice_adminq_cmd.h Thu Sep 10 22:22:23 2020 (r365616) +++ head/sys/dev/ice/ice_adminq_cmd.h Thu Sep 10 23:46:13 2020 (r365617) @@ -156,12 +156,13 @@ struct ice_aqc_list_caps_elem { #define ICE_AQC_CAPS_MSIX 0x0043 #define ICE_AQC_CAPS_MAX_MTU 0x0047 #define ICE_AQC_CAPS_NVM_VER 0x0048 +#define ICE_AQC_CAPS_OROM_VER 0x004A +#define ICE_AQC_CAPS_NET_VER 0x004C #define ICE_AQC_CAPS_CEM 0x00F2 #define ICE_AQC_CAPS_IWARP 0x0051 #define ICE_AQC_CAPS_LED 0x0061 #define ICE_AQC_CAPS_SDP 0x0062 #define ICE_AQC_CAPS_WR_CSR_PROT 0x0064 -#define ICE_AQC_CAPS_NO_DROP_POLICY0x0065 #define ICE_AQC_CAPS_LOGI_TO_PHYSI_PORT_MAP0x0073 #define ICE_AQC_CAPS_SKU 0x0074 #define ICE_AQC_CAPS_PORT_MAP 0x0075 @@ -281,13 +282,6 @@ struct ice_aqc_get_sw_cfg_resp_elem { #define ICE_AQC_GET_SW_CONF_RESP_IS_VF BIT(15) }; -/* The response buffer is as follows. Note that the length of the - * elements array varies with the length of the command response. - */ -struct ice_aqc_get_sw_cfg_resp { - struct ice_aqc_get_sw_cfg_resp_elem elements[1]; -}; - /* Set Port parameters, (direct, 0x0203) */ struct ice_aqc_set_port_params { __le16 cmd_flags; @@ -338,8 +332,6 @@ struct ice_aqc_set_port_params { #define ICE_AQC_RES_TYPE_SWITCH_PROF_BLDR_TCAM 0x49 #define ICE_AQC_RES_TYPE_ACL_PROF_BLDR_PROFID 0x50 #define ICE_AQC_RES_TYPE_ACL_PROF_BLDR_TCAM0x51 -#define ICE_AQC_RES_TYPE_FD_PROF_BLDR_PROFID 0x58 -#define ICE_AQC_RES_TYPE_FD_PROF_BLDR_TCAM 0x59 #define ICE_AQC_RES_TYPE_HASH_PROF_BLDR_PROFID 0x60 #define ICE_AQC_RES_TYPE_HASH_PROF_BLDR_TCAM 0x61 /* Resource types 0x62-67 are reserved for Hash profile builder */ @@ -372,15 +364,6 @@ struct ice_aqc_get_res_resp_elem { __le16 total_free; /* Resources un-allocated/not reserved by any PF */ }; -/* Buffer for Get Resource command */ -struct ice_aqc_get_res_resp { - /* Number of resource entries to be calculated using -* datalen/sizeof(struct ice_aqc_cmd_resp)). -* Value of 'datalen' gets updated as part of response. -*/ - struct ice_aqc_get_res_resp_elem elem[1]; -}; - /* Allocate Resources command (indirect 0x0208) * Free Resources command (indirect 0x0209) */ @@ -406,7 +389,7 @@ struct ice_aqc_alloc_free_res_elem { #define ICE_AQC_RES_TYPE_VSI_PRUNE_LIST_M \ (0xF << ICE_AQC_RES_TYPE_VSI_PRUNE_LIST_S) __le16 num_elems; - struct ice_aqc_res_elem elem[1]; + struct ice_aqc_res_elem elem[STRUCT_HACK_VAR_LEN]; }; /* Get Allocated Resource Descriptors Command (indirect 0x020A) */ @@ -428,10
svn commit: r365616 - head/sys/amd64/vmm/amd
Author: jhb Date: Thu Sep 10 22:22:23 2020 New Revision: 365616 URL: https://svnweb.freebsd.org/changeset/base/365616 Log: Use vmcb_read/write for the vmcb snapshot functions. This avoids some unnecessary layers of indirection. Modified: head/sys/amd64/vmm/amd/vmcb.c Modified: head/sys/amd64/vmm/amd/vmcb.c == --- head/sys/amd64/vmm/amd/vmcb.c Thu Sep 10 21:25:16 2020 (r365615) +++ head/sys/amd64/vmm/amd/vmcb.c Thu Sep 10 22:22:23 2020 (r365616) @@ -472,7 +472,7 @@ vmcb_getany(struct svm_softc *sc, int vcpu, int ident, goto err; } - error = vm_get_register(sc->vm, vcpu, ident, val); + error = vmcb_read(sc, vcpu, ident, val); err: return (error); @@ -493,7 +493,7 @@ vmcb_setany(struct svm_softc *sc, int vcpu, int ident, goto err; } - error = vm_set_register(sc->vm, vcpu, ident, val); + error = vmcb_write(sc, vcpu, ident, val); err: return (error); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r365615 - head/lib/libc/sys
On Thu, Sep 10, 2020 at 4:25 PM Kyle Evans wrote: > > Author: kevans > Date: Thu Sep 10 21:25:16 2020 > New Revision: 365615 > URL: https://svnweb.freebsd.org/changeset/base/365615 > > Log: > memfd_create: fix return values > > Literally returning EINVAL from a function designed to return an fd makes > for interesting scenarios. > > I cannot assign enough pointy hats to cover this one. > The word omitted is "myself" -- I cannot assign myself enough pointy hats to cover this one. Thanks, Kyle Evans ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365615 - head/lib/libc/sys
Author: kevans Date: Thu Sep 10 21:25:16 2020 New Revision: 365615 URL: https://svnweb.freebsd.org/changeset/base/365615 Log: memfd_create: fix return values Literally returning EINVAL from a function designed to return an fd makes for interesting scenarios. I cannot assign enough pointy hats to cover this one. Modified: head/lib/libc/sys/shm_open.c Modified: head/lib/libc/sys/shm_open.c == --- head/lib/libc/sys/shm_open.cThu Sep 10 21:01:22 2020 (r365614) +++ head/lib/libc/sys/shm_open.cThu Sep 10 21:25:16 2020 (r365615) @@ -115,18 +115,26 @@ memfd_create(const char *name, unsigned int flags) struct shm_largepage_conf slc; int error, fd, i, npgs, oflags, pgidx, saved_errno, shmflags; - if (name == NULL) - return (EBADF); + if (name == NULL) { + errno = EBADF; + return (-1); + } namelen = strlen(name); - if (namelen + sizeof(MEMFD_NAME_PREFIX) - 1 > NAME_MAX) - return (EINVAL); + if (namelen + sizeof(MEMFD_NAME_PREFIX) - 1 > NAME_MAX) { + errno = EINVAL; + return (-1); + } if ((flags & ~(MFD_CLOEXEC | MFD_ALLOW_SEALING | MFD_HUGETLB | - MFD_HUGE_MASK)) != 0) - return (EINVAL); + MFD_HUGE_MASK)) != 0) { + errno = EINVAL; + return (-1); + } /* Size specified but no HUGETLB. */ if (((flags & MFD_HUGE_MASK) != 0 && (flags & MFD_HUGETLB) == 0) || - __bitcount(flags & MFD_HUGE_MASK) > 1) - return (EINVAL); + __bitcount(flags & MFD_HUGE_MASK) > 1) { + errno = EINVAL; + return (-1); + } /* We've already validated that we're sufficiently sized. */ snprintf(memfd_name, NAME_MAX + 1, "%s%s", MEMFD_NAME_PREFIX, name); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365613 - head/sys/kern
Author: kib Date: Thu Sep 10 20:54:44 2020 New Revision: 365613 URL: https://svnweb.freebsd.org/changeset/base/365613 Log: Fix interaction between largepages and seals/writes. On write with SHM_GROW_ON_WRITE, use proper truncate. Do not allow to grow largepage shm if F_SEAL_GROW is set. Note that shrinks are not supported at all due to unmanaged mappings. Call to vm_pager_update_writecount() is only valid for swap objects, skip it for unmanaged largepages. Largepages cannot support write sealing. Do not writecnt largepage mappings. Reported by: kevans Reviewed by: kevans, markj Sponsored by: The FreeBSD Foundation MFC after:1 week Differential revision:https://reviews.freebsd.org/D26394 Modified: head/sys/kern/uipc_shm.c Modified: head/sys/kern/uipc_shm.c == --- head/sys/kern/uipc_shm.cThu Sep 10 20:46:16 2020(r365612) +++ head/sys/kern/uipc_shm.cThu Sep 10 20:54:44 2020(r365613) @@ -450,9 +450,7 @@ shm_write(struct file *fp, struct uio *uio, struct ucr error = 0; if ((shmfd->shm_flags & SHM_GROW_ON_WRITE) != 0 && size > shmfd->shm_size) { - VM_OBJECT_WLOCK(shmfd->shm_object); - error = shm_dotruncate_locked(shmfd, size, rl_cookie); - VM_OBJECT_WUNLOCK(shmfd->shm_object); + error = shm_dotruncate_cookie(shmfd, size, rl_cookie); } if (error == 0) error = uiomove_object(shmfd->shm_object, @@ -767,6 +765,9 @@ shm_dotruncate_largepage(struct shmfd *shmfd, off_t le #endif } + if ((shmfd->shm_seals & F_SEAL_GROW) != 0) + return (EPERM); + aflags = VM_ALLOC_NORMAL | VM_ALLOC_ZERO; if (shmfd->shm_lp_alloc_policy == SHM_LARGEPAGE_ALLOC_NOWAIT) aflags |= VM_ALLOC_WAITFAIL; @@ -1416,7 +1417,7 @@ out: static int shm_mmap_large(struct shmfd *shmfd, vm_map_t map, vm_offset_t *addr, vm_size_t size, vm_prot_t prot, vm_prot_t max_prot, int flags, -vm_ooffset_t foff, bool writecounted, struct thread *td) +vm_ooffset_t foff, struct thread *td) { struct vmspace *vms; vm_map_entry_t next_entry, prev_entry; @@ -1448,8 +1449,6 @@ shm_mmap_large(struct shmfd *shmfd, vm_map_t map, vm_o docow |= MAP_INHERIT_SHARE; if ((flags & MAP_NOCORE) != 0) docow |= MAP_DISABLE_COREDUMP; - if (writecounted) - docow |= MAP_WRITECOUNT; mask = pagesizes[shmfd->shm_lp_psind] - 1; if ((foff & mask) != 0) @@ -1594,12 +1593,15 @@ shm_mmap(struct file *fp, vm_map_t map, vm_offset_t *a mtx_unlock(_timestamp_lock); vm_object_reference(shmfd->shm_object); - if (writecnt) - vm_pager_update_writecount(shmfd->shm_object, 0, objsize); if (shm_largepage(shmfd)) { + writecnt = false; error = shm_mmap_large(shmfd, map, addr, objsize, prot, - maxprot, flags, foff, writecnt, td); + maxprot, flags, foff, td); } else { + if (writecnt) { + vm_pager_update_writecount(shmfd->shm_object, 0, + objsize); + } error = vm_mmap_object(map, addr, objsize, prot, maxprot, flags, shmfd->shm_object, foff, writecnt, td); } @@ -1838,6 +1840,11 @@ shm_add_seals(struct file *fp, int seals) } nseals = seals & ~shmfd->shm_seals; if ((nseals & F_SEAL_WRITE) != 0) { + if (shm_largepage(shmfd)) { + error = ENOTSUP; + goto out; + } + /* * The rangelock above prevents writable mappings from being * added after we've started applying seals. The RLOCK here ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365609 - in head/tests/sys: netinet netinet6
Author: melifaro Date: Thu Sep 10 19:25:51 2020 New Revision: 365609 URL: https://svnweb.freebsd.org/changeset/base/365609 Log: Add basic test for net.fibs dynamic growth. Reviewed by: kp Differential Revision:https://reviews.freebsd.org/D26382 Added: head/tests/sys/netinet/fibs.sh (contents, props changed) head/tests/sys/netinet6/fibs6.sh (contents, props changed) Modified: head/tests/sys/netinet/Makefile head/tests/sys/netinet6/Makefile Modified: head/tests/sys/netinet/Makefile == --- head/tests/sys/netinet/Makefile Thu Sep 10 19:00:17 2020 (r365608) +++ head/tests/sys/netinet/Makefile Thu Sep 10 19:25:51 2020 (r365609) @@ -9,7 +9,7 @@ ATF_TESTS_C=ip_reass_test \ so_reuseport_lb_test \ socket_afinet -ATF_TESTS_SH= carp fibs_test redirect divert forward output lpm +ATF_TESTS_SH= carp fibs fibs_test redirect divert forward output lpm TEST_METADATA.output+= required_programs="python" PROGS= udp_dontroute tcp_user_cookie Added: head/tests/sys/netinet/fibs.sh == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/netinet/fibs.sh Thu Sep 10 19:25:51 2020 (r365609) @@ -0,0 +1,73 @@ +#!/usr/bin/env atf-sh +#- +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2020 Alexander V. Chernikov +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +#notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +#notice, this list of conditions and the following disclaimer in the +#documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +. $(atf_get_srcdir)/../common/vnet.subr + +atf_test_case "fibs_ifroutes1_success" "cleanup" +fibs_ifroutes1_success_head() +{ + + atf_set descr 'Test IPv4 routes gets populated in the correct fib' + atf_set require.user root +} + +fibs_ifroutes1_success_body() +{ + + vnet_init + + net_dst="192.168.0." + jname="v6t-fibs_ifroutes1_success" + + epair=$(vnet_mkepair) + vnet_mkjail ${jname}a ${epair}a + + jexec ${jname}a sysctl net.fibs=2 + + jexec ${jname}a ifconfig ${epair}a fib 1 + jexec ${jname}a ifconfig ${epair}a inet ${net_dst}1/24 + jexec ${jname}a ifconfig ${epair}a up + + atf_check -s exit:0 -o ignore jexec ${jname}a setfib 1 route -4n get ${net_dst}0/24 + atf_check -o match:"interface: lo0" jexec ${jname}a setfib 1 route -4n get ${net_dst}1 + atf_check -o match:"destination: ${net_dst}1" jexec ${jname}a setfib 1 route -4n get ${net_dst}1 +} + +fibs_ifroutes1_success_cleanup() +{ + vnet_cleanup +} + +atf_init_test_cases() +{ + atf_add_test_case "fibs_ifroutes1_success" +} + + Modified: head/tests/sys/netinet6/Makefile == --- head/tests/sys/netinet6/MakefileThu Sep 10 19:00:17 2020 (r365608) +++ head/tests/sys/netinet6/MakefileThu Sep 10 19:25:51 2020 (r365609) @@ -13,7 +13,8 @@ ATF_TESTS_SH= \ divert \ forward6 \ output6 \ - lpm6 + lpm6 \ + fibs6 TEST_METADATA.output6+=required_programs="python" ${PACKAGE}FILES+= exthdr.py Added: head/tests/sys/netinet6/fibs6.sh == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/netinet6/fibs6.shThu Sep 10 19:25:51 2020 (r365609) @@ -0,0 +1,92 @@ +#!/usr/bin/env atf-sh +#- +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2020 Alexander
Re: uninitialized variables [Was: svn commit: r365445 - head/sys/cam/mmc]
On 09/09/2020 16:44, Mark Johnston wrote: > On Wed, Sep 09, 2020 at 08:49:01AM +0300, Andriy Gapon wrote: >> On 08/09/2020 15:48, Mark Johnston wrote: >>> I observed the same thing recently as well: the compiler catches >>> uninitialized variables only in simple cases. In my case, any uses of >>> goto within the function seemed to silence the warning, even if they >>> appeared after the uninitialized reference. >> >> I am running a kernel build now with this addition (for clang): >> CWARNEXTRA+= -Wconditional-uninitialized >> -Wno-error-conditional-uninitialized >> >> It produces a ton of warnings. >> Some of them are probably false positives, but some look quite reasonable. > > It has a lot of trouble with code patterns of the form: > > for (i = 0; i < 100; i++) { > val = foo(); > } > if (val != 0) /* may be uninitialized!!1 */ > bar(); > > or > > if (foo == bar) > val = baz(); > > if (foo == bar && val == 3) > > > The second example makes some sense to me since it's hard to prove that > foo == bar will not change between the first and second evaluations. I also noted the first pattern as the most common source of false positives. So, it seems that we cannot have what we want. Without -Wconditional-uninitialized clang is too conservative, with the option it's too "loose". I seem to recall that compilers used to be better than that. But maybe it's just false memories ("there used to be more snow in the winter", etc). >> E.g.: >> sys/cam/cam_periph.c:314:19: warning: variable 'p_drv' may be uninitialized >> when >> used here [-Wconditional-uninitialized] >> TAILQ_REMOVE(&(*p_drv)->units, periph, unit_links); >> >> Indeed, there is a conditional 'goto failure' before a first assignment to >> p_drv >> and the line is after the label. So, maybe the situation is impossible, but >> it >> is reasonable to warn about it. >> >> But the number of false positives (and "possible but impossible" situations) >> is >> too overwhelming. > > Yeah. I looked at maybe 30 warnings (out of hundreds) this morning > and they were all false positives. KMSAN will provide a new tool for > finding such bugs, but they will only be detected at runtime. > -- Andriy Gapon ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365607 - head/sys/powerpc/include
Author: bdragon Date: Thu Sep 10 18:41:15 2020 New Revision: 365607 URL: https://svnweb.freebsd.org/changeset/base/365607 Log: [PowerPC64LE] Add LOAD_LR_NIA and RETURN_TO_NATIVE_ENDIAN defines. * Add LOAD_LR_NIA define. This is preferred to "bl 1f; 1:" because it doesn't pollute the branch predictor. * Add magic sequence to return the CPU to the correct endianness after jumping to cross-endian code, similar to the sequence from Linux. Sponsored by: Tag1 Consulting, Inc. Modified: head/sys/powerpc/include/asm.h Modified: head/sys/powerpc/include/asm.h == --- head/sys/powerpc/include/asm.h Thu Sep 10 18:27:52 2020 (r365606) +++ head/sys/powerpc/include/asm.h Thu Sep 10 18:41:15 2020 (r365607) @@ -194,6 +194,43 @@ name: \ #defineASENTRY_NOPROF(y) _ENTRY(ASMNAME(y)) #defineENTRY_NOPROF(y) _ENTRY(CNAME(y)) +/* Load NIA without affecting branch prediction */ +#defineLOAD_LR_NIA bcl 20, 31, .+4 + +/* + * Magic sequence to return to native endian. + * Overwrites r0 and r11. + * + * The encoding of the instruction "tdi 0, %r0, 0x48" in opposite endian + * happens to be "b . + 8". This is useful because we can write a sequence + * of instructions that can execute in either endian. + * + * Use a sequence of handcoded instructions that switches contexts to the + * instruction following the sequence, but with the correct PSL_LE bit. + * + * The same sequence works for both BE and LE because the xori will flip + * the bit to the other state, and the code only runs when running in the + * wrong endian. + * + * This sequence is NMI-reentrant. + */ +#defineRETURN_TO_NATIVE_ENDIAN \ + tdi 0, %r0, 0x48; /* Endian swapped: b . + 8 */\ + b 1f; /* Will fall through to here if correct */\ + .long 0xa600607d; /* mfmsr %r11 */\ + .long 0x0038; /* li %r0, 0*/\ + .long 0x6401617d; /* mtmsrd %r0, 1 (L=1 EE,RI bits only) */\ + .long 0x01006b69; /* xori %r11, %r11, 0x1 (PSL_LE)*/\ + .long 0xa602087c; /* mflr %r0 */\ + .long 0x05009f42; /* LOAD_LR_NIA */\ + .long 0xa6037b7d; /* 0: mtsrr1 %r11 */\ + .long 0xa602687d; /* mflr %r11*/\ + .long 0x18006b39; /* addi %r11, %r11, (1f - 0b) */\ + .long 0xa6037a7d; /* mtsrr0 %r11 */\ + .long 0xa603087c; /* mtlr %r0 */\ + .long 0x244c; /* rfid */\ +1: /* RETURN_TO_NATIVE_ENDIAN */ + #defineASMSTR .asciz #defineRCSID(x).text; .asciz x ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365606 - head/sys/dev/usb/net
Author: lwhsu Date: Thu Sep 10 18:27:52 2020 New Revision: 365606 URL: https://svnweb.freebsd.org/changeset/base/365606 Log: urndis(4): Add support of Inseego/Novatel Wireless MiFi 8800/8000 PR: 245152 Submitted by: rootl...@gmail.com Reviewed by: hselasky MFC after:3 days Modified: head/sys/dev/usb/net/if_urndis.c Modified: head/sys/dev/usb/net/if_urndis.c == --- head/sys/dev/usb/net/if_urndis.cThu Sep 10 18:19:45 2020 (r365605) +++ head/sys/dev/usb/net/if_urndis.cThu Sep 10 18:27:52 2020 (r365606) @@ -179,6 +179,9 @@ static const STRUCT_USB_HOST_ID urndis_host_devs[] = { /* Nokia 7 plus */ {USB_IFACE_CLASS(UICLASS_IAD), USB_IFACE_SUBCLASS(0x4), USB_IFACE_PROTOCOL(UIPROTO_ACTIVESYNC)}, + /* Novatel Wireless 8800/8000/etc */ + {USB_IFACE_CLASS(UICLASS_IAD), USB_IFACE_SUBCLASS(0xef), + USB_IFACE_PROTOCOL(UIPROTO_RNDIS)}, }; DRIVER_MODULE(urndis, uhub, urndis_driver, urndis_devclass, NULL, NULL); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365605 - head/usr.sbin/crunch/crunchgen
Author: kevans Date: Thu Sep 10 18:19:45 2020 New Revision: 365605 URL: https://svnweb.freebsd.org/changeset/base/365605 Log: crunchgen(8): fix crunched application build with WARNS=6 This was revealed by the rescue build with a patch I'm working on to default WARNS=6 everywhere. The issues resolved were: - Missing prototype for _crunched_${ident}_stub in the *_stub.c generated bits - Missing prototype for crunched_main - Incomplete prototype for _crunched_${ident}_stub in the generated parts of crunched_main - Literal strings in the stub table must drop const qualifier, unless we const'ify name - f field in struct stub didn't have a proper prototype Most of these issues are minor formalities and easily addressed. I note that if my patch to eventually raise WARNS for the rescue build lands, we'll need to bump the __FreeBSD_version requirement for bootstrapping crunchgen and wipe out the rescue .OBJDIR if it's stale, which we should be able to detect pretty easily from a couple of the issues that have been fixed here. Reviewed by: arichardson MFC after:1 week Differential Revision:https://reviews.freebsd.org/D26363 Modified: head/usr.sbin/crunch/crunchgen/crunched_main.c head/usr.sbin/crunch/crunchgen/crunchgen.c Modified: head/usr.sbin/crunch/crunchgen/crunched_main.c == --- head/usr.sbin/crunch/crunchgen/crunched_main.c Thu Sep 10 18:04:34 2020(r365604) +++ head/usr.sbin/crunch/crunchgen/crunched_main.c Thu Sep 10 18:19:45 2020(r365605) @@ -76,15 +76,19 @@ __FBSDID("$FreeBSD$"); #include #include +typedef int crunched_stub_t(int, char **, char **); + struct stub { - char *name; - int (*f)(); + const char *name; + crunched_stub_t *f; }; extern const char *__progname; extern struct stub entry_points[]; static void crunched_usage(void); + +crunched_stub_t crunched_main; static struct stub * find_entry_point(const char *basename) Modified: head/usr.sbin/crunch/crunchgen/crunchgen.c == --- head/usr.sbin/crunch/crunchgen/crunchgen.c Thu Sep 10 18:04:34 2020 (r365604) +++ head/usr.sbin/crunch/crunchgen/crunchgen.c Thu Sep 10 18:19:45 2020 (r365605) @@ -934,7 +934,9 @@ gen_output_cfile(void) fprintf(outcf, "%s\n", *cp); for (p = progs; p != NULL; p = p->next) - fprintf(outcf, "extern int _crunched_%s_stub();\n", p->ident); + fprintf(outcf, + "extern crunched_stub_t _crunched_%s_stub;\n", + p->ident); fprintf(outcf, "\nstruct stub entry_points[] = {\n"); for (p = progs; p != NULL; p = p->next) { @@ -1122,9 +1124,10 @@ prog_makefile_rules(FILE *outmk, prog_t *p) fprintf(outmk, "%s_stub.c:\n", p->name); fprintf(outmk, "\techo \"" "extern int main(int argc, char **argv, char **envp); " + "int _crunched_%s_stub(int argc, char **argv, char **envp);" "int _crunched_%s_stub(int argc, char **argv, char **envp)" "{return main(argc,argv,envp);}\" >%s_stub.c\n", - p->ident, p->name); + p->ident, p->ident, p->name); fprintf(outmk, "%s.lo: %s_stub.o $(%s_OBJPATHS)", p->name, p->name, p->ident); if (p->libs) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365603 - head/tests/sys/kern
Author: kevans Date: Thu Sep 10 17:58:24 2020 New Revision: 365603 URL: https://svnweb.freebsd.org/changeset/base/365603 Log: Fix the build after r365592 r365592 accidentally mixed atf-c and atf-sh; convert atf_skip -> atf_tc_skip Modified: head/tests/sys/kern/memfd_test.c Modified: head/tests/sys/kern/memfd_test.c == --- head/tests/sys/kern/memfd_test.cThu Sep 10 17:53:00 2020 (r365602) +++ head/tests/sys/kern/memfd_test.cThu Sep 10 17:58:24 2020 (r365603) @@ -44,7 +44,7 @@ ATF_TC_BODY(basic, tc) char buf[8]; if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) - atf_skip "https://bugs.freebsd.org/249236; + atf_tc_skip("https://bugs.freebsd.org/249236;); ATF_REQUIRE((fd = memfd_create("...", 0)) != -1); @@ -103,7 +103,7 @@ ATF_TC_BODY(write_seal, tc) char *addr, buf[BUF_SIZE]; if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) - atf_skip "https://bugs.freebsd.org/249236; + atf_tc_skip("https://bugs.freebsd.org/249236;); ATF_REQUIRE((fd = memfd_create("...", MFD_ALLOW_SEALING)) != -1); ATF_REQUIRE(ftruncate(fd, BUF_SIZE) == 0); @@ -135,7 +135,7 @@ ATF_TC_BODY(mmap_write_seal, tc) char *addr, *paddr, *raddr; if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) - atf_skip "https://bugs.freebsd.org/249236; + atf_tc_skip("https://bugs.freebsd.org/249236;); ATF_REQUIRE((fd = memfd_create("...", MFD_ALLOW_SEALING)) != -1); ATF_REQUIRE(ftruncate(fd, BUF_SIZE) == 0); @@ -203,7 +203,7 @@ ATF_TC_BODY(truncate_seals, tc) { if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) - atf_skip "https://bugs.freebsd.org/249236; + atf_tc_skip("https://bugs.freebsd.org/249236;); ATF_REQUIRE(memfd_truncate_test(4, 8, F_SEAL_GROW) == EPERM); ATF_REQUIRE(memfd_truncate_test(8, 4, F_SEAL_SHRINK) == EPERM); @@ -242,7 +242,7 @@ ATF_TC_BODY(dup_seals, tc) int seals; if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) - atf_skip "https://bugs.freebsd.org/249236; + atf_tc_skip("https://bugs.freebsd.org/249236;); ATF_REQUIRE((fd = memfd_create("...", MFD_ALLOW_SEALING)) != -1); ATF_REQUIRE((fdx = dup(fd)) != -1); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365602 - head/contrib/netbsd-tests/lib/librt
Author: kevans Date: Thu Sep 10 17:53:00 2020 New Revision: 365602 URL: https://svnweb.freebsd.org/changeset/base/365602 Log: librt: tests: fix minor issues with higher WARNS got_sigalrm is a global with external linkage and must therefore have a previous extern declaration. There's no reason to maintain the status quo there, so just make it static. The result var is unused. This part of the test has not been upstreamed, presumably because it exists solely for sem_clockwait_np. We should perhaps consider moving it into its own test file outside of ^/contrib/netbsd-tests, but this can happen later. MFC after:1 week Modified: head/contrib/netbsd-tests/lib/librt/t_sem.c Modified: head/contrib/netbsd-tests/lib/librt/t_sem.c == --- head/contrib/netbsd-tests/lib/librt/t_sem.c Thu Sep 10 17:49:21 2020 (r365601) +++ head/contrib/netbsd-tests/lib/librt/t_sem.c Thu Sep 10 17:53:00 2020 (r365602) @@ -190,7 +190,7 @@ timespec_add_ms(struct timespec *ts, int ms) } } -volatile sig_atomic_t got_sigalrm = 0; +static volatile sig_atomic_t got_sigalrm = 0; static void sigalrm_handler(int sig __unused) @@ -212,7 +212,6 @@ ATF_TC_BODY(timedwait, tc) { struct timespec ts; sem_t sem; - int result; SEM_REQUIRE(sem_init(, 0, 0)); SEM_REQUIRE(sem_post()); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365600 - head/contrib/netbsd-tests/lib/libexecinfo
Author: kevans Date: Thu Sep 10 17:48:27 2020 New Revision: 365600 URL: https://svnweb.freebsd.org/changeset/base/365600 Log: MFV r365599: import fix for a libexecinfo warning at higher WARNS v1.17 of this file included a fix that I just submitted upstream to fix a warning about prevent_inline with external linkage not having been previously declared. MFC after:1 week Modified: head/contrib/netbsd-tests/lib/libexecinfo/t_backtrace.c Directory Properties: head/contrib/netbsd-tests/ (props changed) Modified: head/contrib/netbsd-tests/lib/libexecinfo/t_backtrace.c == --- head/contrib/netbsd-tests/lib/libexecinfo/t_backtrace.c Thu Sep 10 17:46:40 2020(r365599) +++ head/contrib/netbsd-tests/lib/libexecinfo/t_backtrace.c Thu Sep 10 17:48:27 2020(r365600) @@ -1,4 +1,4 @@ -/* $NetBSD: t_backtrace.c,v 1.16 2014/11/04 00:20:19 justin Exp $ */ +/* $NetBSD: t_backtrace.c,v 1.17 2020/09/09 20:04:10 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_backtrace.c,v 1.16 2014/11/04 00:20:19 justin Exp $"); +__RCSID("$NetBSD: t_backtrace.c,v 1.17 2020/09/09 20:04:10 christos Exp $"); #include #include @@ -47,7 +47,7 @@ void myfunc2(size_t ncalls); void myfunc1(size_t origcalls, volatile size_t ncalls); void myfunc(size_t ncalls); -volatile int prevent_inline; +static volatile int prevent_inline; void myfunc3(size_t ncalls) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365593 - head/lib/libc/sys
Author: kevans Date: Thu Sep 10 17:23:30 2020 New Revision: 365593 URL: https://svnweb.freebsd.org/changeset/base/365593 Log: Fix memfd_create tests after r365524 r365524 did accidentally invert this check that sets SHM_LARGEPAGE, leading non-hugetlb memfd as unconfigured largepage shm and thus test failures when we try to ftruncate or write to them. PR: 249236 Discussed with: kib Modified: head/lib/libc/sys/shm_open.c Modified: head/lib/libc/sys/shm_open.c == --- head/lib/libc/sys/shm_open.cThu Sep 10 17:15:44 2020 (r365592) +++ head/lib/libc/sys/shm_open.cThu Sep 10 17:23:30 2020 (r365593) @@ -136,7 +136,7 @@ memfd_create(const char *name, unsigned int flags) oflags |= O_CLOEXEC; if ((flags & MFD_ALLOW_SEALING) != 0) shmflags |= SHM_ALLOW_SEALING; - if ((flags & MFD_HUGETLB) == 0) + if ((flags & MFD_HUGETLB) != 0) shmflags |= SHM_LARGEPAGE; fd = __sys_shm_open2(SHM_ANON, oflags, 0, shmflags, memfd_name); if (fd == -1 || (flags & MFD_HUGETLB) == 0) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r365592 - head/tests/sys/kern
On Fri, Sep 11, 2020 at 1:18 AM Kyle Evans wrote: > > On Thu, Sep 10, 2020 at 12:16 PM Li-Wen Hsu wrote: > > > > Author: lwhsu > > Date: Thu Sep 10 17:15:44 2020 > > New Revision: 365592 > > URL: https://svnweb.freebsd.org/changeset/base/365592 > > > > Log: > > Temporarily skip failing sys.kern.memfd_test.* tests in CI > > > > PR: 249236 > > Sponsored by: The FreeBSD Foundation > > > > Oy, I was literally just about to hit commit on the fix for these. Oops, Although I should have marked them earlier, just don't get another report of the same issues. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r365592 - head/tests/sys/kern
On Thu, Sep 10, 2020 at 12:16 PM Li-Wen Hsu wrote: > > Author: lwhsu > Date: Thu Sep 10 17:15:44 2020 > New Revision: 365592 > URL: https://svnweb.freebsd.org/changeset/base/365592 > > Log: > Temporarily skip failing sys.kern.memfd_test.* tests in CI > > PR: 249236 > Sponsored by: The FreeBSD Foundation > Oy, I was literally just about to hit commit on the fix for these. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365592 - head/tests/sys/kern
Author: lwhsu Date: Thu Sep 10 17:15:44 2020 New Revision: 365592 URL: https://svnweb.freebsd.org/changeset/base/365592 Log: Temporarily skip failing sys.kern.memfd_test.* tests in CI PR: 249236 Sponsored by: The FreeBSD Foundation Modified: head/tests/sys/kern/memfd_test.c Modified: head/tests/sys/kern/memfd_test.c == --- head/tests/sys/kern/memfd_test.cThu Sep 10 17:12:42 2020 (r365591) +++ head/tests/sys/kern/memfd_test.cThu Sep 10 17:15:44 2020 (r365592) @@ -43,6 +43,9 @@ ATF_TC_BODY(basic, tc) int fd; char buf[8]; + if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) + atf_skip "https://bugs.freebsd.org/249236; + ATF_REQUIRE((fd = memfd_create("...", 0)) != -1); /* write(2) should grow us out automatically. */ @@ -99,6 +102,9 @@ ATF_TC_BODY(write_seal, tc) int fd; char *addr, buf[BUF_SIZE]; + if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) + atf_skip "https://bugs.freebsd.org/249236; + ATF_REQUIRE((fd = memfd_create("...", MFD_ALLOW_SEALING)) != -1); ATF_REQUIRE(ftruncate(fd, BUF_SIZE) == 0); @@ -128,6 +134,9 @@ ATF_TC_BODY(mmap_write_seal, tc) int fd; char *addr, *paddr, *raddr; + if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) + atf_skip "https://bugs.freebsd.org/249236; + ATF_REQUIRE((fd = memfd_create("...", MFD_ALLOW_SEALING)) != -1); ATF_REQUIRE(ftruncate(fd, BUF_SIZE) == 0); @@ -193,6 +202,9 @@ ATF_TC_WITHOUT_HEAD(truncate_seals); ATF_TC_BODY(truncate_seals, tc) { + if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) + atf_skip "https://bugs.freebsd.org/249236; + ATF_REQUIRE(memfd_truncate_test(4, 8, F_SEAL_GROW) == EPERM); ATF_REQUIRE(memfd_truncate_test(8, 4, F_SEAL_SHRINK) == EPERM); ATF_REQUIRE(memfd_truncate_test(8, 4, F_SEAL_GROW) == 0); @@ -228,6 +240,9 @@ ATF_TC_BODY(dup_seals, tc) char buf[8]; int fd, fdx; int seals; + + if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) + atf_skip "https://bugs.freebsd.org/249236; ATF_REQUIRE((fd = memfd_create("...", MFD_ALLOW_SEALING)) != -1); ATF_REQUIRE((fdx = dup(fd)) != -1); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365588 - head/lib/libcompiler_rt
Author: dim Date: Thu Sep 10 16:47:12 2020 New Revision: 365588 URL: https://svnweb.freebsd.org/changeset/base/365588 Log: Follow-up r364753 by only using arm's stdatomic.c implementation, as it already covers the functions in compiler-rt's atomic.c, leading to conflicts when linking. PR: 230888 MFC after:3 days X-MFC-With: r364753 Modified: head/lib/libcompiler_rt/Makefile.inc Modified: head/lib/libcompiler_rt/Makefile.inc == --- head/lib/libcompiler_rt/Makefile.incThu Sep 10 16:47:08 2020 (r365587) +++ head/lib/libcompiler_rt/Makefile.incThu Sep 10 16:47:12 2020 (r365588) @@ -124,7 +124,8 @@ SRCF+= umodti3 # Enable compiler-rt's atomic implementation only for clang, as it uses clang # specific builtins, and gcc packages usually come with their own libatomic. -.if "${COMPILER_TYPE}" == "clang" +# Exclude arm which has its own implementations of atomic functions, below. +.if "${COMPILER_TYPE}" == "clang" && ${MACHINE_CPUARCH} != "arm" SRCF+= atomic .endif ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365582 - head/usr.bin/sort
Author: arichardson Date: Thu Sep 10 15:37:19 2020 New Revision: 365582 URL: https://svnweb.freebsd.org/changeset/base/365582 Log: Fix -Wpointer-sign warnings in bwstring.c Modified: head/usr.bin/sort/bwstring.c Modified: head/usr.bin/sort/bwstring.c == --- head/usr.bin/sort/bwstring.cThu Sep 10 15:37:15 2020 (r365581) +++ head/usr.bin/sort/bwstring.cThu Sep 10 15:37:19 2020 (r365582) @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); bool byte_sort; static wchar_t **wmonths; -static unsigned char **cmonths; +static char **cmonths; /* initialise months */ @@ -56,17 +56,17 @@ initialise_months(void) const nl_item item[12] = { ABMON_1, ABMON_2, ABMON_3, ABMON_4, ABMON_5, ABMON_6, ABMON_7, ABMON_8, ABMON_9, ABMON_10, ABMON_11, ABMON_12 }; - unsigned char *tmp; + char *tmp; size_t len; if (MB_CUR_MAX == 1) { if (cmonths == NULL) { - unsigned char *m; + char *m; - cmonths = sort_malloc(sizeof(unsigned char*) * 12); + cmonths = sort_malloc(sizeof(char*) * 12); for (int i = 0; i < 12; i++) { cmonths[i] = NULL; - tmp = (unsigned char *) nl_langinfo(item[i]); + tmp = nl_langinfo(item[i]); if (debug_sort) printf("month[%d]=%s\n", i, tmp); if (*tmp == '\0') @@ -86,14 +86,14 @@ initialise_months(void) wmonths = sort_malloc(sizeof(wchar_t *) * 12); for (int i = 0; i < 12; i++) { wmonths[i] = NULL; - tmp = (unsigned char *) nl_langinfo(item[i]); + tmp = nl_langinfo(item[i]); if (debug_sort) printf("month[%d]=%s\n", i, tmp); if (*tmp == '\0') continue; len = strlen(tmp); m = sort_malloc(SIZEOF_WCHAR_STRING(len + 1)); - if (mbstowcs(m, (char*)tmp, len) == + if (mbstowcs(m, tmp, len) == ((size_t) - 1)) { sort_free(m); continue; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365584 - in head: . usr.bin/mandoc
Author: arichardson Date: Thu Sep 10 15:37:29 2020 New Revision: 365584 URL: https://svnweb.freebsd.org/changeset/base/365584 Log: Ensure that the makewhatis symlink is added in the bootstrap-tools stage We currently set MK_MAN=no in $BSARGS so MK_MAN_UTILS will also be false which means that the makewhatis symlink will not be created. This change fixes the build when using both -DBUILD_WITH_STRICT_TMPPATH and -DBOOTSTRAP_ALL_TOOLS. Tested by:andrew Differential Revision: https://reviews.freebsd.org/D16761 Modified: head/Makefile.inc1 head/usr.bin/mandoc/Makefile Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Thu Sep 10 15:37:24 2020(r365583) +++ head/Makefile.inc1 Thu Sep 10 15:37:29 2020(r365584) @@ -723,7 +723,7 @@ BSARGS= DESTDIR= \ BOOTSTRAPPING=${BOOTSTRAPPING_OSRELDATE} \ BWPHASE=${.TARGET:C,^_,,} \ SSP_CFLAGS= \ - MK_HTML=no NO_LINT=yes MK_MAN=no \ + MK_HTML=no NO_LINT=yes MK_MAN=no MK_MAN_UTILS=yes \ -DNO_PIC MK_PROFILE=no -DNO_SHARED \ -DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no \ MK_CLANG_EXTRAS=no MK_CLANG_FORMAT=no MK_CLANG_FULL=no \ Modified: head/usr.bin/mandoc/Makefile == --- head/usr.bin/mandoc/MakefileThu Sep 10 15:37:24 2020 (r365583) +++ head/usr.bin/mandoc/MakefileThu Sep 10 15:37:29 2020 (r365584) @@ -14,6 +14,8 @@ MLINKS+= apropos.1 whatis.1 LINKS= ${BINDIR}/mandoc ${BINDIR}/whatis \ ${BINDIR}/mandoc ${BINDIR}/makewhatis \ ${BINDIR}/mandoc ${BINDIR}/apropos +.elif defined(BOOTSTRAPPING) +.error "MK_MAN_UTILS should be set to yes when bootstrapping" .endif LIBMAN_SRCS= man.c \ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365583 - head/tools/build/mk
Author: arichardson Date: Thu Sep 10 15:37:24 2020 New Revision: 365583 URL: https://svnweb.freebsd.org/changeset/base/365583 Log: Silence GCC's -Wno-unused-result during bootstrap Unlike clang, GCC still warns even with (void) casts (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425) Modified: head/tools/build/mk/Makefile.boot Modified: head/tools/build/mk/Makefile.boot == --- head/tools/build/mk/Makefile.boot Thu Sep 10 15:37:19 2020 (r365582) +++ head/tools/build/mk/Makefile.boot Thu Sep 10 15:37:24 2020 (r365583) @@ -96,3 +96,6 @@ UPDATE_DEPENDFILE= no Error was caused by Makefile in ${.CURDIR} .endif .endif + +# GCC doesn't allow silencing warn_unused_result calls with (void) casts. +CFLAGS.gcc+=-Wno-unused-result ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365581 - head/kerberos5/include
Author: arichardson Date: Thu Sep 10 15:37:15 2020 New Revision: 365581 URL: https://svnweb.freebsd.org/changeset/base/365581 Log: Fix a noisy -Wundef warning when bootstrapping tools Modified: head/kerberos5/include/config.h Modified: head/kerberos5/include/config.h == --- head/kerberos5/include/config.h Thu Sep 10 15:37:07 2020 (r365580) +++ head/kerberos5/include/config.h Thu Sep 10 15:37:15 2020 (r365581) @@ -1579,7 +1579,7 @@ static /**/const char *const rcsid[] = { (const char * /* Define to `int' if doesn't define. */ /* #undef uid_t */ -#if _AIX +#ifdef _AIX /* XXX this is gross, but kills about a gazillion warnings */ struct ether_addr; struct sockaddr; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365580 - in head: cddl/lib/drti cddl/lib/libctf cddl/lib/libdtrace cddl/usr.bin/ctfconvert cddl/usr.bin/ctfdump cddl/usr.bin/ctfmerge cddl/usr.sbin/dtrace cddl/usr.sbin/lockstat cddl/u...
Author: arichardson Date: Thu Sep 10 15:37:07 2020 New Revision: 365580 URL: https://svnweb.freebsd.org/changeset/base/365580 Log: Remove -I flag for include path that doesn't exist Found this while trying to get macOS bootstrap to work again after OpenZFS merge. Reviewed By: #zfs, freqlabs Differential Revision: https://reviews.freebsd.org/D26192 Modified: head/cddl/lib/drti/Makefile head/cddl/lib/libctf/Makefile head/cddl/lib/libdtrace/Makefile head/cddl/usr.bin/ctfconvert/Makefile head/cddl/usr.bin/ctfdump/Makefile head/cddl/usr.bin/ctfmerge/Makefile head/cddl/usr.sbin/dtrace/Makefile head/cddl/usr.sbin/lockstat/Makefile head/cddl/usr.sbin/plockstat/Makefile head/cddl/usr.sbin/zfsd/Makefile.common head/lib/libproc/Makefile Modified: head/cddl/lib/drti/Makefile == --- head/cddl/lib/drti/Makefile Thu Sep 10 14:58:46 2020(r365579) +++ head/cddl/lib/drti/Makefile Thu Sep 10 15:37:07 2020(r365580) @@ -12,7 +12,6 @@ CLEANFILES= ${FILES} # These FILES qualify as libraries for the purpose of LIBRARIES_ONLY. .undef LIBRARIES_ONLY CFLAGS+= -DIN_BASE -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd/spl CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd Modified: head/cddl/lib/libctf/Makefile == --- head/cddl/lib/libctf/Makefile Thu Sep 10 14:58:46 2020 (r365579) +++ head/cddl/lib/libctf/Makefile Thu Sep 10 15:37:07 2020 (r365580) @@ -22,7 +22,6 @@ WARNS?= 2 CFLAGS+= -DCTF_OLD_VERSIONS CFLAGS+= -DIN_BASE -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd/spl CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd Modified: head/cddl/lib/libdtrace/Makefile == --- head/cddl/lib/libdtrace/MakefileThu Sep 10 14:58:46 2020 (r365579) +++ head/cddl/lib/libdtrace/MakefileThu Sep 10 15:37:07 2020 (r365580) @@ -67,7 +67,6 @@ FILESMODE=${NOBINMODE} WARNS?=1 CFLAGS+= -DIN_BASE -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd/spl CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd Modified: head/cddl/usr.bin/ctfconvert/Makefile == --- head/cddl/usr.bin/ctfconvert/Makefile Thu Sep 10 14:58:46 2020 (r365579) +++ head/cddl/usr.bin/ctfconvert/Makefile Thu Sep 10 15:37:07 2020 (r365580) @@ -31,7 +31,6 @@ CFLAGS+= -DIN_BASE CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd/spl CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris \ -I${SRCTOP}/cddl/compat/opensolaris/include \ Modified: head/cddl/usr.bin/ctfdump/Makefile == --- head/cddl/usr.bin/ctfdump/Makefile Thu Sep 10 14:58:46 2020 (r365579) +++ head/cddl/usr.bin/ctfdump/Makefile Thu Sep 10 15:37:07 2020 (r365580) @@ -12,7 +12,6 @@ CFLAGS+= -DIN_BASE CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd/spl CFLAGS+= -I${SRCTOP}/sys CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include CFLAGS+= -I${OPENSOLARIS_USR_DISTDIR} \ Modified: head/cddl/usr.bin/ctfmerge/Makefile == --- head/cddl/usr.bin/ctfmerge/Makefile Thu Sep 10 14:58:46 2020 (r365579) +++ head/cddl/usr.bin/ctfmerge/Makefile Thu Sep 10 15:37:07 2020 (r365580) @@ -29,7 +29,6 @@ CFLAGS+= -DIN_BASE CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd/spl CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris \
svn commit: r365579 - in head/sys: arm64/include dev/gpio
Author: andrew Date: Thu Sep 10 14:58:46 2020 New Revision: 365579 URL: https://svnweb.freebsd.org/changeset/base/365579 Log: Move the pl061 acpi attachment earlier As the pl061 driver can be an interrupt controller attach it earlier in the boot so other drivers can use it. Use a new GPIO xref to not conflict with the existing root interrupt controller. Sponsored by: Innovate UK Modified: head/sys/arm64/include/intr.h head/sys/dev/gpio/pl061_acpi.c Modified: head/sys/arm64/include/intr.h == --- head/sys/arm64/include/intr.h Thu Sep 10 14:13:49 2020 (r365578) +++ head/sys/arm64/include/intr.h Thu Sep 10 14:58:46 2020 (r365579) @@ -51,6 +51,7 @@ void intr_ipi_dispatch(u_int, struct trapframe *); #ifdef DEV_ACPI #defineACPI_INTR_XREF 1 #defineACPI_MSI_XREF 2 +#defineACPI_GPIO_XREF 3 #endif #endif /* _MACHINE_INTR_H */ Modified: head/sys/dev/gpio/pl061_acpi.c == --- head/sys/dev/gpio/pl061_acpi.c Thu Sep 10 14:13:49 2020 (r365578) +++ head/sys/dev/gpio/pl061_acpi.c Thu Sep 10 14:58:46 2020 (r365579) @@ -76,7 +76,7 @@ pl061_acpi_attach(device_t dev) if (error != 0) return (error); - if (!intr_pic_register(dev, ACPI_INTR_XREF)) { + if (!intr_pic_register(dev, ACPI_GPIO_XREF)) { device_printf(dev, "couldn't register PIC\n"); pl061_detach(dev); error = ENXIO; @@ -98,6 +98,7 @@ DEFINE_CLASS_1(gpio, pl061_acpi_driver, pl061_acpi_met static devclass_t pl061_devclass; -DRIVER_MODULE(pl061, acpi, pl061_driver, pl061_devclass, NULL, NULL); +EARLY_DRIVER_MODULE(pl061, acpi, pl061_acpi_driver, pl061_devclass, NULL, NULL, +BUS_PASS_INTERRUPT + BUS_PASS_ORDER_LATE); MODULE_DEPEND(pl061, acpi, 1, 1, 1); MODULE_DEPEND(pl061, gpiobus, 1, 1, 1); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r365578 - head/stand/efi/loader/arch/arm64
We already discard it via objcopy when converting from elf -> EFI as we only copy the sections needed in the final EFI file. Andrew > On 10 Sep 2020, at 15:22, Brandon Bergren wrote: > > You can truly get rid of it with /DISCARD/ and shave the bytes off entirely, > by the way. > > On Thu, Sep 10, 2020, at 9:13 AM, Andrew Turner wrote: >> Author: andrew >> Date: Thu Sep 10 14:13:49 2020 >> New Revision: 365578 >> URL: https://svnweb.freebsd.org/changeset/base/365578 >> >> Log: >> Ignore the .interp section in the arm64 EFI loader >> >> When building the loader an unneeded .interp section may be added. Move >> this to the unused section region so offsets of used sections don't >> change. >> >> Obtained from: CheriBSD >> Sponsored by: Innovate UK >> >> Modified: >> head/stand/efi/loader/arch/arm64/ldscript.arm64 >> >> Modified: head/stand/efi/loader/arch/arm64/ldscript.arm64 >> == >> --- head/stand/efi/loader/arch/arm64/ldscript.arm64 Thu Sep 10 14:12:25 >> 2020 (r365577) >> +++ head/stand/efi/loader/arch/arm64/ldscript.arm64 Thu Sep 10 14:13:49 >> 2020 (r365578) >> @@ -80,6 +80,7 @@ SECTIONS >> _edata = .; >> >> /* Unused sections */ >> + .interp : { *(.interp) } >> .dynstr: { *(.dynstr) } >> .hash : { *(.hash) } >> } >> > > -- > Brandon Bergren > bdra...@freebsd.org > ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r365578 - head/stand/efi/loader/arch/arm64
You can truly get rid of it with /DISCARD/ and shave the bytes off entirely, by the way. On Thu, Sep 10, 2020, at 9:13 AM, Andrew Turner wrote: > Author: andrew > Date: Thu Sep 10 14:13:49 2020 > New Revision: 365578 > URL: https://svnweb.freebsd.org/changeset/base/365578 > > Log: > Ignore the .interp section in the arm64 EFI loader > > When building the loader an unneeded .interp section may be added. Move > this to the unused section region so offsets of used sections don't > change. > > Obtained from: CheriBSD > Sponsored by: Innovate UK > > Modified: > head/stand/efi/loader/arch/arm64/ldscript.arm64 > > Modified: head/stand/efi/loader/arch/arm64/ldscript.arm64 > == > --- head/stand/efi/loader/arch/arm64/ldscript.arm64 Thu Sep 10 14:12:25 > 2020 (r365577) > +++ head/stand/efi/loader/arch/arm64/ldscript.arm64 Thu Sep 10 14:13:49 > 2020 (r365578) > @@ -80,6 +80,7 @@ SECTIONS >_edata = .; > >/* Unused sections */ > + .interp: { *(.interp) } >.dynstr: { *(.dynstr) } >.hash : { *(.hash) } > } > -- Brandon Bergren bdra...@freebsd.org ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365578 - head/stand/efi/loader/arch/arm64
Author: andrew Date: Thu Sep 10 14:13:49 2020 New Revision: 365578 URL: https://svnweb.freebsd.org/changeset/base/365578 Log: Ignore the .interp section in the arm64 EFI loader When building the loader an unneeded .interp section may be added. Move this to the unused section region so offsets of used sections don't change. Obtained from:CheriBSD Sponsored by: Innovate UK Modified: head/stand/efi/loader/arch/arm64/ldscript.arm64 Modified: head/stand/efi/loader/arch/arm64/ldscript.arm64 == --- head/stand/efi/loader/arch/arm64/ldscript.arm64 Thu Sep 10 14:12:25 2020(r365577) +++ head/stand/efi/loader/arch/arm64/ldscript.arm64 Thu Sep 10 14:13:49 2020(r365578) @@ -80,6 +80,7 @@ SECTIONS _edata = .; /* Unused sections */ + .interp : { *(.interp) } .dynstr : { *(.dynstr) } .hash: { *(.hash) } } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365577 - in head/sys: dev/iommu x86/iommu
Author: br Date: Thu Sep 10 14:12:25 2020 New Revision: 365577 URL: https://svnweb.freebsd.org/changeset/base/365577 Log: Move the rid variable to the generic iommu context. It could be used in various IOMMU platforms, not only DMAR. Reviewed by: kib Sponsored by: DARPA, AFRL Differential Revision:https://reviews.freebsd.org/D26373 Modified: head/sys/dev/iommu/iommu.h head/sys/x86/iommu/intel_ctx.c head/sys/x86/iommu/intel_dmar.h Modified: head/sys/dev/iommu/iommu.h == --- head/sys/dev/iommu/iommu.h Thu Sep 10 14:11:29 2020(r365576) +++ head/sys/dev/iommu/iommu.h Thu Sep 10 14:12:25 2020(r365577) @@ -135,6 +135,7 @@ struct iommu_ctx { u_long loads; /* atomic updates, for stat only */ u_long unloads; /* same */ u_int flags;/* (u) */ + uint16_t rid; /* (c) pci RID */ }; /* struct iommu_ctx flags */ Modified: head/sys/x86/iommu/intel_ctx.c == --- head/sys/x86/iommu/intel_ctx.c Thu Sep 10 14:11:29 2020 (r365576) +++ head/sys/x86/iommu/intel_ctx.c Thu Sep 10 14:12:25 2020 (r365577) @@ -118,9 +118,9 @@ dmar_map_ctx_entry(struct dmar_ctx *ctx, struct sf_buf dmar = CTX2DMAR(ctx); - ctxp = dmar_map_pgtbl(dmar->ctx_obj, 1 + - PCI_RID2BUS(ctx->rid), IOMMU_PGF_NOALLOC | IOMMU_PGF_WAITOK, sfp); - ctxp += ctx->rid & 0xff; + ctxp = dmar_map_pgtbl(dmar->ctx_obj, 1 + PCI_RID2BUS(ctx->context.rid), + IOMMU_PGF_NOALLOC | IOMMU_PGF_WAITOK, sfp); + ctxp += ctx->context.rid & 0xff; return (ctxp); } @@ -386,7 +386,7 @@ dmar_ctx_alloc(struct dmar_domain *domain, uint16_t ri ctx->context.domain = DOM2IODOM(domain); ctx->context.tag = malloc(sizeof(struct bus_dma_tag_iommu), M_DMAR_CTX, M_WAITOK | M_ZERO); - ctx->rid = rid; + ctx->context.rid = rid; ctx->refs = 1; return (ctx); } @@ -643,8 +643,9 @@ dmar_move_ctx_to_domain(struct dmar_domain *domain, st error = dmar_flush_for_ctx_entry(dmar, true); /* If flush failed, rolling back would not work as well. */ printf("dmar%d rid %x domain %d->%d %s-mapped\n", - dmar->iommu.unit, ctx->rid, old_domain->domain, domain->domain, - (domain->iodom.flags & IOMMU_DOMAIN_IDMAP) != 0 ? "id" : "re"); + dmar->iommu.unit, ctx->context.rid, old_domain->domain, + domain->domain, (domain->iodom.flags & IOMMU_DOMAIN_IDMAP) != 0 ? + "id" : "re"); dmar_unref_domain_locked(dmar, old_domain); TD_PINNED_ASSERT; return (error); @@ -776,7 +777,7 @@ dmar_find_ctx_locked(struct dmar_unit *dmar, uint16_t LIST_FOREACH(domain, >domains, link) { LIST_FOREACH(ctx, >contexts, link) { - if (ctx->rid == rid) + if (ctx->context.rid == rid) return (ctx); } } Modified: head/sys/x86/iommu/intel_dmar.h == --- head/sys/x86/iommu/intel_dmar.h Thu Sep 10 14:11:29 2020 (r365576) +++ head/sys/x86/iommu/intel_dmar.h Thu Sep 10 14:12:25 2020 (r365577) @@ -75,7 +75,6 @@ struct dmar_domain { struct dmar_ctx { struct iommu_ctx context; - uint16_t rid; /* (c) pci RID */ uint64_t last_fault_rec[2]; /* Last fault reported */ LIST_ENTRY(dmar_ctx) link; /* (u) Member in the domain list */ u_int refs; /* (u) References from tags */ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365575 - head
Author: arichardson Date: Thu Sep 10 14:11:24 2020 New Revision: 365575 URL: https://svnweb.freebsd.org/changeset/base/365575 Log: Use the correct config names for some .clang-format entries Those values are enum entries and should use "Never" instead of "false". clang-format currently accepts false, but it's better to use the correct syntax in case that changes in the future. Modified: head/.clang-format (contents, props changed) Modified: head/.clang-format == --- head/.clang-format Thu Sep 10 13:57:57 2020(r365574) +++ head/.clang-format Thu Sep 10 14:11:24 2020(r365575) @@ -9,10 +9,10 @@ AlignEscapedNewlines: Left AlignOperands: false AlignTrailingComments: false AllowAllParametersOfDeclarationOnNextLine: false -AllowShortBlocksOnASingleLine: false +AllowShortBlocksOnASingleLine: Never AllowShortCaseLabelsOnASingleLine: false AllowShortFunctionsOnASingleLine: InlineOnly -AllowShortIfStatementsOnASingleLine: false +AllowShortIfStatementsOnASingleLine: Never AllowShortLoopsOnASingleLine: false AlwaysBreakAfterReturnType: TopLevelDefinitions AlwaysBreakBeforeMultilineStrings: false ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365576 - head
Author: arichardson Date: Thu Sep 10 14:11:29 2020 New Revision: 365576 URL: https://svnweb.freebsd.org/changeset/base/365576 Log: Set AlignTrailingComments in the clang-format config This seems to be fairly common in existing code and often looks better when adding trailing comments to e.g. enumerators or array initializers. See D26340 for more context. Reviewed By: emaste Differential Revision: https://reviews.freebsd.org/D26391 Modified: head/.clang-format (contents, props changed) Modified: head/.clang-format == --- head/.clang-format Thu Sep 10 14:11:24 2020(r365575) +++ head/.clang-format Thu Sep 10 14:11:29 2020(r365576) @@ -7,7 +7,7 @@ AlignConsecutiveAssignments: false AlignConsecutiveDeclarations: false AlignEscapedNewlines: Left AlignOperands: false -AlignTrailingComments: false +AlignTrailingComments: true AllowAllParametersOfDeclarationOnNextLine: false AllowShortBlocksOnASingleLine: Never AllowShortCaseLabelsOnASingleLine: false ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365574 - head/share/misc
Author: rhurlin (ports committer) Date: Thu Sep 10 13:57:57 2020 New Revision: 365574 URL: https://svnweb.freebsd.org/changeset/base/365574 Log: Add author entity for rhurlin, part 2 Forgot to submit step 5 from procedure 1 in Chap. 6 of the Committers Guide: Update Mentor and Mentee Information Reviewed by: arrowd (mentor), tcberner (mentor) Approved by: arrowd (mentor), tcberner (mentor) Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot == --- head/share/misc/committers-ports.dotThu Sep 10 13:44:35 2020 (r365573) +++ head/share/misc/committers-ports.dotThu Sep 10 13:57:57 2020 (r365574) @@ -229,6 +229,7 @@ rafan [label="Rong-En Fan\nra...@freebsd.org\n2006/06/ rakuco [label="Raphael Kubo da Costa\nrak...@freebsd.org\n2011/08/22"] rene [label="Rene Ladan\nr...@freebsd.org\n2010/04/11"] rezny [label="Matthew Rezny\nre...@freebsd.org\n2017/01/09"] +rhurlin [label="Rainer Hurling\nrhur...@freebsd.org\n2020/08/31"] riggs [label="Thomas Zander\nri...@freebsd.org\n2014/01/09"] rigoletto [label="Alexandre C. Guimaraes\nrigole...@freebsd.org\n2018/10/01"] rm [label="Ruslan Makhmatkhanov\n...@freebsd.org\n2011/11/06"] @@ -320,6 +321,8 @@ araujo -> pclin araujo -> pgollucci araujo -> samm +arrowd -> rhurlin + arved -> markus arved -> stefan @@ -746,6 +749,7 @@ tcberner -> joneum tcberner -> kai tcberner -> lbartoletti tcberner -> pkubaj +tcberner -> rhurlin tcberner -> rigoletto tcberner -> salvadore tcberner -> yuri ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r365419 - in head/sys/dev: ath bwi iwm iwn mwl otus usb/wlan wtap
On 9 Sep 2020, at 22:41, Tomoaki AOKI wrote: This breaks at least iwm. (Other drivers not tested.) Messages below are repeatedly shown and no carrier detected. Manually reverting this commit fixes the issue. iwm0: failed to send antennas before calibration: 35 iwm_run_init_ucode: failed 35 iwm_init_hw failed 35 iwm0: could not initiate scan and lesser times messages below. iwm0: iwm_send_phy_db_data: Cannot send HCMD of Phy DB cfg section, 35 iwm_init_hw failed 35 iwm0: could not initiate scan I’ll try to test iwm as well, in case you are faster, can you please try this instead of reverting; the previous version never made it past the first return anymore in the last years it seems, so we can remove the function entirely to keep the status quo: Sorry for the oversight. Index: if_iwm.c === --- if_iwm.c(revision 365559) +++ if_iwm.c(working copy) @@ -354,7 +354,6 @@ static struct ieee80211_node * static uint8_t iwm_rate_from_ucode_rate(uint32_t); static int iwm_rate2ridx(struct iwm_softc *, uint8_t); static voidiwm_setrates(struct iwm_softc *, struct iwm_node *, int); -static int iwm_media_change(struct ifnet *); static int iwm_newstate(struct ieee80211vap *, enum ieee80211_state, int); static voidiwm_endscan_cb(void *, int); static int iwm_send_bt_init_conf(struct iwm_softc *); @@ -4417,27 +4416,6 @@ iwm_setrates(struct iwm_softc *sc, struct iwm_node } } -static int -iwm_media_change(struct ifnet *ifp) -{ - struct ieee80211vap *vap = ifp->if_softc; - struct ieee80211com *ic = vap->iv_ic; - struct iwm_softc *sc = ic->ic_softc; - int error; - - error = ieee80211_media_change(ifp); - if (error != 0) - return (error); - - IWM_LOCK(sc); - if (ic->ic_nrunning > 0) { - iwm_stop(sc); - iwm_init(sc); - } - IWM_UNLOCK(sc); - return (0); -} - static void iwm_bring_down_firmware(struct iwm_softc *sc, struct ieee80211vap *vap) { @@ -6432,8 +6410,8 @@ iwm_vap_create(struct ieee80211com *ic, const char ieee80211_ratectl_init(vap); /* Complete setup. */ - ieee80211_vap_attach(vap, iwm_media_change, ieee80211_media_status, - mac); + ieee80211_vap_attach(vap, ieee80211_media_change, + ieee80211_media_status, mac); ic->ic_opmode = opmode; return vap; Author: bz Date: Mon Sep 7 15:35:40 2020 New Revision: 365419 URL: https://svnweb.freebsd.org/changeset/base/365419 Log: WiFi: fix ieee80211_media_change() callers In r178354 with the introduction of multi-bss ("vap") support factoring out started and with r193340 ieee80211_media_change() no longer returned ENETRESET but only 0 or error. As ieee80211(9) tells the ieee80211_media_change() function should not be called directly but is registered with ieee80211_vap_attach() instead. Some drivers have not been fully converted. After fixing the return checking some of these functions were simply wrappers between ieee80211_vap_attach() and ieee80211_media_change(), so remove the extra function, where possible as well. PR: 248955 Submitted by: Tong Zhang (ztong0001 gmail.com) (original) MFC after:3 days Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/ath/if_ath.c head/sys/dev/bwi/if_bwi.c head/sys/dev/iwm/if_iwm.c head/sys/dev/iwn/if_iwn.c head/sys/dev/mwl/if_mwl.c head/sys/dev/otus/if_otus.c head/sys/dev/usb/wlan/if_run.c head/sys/dev/wtap/if_wtap.c Modified: head/sys/dev/ath/if_ath.c == --- head/sys/dev/ath/if_ath.c Mon Sep 7 14:40:33 2020(r365418) +++ head/sys/dev/ath/if_ath.c Mon Sep 7 15:35:40 2020(r365419) @@ -160,7 +160,6 @@ static int ath_init(struct ath_softc *); static voidath_stop(struct ath_softc *); static int ath_reset_vap(struct ieee80211vap *, u_long); static int ath_transmit(struct ieee80211com *, struct mbuf *); -static int ath_media_change(struct ifnet *); static voidath_watchdog(void *); static voidath_parent(struct ieee80211com *); static voidath_fatal_proc(void *, int); (snip) Modified: head/sys/dev/iwm/if_iwm.c == --- head/sys/dev/iwm/if_iwm.c Mon Sep 7 14:40:33 2020(r365418) +++ head/sys/dev/iwm/if_iwm.c Mon Sep 7 15:35:40 2020(r365419) @@ -4426,8 +4426,8 @@ iwm_media_change(struct ifnet *ifp) int error; error = ieee80211_media_change(ifp); - if (error != ENETRESET) - return error; + if (error != 0) + return (error); IWM_LOCK(sc); if (ic->ic_nrunning > 0) { @@ -4435,7 +4435,7 @@ iwm_media_change(struct ifnet *ifp) iwm_init(sc); }
svn commit: r365559 - head/sys/dev/gpio
Author: andrew Date: Thu Sep 10 09:50:43 2020 New Revision: 365559 URL: https://svnweb.freebsd.org/changeset/base/365559 Log: Switch the name of the pl061 driver to gpio We need it to be named gpio for gpiobus to work. Sponsored by: Innovate UK Modified: head/sys/dev/gpio/pl061.c head/sys/dev/gpio/pl061_acpi.c Modified: head/sys/dev/gpio/pl061.c == --- head/sys/dev/gpio/pl061.c Thu Sep 10 09:42:37 2020(r365558) +++ head/sys/dev/gpio/pl061.c Thu Sep 10 09:50:43 2020(r365559) @@ -577,4 +577,4 @@ static device_method_t pl061_methods[] = { DEVMETHOD_END }; -DEFINE_CLASS_0(pl061, pl061_driver, pl061_methods, sizeof(struct pl061_softc)); +DEFINE_CLASS_0(gpio, pl061_driver, pl061_methods, sizeof(struct pl061_softc)); Modified: head/sys/dev/gpio/pl061_acpi.c == --- head/sys/dev/gpio/pl061_acpi.c Thu Sep 10 09:42:37 2020 (r365558) +++ head/sys/dev/gpio/pl061_acpi.c Thu Sep 10 09:50:43 2020 (r365559) @@ -93,7 +93,7 @@ static device_method_t pl061_acpi_methods[] = { DEVMETHOD_END }; -DEFINE_CLASS_1(pl061, pl061_acpi_driver, pl061_acpi_methods, +DEFINE_CLASS_1(gpio, pl061_acpi_driver, pl061_acpi_methods, sizeof(struct pl061_softc), pl061_driver); static devclass_t pl061_devclass; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365558 - head/sys/dev/gpio
Author: andrew Date: Thu Sep 10 09:42:37 2020 New Revision: 365558 URL: https://svnweb.freebsd.org/changeset/base/365558 Log: Only manage ofw gpio providers on ofw systems On arm64 we may boot via ACPI. In this case we will still try to manage the gpio providers as if we are using FDT. Fix this by checking if the FDT node is valid before registering a cross reference. Sponsored by: Innovate UK Modified: head/sys/dev/gpio/ofw_gpiobus.c Modified: head/sys/dev/gpio/ofw_gpiobus.c == --- head/sys/dev/gpio/ofw_gpiobus.c Thu Sep 10 09:37:30 2020 (r365557) +++ head/sys/dev/gpio/ofw_gpiobus.c Thu Sep 10 09:42:37 2020 (r365558) @@ -197,7 +197,8 @@ ofw_gpiobus_register_provider(device_t provider) phandle_t node; node = ofw_bus_get_node(provider); - OF_device_register_xref(OF_xref_from_node(node), provider); + if (node != -1) + OF_device_register_xref(OF_xref_from_node(node), provider); } void @@ -206,7 +207,8 @@ ofw_gpiobus_unregister_provider(device_t provider) phandle_t node; node = ofw_bus_get_node(provider); - OF_device_register_xref(OF_xref_from_node(node), NULL); + if (node != -1) + OF_device_register_xref(OF_xref_from_node(node), NULL); } static struct ofw_gpiobus_devinfo * ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365557 - head/sys/dev/gpio
Author: andrew Date: Thu Sep 10 09:37:30 2020 New Revision: 365557 URL: https://svnweb.freebsd.org/changeset/base/365557 Log: Use the correct variable to check which interrupt mode to use In the PL061 driver we incorrectly used the mask rather than mode to find how to configure the interrupt. Sponsored by: Innovate UK Modified: head/sys/dev/gpio/pl061.c Modified: head/sys/dev/gpio/pl061.c == --- head/sys/dev/gpio/pl061.c Thu Sep 10 09:10:33 2020(r365556) +++ head/sys/dev/gpio/pl061.c Thu Sep 10 09:37:30 2020(r365557) @@ -335,22 +335,22 @@ pl061_pic_setup_intr(device_t dev, struct intr_irqsrc PL061_LOCK(sc); - if (mask & GPIO_INTR_EDGE_BOTH) { + if (mode & GPIO_INTR_EDGE_BOTH) { mask_and_set(sc, PL061_INTBOTHEDGES, mask, mask); mask_and_set(sc, PL061_INTSENSE, mask, 0); - } else if (mask & GPIO_INTR_EDGE_RISING) { + } else if (mode & GPIO_INTR_EDGE_RISING) { mask_and_set(sc, PL061_INTBOTHEDGES, mask, 0); mask_and_set(sc, PL061_INTSENSE, mask, 0); mask_and_set(sc, PL061_INTEVENT, mask, mask); - } else if (mask & GPIO_INTR_EDGE_FALLING) { + } else if (mode & GPIO_INTR_EDGE_FALLING) { mask_and_set(sc, PL061_INTBOTHEDGES, mask, 0); mask_and_set(sc, PL061_INTSENSE, mask, 0); mask_and_set(sc, PL061_INTEVENT, mask, 0); - } else if (mask & GPIO_INTR_LEVEL_HIGH) { + } else if (mode & GPIO_INTR_LEVEL_HIGH) { mask_and_set(sc, PL061_INTBOTHEDGES, mask, 0); mask_and_set(sc, PL061_INTSENSE, mask, mask); mask_and_set(sc, PL061_INTEVENT, mask, mask); - } else if (mask & GPIO_INTR_LEVEL_LOW) { + } else if (mode & GPIO_INTR_LEVEL_LOW) { mask_and_set(sc, PL061_INTBOTHEDGES, mask, 0); mask_and_set(sc, PL061_INTSENSE, mask, mask); mask_and_set(sc, PL061_INTEVENT, mask, 0); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365554 - head/sys/net/route
Author: melifaro Date: Thu Sep 10 07:05:31 2020 New Revision: 365554 URL: https://svnweb.freebsd.org/changeset/base/365554 Log: Fix RADIX_MPATH build broken by r365521. Reported by: jenkins, Hartmann, O. Modified: head/sys/net/route/route_ctl.c Modified: head/sys/net/route/route_ctl.c == --- head/sys/net/route/route_ctl.c Thu Sep 10 06:32:25 2020 (r365553) +++ head/sys/net/route/route_ctl.c Thu Sep 10 07:05:31 2020 (r365554) @@ -577,9 +577,11 @@ rt_unlinkrte(struct rib_head *rnh, struct rt_addrinfo */ #ifdef RADIX_MPATH info->rti_info[RTAX_GATEWAY] = >gw_sa; - if (rt_mpath_capable(rnh)) - rn = rt_mpath_unlink(rnh, info, rt, perror); - else + if (rt_mpath_capable(rnh)) { + rn = rt_mpath_unlink(rnh, info, rt, ); + if (error != 0) + return (error); + } else #endif rn = rnh->rnh_deladdr(info->rti_info[RTAX_DST], info->rti_info[RTAX_NETMASK], >head); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365553 - in head: . share/man/man9
Author: lwhsu Date: Thu Sep 10 06:32:25 2020 New Revision: 365553 URL: https://svnweb.freebsd.org/changeset/base/365553 Log: Remove vm_map_create(9) KPI's manpage according to r364302 Submitted by: Ka Ho Ng Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D26372 Deleted: head/share/man/man9/vm_map_create.9 Modified: head/ObsoleteFiles.inc head/share/man/man9/Makefile head/share/man/man9/vm_map.9 Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Thu Sep 10 04:17:23 2020(r365552) +++ head/ObsoleteFiles.inc Thu Sep 10 06:32:25 2020(r365553) @@ -36,6 +36,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20200910: remove vm_map_create(9) to sync with the code +OLD_FILES+=usr/share/man/man9/vm_map_create.9.gz + # 20200820: Removal of the ufm driver. OLD_FILES+=usr/share/man/man4/ufm.4.gz Modified: head/share/man/man9/Makefile == --- head/share/man/man9/MakefileThu Sep 10 04:17:23 2020 (r365552) +++ head/share/man/man9/MakefileThu Sep 10 06:32:25 2020 (r365553) @@ -361,7 +361,6 @@ MAN=accept_filter.9 \ vm_fault_prefault.9 \ vm_map.9 \ vm_map_check_protection.9 \ - vm_map_create.9 \ vm_map_delete.9 \ vm_map_entry_resize_free.9 \ vm_map_find.9 \ Modified: head/share/man/man9/vm_map.9 == --- head/share/man/man9/vm_map.9Thu Sep 10 04:17:23 2020 (r365552) +++ head/share/man/man9/vm_map.9Thu Sep 10 06:32:25 2020 (r365553) @@ -310,7 +310,6 @@ is backed by a .Sh SEE ALSO .Xr pmap 9 , .Xr vm_map_check_protection 9 , -.Xr vm_map_create 9 , .Xr vm_map_delete 9 , .Xr vm_map_entry_resize_free 9 , .Xr vm_map_find 9 , ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"