Re: svn commit: r361967 - head/sys/kern
Does not reproduce for me, dtrace says: # dtrace -n 'fbt::pgadjustjobc:entry { printf("pgrp %p count %d entering %d\n", args[0], args[0]->pg_jobc, arg1); }' ", args[0], args[0]->pg_jobc, arg1); }'dtrace: description 'fbt::pgadjustjobc:entry ' matched 1 probe CPU IDFUNCTION:NAME 0 12082 pgadjustjobc:entry pgrp f80083510e00 count 0 entering 1 6 12082 pgadjustjobc:entry pgrp f80002b6bc00 count 0 entering 1 0 12082 pgadjustjobc:entry pgrp f80083510e00 count 1 entering 0 0 12082 pgadjustjobc:entry pgrp f80002b6bc00 count 1 entering 0 I don't have time to dig into this one. If there are no takers, I'll replace these assertions with a comment. On 6/17/20, John Baldwin wrote: > On 6/17/20 9:39 AM, Kyle Evans wrote: >> On Wed, Jun 17, 2020 at 10:21 AM Mateusz Guzik wrote: >>> >>> pho@ reported triggering one of the asserts: >>> https://people.freebsd.org/~pho/stress/log/mjguzik028.txt >>> >>> I did not have the time to properly investigate this yet and this does >>> not reproduce for me. >>> >> >> Ah, this is good to know that he's reproduced it. There's only so many >> places that we touch these. I can't quite envision how, but the only >> scenario this would seem to be possible in is doenterpgrp() -> >> fixjobc(p, p->p_grp, 0) -> adjusts some child with a different process >> group without actually changing it, orphans the group, then we manage >> to finalize killjobc() on a freshly-orphaned process, which hasn't had >> its p_pgrp nullified. >> >> I haven't yet traced it through completely enough to determine if >> there's any way that can even happen. > > I reproduced it three times yesterday in a head VM by exiting GDB while > it was attached to a live process (which kills the process), something > like: > > gdb /bin/ls > start > ^D > > Should be enough to reproduce. > > -- > John Baldwin > -- Mateusz Guzik ___ 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: r362667 - head/sys/cddl/contrib/opensolaris/uts/common/dtrace
On Fri, Jun 26, 2020, 9:04 PM Enji Cooper wrote: > > > On Jun 26, 2020, at 6:02 PM, Alexey Dokuchaev wrote: > > > > On Sat, Jun 27, 2020 at 12:57:48AM +, Matt Macy wrote: > >> New Revision: 362667 > >> URL: https://svnweb.freebsd.org/changeset/base/362667 > >> > >> Log: > >> Fix "current" variable name conflict with openzfs > >> > >> The variable "current" is an alias for curthread > >> in openzfs. Rename all variable uses of current > >> in dtrace.c to curstate. > > > > Shouldn't OpenZFS be fixed instead? The fact that we need to fix our > > local variables suggests that they're abusing too generic name… > > > I kind of agree with `current` being a bit too genericly named in > both DTrace and OpenZFS :/.. > It's always going to be something. These changes are actually pretty minor and really only affect the part of the tree that uses Open Solaris compatibility layer. These changes are smaller for us than changing all OpenZFS. This really was the right fix. Warner > ___ 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: r362667 - head/sys/cddl/contrib/opensolaris/uts/common/dtrace
> On Jun 26, 2020, at 6:02 PM, Alexey Dokuchaev wrote: > > On Sat, Jun 27, 2020 at 12:57:48AM +, Matt Macy wrote: >> New Revision: 362667 >> URL: https://svnweb.freebsd.org/changeset/base/362667 >> >> Log: >> Fix "current" variable name conflict with openzfs >> >> The variable "current" is an alias for curthread >> in openzfs. Rename all variable uses of current >> in dtrace.c to curstate. > > Shouldn't OpenZFS be fixed instead? The fact that we need to fix our > local variables suggests that they're abusing too generic name… I kind of agree with `current` being a bit too genericly named in both DTrace and OpenZFS :/.. Cheers, -Enji ___ 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: r362671 - in head/sys/dev/ath/ath_hal: ar5212 ar5416
Author: adrian Date: Sat Jun 27 02:59:51 2020 New Revision: 362671 URL: https://svnweb.freebsd.org/changeset/base/362671 Log: [ath_hal] Add KeyMiss for AR5212/AR5416 series chips. This is a flag from the MAC that says the received packet didn't match a keycache slot. This isn't technically a problem as WEP keys don't match keycache slots (they're "global" keys), but it could be useful for tracking down CCMP decryption failures. Right now it's a no-op - it mirrors what the AR9300 HAL does and it just increments a counter. But, hey, maybe one day I'll use it for diagnosing keycache/CCMP decrypt issues. Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c head/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c == --- head/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c Sat Jun 27 02:31:39 2020(r362670) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c Sat Jun 27 02:59:51 2020(r362671) @@ -265,7 +265,6 @@ ar5212ProcRxDesc(struct ath_hal *ah, struct ath_desc * rs->rs_datalen = ads->ds_rxstatus0 & AR_DataLen; rs->rs_tstamp = MS(ads->ds_rxstatus1, AR_RcvTimestamp); rs->rs_status = 0; - /* XXX what about KeyCacheMiss? */ rs->rs_rssi = MS(ads->ds_rxstatus0, AR_RcvSigStrength); /* discard invalid h/w rssi data */ if (rs->rs_rssi == -128) @@ -274,6 +273,8 @@ ar5212ProcRxDesc(struct ath_hal *ah, struct ath_desc * rs->rs_keyix = MS(ads->ds_rxstatus1, AR_KeyIdx); else rs->rs_keyix = HAL_RXKEYIX_INVALID; + if (ads->ds_rxstatus1 & AR_KeyCacheMiss) + rs->rs_status |= HAL_RXERR_KEYMISS; /* NB: caller expected to do rate table mapping */ rs->rs_rate = MS(ads->ds_rxstatus0, AR_RcvRate); rs->rs_antenna = MS(ads->ds_rxstatus0, AR_RcvAntenna); Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c == --- head/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c Sat Jun 27 02:31:39 2020(r362670) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c Sat Jun 27 02:59:51 2020(r362671) @@ -183,8 +183,6 @@ ar5416ProcRxDesc(struct ath_hal *ah, struct ath_desc * rs->rs_datalen = ads->ds_rxstatus1 & AR_DataLen; rs->rs_tstamp = ads->AR_RcvTimestamp; - /* XXX what about KeyCacheMiss? */ - rs->rs_rssi = MS(ads->ds_rxstatus4, AR_RxRSSICombined); rs->rs_rssi_ctl[0] = MS(ads->ds_rxstatus0, AR_RxRSSIAnt00); rs->rs_rssi_ctl[1] = MS(ads->ds_rxstatus0, AR_RxRSSIAnt01); @@ -276,6 +274,9 @@ ar5416ProcRxDesc(struct ath_hal *ah, struct ath_desc * else if (ads->ds_rxstatus8 & AR_MichaelErr) rs->rs_status |= HAL_RXERR_MIC; } + + if (ads->ds_rxstatus8 & AR_KeyMiss) + rs->rs_status |= HAL_RXERR_KEYMISS; return HAL_OK; } ___ 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: r362670 - head/sys/vm
Author: kib Date: Sat Jun 27 02:31:39 2020 New Revision: 362670 URL: https://svnweb.freebsd.org/changeset/base/362670 Log: vm_page_free_prep(): correct description of the required page and object state. Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential revision:https://reviews.freebsd.org/D25482 Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c == --- head/sys/vm/vm_page.c Sat Jun 27 02:17:04 2020(r362669) +++ head/sys/vm/vm_page.c Sat Jun 27 02:31:39 2020(r362670) @@ -3666,8 +3666,9 @@ vm_page_enqueue(vm_page_t m, uint8_t queue) * disassociating it from any VM object. The caller may return * the page to the free list only if this function returns true. * - * The object must be locked. The page must be locked if it is - * managed. + * The object, if it exists, must be locked, and then the page must + * be xbusy. Otherwise the page must be not busied. A managed + * page must be unmapped. */ static bool vm_page_free_prep(vm_page_t m) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r362669 - head/lib/libnv
Author: mmacy Date: Sat Jun 27 02:17:04 2020 New Revision: 362669 URL: https://svnweb.freebsd.org/changeset/base/362669 Log: Fix libnv build post rename Submitted by: Neel Chauhan Differential Revision:https://reviews.freebsd.org/D25481 Modified: head/lib/libnv/Makefile Modified: head/lib/libnv/Makefile == --- head/lib/libnv/Makefile Sat Jun 27 01:08:27 2020(r362668) +++ head/lib/libnv/Makefile Sat Jun 27 02:17:04 2020(r362669) @@ -15,7 +15,7 @@ SRCS= cnvlist.c SRCS+= dnvlist.c SRCS+= msgio.c SRCS+= nvlist.c -SRCS+= nvpair.c +SRCS+= bsd_nvpair.c HAS_TESTS= SUBDIR.${MK_TESTS}+= tests ___ 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: r362667 - head/sys/cddl/contrib/opensolaris/uts/common/dtrace
On Sat, Jun 27, 2020 at 12:57:48AM +, Matt Macy wrote: > New Revision: 362667 > URL: https://svnweb.freebsd.org/changeset/base/362667 > > Log: > Fix "current" variable name conflict with openzfs > > The variable "current" is an alias for curthread > in openzfs. Rename all variable uses of current > in dtrace.c to curstate. Shouldn't OpenZFS be fixed instead? The fact that we need to fix our local variables suggests that they're abusing too generic name... ./danfe ___ 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: r362667 - head/sys/cddl/contrib/opensolaris/uts/common/dtrace
Author: mmacy Date: Sat Jun 27 00:57:48 2020 New Revision: 362667 URL: https://svnweb.freebsd.org/changeset/base/362667 Log: Fix "current" variable name conflict with openzfs The variable "current" is an alias for curthread in openzfs. Rename all variable uses of current in dtrace.c to curstate. Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c == --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.cSat Jun 27 00:55:03 2020(r362666) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.cSat Jun 27 00:57:48 2020(r362667) @@ -2780,25 +2780,25 @@ static int dtrace_speculation(dtrace_state_t *state) { int i = 0; - dtrace_speculation_state_t current; + dtrace_speculation_state_t curstate; uint32_t *stat = >dts_speculations_unavail, count; while (i < state->dts_nspeculations) { dtrace_speculation_t *spec = >dts_speculations[i]; - current = spec->dtsp_state; + curstate = spec->dtsp_state; - if (current != DTRACESPEC_INACTIVE) { - if (current == DTRACESPEC_COMMITTINGMANY || - current == DTRACESPEC_COMMITTING || - current == DTRACESPEC_DISCARDING) + if (curstate != DTRACESPEC_INACTIVE) { + if (curstate == DTRACESPEC_COMMITTINGMANY || + curstate == DTRACESPEC_COMMITTING || + curstate == DTRACESPEC_DISCARDING) stat = >dts_speculations_busy; i++; continue; } if (dtrace_cas32((uint32_t *)>dtsp_state, - current, DTRACESPEC_ACTIVE) == current) + curstate, DTRACESPEC_ACTIVE) == curstate) return (i + 1); } @@ -2827,7 +2827,7 @@ dtrace_speculation_commit(dtrace_state_t *state, proce dtrace_speculation_t *spec; dtrace_buffer_t *src, *dest; uintptr_t daddr, saddr, dlimit, slimit; - dtrace_speculation_state_t current, new = 0; + dtrace_speculation_state_t curstate, new = 0; intptr_t offs; uint64_t timestamp; @@ -2844,12 +2844,12 @@ dtrace_speculation_commit(dtrace_state_t *state, proce dest = >dts_buffer[cpu]; do { - current = spec->dtsp_state; + curstate = spec->dtsp_state; - if (current == DTRACESPEC_COMMITTINGMANY) + if (curstate == DTRACESPEC_COMMITTINGMANY) break; - switch (current) { + switch (curstate) { case DTRACESPEC_INACTIVE: case DTRACESPEC_DISCARDING: return; @@ -2891,7 +2891,7 @@ dtrace_speculation_commit(dtrace_state_t *state, proce ASSERT(0); } } while (dtrace_cas32((uint32_t *)>dtsp_state, - current, new) != current); + curstate, new) != curstate); /* * We have set the state to indicate that we are committing this @@ -2907,7 +2907,7 @@ dtrace_speculation_commit(dtrace_state_t *state, proce /* * We have sufficient space to copy the speculative buffer into the * primary buffer. First, modify the speculative buffer, filling -* in the timestamp of all entries with the current time. The data +* in the timestamp of all entries with the curstate time. The data * must have the commit() time rather than the time it was traced, * so that all entries in the primary buffer are in timestamp order. */ @@ -2970,8 +2970,8 @@ out: * If we're lucky enough to be the only active CPU on this speculation * buffer, we can just set the state back to DTRACESPEC_INACTIVE. */ - if (current == DTRACESPEC_ACTIVE || - (current == DTRACESPEC_ACTIVEONE && new == DTRACESPEC_COMMITTING)) { + if (curstate == DTRACESPEC_ACTIVE || + (curstate == DTRACESPEC_ACTIVEONE && new == DTRACESPEC_COMMITTING)) { uint32_t rval = dtrace_cas32((uint32_t *)>dtsp_state, DTRACESPEC_COMMITTING, DTRACESPEC_INACTIVE); @@ -2994,7 +2994,7 @@ dtrace_speculation_discard(dtrace_state_t *state, proc dtrace_specid_t which) { dtrace_speculation_t *spec; - dtrace_speculation_state_t current, new = 0; + dtrace_speculation_state_t curstate, new = 0; dtrace_buffer_t *buf; if (which == 0) @@ -3009,9 +3009,9 @@ dtrace_speculation_discard(dtrace_state_t *state, proc buf = >dtsp_buffer[cpu]; do { - current = spec->dtsp_state; +
svn commit: r362666 - in head/sys: conf contrib/libnv
Author: mmacy Date: Sat Jun 27 00:55:03 2020 New Revision: 362666 URL: https://svnweb.freebsd.org/changeset/base/362666 Log: Rename nvpair.c to bsd_nvpair.c to not conflict with openzfs' version. Added: head/sys/contrib/libnv/bsd_nvpair.c - copied unchanged from r362665, head/sys/contrib/libnv/nvpair.c Deleted: head/sys/contrib/libnv/nvpair.c Modified: head/sys/conf/files Modified: head/sys/conf/files == --- head/sys/conf/files Fri Jun 26 22:23:15 2020(r362665) +++ head/sys/conf/files Sat Jun 27 00:55:03 2020(r362666) @@ -593,7 +593,7 @@ contrib/libfdt/fdt_wip.coptional fdt contrib/libnv/cnvlist.cstandard contrib/libnv/dnvlist.cstandard contrib/libnv/nvlist.c standard -contrib/libnv/nvpair.c standard +contrib/libnv/bsd_nvpair.c standard contrib/ngatm/netnatm/api/cc_conn.c optional ngatm_ccatm \ compile-with "${NORMAL_C_NOWERROR} -I$S/contrib/ngatm" contrib/ngatm/netnatm/api/cc_data.c optional ngatm_ccatm \ Copied: head/sys/contrib/libnv/bsd_nvpair.c (from r362665, head/sys/contrib/libnv/nvpair.c) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/contrib/libnv/bsd_nvpair.c Sat Jun 27 00:55:03 2020 (r362666, copy of r362665, head/sys/contrib/libnv/nvpair.c) @@ -0,0 +1,2135 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2009-2013 The FreeBSD Foundation + * Copyright (c) 2013-2015 Mariusz Zaborski + * All rights reserved. + * + * This software was developed by Pawel Jakub Dawidek under sponsorship from + * the FreeBSD Foundation. + * + * 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 AUTHORS 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 AUTHORS 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +#ifdef _KERNEL + +#include +#include +#include +#include + +#include + +#else +#include +#include +#include +#include +#include +#include +#include +#include + +#include "common_impl.h" +#endif + +#ifdef HAVE_PJDLOG +#include +#endif + +#include + +#include "nv_impl.h" +#include "nvlist_impl.h" +#include "nvpair_impl.h" + +#ifndefHAVE_PJDLOG +#ifdef _KERNEL +#definePJDLOG_ASSERT(...) MPASS(__VA_ARGS__) +#definePJDLOG_RASSERT(expr, ...) KASSERT(expr, (__VA_ARGS__)) +#definePJDLOG_ABORT(...) panic(__VA_ARGS__) +#else +#include +#definePJDLOG_ASSERT(...) assert(__VA_ARGS__) +#definePJDLOG_RASSERT(expr, ...) assert(expr) +#definePJDLOG_ABORT(...) abort() +#endif +#endif + +#defineNVPAIR_MAGIC0x6e7670/* "nvp" */ +struct nvpair { + int nvp_magic; + char*nvp_name; + int nvp_type; + uint64_t nvp_data; + size_t nvp_datasize; + size_t nvp_nitems;/* Used only for array types. */ + nvlist_t*nvp_list; + TAILQ_ENTRY(nvpair) nvp_next; +}; + +#defineNVPAIR_ASSERT(nvp) do { \ + PJDLOG_ASSERT((nvp) != NULL); \ + PJDLOG_ASSERT((nvp)->nvp_magic == NVPAIR_MAGIC);\ +} while (0) + +struct nvpair_header { + uint8_t nvph_type; + uint16_tnvph_namesize; + uint64_tnvph_datasize; + uint64_tnvph_nitems; +} __packed; + + +void +nvpair_assert(const nvpair_t *nvp __unused) +{ + + NVPAIR_ASSERT(nvp); +} + +static nvpair_t * +nvpair_allocv(const char *name, int type,
svn commit: r362665 - head/usr.sbin/chroot
Author: imp Date: Fri Jun 26 22:23:15 2020 New Revision: 362665 URL: https://svnweb.freebsd.org/changeset/base/362665 Log: Chroot first appeared in 4.3-Reno, not in 4.4 in the BSD world, but in System III in the AT world. Examination of the TUHS archives shows this was present in 4.3-Reno and System III. Reviewed by: 0mp@, allanjude@ MFC After: 3 days Differential Revision: https://reviews.freebsd.org/D25479 Modified: head/usr.sbin/chroot/chroot.8 Modified: head/usr.sbin/chroot/chroot.8 == --- head/usr.sbin/chroot/chroot.8 Fri Jun 26 22:05:23 2020 (r362664) +++ head/usr.sbin/chroot/chroot.8 Fri Jun 26 22:23:15 2020 (r362665) @@ -28,7 +28,7 @@ .\" @(#)chroot.8 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd March 14, 2019 +.Dd June 27, 2020 .Dt CHROOT 8 .Os .Sh NAME @@ -113,4 +113,6 @@ to list the contents of The .Nm utility first appeared in -.Bx 4.4 . +.At III +and +.Bx 4.3 Reno . ___ 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: r362664 - head/lib/libc/sys
Author: imp Date: Fri Jun 26 22:05:23 2020 New Revision: 362664 URL: https://svnweb.freebsd.org/changeset/base/362664 Log: Chroot actually appeared in 7th Edition Unix. Chroot appeared during the development of 7th edition Unix. The FreeBSD jail documents, incorrectly, that Bill Joy added this to 4.2BSD on 18 March 1982. That was when Bill Joy converted from a statically coded system call glue to dynamically generated assembler. Chroot was present in 32V, 3BSD, 4.0BSD, 4.1BSD and 4.1cBSD well in advance of this. Kirk McKusick agrees with this analysis. See also: V7: https://minnie.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/libc/sys/chroot.s 32V: https://minnie.tuhs.org/cgi-bin/utree.pl?file=32V/usr/src/libc/sys/chroot.s 3BSD: https://minnie.tuhs.org/cgi-bin/utree.pl?file=3BSD/usr/src/libc/sys/chroot.s 4BSD: https://minnie.tuhs.org/cgi-bin/utree.pl?file=4BSD/usr/src/libc/sys/chroot.s 4.1cBSD: https://minnie.tuhs.org/cgi-bin/utree.pl?file=4.1cBSD/usr/src/libc/sys/chroot.s The 6th and earlier editions do not have this system call, nor do they have anything named chroot in the trees available from TUHS. Reviewed by: allanjude@ Differential Revision: https://reviews.freebsd.org/D25475 Modified: head/lib/libc/sys/chroot.2 Modified: head/lib/libc/sys/chroot.2 == --- head/lib/libc/sys/chroot.2 Fri Jun 26 21:21:35 2020(r362663) +++ head/lib/libc/sys/chroot.2 Fri Jun 26 22:05:23 2020(r362664) @@ -28,7 +28,7 @@ .\" @(#)chroot.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd March 30, 2020 +.Dd June 26, 2020 .Dt CHROOT 2 .Os .Sh NAME @@ -131,7 +131,7 @@ Corrupted data was detected while reading from the fil The .Fn chroot system call appeared in -.Bx 4.2 . +.At v7 . It was marked as .Dq legacy in ___ 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: r362663 - head/stand/libsa/zfs
Author: tsoome Date: Fri Jun 26 21:21:35 2020 New Revision: 362663 URL: https://svnweb.freebsd.org/changeset/base/362663 Log: loader: can not read zfs pool with slog removed The vdev_init() does check for "known" vdev types, the [log] device removal will create "hole" device, but vdev_init() does not allow it. Obtained from: illumos MFC after:1 week Modified: head/stand/libsa/zfs/zfsimpl.c Modified: head/stand/libsa/zfs/zfsimpl.c == --- head/stand/libsa/zfs/zfsimpl.c Fri Jun 26 20:44:10 2020 (r362662) +++ head/stand/libsa/zfs/zfsimpl.c Fri Jun 26 21:21:35 2020 (r362663) @@ -765,7 +765,14 @@ vdev_disk_read(vdev_t *vdev, const blkptr_t *bp, void offset + VDEV_LABEL_START_SIZE, bytes)); } +static int +vdev_missing_read(vdev_t *vdev __unused, const blkptr_t *bp __unused, +void *buf __unused, off_t offset __unused, size_t bytes __unused) +{ + return (ENOTSUP); +} + static int vdev_mirror_read(vdev_t *vdev, const blkptr_t *bp, void *buf, off_t offset, size_t bytes) @@ -904,9 +911,10 @@ vdev_init(uint64_t guid, const nvlist_t *nvlist, vdev_ #endif memcmp(type, VDEV_TYPE_RAIDZ, len) != 0 && memcmp(type, VDEV_TYPE_INDIRECT, len) != 0 && - memcmp(type, VDEV_TYPE_REPLACING, len) != 0) { + memcmp(type, VDEV_TYPE_REPLACING, len) != 0 && + memcmp(type, VDEV_TYPE_HOLE, len) != 0) { printf("ZFS: can only boot from disk, mirror, raidz1, " - "raidz2 and raidz3 vdevs\n"); + "raidz2 and raidz3 vdevs, got: %.*s\n", len, type); return (EIO); } @@ -937,6 +945,8 @@ vdev_init(uint64_t guid, const nvlist_t *nvlist, vdev_ DATA_TYPE_UINT64, NULL, >vic_prev_indirect_vdev, NULL); } + } else if (memcmp(type, VDEV_TYPE_HOLE, len) == 0) { + vdev = vdev_create(guid, vdev_missing_read); } else { vdev = vdev_create(guid, vdev_disk_read); } ___ 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: r362661 - in head/sys/dev: acpica pci
Author: mav Date: Fri Jun 26 19:55:11 2020 New Revision: 362661 URL: https://svnweb.freebsd.org/changeset/base/362661 Log: Add mostly dummy hw.pci.enable_aspm tunable. The only thing this tunable enables now is reporting to ACPI _OSC that Active State Power Management and Clock Power Management Capability are "supported" by the OS. I've found that at least some Supermicro server boards do not allow OS to support native PCIe hot-plug unless it reports those capabilities. After spending significant time in PCIe specs I have found very little motivation for that, and none of it applies to those motherboards, not enabling ASPM themselves. So unless OS explicitly wants to save power, I see nothing for it to do there actually. I guess it may get sense to support ASPM when we get Thunderbolt support. Otherwise I have no system with PCIe hot-plug where power saving matters. It would be nice to enable this by default, but I worry that it affect power saving of some laptops, even though I haven't noticed that myself. Modified: head/sys/dev/acpica/acpi_pcib_acpi.c head/sys/dev/pci/pci.c head/sys/dev/pci/pcivar.h Modified: head/sys/dev/acpica/acpi_pcib_acpi.c == --- head/sys/dev/acpica/acpi_pcib_acpi.cFri Jun 26 19:46:30 2020 (r362660) +++ head/sys/dev/acpica/acpi_pcib_acpi.cFri Jun 26 19:55:11 2020 (r362661) @@ -326,6 +326,10 @@ acpi_pcib_osc(struct acpi_hpcib_softc *sc, uint32_t os /* Support Field: Extended PCI Config Space, PCI Segment Groups, MSI */ cap_set[PCI_OSC_SUPPORT] = PCIM_OSC_SUPPORT_EXT_PCI_CONF | PCIM_OSC_SUPPORT_SEG_GROUP | PCIM_OSC_SUPPORT_MSI; + /* Active State Power Management, Clock Power Management Capability */ + if (pci_enable_aspm) + cap_set[PCI_OSC_SUPPORT] |= PCIM_OSC_SUPPORT_ASPM | + PCIM_OSC_SUPPORT_CPMC; /* Control Field */ cap_set[PCI_OSC_CTL] = sc->ap_osc_ctl | osc_ctl; Modified: head/sys/dev/pci/pci.c == --- head/sys/dev/pci/pci.c Fri Jun 26 19:46:30 2020(r362660) +++ head/sys/dev/pci/pci.c Fri Jun 26 19:55:11 2020(r362661) @@ -408,6 +408,10 @@ static int pci_enable_ari = 1; SYSCTL_INT(_hw_pci, OID_AUTO, enable_ari, CTLFLAG_RDTUN, _enable_ari, 0, "Enable support for PCIe Alternative RID Interpretation"); +int pci_enable_aspm; +SYSCTL_INT(_hw_pci, OID_AUTO, enable_aspm, CTLFLAG_RDTUN, _enable_aspm, +0, "Enable support for PCIe Active State Power Management"); + static int pci_clear_aer_on_attach = 0; SYSCTL_INT(_hw_pci, OID_AUTO, clear_aer_on_attach, CTLFLAG_RWTUN, _clear_aer_on_attach, 0, Modified: head/sys/dev/pci/pcivar.h == --- head/sys/dev/pci/pcivar.h Fri Jun 26 19:46:30 2020(r362660) +++ head/sys/dev/pci/pcivar.h Fri Jun 26 19:55:11 2020(r362661) @@ -257,6 +257,7 @@ typedef struct { } pcih2cfgregs; extern uint32_t pci_numdevs; +extern int pci_enable_aspm; /* * The bitfield has to be stable and match the fields below (so that ___ 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: r362660 - in head/lib/csu: aarch64 arm i386 riscv
Author: jhb Date: Fri Jun 26 19:46:30 2020 New Revision: 362660 URL: https://svnweb.freebsd.org/changeset/base/362660 Log: Only include object files from .ALLSRC when linking crt1 objects. Reported by: np, peterj Reviewed by: kib, emaste Sponsored by: DARPA Differential Revision:https://reviews.freebsd.org/D25469 Modified: head/lib/csu/aarch64/Makefile head/lib/csu/arm/Makefile head/lib/csu/i386/Makefile head/lib/csu/riscv/Makefile Modified: head/lib/csu/aarch64/Makefile == --- head/lib/csu/aarch64/Makefile Fri Jun 26 18:57:01 2020 (r362659) +++ head/lib/csu/aarch64/Makefile Fri Jun 26 19:46:30 2020 (r362660) @@ -24,15 +24,15 @@ gcrt1_c.o: crt1_c.c ${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c gcrt1.o: gcrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} crt1.o:crt1_c.o crt1_s.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} Scrt1_c.o: crt1_c.c ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.CURDIR}/crt1_c.c Scrt1.o: Scrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} .include Modified: head/lib/csu/arm/Makefile == --- head/lib/csu/arm/Makefile Fri Jun 26 18:57:01 2020(r362659) +++ head/lib/csu/arm/Makefile Fri Jun 26 19:46:30 2020(r362660) @@ -24,18 +24,18 @@ crt1_c.o: crt1_c.c ${CC} ${CFLAGS} ${STATIC_CFLAGS} -c -o ${.TARGET} ${.CURDIR}/crt1_c.c crt1.o:crt1_c.o crt1_s.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} gcrt1_c.o: crt1_c.c ${CC} ${CFLAGS} ${STATIC_CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c gcrt1.o: gcrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} Scrt1_c.o: crt1_c.c ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.CURDIR}/crt1_c.c Scrt1.o: Scrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} .include Modified: head/lib/csu/i386/Makefile == --- head/lib/csu/i386/Makefile Fri Jun 26 18:57:01 2020(r362659) +++ head/lib/csu/i386/Makefile Fri Jun 26 19:46:30 2020(r362660) @@ -24,17 +24,17 @@ gcrt1_c.o: crt1_c.c ${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c gcrt1.o: gcrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} crt1.o:crt1_c.o crt1_s.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} ${OBJCOPY} --localize-symbol _start1 crt1.o Scrt1_c.o: crt1_c.c ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.CURDIR}/crt1_c.c Scrt1.o: Scrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} ${OBJCOPY} --localize-symbol _start1 Scrt1.o .include Modified: head/lib/csu/riscv/Makefile == --- head/lib/csu/riscv/Makefile Fri Jun 26 18:57:01 2020(r362659) +++ head/lib/csu/riscv/Makefile Fri Jun 26 19:46:30 2020(r362660) @@ -24,15 +24,15 @@ gcrt1_c.o: crt1_c.c ${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c gcrt1.o: gcrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} crt1.o:crt1_c.o crt1_s.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} Scrt1_c.o: crt1_c.c ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.CURDIR}/crt1_c.c Scrt1.o: Scrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} .include ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r362656 - head/contrib/netbsd-tests/kernel
Author: lwhsu Date: Fri Jun 26 17:58:10 2020 New Revision: 362656 URL: https://svnweb.freebsd.org/changeset/base/362656 Log: Temporarily skip flakey sys.kern.sysv_test.msg in CI PR: 233649 Modified: head/contrib/netbsd-tests/kernel/t_sysv.c Modified: head/contrib/netbsd-tests/kernel/t_sysv.c == --- head/contrib/netbsd-tests/kernel/t_sysv.c Fri Jun 26 17:35:09 2020 (r362655) +++ head/contrib/netbsd-tests/kernel/t_sysv.c Fri Jun 26 17:58:10 2020 (r362656) @@ -210,6 +210,9 @@ ATF_TC_BODY(msg, tc) int loop; int c_status; + if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) + atf_tc_skip("https://bugs.freebsd.org/233649;); + /* * Install a SIGSYS handler so that we can exit gracefully if * System V Message Queue support isn't in the kernel. ___ 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: r362654 - head/sbin/ifconfig
Author: allanjude Date: Fri Jun 26 16:20:34 2020 New Revision: 362654 URL: https://svnweb.freebsd.org/changeset/base/362654 Log: ifconfig(8): optimize -f ether:dash mode Switch to the simplified while loop suggest by Aaron LI Post commit review via: https://reviews.freebsd.org/rS301185#inline-232 Submitted by: Aaron LI Sponsored by: Klara Inc. Modified: head/sbin/ifconfig/af_link.c Modified: head/sbin/ifconfig/af_link.c == --- head/sbin/ifconfig/af_link.cFri Jun 26 16:16:25 2020 (r362653) +++ head/sbin/ifconfig/af_link.cFri Jun 26 16:20:34 2020 (r362654) @@ -74,10 +74,10 @@ link_status(int s __unused, const struct ifaddrs *ifa) sdl->sdl_type == IFT_BRIDGE) && sdl->sdl_alen == ETHER_ADDR_LEN) { ether_format = ether_ntoa((struct ether_addr *)LLADDR(sdl)); if (f_ether != NULL && strcmp(f_ether, "dash") == 0) { - for (format_char = strchr(ether_format, ':'); - format_char != NULL; - format_char = strchr(ether_format, ':')) + while ((format_char = strchr(ether_format, ':')) != + NULL) { *format_char = '-'; + } } printf("\tether %s\n", ether_format); } else { ___ 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: r362620 - head/secure/lib/libcrypto
On 6/25/20 2:30 PM, Benjamin Kaduk wrote: > On Thu, Jun 25, 2020 at 12:35 PM Gordon Tetlow wrote: > >> Author: gordon >> Date: Thu Jun 25 19:35:37 2020 >> New Revision: 362620 >> URL: https://svnweb.freebsd.org/changeset/base/362620 >> >> Log: >> Revert OPENSSL_NO_SSL3_METHOD to keep ABI compatibility. >> >> This define caused a couple of symbols to disappear. To keep ABI >> compatibility, we are going to keep the symbols exposed, but leave SSLv3 >> as >> not in the default config (this is what OPENSSL_NO_SSL3 achieves). The >> ramifications of this is an application can still use SSLv3 if it >> specifically calls the SSLv3_method family of APIs. >> >> > I think I've seen some distros that keep the functinos around but just have > them always return failure. I think this is sensible for 13.0. It might even be something we could MFC to 12.x, but certainly for 13.0. -- John Baldwin ___ 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: r362652 - head/sbin/ifconfig
Author: allanjude Date: Fri Jun 26 15:14:03 2020 New Revision: 362652 URL: https://svnweb.freebsd.org/changeset/base/362652 Log: ifconfig(8): remove duplicate line from man page Reported by: Weitian LI Sponsored by: Klara Inc. Modified: head/sbin/ifconfig/ifconfig.8 Modified: head/sbin/ifconfig/ifconfig.8 == --- head/sbin/ifconfig/ifconfig.8 Fri Jun 26 14:18:08 2020 (r362651) +++ head/sbin/ifconfig/ifconfig.8 Fri Jun 26 15:14:03 2020 (r362652) @@ -2914,7 +2914,6 @@ The flag limits this to interfaces that are down, .Fl u limits this to interfaces that are up, -limits this to interfaces that are up, .Fl g limits this to members of the specified group of interfaces, and .Fl G ___ 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: r362589 - in head/lib/csu: aarch64 arm i386 riscv
On 6/25/20 5:25 PM, Peter Jeremy wrote: > On 2020-Jun-24 17:54:25 +, John Baldwin wrote: >> Author: jhb >> Date: Wed Jun 24 17:54:24 2020 >> New Revision: 362589 >> URL: https://svnweb.freebsd.org/changeset/base/362589 >> >> Log: >> Always compile the brand and ignore init ELF notes standalone. > > I'm not sure if this is self-inflicted but I'm now seeing linker failures > trying to build in /usr/src/lib/csu/aarch64: > ld -o Scrt1.o -r Scrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o Scrt1.s > ld: error: Scrt1.s:1: unknown directive: .text .text ^ > *** Error code 1 > > This is running r362580 and trying to buildworld r352310 on arm64. Ah, I will fix. I have to use ${.ALLSRC:M*.o} instead of ${.ALLSRC} as bmake adds implicit dependencies in ${.ALLSRC}. -- John Baldwin ___ 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: r362651 - head/usr.sbin/wpa/wpa_supplicant
Author: cy Date: Fri Jun 26 14:18:08 2020 New Revision: 362651 URL: https://svnweb.freebsd.org/changeset/base/362651 Log: Add MATCH option for CONFIG_MATCH_IFACE. If the interfaces on which wpa_supplicant is to run are not known or do not exist, wpa_supplicant can match an interface when it arrives. Each matched interface is separated with -M argument and the -i argument now allows for pattern matching. As an example, the following command would start wpa_supplicant for a specific wired interface called lan0, any interface starting with wlan and lastly any other interface. Each match has its own configuration file, and for the wired interface a specific driver has also been given. wpa_supplicant \ -M -c wpa_wired.conf -ilan0 -D wired \ -M -c wpa1.conf -iwlan* \ -M -c wpa2.conf PR: 247177 Reported by: greg@unrelenting.technology MFC after:1 month Related to: ports r540412 Modified: head/usr.sbin/wpa/wpa_supplicant/Makefile Modified: head/usr.sbin/wpa/wpa_supplicant/Makefile == --- head/usr.sbin/wpa/wpa_supplicant/Makefile Fri Jun 26 12:11:22 2020 (r362650) +++ head/usr.sbin/wpa/wpa_supplicant/Makefile Fri Jun 26 14:18:08 2020 (r362651) @@ -49,7 +49,8 @@ CFLAGS+=-DCONFIG_BACKEND_FILE \ -DCONFIG_TLS=openssl \ -DCONFIG_WPS2 \ -DCONFIG_WPS_UPNP \ - -DPKCS12_FUNCS + -DPKCS12_FUNCS \ + -DCONFIG_MATCH_IFACE #CFLAGS+= -g LIBADD=pcap util ___ 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: r362645 - head/sys/modules/ena
On 26/06/2020 12:32, Andriy Gapon wrote: > Author: avg > Date: Fri Jun 26 09:32:57 2020 > New Revision: 362645 > URL: https://svnweb.freebsd.org/changeset/base/362645 > > Log: > ena: fix module build after r362530 Or rather, _standalone_ module build. -- 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: r362647 - head/sys/dev/sound/pci/hda
Author: avg Date: Fri Jun 26 09:46:03 2020 New Revision: 362647 URL: https://svnweb.freebsd.org/changeset/base/362647 Log: sound/hda: fix interrupt handler endless loop after r362294 Not all interrupt sources that affect CIS bit were acknowledged. Specifically, bits in STATESTS (aka WAKESTS) were left set. The fix is to disable WAKEEN and clear STATESTS bits before the HDA interrupt is enabled. This way we should never get any STATESTS bits. I also added placeholders for all event bits that we currently do not enable, do not handle and do not clear. This might get useful when / if we enable any of them. Reported by: kib (Apollo Lake hardware) Tested by:kib (earlier, different change) MFC after:2 weeks X-MFC with: r362294 Modified: head/sys/dev/sound/pci/hda/hdac.c Modified: head/sys/dev/sound/pci/hda/hdac.c == --- head/sys/dev/sound/pci/hda/hdac.c Fri Jun 26 09:39:23 2020 (r362646) +++ head/sys/dev/sound/pci/hda/hdac.c Fri Jun 26 09:46:03 2020 (r362647) @@ -312,8 +312,27 @@ hdac_one_intr(struct hdac_softc *sc, uint32_t intsts) /* Was this a controller interrupt? */ if (intsts & HDAC_INTSTS_CIS) { - rirbsts = HDAC_READ_1(>mem, HDAC_RIRBSTS); + /* +* Placeholder: if we ever enable any bits in HDAC_WAKEEN, then +* we will need to check and clear HDAC_STATESTS. +* That event is used to report codec status changes such as +* a reset or a wake-up event. +*/ + /* +* Placeholder: if we ever enable HDAC_CORBCTL_CMEIE, then we +* will need to check and clear HDAC_CORBSTS_CMEI in +* HDAC_CORBSTS. +* That event is used to report CORB memory errors. +*/ + /* +* Placeholder: if we ever enable HDAC_RIRBCTL_RIRBOIC, then we +* will need to check and clear HDAC_RIRBSTS_RIRBOIS in +* HDAC_RIRBSTS. +* That event is used to report response FIFO overruns. +*/ + /* Get as many responses that we can */ + rirbsts = HDAC_READ_1(>mem, HDAC_RIRBSTS); while (rirbsts & HDAC_RIRBSTS_RINTFL) { HDAC_WRITE_1(>mem, HDAC_RIRBSTS, HDAC_RIRBSTS_RINTFL); @@ -1514,6 +1533,24 @@ hdac_attach2(void *arg) device_printf(sc->dev, "Starting RIRB Engine...\n"); ); hdac_rirb_start(sc); + + /* +* Clear HDAC_WAKEEN as at present we have no use for SDI wake +* (status change) interrupts. The documentation says that we +* should not make any assumptions about the state of this register +* and set it explicitly. +* NB: this needs to be done before the interrupt is enabled as +* the handler does not expect this interrupt source. +*/ + HDAC_WRITE_2(>mem, HDAC_WAKEEN, 0); + + /* +* Read and clear post-reset SDI wake status. +* Each set bit corresponds to a codec that came out of reset. +*/ + statests = HDAC_READ_2(>mem, HDAC_STATESTS); + HDAC_WRITE_2(>mem, HDAC_STATESTS, statests); + HDA_BOOTHVERBOSE( device_printf(sc->dev, "Enabling controller interrupt...\n"); @@ -1529,7 +1566,6 @@ hdac_attach2(void *arg) HDA_BOOTHVERBOSE( device_printf(sc->dev, "Scanning HDA codecs ...\n"); ); - statests = HDAC_READ_2(>mem, HDAC_STATESTS); hdac_unlock(sc); for (i = 0; i < HDAC_CODEC_MAX; i++) { if (HDAC_STATESTS_SDIWAKE(statests, i)) { @@ -1643,6 +1679,19 @@ hdac_resume(device_t dev) device_printf(dev, "Starting RIRB Engine...\n"); ); hdac_rirb_start(sc); + + /* +* Clear HDAC_WAKEEN as at present we have no use for SDI wake +* (status change) events. The documentation says that we should +* not make any assumptions about the state of this register and +* set it explicitly. +* Also, clear HDAC_STATESTS. +* NB: this needs to be done before the interrupt is enabled as +* the handler does not expect this interrupt source. +*/ + HDAC_WRITE_2(>mem, HDAC_WAKEEN, 0); + HDAC_WRITE_2(>mem, HDAC_STATESTS, HDAC_STATESTS_SDIWAKE_MASK); + HDA_BOOTHVERBOSE( device_printf(dev, "Enabling controller interrupt...\n"); ); ___ 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: r362646 - head/bin/sh/tests
On Fri, Jun 26, 2020 at 5:39 PM Li-Wen Hsu wrote: > > Author: lwhsu > Date: Fri Jun 26 09:39:23 2020 > New Revision: 362646 > URL: https://svnweb.freebsd.org/changeset/base/362646 > > Log: > Temporarily skip flakey bin.sh.execution.functional_test.bg12 in CI > > PR: 238870 The correct PR should be https://bugs.freebsd.org/247559 ___ 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: r362646 - head/bin/sh/tests
Author: lwhsu Date: Fri Jun 26 09:39:23 2020 New Revision: 362646 URL: https://svnweb.freebsd.org/changeset/base/362646 Log: Temporarily skip flakey bin.sh.execution.functional_test.bg12 in CI PR: 238870 Sponsored by: The FreeBSD Foundation Modified: head/bin/sh/tests/functional_test.sh Modified: head/bin/sh/tests/functional_test.sh == --- head/bin/sh/tests/functional_test.shFri Jun 26 09:32:57 2020 (r362645) +++ head/bin/sh/tests/functional_test.shFri Jun 26 09:39:23 2020 (r362646) @@ -27,6 +27,7 @@ # $FreeBSD$ SRCDIR=$(atf_get_srcdir) +CATEGORY=$(basename ${SRCDIR}) check() { @@ -60,7 +61,20 @@ add_testcase() esac atf_test_case ${tc_escaped} - eval "${tc_escaped}_body() { check ${tc}; }" + + if [ "$(atf_config_get ci false)" = "true" ]; then + case "${CATEGORY}/${tc}" in + execution/bg12.0) + eval "${tc_escaped}_body() { atf_skip 'https://bugs.freebsd.org/247559'; }" + ;; + *) + eval "${tc_escaped}_body() { check ${tc}; }" + ;; + esac + else + eval "${tc_escaped}_body() { check ${tc}; }" + fi + atf_add_test_case ${tc_escaped} } ___ 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: r362645 - head/sys/modules/ena
Author: avg Date: Fri Jun 26 09:32:57 2020 New Revision: 362645 URL: https://svnweb.freebsd.org/changeset/base/362645 Log: ena: fix module build after r362530 Somehow I missed the makefile when moving the change from phabricator to svn. MFC after:1 week X-MFC with: r362530 Modified: head/sys/modules/ena/Makefile Modified: head/sys/modules/ena/Makefile == --- head/sys/modules/ena/Makefile Fri Jun 26 08:20:38 2020 (r362644) +++ head/sys/modules/ena/Makefile Fri Jun 26 09:32:57 2020 (r362645) @@ -37,6 +37,7 @@ KMOD = if_ena SRCS = ena_com.c ena_eth_com.c SRCS += ena.c ena_sysctl.c ena_datapath.c ena_netmap.c SRCS += device_if.h bus_if.h pci_if.h +SRCS += opt_rss.h CFLAGS += -I${SRCTOP}/sys/contrib .include ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r362644 - head/usr.sbin/bhyve
Author: grehan Date: Fri Jun 26 08:20:38 2020 New Revision: 362644 URL: https://svnweb.freebsd.org/changeset/base/362644 Log: Prevent calling USB backends multiple times. The TRB processing loop could potentially call a back-end twice with the same status transaction. While this was generally benign, some code paths in the tablet backend weren't set up to handle this case, resulting in a NULL dereference. Fix by - returning a STALL error when an invalid request was seen in the backend - skipping a call to the backend if the number of packets in a status transaction was zero (this code fragment was taken from the Intel ACRN xhci backend) PR: 246964 Reported by: Ali Abdallah Discussed with: Leon Dang (author) Reviewed by: jhb (#bhyve), Leon Dang Approved by: jhb Obtained from: Intel ACRN (partially) MFC after: 2 weeks Differential Revision:https://reviews.freebsd.org/D25228 Modified: head/usr.sbin/bhyve/pci_xhci.c head/usr.sbin/bhyve/usb_mouse.c Modified: head/usr.sbin/bhyve/pci_xhci.c == --- head/usr.sbin/bhyve/pci_xhci.c Fri Jun 26 06:11:50 2020 (r362643) +++ head/usr.sbin/bhyve/pci_xhci.c Fri Jun 26 08:20:38 2020 (r362644) @@ -1843,6 +1843,9 @@ retry: DPRINTF(("pci_xhci[%d]: xfer->ndata %u", __LINE__, xfer->ndata)); + if (xfer->ndata <= 0) + goto errout; + if (epid == 1) { err = USB_ERR_NOT_STARTED; if (dev->dev_ue->ue_request != NULL) @@ -1857,6 +1860,7 @@ retry: err = USB_TO_XHCI_ERR(err); if ((err == XHCI_TRB_ERROR_SUCCESS) || + (err == XHCI_TRB_ERROR_STALL) || (err == XHCI_TRB_ERROR_SHORT_PKT)) { err = pci_xhci_xfer_complete(sc, xfer, slot, epid, _intr); if (err != XHCI_TRB_ERROR_SUCCESS) Modified: head/usr.sbin/bhyve/usb_mouse.c == --- head/usr.sbin/bhyve/usb_mouse.c Fri Jun 26 06:11:50 2020 (r362643) +++ head/usr.sbin/bhyve/usb_mouse.c Fri Jun 26 08:20:38 2020 (r362644) @@ -390,7 +390,7 @@ umouse_request(void *scarg, struct usb_data_xfer *xfer "sizeof(umouse_dev_desc) %lu", len, sizeof(umouse_dev_desc))); if ((value & 0xFF) != 0) { - err = USB_ERR_IOERROR; + err = USB_ERR_STALLED; goto done; } if (len > sizeof(umouse_dev_desc)) { @@ -405,7 +405,7 @@ umouse_request(void *scarg, struct usb_data_xfer *xfer case UDESC_CONFIG: DPRINTF(("umouse: (->UDESC_CONFIG)")); if ((value & 0xFF) != 0) { - err = USB_ERR_IOERROR; + err = USB_ERR_STALLED; goto done; } if (len > sizeof(umouse_confd)) { @@ -474,7 +474,7 @@ umouse_request(void *scarg, struct usb_data_xfer *xfer default: DPRINTF(("umouse: unknown(%d)->ERROR", value >> 8)); - err = USB_ERR_IOERROR; + err = USB_ERR_STALLED; goto done; } eshort = data->blen > 0; @@ -498,7 +498,7 @@ umouse_request(void *scarg, struct usb_data_xfer *xfer break; default: DPRINTF(("umouse: IO ERROR")); - err = USB_ERR_IOERROR; + err = USB_ERR_STALLED; goto done; } eshort = data->blen > 0; @@ -509,7 +509,7 @@ umouse_request(void *scarg, struct usb_data_xfer *xfer if (index != 0) { DPRINTF(("umouse get_interface, invalid index %d", index)); - err = USB_ERR_IOERROR; + err = USB_ERR_STALLED; goto done; } @@ -580,7 +580,7 @@ umouse_request(void *scarg, struct usb_data_xfer *xfer case UREQ(UR_SET_FEATURE, UT_WRITE_INTERFACE): case UREQ(UR_SET_FEATURE, UT_WRITE_ENDPOINT): DPRINTF(("umouse: (UR_CLEAR_FEATURE, UT_WRITE_INTERFACE)")); - err = USB_ERR_IOERROR; + err = USB_ERR_STALLED; goto done; case UREQ(UR_SET_INTERFACE, UT_WRITE_INTERFACE): @@ -619,7 +619,7 @@ umouse_request(void *scarg, struct usb_data_xfer *xfer memcpy(data->buf, >um_report, len); data->bdone += len; } else { - err = USB_ERR_IOERROR; +
svn commit: r362643 - head
Author: grehan Date: Fri Jun 26 06:11:50 2020 New Revision: 362643 URL: https://svnweb.freebsd.org/changeset/base/362643 Log: Update bhyve maintainers. Suggested by: jhb Approved by: jhb, tychon Modified: head/MAINTAINERS Modified: head/MAINTAINERS == --- head/MAINTAINERSFri Jun 26 04:46:45 2020(r362642) +++ head/MAINTAINERSFri Jun 26 06:11:50 2020(r362643) @@ -119,11 +119,11 @@ usr.sbin/bsdconfigdteske Pre-commit phabricator revie usr.sbin/dpv dteske Pre-commit review requested. Keep in sync with libdpv. usr.sbin/pkg pkg@Please coordinate behavior or flag changes with pkg team. usr.sbin/sysrc dteske Pre-commit phabricator review requested. Keep in sync with bsdconfig(8) sysrc.subr. -vmm(4) tychon, jhb Pre-commit review requested via #bhyve +vmm(4) jhb, grehan Pre-commit review requested via #bhyve phabricator group. -libvmmapi tychon, jhb Pre-commit review requested via #bhyve +libvmmapi jhb, grehan Pre-commit review requested via #bhyve phabricator group. -usr.sbin/bhyve*tychon, jhb Pre-commit review requested via #bhyve +usr.sbin/bhyve*jhb, grehan Pre-commit review requested via #bhyve phabricator group. autofs(5) trasz Pre-commit review recommended. iscsi(4) trasz Pre-commit review recommended. ___ 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"