From nobody Mon Jun 10 02:55:38 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VyGdR00xlz5Njn4; Mon, 10 Jun 2024 02:55:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VyGdQ5NkMz4XVW; Mon, 10 Jun 2024 02:55:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717988138; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kE/GgNl7pkaniEdQ0kcC+b2AXfRhbLSDGOx/m0yC5gg=; b=Q934o4QoU8S+FT9+A6ahravc5TjpXOHtt36HPYiMjFrXkdOcQqfjonyVYrUy1h5CScgod+ Vw1Y3vVcNbakcCdUYD43vbSYvxNwEaoRV2QWnpkXuvxDC7o7VK6YwjwVs7ggdRhojFDae/ VlpZxBQGeTwO1rT4wn5B0r5sUnh6IvhiTzc/wLAkcBsjO+6+7rPW274sjYhcR9pUpBNnsL JRQBQJwZgfVUU8BhiTFlmfeH4oJqeG8yRXAf+i01+VDg7I1EXVP6wWy/QWOiH/L2cZMbLf Mp0pDCm+CCnh/Ron3BQBXlOXERbfxtmTwRc0hQLiXUwO9BtKjNloModHXxulgw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1717988138; a=rsa-sha256; cv=none; b=X7ZWqkPAThHchz29Qz9t3795Znc5M3nwNkjCcsiadGewyXKQAM58eipjMmR/kcQwuPdzkn zSK/NeBsni/G8AwK07+ehIYOa50HGIH9+NSiYkais7YqUnhI2n8rAj3yyWhnlwpSE+Rrks UHM/Mzd4NX00JGk8e1C/K8dMVTTEhVZhUzLU6g2b17y08VDjBD6aP/MsmDywzTQbLYiDkH vMAS4s9VLxEqbzorRUpg0myIM5CxodLWt6BnZVeaPxivdSWES3a8ctqhWug7E2CxBvU3PG WUx1Jxv8u3YH5Cs2yEDXb8VGqwTfYV377+am0pte9ENL0r7YuVgsAj1t1hmMiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717988138; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kE/GgNl7pkaniEdQ0kcC+b2AXfRhbLSDGOx/m0yC5gg=; b=O/JyDXNZedPwsKnVE/p9/bKUBdCNNXpEZf0/YCJ9yLPQRpSJwA1V3FFrtneDxnDc2pJPd9 GKlaPAmf5rY0U1iDeZRQLAp0G+YeVNevW/ge4+rA4r/ET+aGcKmrE/D/G26uZmY1ZLOnz8 CAeOLaCo0tRt6g+TEB0umI7ZmaXkdClROsPaUnyNfUtb3wvxzBbzYBn+OpMrARcdUp+Md2 chN2/xSlC+lHzEl9BPASeHfVcjav+5zShhb6pE+teZw2YEB3uJJX5pcVWIdFD5VyZ3XEov NEFNHRcfrcALFHBBx13h/1opv1Aus6umLd6oUB8/Km+eeXnWUKJ1IQonYtc4nQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VyGdQ4sT7z16nw; Mon, 10 Jun 2024 02:55:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45A2tcGN068681; Mon, 10 Jun 2024 02:55:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45A2tckZ068678; Mon, 10 Jun 2024 02:55:38 GMT (envelope-from git) Date: Mon, 10 Jun 2024 02:55:38 GMT Message-Id: <202406100255.45A2tckZ068678@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 3562d64e794b - stable/14 - sqlite3: Vendor import of sqlite3 3.46.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3562d64e794b2614f15728c8b7e3a6dff0b644a7 Auto-Submitted: auto-generated The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=3562d64e794b2614f15728c8b7e3a6dff0b644a7 commit 3562d64e794b2614f15728c8b7e3a6dff0b644a7 Author: Cy Schubert AuthorDate: 2024-06-03 01:40:14 +0000 Commit: Cy Schubert CommitDate: 2024-06-10 02:55:18 +0000 sqlite3: Vendor import of sqlite3 3.46.0 Release notes at https://www.sqlite.org/releaselog/3_46_0.html. Obtained from: https://www.sqlite.org/2024/sqlite-autoconf-3460000.tar.gz Merge commit '259d29fd8c012d4392fa59ff803b691ead5b304d' into main (cherry picked from commit 0f996f45418e82dae151e5d1da478da38d70049f) --- contrib/sqlite3/Makefile.msc | 7 + contrib/sqlite3/configure | 20 +- contrib/sqlite3/configure.ac | 2 +- contrib/sqlite3/shell.c | 1943 +++++++-- contrib/sqlite3/sqlite3.c | 8935 +++++++++++++++++++++++--------------- contrib/sqlite3/sqlite3.h | 116 +- contrib/sqlite3/sqlite3rc.h | 2 +- contrib/sqlite3/tea/configure | 18 +- contrib/sqlite3/tea/configure.ac | 2 +- 9 files changed, 7287 insertions(+), 3758 deletions(-) diff --git a/contrib/sqlite3/Makefile.msc b/contrib/sqlite3/Makefile.msc index 45a07a9f317c..a4270fb2ae71 100644 --- a/contrib/sqlite3/Makefile.msc +++ b/contrib/sqlite3/Makefile.msc @@ -18,6 +18,13 @@ TOP = . +# Optionally set EXTRA_SRC to a list of C files to append to +# the generated sqlite3.c. +# +!IFNDEF EXTRA_SRC +EXTRA_SRC = +!ENDIF + # Set this non-0 to enable full warnings (-W4, etc) when compiling. # !IFNDEF USE_FULLWARN diff --git a/contrib/sqlite3/configure b/contrib/sqlite3/configure index 472e8acd0097..f2f70b5ae802 100755 --- a/contrib/sqlite3/configure +++ b/contrib/sqlite3/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for sqlite 3.45.1. +# Generated by GNU Autoconf 2.71 for sqlite 3.46.0. # # Report bugs to . # @@ -621,8 +621,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='sqlite' PACKAGE_TARNAME='sqlite' -PACKAGE_VERSION='3.45.1' -PACKAGE_STRING='sqlite 3.45.1' +PACKAGE_VERSION='3.46.0' +PACKAGE_STRING='sqlite 3.46.0' PACKAGE_BUGREPORT='http://www.sqlite.org' PACKAGE_URL='' @@ -1367,7 +1367,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures sqlite 3.45.1 to adapt to many kinds of systems. +\`configure' configures sqlite 3.46.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1438,7 +1438,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of sqlite 3.45.1:";; + short | recursive ) echo "Configuration of sqlite 3.46.0:";; esac cat <<\_ACEOF @@ -1563,7 +1563,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -sqlite configure 3.45.1 +sqlite configure 3.46.0 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -1833,7 +1833,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by sqlite $as_me 3.45.1, which was +It was created by sqlite $as_me 3.46.0, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3106,7 +3106,7 @@ fi # Define the identity of the package. PACKAGE='sqlite' - VERSION='3.45.1' + VERSION='3.46.0' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -15314,7 +15314,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by sqlite $as_me 3.45.1, which was +This file was extended by sqlite $as_me 3.46.0, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15373,7 +15373,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -sqlite config.status 3.45.1 +sqlite config.status 3.46.0 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/contrib/sqlite3/configure.ac b/contrib/sqlite3/configure.ac index 3ce8855cc762..c83f381d90b1 100644 --- a/contrib/sqlite3/configure.ac +++ b/contrib/sqlite3/configure.ac @@ -10,7 +10,7 @@ # AC_PREREQ(2.61) -AC_INIT(sqlite, 3.45.1, http://www.sqlite.org) +AC_INIT(sqlite, 3.46.0, http://www.sqlite.org) AC_CONFIG_SRCDIR([sqlite3.c]) AC_CONFIG_AUX_DIR([.]) diff --git a/contrib/sqlite3/shell.c b/contrib/sqlite3/shell.c index 1e02a12fbc2f..7d46e4acac57 100644 --- a/contrib/sqlite3/shell.c +++ b/contrib/sqlite3/shell.c @@ -580,6 +580,9 @@ zSkipValidUtf8(const char *z, int nAccept, long ccm); #ifndef HAVE_CONSOLE_IO_H # include "console_io.h" #endif +#if defined(_MSC_VER) +# pragma warning(disable : 4204) +#endif #ifndef SQLITE_CIO_NO_TRANSLATE # if (defined(_WIN32) || defined(WIN32)) && !SQLITE_OS_WINRT @@ -678,6 +681,10 @@ static short streamOfConsole(FILE *pf, /* out */ PerStreamTags *ppst){ # endif } +# ifndef ENABLE_VIRTUAL_TERMINAL_PROCESSING +# define ENABLE_VIRTUAL_TERMINAL_PROCESSING (0x4) +# endif + # if CIO_WIN_WC_XLATE /* Define console modes for use with the Windows Console API. */ # define SHELL_CONI_MODE \ @@ -1228,6 +1235,10 @@ SQLITE_INTERNAL_LINKAGE char* fGetsUtf8(char *cBuf, int ncMax, FILE *pfIn){ } #endif /* !defined(SQLITE_CIO_NO_TRANSLATE) */ +#if defined(_MSC_VER) +# pragma warning(default : 4204) +#endif + #undef SHELL_INVALID_FILE_PTR /************************* End ../ext/consio/console_io.c ********************/ @@ -1250,6 +1261,9 @@ SQLITE_INTERNAL_LINKAGE char* fGetsUtf8(char *cBuf, int ncMax, FILE *pfIn){ * setOutputStream(FILE *pf) * This is normally the stream that CLI normal output goes to. * For the stand-alone CLI, it is stdout with no .output redirect. + * + * The ?putz(z) forms are required for the Fiddle builds for string literal + * output, in aid of enforcing format string to argument correspondence. */ # define sputz(s,z) fPutsUtf8(z,s) # define sputf fPrintfUtf8 @@ -1261,12 +1275,18 @@ SQLITE_INTERNAL_LINKAGE char* fGetsUtf8(char *cBuf, int ncMax, FILE *pfIn){ #else /* For Fiddle, all console handling and emit redirection is omitted. */ -# define sputz(fp,z) fputs(z,fp) +/* These next 3 macros are for emitting formatted output. When complaints + * from the WASM build are issued for non-formatted output, (when a mere + * string literal is to be emitted, the ?putz(z) forms should be used. + * (This permits compile-time checking of format string / argument mismatch.) + */ +# define oputf(fmt, ...) printf(fmt,__VA_ARGS__) +# define eputf(fmt, ...) fprintf(stderr,fmt,__VA_ARGS__) # define sputf(fp,fmt, ...) fprintf(fp,fmt,__VA_ARGS__) +/* These next 3 macros are for emitting simple string literals. */ # define oputz(z) fputs(z,stdout) -# define oputf(fmt, ...) printf(fmt,__VA_ARGS__) # define eputz(z) fputs(z,stderr) -# define eputf(fmt, ...) fprintf(stderr,fmt,__VA_ARGS__) +# define sputz(fp,z) fputs(z,fp) # define oputb(buf,na) fwrite(buf,1,na,stdout) #endif @@ -5711,16 +5731,20 @@ SQLITE_EXTENSION_INIT1 ** index is ix. The 0th member is given by smBase. The sequence members ** progress per ix increment by smStep. */ -static sqlite3_int64 genSeqMember(sqlite3_int64 smBase, - sqlite3_int64 smStep, - sqlite3_uint64 ix){ - if( ix>=(sqlite3_uint64)LLONG_MAX ){ +static sqlite3_int64 genSeqMember( + sqlite3_int64 smBase, + sqlite3_int64 smStep, + sqlite3_uint64 ix +){ + static const sqlite3_uint64 mxI64 = + ((sqlite3_uint64)0x7fffffff)<<32 | 0xffffffff; + if( ix>=mxI64 ){ /* Get ix into signed i64 range. */ - ix -= (sqlite3_uint64)LLONG_MAX; + ix -= mxI64; /* With 2's complement ALU, this next can be 1 step, but is split into * 2 for UBSAN's satisfaction (and hypothetical 1's complement ALUs.) */ - smBase += (LLONG_MAX/2) * smStep; - smBase += (LLONG_MAX - LLONG_MAX/2) * smStep; + smBase += (mxI64/2) * smStep; + smBase += (mxI64 - mxI64/2) * smStep; } /* Under UBSAN (or on 1's complement machines), must do this last term * in steps to avoid the dreaded (and harmless) signed multiply overlow. */ @@ -5980,13 +6004,13 @@ static int seriesEof(sqlite3_vtab_cursor *cur){ ** parameter. (idxStr is not used in this implementation.) idxNum ** is a bitmask showing which constraints are available: ** -** 1: start=VALUE -** 2: stop=VALUE -** 4: step=VALUE -** -** Also, if bit 8 is set, that means that the series should be output -** in descending order rather than in ascending order. If bit 16 is -** set, then output must appear in ascending order. +** 0x01: start=VALUE +** 0x02: stop=VALUE +** 0x04: step=VALUE +** 0x08: descending order +** 0x10: ascending order +** 0x20: LIMIT VALUE +** 0x40: OFFSET VALUE ** ** This routine should initialize the cursor and position it so that it ** is pointing at the first row, or pointing off the end of the table @@ -6000,26 +6024,44 @@ static int seriesFilter( series_cursor *pCur = (series_cursor *)pVtabCursor; int i = 0; (void)idxStrUnused; - if( idxNum & 1 ){ + if( idxNum & 0x01 ){ pCur->ss.iBase = sqlite3_value_int64(argv[i++]); }else{ pCur->ss.iBase = 0; } - if( idxNum & 2 ){ + if( idxNum & 0x02 ){ pCur->ss.iTerm = sqlite3_value_int64(argv[i++]); }else{ pCur->ss.iTerm = 0xffffffff; } - if( idxNum & 4 ){ + if( idxNum & 0x04 ){ pCur->ss.iStep = sqlite3_value_int64(argv[i++]); if( pCur->ss.iStep==0 ){ pCur->ss.iStep = 1; }else if( pCur->ss.iStep<0 ){ - if( (idxNum & 16)==0 ) idxNum |= 8; + if( (idxNum & 0x10)==0 ) idxNum |= 0x08; } }else{ pCur->ss.iStep = 1; } + if( idxNum & 0x20 ){ + sqlite3_int64 iLimit = sqlite3_value_int64(argv[i++]); + sqlite3_int64 iTerm; + if( idxNum & 0x40 ){ + sqlite3_int64 iOffset = sqlite3_value_int64(argv[i++]); + if( iOffset>0 ){ + pCur->ss.iBase += pCur->ss.iStep*iOffset; + } + } + if( iLimit>=0 ){ + iTerm = pCur->ss.iBase + (iLimit - 1)*pCur->ss.iStep; + if( pCur->ss.iStep<0 ){ + if( iTerm>pCur->ss.iTerm ) pCur->ss.iTerm = iTerm; + }else{ + if( iTermss.iTerm ) pCur->ss.iTerm = iTerm; + } + } + } for(i=0; iss.isReversing = pCur->ss.iStep > 0; }else{ pCur->ss.isReversing = pCur->ss.iStep < 0; @@ -6050,10 +6092,13 @@ static int seriesFilter( ** ** The query plan is represented by bits in idxNum: ** -** (1) start = $value -- constraint exists -** (2) stop = $value -- constraint exists -** (4) step = $value -- constraint exists -** (8) output in descending order +** 0x01 start = $value -- constraint exists +** 0x02 stop = $value -- constraint exists +** 0x04 step = $value -- constraint exists +** 0x08 output is in descending order +** 0x10 output is in ascending order +** 0x20 LIMIT $value -- constraint exists +** 0x40 OFFSET $value -- constraint exists */ static int seriesBestIndex( sqlite3_vtab *pVTab, @@ -6061,10 +6106,12 @@ static int seriesBestIndex( ){ int i, j; /* Loop over constraints */ int idxNum = 0; /* The query plan bitmask */ +#ifndef ZERO_ARGUMENT_GENERATE_SERIES int bStartSeen = 0; /* EQ constraint seen on the START column */ +#endif int unusableMask = 0; /* Mask of unusable constraints */ int nArg = 0; /* Number of arguments that seriesFilter() expects */ - int aIdx[3]; /* Constraints on start, stop, and step */ + int aIdx[5]; /* Constraints on start, stop, step, LIMIT, OFFSET */ const struct sqlite3_index_constraint *pConstraint; /* This implementation assumes that the start, stop, and step columns @@ -6072,28 +6119,54 @@ static int seriesBestIndex( assert( SERIES_COLUMN_STOP == SERIES_COLUMN_START+1 ); assert( SERIES_COLUMN_STEP == SERIES_COLUMN_START+2 ); - aIdx[0] = aIdx[1] = aIdx[2] = -1; + aIdx[0] = aIdx[1] = aIdx[2] = aIdx[3] = aIdx[4] = -1; pConstraint = pIdxInfo->aConstraint; for(i=0; inConstraint; i++, pConstraint++){ int iCol; /* 0 for start, 1 for stop, 2 for step */ int iMask; /* bitmask for those column */ + int op = pConstraint->op; + if( op>=SQLITE_INDEX_CONSTRAINT_LIMIT + && op<=SQLITE_INDEX_CONSTRAINT_OFFSET + ){ + if( pConstraint->usable==0 ){ + /* do nothing */ + }else if( op==SQLITE_INDEX_CONSTRAINT_LIMIT ){ + aIdx[3] = i; + idxNum |= 0x20; + }else{ + assert( op==SQLITE_INDEX_CONSTRAINT_OFFSET ); + aIdx[4] = i; + idxNum |= 0x40; + } + continue; + } if( pConstraint->iColumniColumn - SERIES_COLUMN_START; assert( iCol>=0 && iCol<=2 ); iMask = 1 << iCol; - if( iCol==0 ) bStartSeen = 1; +#ifndef ZERO_ARGUMENT_GENERATE_SERIES + if( iCol==0 && op==SQLITE_INDEX_CONSTRAINT_EQ ){ + bStartSeen = 1; + } +#endif if( pConstraint->usable==0 ){ unusableMask |= iMask; continue; - }else if( pConstraint->op==SQLITE_INDEX_CONSTRAINT_EQ ){ + }else if( op==SQLITE_INDEX_CONSTRAINT_EQ ){ idxNum |= iMask; aIdx[iCol] = i; } } - for(i=0; i<3; i++){ + if( aIdx[3]==0 ){ + /* Ignore OFFSET if LIMIT is omitted */ + idxNum &= ~0x60; + aIdx[4] = 0; + } + for(i=0; i<5; i++){ if( (j = aIdx[i])>=0 ){ pIdxInfo->aConstraintUsage[j].argvIndex = ++nArg; - pIdxInfo->aConstraintUsage[j].omit = !SQLITE_SERIES_CONSTRAINT_VERIFY; + pIdxInfo->aConstraintUsage[j].omit = + !SQLITE_SERIES_CONSTRAINT_VERIFY || i>=3; } } /* The current generate_column() implementation requires at least one @@ -6114,19 +6187,22 @@ static int seriesBestIndex( ** this plan is unusable */ return SQLITE_CONSTRAINT; } - if( (idxNum & 3)==3 ){ + if( (idxNum & 0x03)==0x03 ){ /* Both start= and stop= boundaries are available. This is the ** the preferred case */ pIdxInfo->estimatedCost = (double)(2 - ((idxNum&4)!=0)); pIdxInfo->estimatedRows = 1000; if( pIdxInfo->nOrderBy>=1 && pIdxInfo->aOrderBy[0].iColumn==0 ){ if( pIdxInfo->aOrderBy[0].desc ){ - idxNum |= 8; + idxNum |= 0x08; }else{ - idxNum |= 16; + idxNum |= 0x10; } pIdxInfo->orderByConsumed = 1; } + }else if( (idxNum & 0x21)==0x21 ){ + /* We have start= and LIMIT */ + pIdxInfo->estimatedRows = 2500; }else{ /* If either boundary is missing, we have to generate a huge span ** of numbers. Make this case very expensive so that the query @@ -7453,7 +7529,9 @@ static int writeFile( #if !defined(_WIN32) && !defined(WIN32) if( S_ISLNK(mode) ){ const char *zTo = (const char*)sqlite3_value_text(pData); - if( zTo==0 || symlink(zTo, zFile)<0 ) return 1; + if( zTo==0 ) return 1; + unlink(zFile); + if( symlink(zTo, zFile)<0 ) return 1; }else #endif { @@ -7539,13 +7617,19 @@ static int writeFile( return 1; } #else - /* Legacy unix */ - struct timeval times[2]; - times[0].tv_usec = times[1].tv_usec = 0; - times[0].tv_sec = time(0); - times[1].tv_sec = mtime; - if( utimes(zFile, times) ){ - return 1; + /* Legacy unix. + ** + ** Do not use utimes() on a symbolic link - it sees through the link and + ** modifies the timestamps on the target. Or fails if the target does + ** not exist. */ + if( 0==S_ISLNK(mode) ){ + struct timeval times[2]; + times[0].tv_usec = times[1].tv_usec = 0; + times[0].tv_sec = time(0); + times[1].tv_sec = mtime; + if( utimes(zFile, times) ){ + return 1; + } } #endif } @@ -11617,7 +11701,7 @@ static void sqlarUncompressFunc( sqlite3_value **argv ){ uLong nData; - uLongf sz; + sqlite3_int64 sz; assert( argc==2 ); sz = sqlite3_value_int(argv[1]); @@ -11625,14 +11709,15 @@ static void sqlarUncompressFunc( if( sz<=0 || sz==(nData = sqlite3_value_bytes(argv[0])) ){ sqlite3_result_value(context, argv[0]); }else{ + uLongf szf = sz; const Bytef *pData= sqlite3_value_blob(argv[0]); Bytef *pOut = sqlite3_malloc(sz); if( pOut==0 ){ sqlite3_result_error_nomem(context); - }else if( Z_OK!=uncompress(pOut, &sz, pData, nData) ){ + }else if( Z_OK!=uncompress(pOut, &szf, pData, nData) ){ sqlite3_result_error(context, "error in uncompress()", -1); }else{ - sqlite3_result_blob(context, pOut, sz, SQLITE_TRANSIENT); + sqlite3_result_blob(context, pOut, szf, SQLITE_TRANSIENT); } sqlite3_free(pOut); } @@ -13784,7 +13869,7 @@ sqlite3expert *sqlite3_expert_new(sqlite3 *db, char **pzErrmsg){ sqlite3_stmt *pSql = 0; rc = idxPrintfPrepareStmt(pNew->db, &pSql, pzErrmsg, "SELECT sql FROM sqlite_schema WHERE name NOT LIKE 'sqlite_%%'" - " AND sql NOT LIKE 'CREATE VIRTUAL %%'" + " AND sql NOT LIKE 'CREATE VIRTUAL %%' ORDER BY rowid" ); while( rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(pSql) ){ const char *zSql = (const char*)sqlite3_column_text(pSql, 0); @@ -13888,103 +13973,1221 @@ int sqlite3_expert_sql( return rc; } -int sqlite3_expert_analyze(sqlite3expert *p, char **pzErr){ - int rc; - IdxHashEntry *pEntry; +int sqlite3_expert_analyze(sqlite3expert *p, char **pzErr){ + int rc; + IdxHashEntry *pEntry; + + /* Do trigger processing to collect any extra IdxScan structures */ + rc = idxProcessTriggers(p, pzErr); + + /* Create candidate indexes within the in-memory database file */ + if( rc==SQLITE_OK ){ + rc = idxCreateCandidates(p); + }else if ( rc==SQLITE_BUSY_TIMEOUT ){ + if( pzErr ) + *pzErr = sqlite3_mprintf("Cannot find a unique index name to propose."); + return rc; + } + + /* Generate the stat1 data */ + if( rc==SQLITE_OK ){ + rc = idxPopulateStat1(p, pzErr); + } + + /* Formulate the EXPERT_REPORT_CANDIDATES text */ + for(pEntry=p->hIdx.pFirst; pEntry; pEntry=pEntry->pNext){ + p->zCandidates = idxAppendText(&rc, p->zCandidates, + "%s;%s%s\n", pEntry->zVal, + pEntry->zVal2 ? " -- stat1: " : "", pEntry->zVal2 + ); + } + + /* Figure out which of the candidate indexes are preferred by the query + ** planner and report the results to the user. */ + if( rc==SQLITE_OK ){ + rc = idxFindIndexes(p, pzErr); + } + + if( rc==SQLITE_OK ){ + p->bRun = 1; + } + return rc; +} + +/* +** Return the total number of statements that have been added to this +** sqlite3expert using sqlite3_expert_sql(). +*/ +int sqlite3_expert_count(sqlite3expert *p){ + int nRet = 0; + if( p->pStatement ) nRet = p->pStatement->iId+1; + return nRet; +} + +/* +** Return a component of the report. +*/ +const char *sqlite3_expert_report(sqlite3expert *p, int iStmt, int eReport){ + const char *zRet = 0; + IdxStatement *pStmt; + + if( p->bRun==0 ) return 0; + for(pStmt=p->pStatement; pStmt && pStmt->iId!=iStmt; pStmt=pStmt->pNext); + switch( eReport ){ + case EXPERT_REPORT_SQL: + if( pStmt ) zRet = pStmt->zSql; + break; + case EXPERT_REPORT_INDEXES: + if( pStmt ) zRet = pStmt->zIdx; + break; + case EXPERT_REPORT_PLAN: + if( pStmt ) zRet = pStmt->zEQP; + break; + case EXPERT_REPORT_CANDIDATES: + zRet = p->zCandidates; + break; + } + return zRet; +} + +/* +** Free an sqlite3expert object. +*/ +void sqlite3_expert_destroy(sqlite3expert *p){ + if( p ){ + sqlite3_close(p->dbm); + sqlite3_close(p->dbv); + idxScanFree(p->pScan, 0); + idxStatementFree(p->pStatement, 0); + idxTableFree(p->pTable); + idxWriteFree(p->pWrite); + idxHashClear(&p->hIdx); + sqlite3_free(p->zCandidates); + sqlite3_free(p); + } +} + +#endif /* ifndef SQLITE_OMIT_VIRTUALTABLE */ + +/************************* End ../ext/expert/sqlite3expert.c ********************/ + +/************************* Begin ../ext/intck/sqlite3intck.h ******************/ +/* +** 2024-02-08 +** +** The author disclaims copyright to this source code. In place of +** a legal notice, here is a blessing: +** +** May you do good and not evil. +** May you find forgiveness for yourself and forgive others. +** May you share freely, never taking more than you give. +** +************************************************************************* +*/ + +/* +** Incremental Integrity-Check Extension +** ------------------------------------- +** +** This module contains code to check whether or not an SQLite database +** is well-formed or corrupt. This is the same task as performed by SQLite's +** built-in "PRAGMA integrity_check" command. This module differs from +** "PRAGMA integrity_check" in that: +** +** + It is less thorough - this module does not detect certain types +** of corruption that are detected by the PRAGMA command. However, +** it does detect all kinds of corruption that are likely to cause +** errors in SQLite applications. +** +** + It is slower. Sometimes up to three times slower. +** +** + It allows integrity-check operations to be split into multiple +** transactions, so that the database does not need to be read-locked +** for the duration of the integrity-check. +** +** One way to use the API to run integrity-check on the "main" database +** of handle db is: +** +** int rc = SQLITE_OK; +** sqlite3_intck *p = 0; +** +** sqlite3_intck_open(db, "main", &p); +** while( SQLITE_OK==sqlite3_intck_step(p) ){ +** const char *zMsg = sqlite3_intck_message(p); +** if( zMsg ) printf("corruption: %s\n", zMsg); +** } +** rc = sqlite3_intck_error(p, &zErr); +** if( rc!=SQLITE_OK ){ +** printf("error occured (rc=%d), (errmsg=%s)\n", rc, zErr); +** } +** sqlite3_intck_close(p); +** +** Usually, the sqlite3_intck object opens a read transaction within the +** first call to sqlite3_intck_step() and holds it open until the +** integrity-check is complete. However, if sqlite3_intck_unlock() is +** called, the read transaction is ended and a new read transaction opened +** by the subsequent call to sqlite3_intck_step(). +*/ + +#ifndef _SQLITE_INTCK_H +#define _SQLITE_INTCK_H + +/* #include "sqlite3.h" */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** An ongoing incremental integrity-check operation is represented by an +** opaque pointer of the following type. +*/ +typedef struct sqlite3_intck sqlite3_intck; + +/* +** Open a new incremental integrity-check object. If successful, populate +** output variable (*ppOut) with the new object handle and return SQLITE_OK. +** Or, if an error occurs, set (*ppOut) to NULL and return an SQLite error +** code (e.g. SQLITE_NOMEM). +** +** The integrity-check will be conducted on database zDb (which must be "main", +** "temp", or the name of an attached database) of database handle db. Once +** this function has been called successfully, the caller should not use +** database handle db until the integrity-check object has been destroyed +** using sqlite3_intck_close(). +*/ +int sqlite3_intck_open( + sqlite3 *db, /* Database handle */ + const char *zDb, /* Database name ("main", "temp" etc.) */ + sqlite3_intck **ppOut /* OUT: New sqlite3_intck handle */ +); + +/* +** Close and release all resources associated with a handle opened by an +** earlier call to sqlite3_intck_open(). The results of using an +** integrity-check handle after it has been passed to this function are +** undefined. +*/ +void sqlite3_intck_close(sqlite3_intck *pCk); + +/* +** Do the next step of the integrity-check operation specified by the handle +** passed as the only argument. This function returns SQLITE_DONE if the +** integrity-check operation is finished, or an SQLite error code if +** an error occurs, or SQLITE_OK if no error occurs but the integrity-check +** is not finished. It is not considered an error if database corruption +** is encountered. +** +** Following a successful call to sqlite3_intck_step() (one that returns +** SQLITE_OK), sqlite3_intck_message() returns a non-NULL value if +** corruption was detected in the db. +** +** If an error occurs and a value other than SQLITE_OK or SQLITE_DONE is +** returned, then the integrity-check handle is placed in an error state. +** In this state all subsequent calls to sqlite3_intck_step() or +** sqlite3_intck_unlock() will immediately return the same error. The +** sqlite3_intck_error() method may be used to obtain an English language +** error message in this case. +*/ +int sqlite3_intck_step(sqlite3_intck *pCk); + +/* +** If the previous call to sqlite3_intck_step() encountered corruption +** within the database, then this function returns a pointer to a buffer +** containing a nul-terminated string describing the corruption in +** English. If the previous call to sqlite3_intck_step() did not encounter +** corruption, or if there was no previous call, this function returns +** NULL. +*/ +const char *sqlite3_intck_message(sqlite3_intck *pCk); + +/* +** Close any read-transaction opened by an earlier call to +** sqlite3_intck_step(). Any subsequent call to sqlite3_intck_step() will +** open a new transaction. Return SQLITE_OK if successful, or an SQLite error +** code otherwise. +** +** If an error occurs, then the integrity-check handle is placed in an error +** state. In this state all subsequent calls to sqlite3_intck_step() or +** sqlite3_intck_unlock() will immediately return the same error. The +** sqlite3_intck_error() method may be used to obtain an English language +** error message in this case. +*/ +int sqlite3_intck_unlock(sqlite3_intck *pCk); + +/* +** If an error has occurred in an earlier call to sqlite3_intck_step() +** or sqlite3_intck_unlock(), then this method returns the associated +** SQLite error code. Additionally, if pzErr is not NULL, then (*pzErr) +** may be set to point to a nul-terminated string containing an English +** language error message. Or, if no error message is available, to +** NULL. +** +** If no error has occurred within sqlite3_intck_step() or +** sqlite_intck_unlock() calls on the handle passed as the first argument, +** then SQLITE_OK is returned and (*pzErr) set to NULL. +*/ +int sqlite3_intck_error(sqlite3_intck *pCk, const char **pzErr); + +/* +** This API is used for testing only. It returns the full-text of an SQL +** statement used to test object zObj, which may be a table or index. +** The returned buffer is valid until the next call to either this function +** or sqlite3_intck_close() on the same sqlite3_intck handle. +*/ +const char *sqlite3_intck_test_sql(sqlite3_intck *pCk, const char *zObj); + + +#ifdef __cplusplus +} /* end of the 'extern "C"' block */ +#endif + +#endif /* ifndef _SQLITE_INTCK_H */ + +/************************* End ../ext/intck/sqlite3intck.h ********************/ +/************************* Begin ../ext/intck/sqlite3intck.c ******************/ +/* +** 2024-02-08 +** +** The author disclaims copyright to this source code. In place of +** a legal notice, here is a blessing: +** +** May you do good and not evil. +** May you find forgiveness for yourself and forgive others. +** May you share freely, never taking more than you give. +** +************************************************************************* +*/ + +/* #include "sqlite3intck.h" */ +#include +#include + +#include +#include + +/* +** nKeyVal: +** The number of values that make up the 'key' for the current pCheck +** statement. +** +** rc: +** Error code returned by most recent sqlite3_intck_step() or +** sqlite3_intck_unlock() call. This is set to SQLITE_DONE when +** the integrity-check operation is finished. +** +** zErr: +** If the object has entered the error state, this is the error message. +** Is freed using sqlite3_free() when the object is deleted. +** +** zTestSql: +** The value returned by the most recent call to sqlite3_intck_testsql(). +** Each call to testsql() frees the previous zTestSql value (using +** sqlite3_free()) and replaces it with the new value it will return. +*/ +struct sqlite3_intck { + sqlite3 *db; + const char *zDb; /* Copy of zDb parameter to _open() */ + char *zObj; /* Current object. Or NULL. */ + + sqlite3_stmt *pCheck; /* Current check statement */ + char *zKey; + int nKeyVal; + + char *zMessage; + int bCorruptSchema; + + int rc; /* Error code */ + char *zErr; /* Error message */ + char *zTestSql; /* Returned by sqlite3_intck_test_sql() */ +}; + + +/* +** Some error has occurred while using database p->db. Save the error message +** and error code currently held by the database handle in p->rc and p->zErr. +*/ +static void intckSaveErrmsg(sqlite3_intck *p){ + p->rc = sqlite3_errcode(p->db); + sqlite3_free(p->zErr); + p->zErr = sqlite3_mprintf("%s", sqlite3_errmsg(p->db)); +} + +/* +** If the handle passed as the first argument is already in the error state, +** then this function is a no-op (returns NULL immediately). Otherwise, if an +** error occurs within this function, it leaves an error in said handle. +** +** Otherwise, this function attempts to prepare SQL statement zSql and +** return the resulting statement handle to the user. +*/ +static sqlite3_stmt *intckPrepare(sqlite3_intck *p, const char *zSql){ + sqlite3_stmt *pRet = 0; + if( p->rc==SQLITE_OK ){ + p->rc = sqlite3_prepare_v2(p->db, zSql, -1, &pRet, 0); + if( p->rc!=SQLITE_OK ){ + intckSaveErrmsg(p); + assert( pRet==0 ); + } + } + return pRet; +} + +/* +** If the handle passed as the first argument is already in the error state, +** then this function is a no-op (returns NULL immediately). Otherwise, if an +** error occurs within this function, it leaves an error in said handle. +** +** Otherwise, this function treats argument zFmt as a printf() style format +** string. It formats it according to the trailing arguments and then +** attempts to prepare the results and return the resulting prepared +** statement. +*/ +static sqlite3_stmt *intckPrepareFmt(sqlite3_intck *p, const char *zFmt, ...){ + sqlite3_stmt *pRet = 0; + va_list ap; + char *zSql = 0; + va_start(ap, zFmt); + zSql = sqlite3_vmprintf(zFmt, ap); + if( p->rc==SQLITE_OK && zSql==0 ){ + p->rc = SQLITE_NOMEM; + } + pRet = intckPrepare(p, zSql); + sqlite3_free(zSql); + va_end(ap); + return pRet; +} + +/* +** Finalize SQL statement pStmt. If an error occurs and the handle passed +** as the first argument does not already contain an error, store the +** error in the handle. +*/ +static void intckFinalize(sqlite3_intck *p, sqlite3_stmt *pStmt){ + int rc = sqlite3_finalize(pStmt); + if( p->rc==SQLITE_OK && rc!=SQLITE_OK ){ + intckSaveErrmsg(p); + } +} + +/* +** If there is already an error in handle p, return it. Otherwise, call +** sqlite3_step() on the statement handle and return that value. +*/ +static int intckStep(sqlite3_intck *p, sqlite3_stmt *pStmt){ + if( p->rc ) return p->rc; + return sqlite3_step(pStmt); +} + +/* +** Execute SQL statement zSql. There is no way to obtain any results +** returned by the statement. This function uses the sqlite3_intck error +** code convention. +*/ +static void intckExec(sqlite3_intck *p, const char *zSql){ + sqlite3_stmt *pStmt = 0; + pStmt = intckPrepare(p, zSql); + intckStep(p, pStmt); + intckFinalize(p, pStmt); +} + +/* +** A wrapper around sqlite3_mprintf() that uses the sqlite3_intck error +** code convention. +*/ +static char *intckMprintf(sqlite3_intck *p, const char *zFmt, ...){ + va_list ap; + char *zRet = 0; + va_start(ap, zFmt); + zRet = sqlite3_vmprintf(zFmt, ap); + if( p->rc==SQLITE_OK ){ + if( zRet==0 ){ + p->rc = SQLITE_NOMEM; + } + }else{ + sqlite3_free(zRet); + zRet = 0; + } + return zRet; +} + +/* +** This is used by sqlite3_intck_unlock() to save the vector key value +** required to restart the current pCheck query as a nul-terminated string +** in p->zKey. +*/ +static void intckSaveKey(sqlite3_intck *p){ + int ii; + char *zSql = 0; + sqlite3_stmt *pStmt = 0; + sqlite3_stmt *pXinfo = 0; + const char *zDir = 0; + + assert( p->pCheck ); + assert( p->zKey==0 ); + + pXinfo = intckPrepareFmt(p, + "SELECT group_concat(desc, '') FROM %Q.sqlite_schema s, " + "pragma_index_xinfo(%Q, %Q) " + "WHERE s.type='index' AND s.name=%Q", + p->zDb, p->zObj, p->zDb, p->zObj + ); + if( p->rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(pXinfo) ){ + zDir = (const char*)sqlite3_column_text(pXinfo, 0); + } + + if( zDir==0 ){ *** 15215 LINES SKIPPED *** From nobody Mon Jun 10 02:56:14 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VyGf733x6z5NkJD; Mon, 10 Jun 2024 02:56:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VyGf72Wk0z4Xvj; Mon, 10 Jun 2024 02:56:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717988175; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qv04UIoxo8bEFmCzuphP0aj88EFOyrKztqc9uwtovnw=; b=e4OLbAR+pWPoCaN8Vki+UFON1zmoF+y3EvuFvTpns3o728j7gX5qCttIQkl2loQy8tzK8v SE1rDzXxzLD0UsPu/S4hMWNZ4Y33ABPzu8QiFfTAKyYdwTKvAtfsvnHedXrhB1BC2fsfBt QtIIA6ECR24RWFCfVrDNE58R+4VVsdPjbboN6N6WaxGMS5YQje6d3rEAs85kpXecJ/zL4d J8q0r9aKM5lf63/g7P/Eh4RLq0XGfKoVxnx7oQWxyMqAkY9P2KdoGCU9qvUft3w0gAWtVf uURbP3QmV4TF3PxSNqREKHNNGpIpjLWdj7uPX5Butr+kZnuSih44iZ9YQP0rsQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1717988175; a=rsa-sha256; cv=none; b=Tsf1W+vQ5SkXZaQBQmFikQdboSAthA4BkE5E8R8AcbOynAJh+tw2qLMQdTs4iQwgDicp7H 2lyWroGvsTA0cheBGhWwJp6f15CZSaGKSUGOi0rCF2SReu7DJUvTNQKEQtRm/4Vj2BRjoq Pl7Nj5bVQ8Z9l99AodiwAbs3J+R6sNLTFV/05l5/qe8Y6Gf4fCQcgliSKDRj/bqpzx3zb9 7KzXE+y9We+gq9E3wkuVArBCuyWi1GGQtVroyZ0VhwN0A0BtJ+MAOMUzdqrLG9DlRz4+Wn T5oK675uOxxYwHvHNO4iiXHQlI5dnK933gaDfbY7lKcNkqL6ePrVAJf/mhHWZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717988175; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qv04UIoxo8bEFmCzuphP0aj88EFOyrKztqc9uwtovnw=; b=oa08bR1RqhVZD1r1BZbrLkpllxrPwi3KNNFUKh5ZgrLC4YXPWQAnXbiKGDr1AMVQZuT67+ 3B9gUNyiPZdjqZgPDKvkZUvBRqUJxwhhj7fJYN6OAXv88mFveQ0LGPEcVfrjqzd5KxH4KA Gv9EwPmp+D7i03B2ufXQPr/sb89pTZX5CVDqZQtiNzTM3/qmJsn832I7qOm1utT4ODG5cS s6tocnee6RsSoSqD4nswvnUUxFFU805wmvs1nzm9uBFgj2ZYfAR09mNHV7bFy1J6wED1K3 H+IcyC8wGCGhyXhZJpkkdD7jKi7jXSSYRsX3ENjlIg5lb4fCHAEdTPFRe8GURA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VyGf7271Rz17bf; Mon, 10 Jun 2024 02:56:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45A2uFAO068898; Mon, 10 Jun 2024 02:56:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45A2uENQ068895; Mon, 10 Jun 2024 02:56:14 GMT (envelope-from git) Date: Mon, 10 Jun 2024 02:56:14 GMT Message-Id: <202406100256.45A2uENQ068895@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 960554869b20 - stable/13 - sqlite3: Vendor import of sqlite3 3.46.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 960554869b2059f852155c9e15c16def9fab2f1c Auto-Submitted: auto-generated The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=960554869b2059f852155c9e15c16def9fab2f1c commit 960554869b2059f852155c9e15c16def9fab2f1c Author: Cy Schubert AuthorDate: 2024-06-03 01:40:14 +0000 Commit: Cy Schubert CommitDate: 2024-06-10 02:56:07 +0000 sqlite3: Vendor import of sqlite3 3.46.0 Release notes at https://www.sqlite.org/releaselog/3_46_0.html. Obtained from: https://www.sqlite.org/2024/sqlite-autoconf-3460000.tar.gz Merge commit '259d29fd8c012d4392fa59ff803b691ead5b304d' into main (cherry picked from commit 0f996f45418e82dae151e5d1da478da38d70049f) --- contrib/sqlite3/Makefile.msc | 7 + contrib/sqlite3/configure | 20 +- contrib/sqlite3/configure.ac | 2 +- contrib/sqlite3/shell.c | 1943 +++++++-- contrib/sqlite3/sqlite3.c | 8935 +++++++++++++++++++++++--------------- contrib/sqlite3/sqlite3.h | 116 +- contrib/sqlite3/sqlite3rc.h | 2 +- contrib/sqlite3/tea/configure | 18 +- contrib/sqlite3/tea/configure.ac | 2 +- 9 files changed, 7287 insertions(+), 3758 deletions(-) diff --git a/contrib/sqlite3/Makefile.msc b/contrib/sqlite3/Makefile.msc index 45a07a9f317c..a4270fb2ae71 100644 --- a/contrib/sqlite3/Makefile.msc +++ b/contrib/sqlite3/Makefile.msc @@ -18,6 +18,13 @@ TOP = . +# Optionally set EXTRA_SRC to a list of C files to append to +# the generated sqlite3.c. +# +!IFNDEF EXTRA_SRC +EXTRA_SRC = +!ENDIF + # Set this non-0 to enable full warnings (-W4, etc) when compiling. # !IFNDEF USE_FULLWARN diff --git a/contrib/sqlite3/configure b/contrib/sqlite3/configure index 472e8acd0097..f2f70b5ae802 100755 --- a/contrib/sqlite3/configure +++ b/contrib/sqlite3/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for sqlite 3.45.1. +# Generated by GNU Autoconf 2.71 for sqlite 3.46.0. # # Report bugs to . # @@ -621,8 +621,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='sqlite' PACKAGE_TARNAME='sqlite' -PACKAGE_VERSION='3.45.1' -PACKAGE_STRING='sqlite 3.45.1' +PACKAGE_VERSION='3.46.0' +PACKAGE_STRING='sqlite 3.46.0' PACKAGE_BUGREPORT='http://www.sqlite.org' PACKAGE_URL='' @@ -1367,7 +1367,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures sqlite 3.45.1 to adapt to many kinds of systems. +\`configure' configures sqlite 3.46.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1438,7 +1438,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of sqlite 3.45.1:";; + short | recursive ) echo "Configuration of sqlite 3.46.0:";; esac cat <<\_ACEOF @@ -1563,7 +1563,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -sqlite configure 3.45.1 +sqlite configure 3.46.0 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -1833,7 +1833,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by sqlite $as_me 3.45.1, which was +It was created by sqlite $as_me 3.46.0, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3106,7 +3106,7 @@ fi # Define the identity of the package. PACKAGE='sqlite' - VERSION='3.45.1' + VERSION='3.46.0' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -15314,7 +15314,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by sqlite $as_me 3.45.1, which was +This file was extended by sqlite $as_me 3.46.0, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15373,7 +15373,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -sqlite config.status 3.45.1 +sqlite config.status 3.46.0 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/contrib/sqlite3/configure.ac b/contrib/sqlite3/configure.ac index 3ce8855cc762..c83f381d90b1 100644 --- a/contrib/sqlite3/configure.ac +++ b/contrib/sqlite3/configure.ac @@ -10,7 +10,7 @@ # AC_PREREQ(2.61) -AC_INIT(sqlite, 3.45.1, http://www.sqlite.org) +AC_INIT(sqlite, 3.46.0, http://www.sqlite.org) AC_CONFIG_SRCDIR([sqlite3.c]) AC_CONFIG_AUX_DIR([.]) diff --git a/contrib/sqlite3/shell.c b/contrib/sqlite3/shell.c index 1e02a12fbc2f..7d46e4acac57 100644 --- a/contrib/sqlite3/shell.c +++ b/contrib/sqlite3/shell.c @@ -580,6 +580,9 @@ zSkipValidUtf8(const char *z, int nAccept, long ccm); #ifndef HAVE_CONSOLE_IO_H # include "console_io.h" #endif +#if defined(_MSC_VER) +# pragma warning(disable : 4204) +#endif #ifndef SQLITE_CIO_NO_TRANSLATE # if (defined(_WIN32) || defined(WIN32)) && !SQLITE_OS_WINRT @@ -678,6 +681,10 @@ static short streamOfConsole(FILE *pf, /* out */ PerStreamTags *ppst){ # endif } +# ifndef ENABLE_VIRTUAL_TERMINAL_PROCESSING +# define ENABLE_VIRTUAL_TERMINAL_PROCESSING (0x4) +# endif + # if CIO_WIN_WC_XLATE /* Define console modes for use with the Windows Console API. */ # define SHELL_CONI_MODE \ @@ -1228,6 +1235,10 @@ SQLITE_INTERNAL_LINKAGE char* fGetsUtf8(char *cBuf, int ncMax, FILE *pfIn){ } #endif /* !defined(SQLITE_CIO_NO_TRANSLATE) */ +#if defined(_MSC_VER) +# pragma warning(default : 4204) +#endif + #undef SHELL_INVALID_FILE_PTR /************************* End ../ext/consio/console_io.c ********************/ @@ -1250,6 +1261,9 @@ SQLITE_INTERNAL_LINKAGE char* fGetsUtf8(char *cBuf, int ncMax, FILE *pfIn){ * setOutputStream(FILE *pf) * This is normally the stream that CLI normal output goes to. * For the stand-alone CLI, it is stdout with no .output redirect. + * + * The ?putz(z) forms are required for the Fiddle builds for string literal + * output, in aid of enforcing format string to argument correspondence. */ # define sputz(s,z) fPutsUtf8(z,s) # define sputf fPrintfUtf8 @@ -1261,12 +1275,18 @@ SQLITE_INTERNAL_LINKAGE char* fGetsUtf8(char *cBuf, int ncMax, FILE *pfIn){ #else /* For Fiddle, all console handling and emit redirection is omitted. */ -# define sputz(fp,z) fputs(z,fp) +/* These next 3 macros are for emitting formatted output. When complaints + * from the WASM build are issued for non-formatted output, (when a mere + * string literal is to be emitted, the ?putz(z) forms should be used. + * (This permits compile-time checking of format string / argument mismatch.) + */ +# define oputf(fmt, ...) printf(fmt,__VA_ARGS__) +# define eputf(fmt, ...) fprintf(stderr,fmt,__VA_ARGS__) # define sputf(fp,fmt, ...) fprintf(fp,fmt,__VA_ARGS__) +/* These next 3 macros are for emitting simple string literals. */ # define oputz(z) fputs(z,stdout) -# define oputf(fmt, ...) printf(fmt,__VA_ARGS__) # define eputz(z) fputs(z,stderr) -# define eputf(fmt, ...) fprintf(stderr,fmt,__VA_ARGS__) +# define sputz(fp,z) fputs(z,fp) # define oputb(buf,na) fwrite(buf,1,na,stdout) #endif @@ -5711,16 +5731,20 @@ SQLITE_EXTENSION_INIT1 ** index is ix. The 0th member is given by smBase. The sequence members ** progress per ix increment by smStep. */ -static sqlite3_int64 genSeqMember(sqlite3_int64 smBase, - sqlite3_int64 smStep, - sqlite3_uint64 ix){ - if( ix>=(sqlite3_uint64)LLONG_MAX ){ +static sqlite3_int64 genSeqMember( + sqlite3_int64 smBase, + sqlite3_int64 smStep, + sqlite3_uint64 ix +){ + static const sqlite3_uint64 mxI64 = + ((sqlite3_uint64)0x7fffffff)<<32 | 0xffffffff; + if( ix>=mxI64 ){ /* Get ix into signed i64 range. */ - ix -= (sqlite3_uint64)LLONG_MAX; + ix -= mxI64; /* With 2's complement ALU, this next can be 1 step, but is split into * 2 for UBSAN's satisfaction (and hypothetical 1's complement ALUs.) */ - smBase += (LLONG_MAX/2) * smStep; - smBase += (LLONG_MAX - LLONG_MAX/2) * smStep; + smBase += (mxI64/2) * smStep; + smBase += (mxI64 - mxI64/2) * smStep; } /* Under UBSAN (or on 1's complement machines), must do this last term * in steps to avoid the dreaded (and harmless) signed multiply overlow. */ @@ -5980,13 +6004,13 @@ static int seriesEof(sqlite3_vtab_cursor *cur){ ** parameter. (idxStr is not used in this implementation.) idxNum ** is a bitmask showing which constraints are available: ** -** 1: start=VALUE -** 2: stop=VALUE -** 4: step=VALUE -** -** Also, if bit 8 is set, that means that the series should be output -** in descending order rather than in ascending order. If bit 16 is -** set, then output must appear in ascending order. +** 0x01: start=VALUE +** 0x02: stop=VALUE +** 0x04: step=VALUE +** 0x08: descending order +** 0x10: ascending order +** 0x20: LIMIT VALUE +** 0x40: OFFSET VALUE ** ** This routine should initialize the cursor and position it so that it ** is pointing at the first row, or pointing off the end of the table @@ -6000,26 +6024,44 @@ static int seriesFilter( series_cursor *pCur = (series_cursor *)pVtabCursor; int i = 0; (void)idxStrUnused; - if( idxNum & 1 ){ + if( idxNum & 0x01 ){ pCur->ss.iBase = sqlite3_value_int64(argv[i++]); }else{ pCur->ss.iBase = 0; } - if( idxNum & 2 ){ + if( idxNum & 0x02 ){ pCur->ss.iTerm = sqlite3_value_int64(argv[i++]); }else{ pCur->ss.iTerm = 0xffffffff; } - if( idxNum & 4 ){ + if( idxNum & 0x04 ){ pCur->ss.iStep = sqlite3_value_int64(argv[i++]); if( pCur->ss.iStep==0 ){ pCur->ss.iStep = 1; }else if( pCur->ss.iStep<0 ){ - if( (idxNum & 16)==0 ) idxNum |= 8; + if( (idxNum & 0x10)==0 ) idxNum |= 0x08; } }else{ pCur->ss.iStep = 1; } + if( idxNum & 0x20 ){ + sqlite3_int64 iLimit = sqlite3_value_int64(argv[i++]); + sqlite3_int64 iTerm; + if( idxNum & 0x40 ){ + sqlite3_int64 iOffset = sqlite3_value_int64(argv[i++]); + if( iOffset>0 ){ + pCur->ss.iBase += pCur->ss.iStep*iOffset; + } + } + if( iLimit>=0 ){ + iTerm = pCur->ss.iBase + (iLimit - 1)*pCur->ss.iStep; + if( pCur->ss.iStep<0 ){ + if( iTerm>pCur->ss.iTerm ) pCur->ss.iTerm = iTerm; + }else{ + if( iTermss.iTerm ) pCur->ss.iTerm = iTerm; + } + } + } for(i=0; iss.isReversing = pCur->ss.iStep > 0; }else{ pCur->ss.isReversing = pCur->ss.iStep < 0; @@ -6050,10 +6092,13 @@ static int seriesFilter( ** ** The query plan is represented by bits in idxNum: ** -** (1) start = $value -- constraint exists -** (2) stop = $value -- constraint exists -** (4) step = $value -- constraint exists -** (8) output in descending order +** 0x01 start = $value -- constraint exists +** 0x02 stop = $value -- constraint exists +** 0x04 step = $value -- constraint exists +** 0x08 output is in descending order +** 0x10 output is in ascending order +** 0x20 LIMIT $value -- constraint exists +** 0x40 OFFSET $value -- constraint exists */ static int seriesBestIndex( sqlite3_vtab *pVTab, @@ -6061,10 +6106,12 @@ static int seriesBestIndex( ){ int i, j; /* Loop over constraints */ int idxNum = 0; /* The query plan bitmask */ +#ifndef ZERO_ARGUMENT_GENERATE_SERIES int bStartSeen = 0; /* EQ constraint seen on the START column */ +#endif int unusableMask = 0; /* Mask of unusable constraints */ int nArg = 0; /* Number of arguments that seriesFilter() expects */ - int aIdx[3]; /* Constraints on start, stop, and step */ + int aIdx[5]; /* Constraints on start, stop, step, LIMIT, OFFSET */ const struct sqlite3_index_constraint *pConstraint; /* This implementation assumes that the start, stop, and step columns @@ -6072,28 +6119,54 @@ static int seriesBestIndex( assert( SERIES_COLUMN_STOP == SERIES_COLUMN_START+1 ); assert( SERIES_COLUMN_STEP == SERIES_COLUMN_START+2 ); - aIdx[0] = aIdx[1] = aIdx[2] = -1; + aIdx[0] = aIdx[1] = aIdx[2] = aIdx[3] = aIdx[4] = -1; pConstraint = pIdxInfo->aConstraint; for(i=0; inConstraint; i++, pConstraint++){ int iCol; /* 0 for start, 1 for stop, 2 for step */ int iMask; /* bitmask for those column */ + int op = pConstraint->op; + if( op>=SQLITE_INDEX_CONSTRAINT_LIMIT + && op<=SQLITE_INDEX_CONSTRAINT_OFFSET + ){ + if( pConstraint->usable==0 ){ + /* do nothing */ + }else if( op==SQLITE_INDEX_CONSTRAINT_LIMIT ){ + aIdx[3] = i; + idxNum |= 0x20; + }else{ + assert( op==SQLITE_INDEX_CONSTRAINT_OFFSET ); + aIdx[4] = i; + idxNum |= 0x40; + } + continue; + } if( pConstraint->iColumniColumn - SERIES_COLUMN_START; assert( iCol>=0 && iCol<=2 ); iMask = 1 << iCol; - if( iCol==0 ) bStartSeen = 1; +#ifndef ZERO_ARGUMENT_GENERATE_SERIES + if( iCol==0 && op==SQLITE_INDEX_CONSTRAINT_EQ ){ + bStartSeen = 1; + } +#endif if( pConstraint->usable==0 ){ unusableMask |= iMask; continue; - }else if( pConstraint->op==SQLITE_INDEX_CONSTRAINT_EQ ){ + }else if( op==SQLITE_INDEX_CONSTRAINT_EQ ){ idxNum |= iMask; aIdx[iCol] = i; } } - for(i=0; i<3; i++){ + if( aIdx[3]==0 ){ + /* Ignore OFFSET if LIMIT is omitted */ + idxNum &= ~0x60; + aIdx[4] = 0; + } + for(i=0; i<5; i++){ if( (j = aIdx[i])>=0 ){ pIdxInfo->aConstraintUsage[j].argvIndex = ++nArg; - pIdxInfo->aConstraintUsage[j].omit = !SQLITE_SERIES_CONSTRAINT_VERIFY; + pIdxInfo->aConstraintUsage[j].omit = + !SQLITE_SERIES_CONSTRAINT_VERIFY || i>=3; } } /* The current generate_column() implementation requires at least one @@ -6114,19 +6187,22 @@ static int seriesBestIndex( ** this plan is unusable */ return SQLITE_CONSTRAINT; } - if( (idxNum & 3)==3 ){ + if( (idxNum & 0x03)==0x03 ){ /* Both start= and stop= boundaries are available. This is the ** the preferred case */ pIdxInfo->estimatedCost = (double)(2 - ((idxNum&4)!=0)); pIdxInfo->estimatedRows = 1000; if( pIdxInfo->nOrderBy>=1 && pIdxInfo->aOrderBy[0].iColumn==0 ){ if( pIdxInfo->aOrderBy[0].desc ){ - idxNum |= 8; + idxNum |= 0x08; }else{ - idxNum |= 16; + idxNum |= 0x10; } pIdxInfo->orderByConsumed = 1; } + }else if( (idxNum & 0x21)==0x21 ){ + /* We have start= and LIMIT */ + pIdxInfo->estimatedRows = 2500; }else{ /* If either boundary is missing, we have to generate a huge span ** of numbers. Make this case very expensive so that the query @@ -7453,7 +7529,9 @@ static int writeFile( #if !defined(_WIN32) && !defined(WIN32) if( S_ISLNK(mode) ){ const char *zTo = (const char*)sqlite3_value_text(pData); - if( zTo==0 || symlink(zTo, zFile)<0 ) return 1; + if( zTo==0 ) return 1; + unlink(zFile); + if( symlink(zTo, zFile)<0 ) return 1; }else #endif { @@ -7539,13 +7617,19 @@ static int writeFile( return 1; } #else - /* Legacy unix */ - struct timeval times[2]; - times[0].tv_usec = times[1].tv_usec = 0; - times[0].tv_sec = time(0); - times[1].tv_sec = mtime; - if( utimes(zFile, times) ){ - return 1; + /* Legacy unix. + ** + ** Do not use utimes() on a symbolic link - it sees through the link and + ** modifies the timestamps on the target. Or fails if the target does + ** not exist. */ + if( 0==S_ISLNK(mode) ){ + struct timeval times[2]; + times[0].tv_usec = times[1].tv_usec = 0; + times[0].tv_sec = time(0); + times[1].tv_sec = mtime; + if( utimes(zFile, times) ){ + return 1; + } } #endif } @@ -11617,7 +11701,7 @@ static void sqlarUncompressFunc( sqlite3_value **argv ){ uLong nData; - uLongf sz; + sqlite3_int64 sz; assert( argc==2 ); sz = sqlite3_value_int(argv[1]); @@ -11625,14 +11709,15 @@ static void sqlarUncompressFunc( if( sz<=0 || sz==(nData = sqlite3_value_bytes(argv[0])) ){ sqlite3_result_value(context, argv[0]); }else{ + uLongf szf = sz; const Bytef *pData= sqlite3_value_blob(argv[0]); Bytef *pOut = sqlite3_malloc(sz); if( pOut==0 ){ sqlite3_result_error_nomem(context); - }else if( Z_OK!=uncompress(pOut, &sz, pData, nData) ){ + }else if( Z_OK!=uncompress(pOut, &szf, pData, nData) ){ sqlite3_result_error(context, "error in uncompress()", -1); }else{ - sqlite3_result_blob(context, pOut, sz, SQLITE_TRANSIENT); + sqlite3_result_blob(context, pOut, szf, SQLITE_TRANSIENT); } sqlite3_free(pOut); } @@ -13784,7 +13869,7 @@ sqlite3expert *sqlite3_expert_new(sqlite3 *db, char **pzErrmsg){ sqlite3_stmt *pSql = 0; rc = idxPrintfPrepareStmt(pNew->db, &pSql, pzErrmsg, "SELECT sql FROM sqlite_schema WHERE name NOT LIKE 'sqlite_%%'" - " AND sql NOT LIKE 'CREATE VIRTUAL %%'" + " AND sql NOT LIKE 'CREATE VIRTUAL %%' ORDER BY rowid" ); while( rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(pSql) ){ const char *zSql = (const char*)sqlite3_column_text(pSql, 0); @@ -13888,103 +13973,1221 @@ int sqlite3_expert_sql( return rc; } -int sqlite3_expert_analyze(sqlite3expert *p, char **pzErr){ - int rc; - IdxHashEntry *pEntry; +int sqlite3_expert_analyze(sqlite3expert *p, char **pzErr){ + int rc; + IdxHashEntry *pEntry; + + /* Do trigger processing to collect any extra IdxScan structures */ + rc = idxProcessTriggers(p, pzErr); + + /* Create candidate indexes within the in-memory database file */ + if( rc==SQLITE_OK ){ + rc = idxCreateCandidates(p); + }else if ( rc==SQLITE_BUSY_TIMEOUT ){ + if( pzErr ) + *pzErr = sqlite3_mprintf("Cannot find a unique index name to propose."); + return rc; + } + + /* Generate the stat1 data */ + if( rc==SQLITE_OK ){ + rc = idxPopulateStat1(p, pzErr); + } + + /* Formulate the EXPERT_REPORT_CANDIDATES text */ + for(pEntry=p->hIdx.pFirst; pEntry; pEntry=pEntry->pNext){ + p->zCandidates = idxAppendText(&rc, p->zCandidates, + "%s;%s%s\n", pEntry->zVal, + pEntry->zVal2 ? " -- stat1: " : "", pEntry->zVal2 + ); + } + + /* Figure out which of the candidate indexes are preferred by the query + ** planner and report the results to the user. */ + if( rc==SQLITE_OK ){ + rc = idxFindIndexes(p, pzErr); + } + + if( rc==SQLITE_OK ){ + p->bRun = 1; + } + return rc; +} + +/* +** Return the total number of statements that have been added to this +** sqlite3expert using sqlite3_expert_sql(). +*/ +int sqlite3_expert_count(sqlite3expert *p){ + int nRet = 0; + if( p->pStatement ) nRet = p->pStatement->iId+1; + return nRet; +} + +/* +** Return a component of the report. +*/ +const char *sqlite3_expert_report(sqlite3expert *p, int iStmt, int eReport){ + const char *zRet = 0; + IdxStatement *pStmt; + + if( p->bRun==0 ) return 0; + for(pStmt=p->pStatement; pStmt && pStmt->iId!=iStmt; pStmt=pStmt->pNext); + switch( eReport ){ + case EXPERT_REPORT_SQL: + if( pStmt ) zRet = pStmt->zSql; + break; + case EXPERT_REPORT_INDEXES: + if( pStmt ) zRet = pStmt->zIdx; + break; + case EXPERT_REPORT_PLAN: + if( pStmt ) zRet = pStmt->zEQP; + break; + case EXPERT_REPORT_CANDIDATES: + zRet = p->zCandidates; + break; + } + return zRet; +} + +/* +** Free an sqlite3expert object. +*/ +void sqlite3_expert_destroy(sqlite3expert *p){ + if( p ){ + sqlite3_close(p->dbm); + sqlite3_close(p->dbv); + idxScanFree(p->pScan, 0); + idxStatementFree(p->pStatement, 0); + idxTableFree(p->pTable); + idxWriteFree(p->pWrite); + idxHashClear(&p->hIdx); + sqlite3_free(p->zCandidates); + sqlite3_free(p); + } +} + +#endif /* ifndef SQLITE_OMIT_VIRTUALTABLE */ + +/************************* End ../ext/expert/sqlite3expert.c ********************/ + +/************************* Begin ../ext/intck/sqlite3intck.h ******************/ +/* +** 2024-02-08 +** +** The author disclaims copyright to this source code. In place of +** a legal notice, here is a blessing: +** +** May you do good and not evil. +** May you find forgiveness for yourself and forgive others. +** May you share freely, never taking more than you give. +** +************************************************************************* +*/ + +/* +** Incremental Integrity-Check Extension +** ------------------------------------- +** +** This module contains code to check whether or not an SQLite database +** is well-formed or corrupt. This is the same task as performed by SQLite's +** built-in "PRAGMA integrity_check" command. This module differs from +** "PRAGMA integrity_check" in that: +** +** + It is less thorough - this module does not detect certain types +** of corruption that are detected by the PRAGMA command. However, +** it does detect all kinds of corruption that are likely to cause +** errors in SQLite applications. +** +** + It is slower. Sometimes up to three times slower. +** +** + It allows integrity-check operations to be split into multiple +** transactions, so that the database does not need to be read-locked +** for the duration of the integrity-check. +** +** One way to use the API to run integrity-check on the "main" database +** of handle db is: +** +** int rc = SQLITE_OK; +** sqlite3_intck *p = 0; +** +** sqlite3_intck_open(db, "main", &p); +** while( SQLITE_OK==sqlite3_intck_step(p) ){ +** const char *zMsg = sqlite3_intck_message(p); +** if( zMsg ) printf("corruption: %s\n", zMsg); +** } +** rc = sqlite3_intck_error(p, &zErr); +** if( rc!=SQLITE_OK ){ +** printf("error occured (rc=%d), (errmsg=%s)\n", rc, zErr); +** } +** sqlite3_intck_close(p); +** +** Usually, the sqlite3_intck object opens a read transaction within the +** first call to sqlite3_intck_step() and holds it open until the +** integrity-check is complete. However, if sqlite3_intck_unlock() is +** called, the read transaction is ended and a new read transaction opened +** by the subsequent call to sqlite3_intck_step(). +*/ + +#ifndef _SQLITE_INTCK_H +#define _SQLITE_INTCK_H + +/* #include "sqlite3.h" */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** An ongoing incremental integrity-check operation is represented by an +** opaque pointer of the following type. +*/ +typedef struct sqlite3_intck sqlite3_intck; + +/* +** Open a new incremental integrity-check object. If successful, populate +** output variable (*ppOut) with the new object handle and return SQLITE_OK. +** Or, if an error occurs, set (*ppOut) to NULL and return an SQLite error +** code (e.g. SQLITE_NOMEM). +** +** The integrity-check will be conducted on database zDb (which must be "main", +** "temp", or the name of an attached database) of database handle db. Once +** this function has been called successfully, the caller should not use +** database handle db until the integrity-check object has been destroyed +** using sqlite3_intck_close(). +*/ +int sqlite3_intck_open( + sqlite3 *db, /* Database handle */ + const char *zDb, /* Database name ("main", "temp" etc.) */ + sqlite3_intck **ppOut /* OUT: New sqlite3_intck handle */ +); + +/* +** Close and release all resources associated with a handle opened by an +** earlier call to sqlite3_intck_open(). The results of using an +** integrity-check handle after it has been passed to this function are +** undefined. +*/ +void sqlite3_intck_close(sqlite3_intck *pCk); + +/* +** Do the next step of the integrity-check operation specified by the handle +** passed as the only argument. This function returns SQLITE_DONE if the +** integrity-check operation is finished, or an SQLite error code if +** an error occurs, or SQLITE_OK if no error occurs but the integrity-check +** is not finished. It is not considered an error if database corruption +** is encountered. +** +** Following a successful call to sqlite3_intck_step() (one that returns +** SQLITE_OK), sqlite3_intck_message() returns a non-NULL value if +** corruption was detected in the db. +** +** If an error occurs and a value other than SQLITE_OK or SQLITE_DONE is +** returned, then the integrity-check handle is placed in an error state. +** In this state all subsequent calls to sqlite3_intck_step() or +** sqlite3_intck_unlock() will immediately return the same error. The +** sqlite3_intck_error() method may be used to obtain an English language +** error message in this case. +*/ +int sqlite3_intck_step(sqlite3_intck *pCk); + +/* +** If the previous call to sqlite3_intck_step() encountered corruption +** within the database, then this function returns a pointer to a buffer +** containing a nul-terminated string describing the corruption in +** English. If the previous call to sqlite3_intck_step() did not encounter +** corruption, or if there was no previous call, this function returns +** NULL. +*/ +const char *sqlite3_intck_message(sqlite3_intck *pCk); + +/* +** Close any read-transaction opened by an earlier call to +** sqlite3_intck_step(). Any subsequent call to sqlite3_intck_step() will +** open a new transaction. Return SQLITE_OK if successful, or an SQLite error +** code otherwise. +** +** If an error occurs, then the integrity-check handle is placed in an error +** state. In this state all subsequent calls to sqlite3_intck_step() or +** sqlite3_intck_unlock() will immediately return the same error. The +** sqlite3_intck_error() method may be used to obtain an English language +** error message in this case. +*/ +int sqlite3_intck_unlock(sqlite3_intck *pCk); + +/* +** If an error has occurred in an earlier call to sqlite3_intck_step() +** or sqlite3_intck_unlock(), then this method returns the associated +** SQLite error code. Additionally, if pzErr is not NULL, then (*pzErr) +** may be set to point to a nul-terminated string containing an English +** language error message. Or, if no error message is available, to +** NULL. +** +** If no error has occurred within sqlite3_intck_step() or +** sqlite_intck_unlock() calls on the handle passed as the first argument, +** then SQLITE_OK is returned and (*pzErr) set to NULL. +*/ +int sqlite3_intck_error(sqlite3_intck *pCk, const char **pzErr); + +/* +** This API is used for testing only. It returns the full-text of an SQL +** statement used to test object zObj, which may be a table or index. +** The returned buffer is valid until the next call to either this function +** or sqlite3_intck_close() on the same sqlite3_intck handle. +*/ +const char *sqlite3_intck_test_sql(sqlite3_intck *pCk, const char *zObj); + + +#ifdef __cplusplus +} /* end of the 'extern "C"' block */ +#endif + +#endif /* ifndef _SQLITE_INTCK_H */ + +/************************* End ../ext/intck/sqlite3intck.h ********************/ +/************************* Begin ../ext/intck/sqlite3intck.c ******************/ +/* +** 2024-02-08 +** +** The author disclaims copyright to this source code. In place of +** a legal notice, here is a blessing: +** +** May you do good and not evil. +** May you find forgiveness for yourself and forgive others. +** May you share freely, never taking more than you give. +** +************************************************************************* +*/ + +/* #include "sqlite3intck.h" */ +#include +#include + +#include +#include + +/* +** nKeyVal: +** The number of values that make up the 'key' for the current pCheck +** statement. +** +** rc: +** Error code returned by most recent sqlite3_intck_step() or +** sqlite3_intck_unlock() call. This is set to SQLITE_DONE when +** the integrity-check operation is finished. +** +** zErr: +** If the object has entered the error state, this is the error message. +** Is freed using sqlite3_free() when the object is deleted. +** +** zTestSql: +** The value returned by the most recent call to sqlite3_intck_testsql(). +** Each call to testsql() frees the previous zTestSql value (using +** sqlite3_free()) and replaces it with the new value it will return. +*/ +struct sqlite3_intck { + sqlite3 *db; + const char *zDb; /* Copy of zDb parameter to _open() */ + char *zObj; /* Current object. Or NULL. */ + + sqlite3_stmt *pCheck; /* Current check statement */ + char *zKey; + int nKeyVal; + + char *zMessage; + int bCorruptSchema; + + int rc; /* Error code */ + char *zErr; /* Error message */ + char *zTestSql; /* Returned by sqlite3_intck_test_sql() */ +}; + + +/* +** Some error has occurred while using database p->db. Save the error message +** and error code currently held by the database handle in p->rc and p->zErr. +*/ +static void intckSaveErrmsg(sqlite3_intck *p){ + p->rc = sqlite3_errcode(p->db); + sqlite3_free(p->zErr); + p->zErr = sqlite3_mprintf("%s", sqlite3_errmsg(p->db)); +} + +/* +** If the handle passed as the first argument is already in the error state, +** then this function is a no-op (returns NULL immediately). Otherwise, if an +** error occurs within this function, it leaves an error in said handle. +** +** Otherwise, this function attempts to prepare SQL statement zSql and +** return the resulting statement handle to the user. +*/ +static sqlite3_stmt *intckPrepare(sqlite3_intck *p, const char *zSql){ + sqlite3_stmt *pRet = 0; + if( p->rc==SQLITE_OK ){ + p->rc = sqlite3_prepare_v2(p->db, zSql, -1, &pRet, 0); + if( p->rc!=SQLITE_OK ){ + intckSaveErrmsg(p); + assert( pRet==0 ); + } + } + return pRet; +} + +/* +** If the handle passed as the first argument is already in the error state, +** then this function is a no-op (returns NULL immediately). Otherwise, if an +** error occurs within this function, it leaves an error in said handle. +** +** Otherwise, this function treats argument zFmt as a printf() style format +** string. It formats it according to the trailing arguments and then +** attempts to prepare the results and return the resulting prepared +** statement. +*/ +static sqlite3_stmt *intckPrepareFmt(sqlite3_intck *p, const char *zFmt, ...){ + sqlite3_stmt *pRet = 0; + va_list ap; + char *zSql = 0; + va_start(ap, zFmt); + zSql = sqlite3_vmprintf(zFmt, ap); + if( p->rc==SQLITE_OK && zSql==0 ){ + p->rc = SQLITE_NOMEM; + } + pRet = intckPrepare(p, zSql); + sqlite3_free(zSql); + va_end(ap); + return pRet; +} + +/* +** Finalize SQL statement pStmt. If an error occurs and the handle passed +** as the first argument does not already contain an error, store the +** error in the handle. +*/ +static void intckFinalize(sqlite3_intck *p, sqlite3_stmt *pStmt){ + int rc = sqlite3_finalize(pStmt); + if( p->rc==SQLITE_OK && rc!=SQLITE_OK ){ + intckSaveErrmsg(p); + } +} + +/* +** If there is already an error in handle p, return it. Otherwise, call +** sqlite3_step() on the statement handle and return that value. +*/ +static int intckStep(sqlite3_intck *p, sqlite3_stmt *pStmt){ + if( p->rc ) return p->rc; + return sqlite3_step(pStmt); +} + +/* +** Execute SQL statement zSql. There is no way to obtain any results +** returned by the statement. This function uses the sqlite3_intck error +** code convention. +*/ +static void intckExec(sqlite3_intck *p, const char *zSql){ + sqlite3_stmt *pStmt = 0; + pStmt = intckPrepare(p, zSql); + intckStep(p, pStmt); + intckFinalize(p, pStmt); +} + +/* +** A wrapper around sqlite3_mprintf() that uses the sqlite3_intck error +** code convention. +*/ +static char *intckMprintf(sqlite3_intck *p, const char *zFmt, ...){ + va_list ap; + char *zRet = 0; + va_start(ap, zFmt); + zRet = sqlite3_vmprintf(zFmt, ap); + if( p->rc==SQLITE_OK ){ + if( zRet==0 ){ + p->rc = SQLITE_NOMEM; + } + }else{ + sqlite3_free(zRet); + zRet = 0; + } + return zRet; +} + +/* +** This is used by sqlite3_intck_unlock() to save the vector key value +** required to restart the current pCheck query as a nul-terminated string +** in p->zKey. +*/ +static void intckSaveKey(sqlite3_intck *p){ + int ii; + char *zSql = 0; + sqlite3_stmt *pStmt = 0; + sqlite3_stmt *pXinfo = 0; + const char *zDir = 0; + + assert( p->pCheck ); + assert( p->zKey==0 ); + + pXinfo = intckPrepareFmt(p, + "SELECT group_concat(desc, '') FROM %Q.sqlite_schema s, " + "pragma_index_xinfo(%Q, %Q) " + "WHERE s.type='index' AND s.name=%Q", + p->zDb, p->zObj, p->zDb, p->zObj + ); + if( p->rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(pXinfo) ){ + zDir = (const char*)sqlite3_column_text(pXinfo, 0); + } + + if( zDir==0 ){ *** 15215 LINES SKIPPED *** From nobody Mon Jun 10 07:29:41 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VyNjd71glz5P6PR; Mon, 10 Jun 2024 07:29:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VyNjd6RR3z4tGm; Mon, 10 Jun 2024 07:29:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718004581; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t8rKw+E+6oY66WW+1N1ap+zzhAG6fu7eBBgW/m60YFM=; b=JKDgURss5ibphkwqTNww+5kMIZtRp5lfnC3AiMlxeroRVHtmJamXUVIgGvaLC8Hf4w4S6p gyBarfzn7V40dJCXQ8B8wX7DjdUVgHy1+WDv12XukPVrEW1Jaaqqb5VLVe5T2MlI8DC6HY y+Tcrjv7hXfw2vdddMhA3JNejCXozSu3enWXPrD7iMrtYHLsHyQhuniHByIKcEmFkDEls7 3ZUIYiUUvPXrCEP1VZ2uHs2TaQhiqyd98H0nVKAoNEET1UxtI++piQd8AWY5eYSnHbDbXs HBA2runleKSFvUMd6ojr0yo9AZ4Yfi5PJnttnrbw1ulJvi9fd07DK8yAm/IOSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718004581; a=rsa-sha256; cv=none; b=Vnj9Fh2/9o2fBedEIV1DkpLZDTm8tO3LTdL1rW1rZS0Gl9iFjZvNDZT37sgGkbm/QRIRmx ngWfJtaQ4QLHBdcJXHubx6VPZg3QcObu/wBtRKIhxyVENGZbOzW7xXOho0p4fp5g3kX3fC sp0LAAMn3Fmr+ZSl/h0x/nGK7VYForliNGDwbBWOuawQZ28FzzdqhEqgZ+SLw97cuWXjPT szy52MDCorI3lKbtCu7tNTS6B/wRyvBIrAzxKm7aNU4POqxvYKUQxQ5Xe7HGzIiHCLnIvo WIMEd4H5JUe7dKyQavF3VahVS/9wqmahBuJ+fHEKCNnDI2s0oQXwMCmF4eQZBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718004581; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t8rKw+E+6oY66WW+1N1ap+zzhAG6fu7eBBgW/m60YFM=; b=iprE0FPpxcYM2N5TpgF/9J0Mq1FW/fJKY1sBtbL1rz8dOQkILU+KRKfdGPyCv17DZuxSxi datrxwAqqllp2T7stXtXfsOj65Ccpn1TbZabyZMcyJKawnaaLpZer6p6KnZ82O9GPn2XDP fNHqKmB9KZvF6o+t3OPQ/PafGgPlvc6Pnv/TU1X1E3+aha3876rGrXtYZT3R/Yd9Be74/x 8a018MRlNCKmtDg1istP1PH9Hxt8YvjtspCxCXWbJXXZY4gPI+r3Xt80JLlykxabtRMNlj vH1TzxqHoUiXUgistRvP6CbQWFknV+f8+Mf5EuQ3v4X5n1dI93AZdDEc7QCrJw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VyNjd5wftzGrS; Mon, 10 Jun 2024 07:29:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45A7TfI6027948; Mon, 10 Jun 2024 07:29:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45A7TfcU027946; Mon, 10 Jun 2024 07:29:41 GMT (envelope-from git) Date: Mon, 10 Jun 2024 07:29:41 GMT Message-Id: <202406100729.45A7TfcU027946@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 55c5dad2f305 - stable/14 - Merge commit 382f70a877f0 from llvm-project (by Louis Dionne): List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 55c5dad2f305f74d1ff5ca85c453635511aab9b2 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=55c5dad2f305f74d1ff5ca85c453635511aab9b2 commit 55c5dad2f305f74d1ff5ca85c453635511aab9b2 Author: Dimitry Andric AuthorDate: 2024-06-07 18:42:53 +0000 Commit: Dimitry Andric CommitDate: 2024-06-10 07:29:25 +0000 Merge commit 382f70a877f0 from llvm-project (by Louis Dionne): [libc++][NFC] Rewrite function call on two lines for clarity (#79141) Previously, there was a ternary conditional with a less-than comparison appearing inside a template argument, which was really confusing because of the <...> of the function template. This patch rewrites the same statement on two lines for clarity. Merge commit d129ea8d2fa3 from llvm-project (by Vitaly Buka): [libcxx] Align `__recommend() + 1` by __endian_factor (#90292) This is detected by asan after #83774 Allocation size will be divided by `__endian_factor` before storing. If it's not aligned, we will not be able to recover allocation size to pass into `__alloc_traits::deallocate`. we have code like this ``` auto __allocation = std::__allocate_at_least(__alloc(), __recommend(__sz) + 1); __p = __allocation.ptr; __set_long_cap(__allocation.count); void __set_long_cap(size_type __s) _NOEXCEPT { __r_.first().__l.__cap_ = __s / __endian_factor; __r_.first().__l.__is_long_ = true; } size_type __get_long_cap() const _NOEXCEPT { return __r_.first().__l.__cap_ * __endian_factor; } inline ~basic_string() { __annotate_delete(); if (__is_long()) __alloc_traits::deallocate(__alloc(), __get_long_pointer(), __get_long_cap()); } ``` 1. __recommend() -> even size 2. `std::__allocate_at_least(__alloc(), __recommend(__sz) + 1)` - > not even size 3. ` __set_long_cap() `- > lose one bit of size for __endian_factor == 2 (see `/ __endian_factor`) 4. `__alloc_traits::deallocate(__alloc(), __get_long_pointer(), __get_long_cap())` -> uses even size (see `__get_long_cap`) This should fix incorrect deallocation sizes for some instances of std::string. Memory profiling or debugging tools like AddressSanitizer, LeakSanitizer or TCMalloc could then complain about the the size passed to a deallocation not matching the size originally passed to the allocation. Reported by: Aliaksei Kandratsenka PR: 279560 MFC after: 3 days (cherry picked from commit ead8e4c081e5c4de4d508fc353f381457b058ca6) --- contrib/llvm-project/libcxx/include/string | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/llvm-project/libcxx/include/string b/contrib/llvm-project/libcxx/include/string index ba169c3dbfc9..56e2ef09947f 100644 --- a/contrib/llvm-project/libcxx/include/string +++ b/contrib/llvm-project/libcxx/include/string @@ -1943,10 +1943,10 @@ private: if (__s < __min_cap) { return static_cast(__min_cap) - 1; } - size_type __guess = - __align_it < sizeof(value_type) < __alignment ? __alignment / sizeof(value_type) : 1 > (__s + 1) - 1; + const size_type __boundary = sizeof(value_type) < __alignment ? __alignment / sizeof(value_type) : __endian_factor; + size_type __guess = __align_it<__boundary>(__s + 1) - 1; if (__guess == __min_cap) - ++__guess; + __guess += __endian_factor; return __guess; } From nobody Mon Jun 10 07:29:51 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VyNjr0vTyz5P6GG; Mon, 10 Jun 2024 07:29:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VyNjr0Qr5z4tnv; Mon, 10 Jun 2024 07:29:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718004592; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A6DE9itxYpoEFE3p/tVFL+NuwhF+G7R0QNDNDspy2nw=; b=JzEf61lypo9ADsdsGwSteGvDt/YfOFRkDENmdq4iG29zZVL7PM7eD/DgbENEi+H0mf++zv mQuAErWpQOrdlFCUxTM+f9QS/o3MA+SJwntdyLA71bADE04hFzBkbyIt+wDXdKdsokaoNO Kjml8vsDpiYAdv+Ign6Tu6u9+9XKddfMKec7JfqkRxVI6pgQ32gRhift7Xgn/cSUwYqhmf SUaKjZixmdcHeyt8zSKbPupxktWuBDTXnGgxQ6TpBJF5GYUDUs++kN/LXy0gAv2IiGO6X1 kTX3qUrn8h6m2/9XloCD9xBcOk+VaR0RkSEThvTl/uVj47LV8kuiHDeFZoIpOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718004592; a=rsa-sha256; cv=none; b=SJ0WAZ825YXAYB+yc8dMc13pyFMh4b810t13AYW9jb0VVdHAc7rSvSerlI4eerjhV9FTpl fS4KeWW8QbDepN0BPxcjYaaqvyhNe9gZfasjvUnKS8s3DiNR6i1JMyCxI2lofpsXP+jEgb sL5X4LAMOOigtpuz0w2efzez+Ii8kJQaB7V+UvzTCGQcCcSs+KjbZQdH42BV4KRRdTtgVX Y5GUtCdumw/YPyunQmOyn4gtkKawiwznxdhxcalHstQ0BZWFkPUXRfrOYQuJEzJRZ6DT/4 0u7s0vYllt3m5vEGRMUCrc01r3PiNYryWM2VC0tatLit2nkSWihpk/uJtLFY7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718004592; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A6DE9itxYpoEFE3p/tVFL+NuwhF+G7R0QNDNDspy2nw=; b=kwQs6dyhFZMxcrecMryCsn4PZdVy3y3feG+aarWLIrm8U327v/tplEuClifBly5SFK0b/C fEv+oiBqaEOhw0jjlLvrp4enefFVLwdHu+4K2LcLeaQaooIYAVwrLlSHvNYqbCXYbonzla bwKWjlwfbsMlVrVaEQE2AHsm5NaxCARGdVXetqWQ1simYQTKLzpmwfCBZGuXXEnWMnTfgi gGIs5lnEJepiVqxBnI+qHvWou8WIlIZfzgl5V4gJVd2n5+enUoDoh9Xnr3FsNpkJnvWkfG tL9oDSoqfoD2MdryKt9ATnsqqLUHKm4hdx9ejjNBIeqXeTgYr+R4prAXNsl2PA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VyNjr021VzGrT; Mon, 10 Jun 2024 07:29:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45A7TpRS028110; Mon, 10 Jun 2024 07:29:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45A7TpjK028107; Mon, 10 Jun 2024 07:29:51 GMT (envelope-from git) Date: Mon, 10 Jun 2024 07:29:51 GMT Message-Id: <202406100729.45A7TpjK028107@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: ef4d145057c1 - stable/13 - Merge commit 382f70a877f0 from llvm-project (by Louis Dionne): List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ef4d145057c10e452ac07b3111b4b4d0c5382fb5 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=ef4d145057c10e452ac07b3111b4b4d0c5382fb5 commit ef4d145057c10e452ac07b3111b4b4d0c5382fb5 Author: Dimitry Andric AuthorDate: 2024-06-07 18:42:53 +0000 Commit: Dimitry Andric CommitDate: 2024-06-10 07:29:30 +0000 Merge commit 382f70a877f0 from llvm-project (by Louis Dionne): [libc++][NFC] Rewrite function call on two lines for clarity (#79141) Previously, there was a ternary conditional with a less-than comparison appearing inside a template argument, which was really confusing because of the <...> of the function template. This patch rewrites the same statement on two lines for clarity. Merge commit d129ea8d2fa3 from llvm-project (by Vitaly Buka): [libcxx] Align `__recommend() + 1` by __endian_factor (#90292) This is detected by asan after #83774 Allocation size will be divided by `__endian_factor` before storing. If it's not aligned, we will not be able to recover allocation size to pass into `__alloc_traits::deallocate`. we have code like this ``` auto __allocation = std::__allocate_at_least(__alloc(), __recommend(__sz) + 1); __p = __allocation.ptr; __set_long_cap(__allocation.count); void __set_long_cap(size_type __s) _NOEXCEPT { __r_.first().__l.__cap_ = __s / __endian_factor; __r_.first().__l.__is_long_ = true; } size_type __get_long_cap() const _NOEXCEPT { return __r_.first().__l.__cap_ * __endian_factor; } inline ~basic_string() { __annotate_delete(); if (__is_long()) __alloc_traits::deallocate(__alloc(), __get_long_pointer(), __get_long_cap()); } ``` 1. __recommend() -> even size 2. `std::__allocate_at_least(__alloc(), __recommend(__sz) + 1)` - > not even size 3. ` __set_long_cap() `- > lose one bit of size for __endian_factor == 2 (see `/ __endian_factor`) 4. `__alloc_traits::deallocate(__alloc(), __get_long_pointer(), __get_long_cap())` -> uses even size (see `__get_long_cap`) This should fix incorrect deallocation sizes for some instances of std::string. Memory profiling or debugging tools like AddressSanitizer, LeakSanitizer or TCMalloc could then complain about the the size passed to a deallocation not matching the size originally passed to the allocation. Reported by: Aliaksei Kandratsenka PR: 279560 MFC after: 3 days (cherry picked from commit ead8e4c081e5c4de4d508fc353f381457b058ca6) --- contrib/llvm-project/libcxx/include/string | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/llvm-project/libcxx/include/string b/contrib/llvm-project/libcxx/include/string index ba169c3dbfc9..56e2ef09947f 100644 --- a/contrib/llvm-project/libcxx/include/string +++ b/contrib/llvm-project/libcxx/include/string @@ -1943,10 +1943,10 @@ private: if (__s < __min_cap) { return static_cast(__min_cap) - 1; } - size_type __guess = - __align_it < sizeof(value_type) < __alignment ? __alignment / sizeof(value_type) : 1 > (__s + 1) - 1; + const size_type __boundary = sizeof(value_type) < __alignment ? __alignment / sizeof(value_type) : __endian_factor; + size_type __guess = __align_it<__boundary>(__s + 1) - 1; if (__guess == __min_cap) - ++__guess; + __guess += __endian_factor; return __guess; } From nobody Mon Jun 10 08:15:00 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VyPjw60tRz5P9SS; Mon, 10 Jun 2024 08:15:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VyPjw5LGNz40F4; Mon, 10 Jun 2024 08:15:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718007300; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UYz2DwrbM/8euOqvJ7c8U4dQ+5DFnG5QDkpj1+8IIfA=; b=RcavUpwNiBSqOtz2pV0utPA9kE9jGFbIx6UgWm2ZxYR7rPt6HkGrqPFaoXvc5EZU8leToO RAbHiQBgUzgs/uO+Xc1o7608Y03gs+paIsmkUv2gQYIjzcrXO5qi0Lvhryse+mvaPkbR6e LoF5Jng1MtsmJbCPP3p323AMjHX5R+d16AwW7z8EpHGBYzoSXdWG18EfK7uRImtKKfiSUv uCFkvrFNxCyixwMc2bZft+vKnZyGr6IaG+xnJuiqSMwAX2bdFzEbyMV7ppiFWbeGa/0d28 jqiEHEmAc6PDyLnscW+diHvdKY+7l+mPYuL4JalJ2xEOProCjzJOBsxcaQa8pA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718007300; a=rsa-sha256; cv=none; b=Fo70Ga8B4XISSz5tcc+EI/ysikaVpraVAqJemPG0eunBhvNBw6n5Jw50giXtVUKUItNJRG svXQP3HHbgefxP/0++ZbgHpQ5MQkk+lg6028wE5S19+Zwjamu+asMYzqVLURyTxVzWp3f7 nIu74dvbksef47g8cZ2jiEcUFnWV6Y68B1D6VhHF84CieWRGr4lTDBE3DR5UL5PBYGWT8k CYwzgRxsmKOwysO5E/h+7dQ/iUCTUnI4UP88o5Q5w20cr7ZCefbEC6J3pe894g92b2FqnU Zl1dR9XVY6R3CvyfIp1MEW7jUaPzZVqi7omaqONioHXXsSB2iZVzTDaxI5ALOA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718007300; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UYz2DwrbM/8euOqvJ7c8U4dQ+5DFnG5QDkpj1+8IIfA=; b=FesId///ETfEzEwhjzrU/JSf2buXYyvD3lFAYCfYNCJzbrk3TFHXatsj4xnxjbETzDloH4 Qe7RLZyIiMKLSEyVWjcRAqNl2fRz9hmVD1Ccy+W3CAQBUtVeOs9U5JzWHAoOk0xGR9YJ2A Wu4WBkoNSHdg8WXOeGk6qPwlXmm0pqQ8FBqNwYuMkfiKsCLLHP4ZKIgRb/ACJ2YWDtApG9 Z9sLrQuKsruU9f2oen0mf5fH29o81Rj3yuclXgoijKBOtlWz5p9ilfgBTDalDslno+j2L3 k+6BtDs2oRZzVpn62SXYQ8v1eooABDboy0mwvbUQmTlawnEZ7p7ZQegO2xIcKg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VyPjw4xTFzHgJ; Mon, 10 Jun 2024 08:15:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45A8F0Rb011919; Mon, 10 Jun 2024 08:15:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45A8F0R5011916; Mon, 10 Jun 2024 08:15:00 GMT (envelope-from git) Date: Mon, 10 Jun 2024 08:15:00 GMT Message-Id: <202406100815.45A8F0R5011916@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Benedict Reuschling Subject: git: e335a74b5671 - main - accf_http.9: Fix grammar in description (singular/plural) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bcr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e335a74b5671fa31ea347e70f43004ec29b35280 Auto-Submitted: auto-generated The branch main has been updated by bcr: URL: https://cgit.FreeBSD.org/src/commit/?id=e335a74b5671fa31ea347e70f43004ec29b35280 commit e335a74b5671fa31ea347e70f43004ec29b35280 Author: Benedict Reuschling AuthorDate: 2024-06-10 08:13:58 +0000 Commit: Benedict Reuschling CommitDate: 2024-06-10 08:13:58 +0000 accf_http.9: Fix grammar in description (singular/plural) --- share/man/man9/accf_http.9 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man9/accf_http.9 b/share/man/man9/accf_http.9 index f48894807312..f71bb7811dc0 100644 --- a/share/man/man9/accf_http.9 +++ b/share/man/man9/accf_http.9 @@ -28,7 +28,7 @@ .Os .Sh NAME .Nm accf_http -.Nd "buffer incoming connections until a certain complete HTTP requests arrive" +.Nd "buffer incoming connections until a certain complete HTTP request arrives" .Sh SYNOPSIS .Nm options INET .Nm options ACCEPT_FILTER_HTTP From nobody Mon Jun 10 08:30:26 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VyQ3k1jP0z5PBXB; Mon, 10 Jun 2024 08:30:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VyQ3k1Ddpz41mj; Mon, 10 Jun 2024 08:30:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718008226; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QtrWllLgjVVJpCeg1HoMAhIxIMGrPXZrfcfOETZh1QI=; b=kngr0EPD4KjX6HSc4xT5wqg0DmnOq1Y5lMc7/YRg/ez1LMo5vt+4+atJLkwxWsTLKeMuQs MUsww/fCI8lXurMXtXG8++/glB0b+ZqBMgAZblo39JSP5WMN5g383RDGErmqf2WApAOlCC /n1IVHfXCu2NrDUaJeOi+dai9kOqe+G7aN5FHPDXy9pQJjo0XszIaVMJC5qugSQCg88OFn +Ms3PiGApH6kbcB1pxUWg6twG4+ab2HXd/Aj89kyI4goN1+ObidiWIBSH4wqGUnMkECzJt rk8fGlEyIn1q4obm7V0z2gYWbhtmpdHxdFWBiw7Rtu5MJ+ra3QPfOv5ahA/+og== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718008226; a=rsa-sha256; cv=none; b=t8U0uuGVrgQFEnsJSnFr44nGZsV6H+5gqRxkM0T6GzK33O90sAWu+GuGWoMmIoORPW5Lr/ cVqq5A1wBtyK2fwO4IjYeW2+SSOX8NV31jYw/RqyRHodYlb1eUxt5ss1pEUXrN+vRb/3Cv 1ASua7u/KAgtKFuAe9K388RQL1j8mTciyBfmBF+m9zaYo2FWZnuUskCNmSFZJCz7LRQTPO 28c4+JNAd0mJVU6q8jAmRB1YbH1LKl3s81iHr1Eo6H49WxW1OHq+6OYpj9/nDp+4QVlD5W aLybirkcqmweYoYLYm3snKWutS4nr11hRX1WDXgyThIRzaGSWSsN8VILAnrWqg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718008226; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QtrWllLgjVVJpCeg1HoMAhIxIMGrPXZrfcfOETZh1QI=; b=T0EsjrrmTFSQhB8io5704Jw3kPWvtXY14o1+jonrjlzjTLZyomlCTAOUkbTeP0xtzu6okD G5N5AsDDVfDZ86JiQn+YG6TWwo67iix1KdCzZH3IHHeTjv3FY4nBsQhuTElFJd7Wvskbly i4kYItIjvEcN0SkYDe7mUgz4RI3qRKxLAo2RI2WvpVdsxSiZVGIPS+pZhXbbkuUuVBRaX/ Q0tZ/ddtkptQgCz0V0B3TJZFfMIss6jW2xuhHYVuOaTk+7Zlqyc9aTwP+cUKYPDYN54wSj Y+X5tAW/1U3FXIbzb9Gpfg7C+v+OdH1yfN3tcJxV103dlVupvcXxPnwVmMFExw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VyQ3k0jjhzJRm; Mon, 10 Jun 2024 08:30:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45A8UQa6038419; Mon, 10 Jun 2024 08:30:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45A8UQ5H038416; Mon, 10 Jun 2024 08:30:26 GMT (envelope-from git) Date: Mon, 10 Jun 2024 08:30:26 GMT Message-Id: <202406100830.45A8UQ5H038416@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Benedict Reuschling Subject: git: e5a54f19be8e - main - accf_tls(9): Fix grammar in description (singular/plural) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bcr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e5a54f19be8e0e4e700aaf46ab70d42d3ffba469 Auto-Submitted: auto-generated The branch main has been updated by bcr: URL: https://cgit.FreeBSD.org/src/commit/?id=e5a54f19be8e0e4e700aaf46ab70d42d3ffba469 commit e5a54f19be8e0e4e700aaf46ab70d42d3ffba469 Author: Benedict Reuschling AuthorDate: 2024-06-10 08:29:26 +0000 Commit: Benedict Reuschling CommitDate: 2024-06-10 08:29:26 +0000 accf_tls(9): Fix grammar in description (singular/plural) --- share/man/man9/accf_tls.9 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man9/accf_tls.9 b/share/man/man9/accf_tls.9 index 331ea2aa4fb8..d4dbc299e5bb 100644 --- a/share/man/man9/accf_tls.9 +++ b/share/man/man9/accf_tls.9 @@ -26,7 +26,7 @@ .Os .Sh NAME .Nm accf_tls -.Nd "buffer incoming connections until a TLS handshake like requests arrive" +.Nd "buffer incoming connections until a TLS handshake like request arrives" .Sh SYNOPSIS .Nm options INET .Nm options ACCEPT_FILTER_TLS From nobody Mon Jun 10 09:05:41 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VyQrP3w9Tz5PF4H; Mon, 10 Jun 2024 09:05:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VyQrP3C0Qz442M; Mon, 10 Jun 2024 09:05:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718010341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MJa2Q4vSsYYviARZbl3cQk30iF4SHSV+OaF4bQnVYKU=; b=d2pKoAyuA9cR1TXMN0jWM+gDPElHwy+ftsY8fAlL5gc2C49lCmYKfAqVeAGRB3H7JBZixW IOZFh9JzUhJ+/1EJd78K75WNwcxUiaPqb8IBvvT2n+QEBWwru6WMQDHIL16ZDnoyepTjyZ 1GFEOgIf2RN1cVZ9JoyfxVLezJ8mSKBvrs9EGNmVij65XGpM5Tnpc0IZ/DgqRChkTeziIs KgYK+IaoGuzcQANRdpQF/7n8UlA7Vkiv1GCIKomQtESuztHEXvGyQe5RKdXPs9uCqq6Kcw HpEDvmBklxqs/MkLO3MiS/LHmXxyC22YGOXpl5IXNo1g5O+um7wsIDvurEQYhg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718010341; a=rsa-sha256; cv=none; b=eCIuWcFiEdHzr/OsF4Ysn7mtixtx2p1/qGAu6mSkzLpHJ4DI/kJG0d8d+Nnv5VagCp0GF1 W252I8iUSLnPYS5kv0RHonueGCvxTBV3mbdgSuAEtcsBXl0AjpXG3uah1V3sNjvjiFDcQ7 ltAST8UbEqx71L+oxZO/OFHWny4sgyq5XtiYLkPSz04bK/l9ts5/Tl2C6EpTH0WhcjiNTa T87554Ss+c5NYkdBw7w+cx29ro+TLhAjxs7EwJP4ZVYtzchYFYJpWFm8cCefroAKkX1mjx 4OzrWu55VHKrVW127A4QU2ZT0X9l6jIGlf8VS/2YlT37WG4vZsYQxgTEMKuVnw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718010341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MJa2Q4vSsYYviARZbl3cQk30iF4SHSV+OaF4bQnVYKU=; b=XflCrxXLyCVNNUbONQyitzfyn88J5gV6c3Skp6dBCFq3CxZDoTDPKLt6dJ/eGjatVpOYja eFyIIfRWCRFD3otEJaTcILQNwnVptVTmS8C0gRrZkLOWIjQlFIP/CKX5axNqle9yjjlF7n zMdNPz51ZRypgE3QmD8Hh0vJ1wJ0ViS36yyGH7Ae6GgcYsiILlcNNj3WpFLo2Mdp+9A7Qt V2sXT7vXNWOtvZFZcvsZ0UxcFNj7yQ5AVd5FttG4h/veOdkfHmRizT1uUFBFgMpOQICMpR fMelDMPew+jOERA252TyqMyxw6jvlIT5PxgnszxeHCTBPK1nE+BqY3pbWiEbnw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VyQrP2pYJzKNp; Mon, 10 Jun 2024 09:05:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45A95f41096940; Mon, 10 Jun 2024 09:05:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45A95fRn096937; Mon, 10 Jun 2024 09:05:41 GMT (envelope-from git) Date: Mon, 10 Jun 2024 09:05:41 GMT Message-Id: <202406100905.45A95fRn096937@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 3ff0dc1af85e - main - vmxnet3: make descriptor count checks more robust List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3ff0dc1af85e253b83127ea2417a22a7b2c31f27 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=3ff0dc1af85e253b83127ea2417a22a7b2c31f27 commit 3ff0dc1af85e253b83127ea2417a22a7b2c31f27 Author: Kristof Provost AuthorDate: 2024-06-10 08:47:38 +0000 Commit: Kristof Provost CommitDate: 2024-06-10 09:04:47 +0000 vmxnet3: make descriptor count checks more robust When we update credits there is a potential for a race causing an overflow of vxcr_next (i.e. incrementing it past vxcr_ndesc). Change the check to >= rather than == to be more robust against this. Reviewed by: emaste Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D43712 --- sys/dev/vmware/vmxnet3/if_vmx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/vmware/vmxnet3/if_vmx.c b/sys/dev/vmware/vmxnet3/if_vmx.c index fdcad0dd4bba..62b5f313a137 100644 --- a/sys/dev/vmware/vmxnet3/if_vmx.c +++ b/sys/dev/vmware/vmxnet3/if_vmx.c @@ -1429,7 +1429,8 @@ vmxnet3_isc_txd_credits_update(void *vsc, uint16_t txqid, bool clear) return (1); vmxnet3_barrier(sc, VMXNET3_BARRIER_RD); - if (++txc->vxcr_next == txc->vxcr_ndesc) { + MPASS(txc->vxcr_next < txc->vxcr_ndesc); + if (++txc->vxcr_next >= txc->vxcr_ndesc) { txc->vxcr_next = 0; txc->vxcr_gen ^= 1; } From nobody Mon Jun 10 12:46:23 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VyWl36lprz5Lbdp; Mon, 10 Jun 2024 12:46:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VyWl36GGlz4Rlh; Mon, 10 Jun 2024 12:46:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718023583; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eePjmacLE1vcXvNk1fDglgsRbGWrjGoP25742CEvHIA=; b=FIU5HdnDwTj5X9CnXFz1sEqtXGXRHvcaOh7fHnX4xJ0gk0n+QHsgPpnjuUd0hlizYbgxwz TetQSvKbUs8hVAD4kiMCC49ob/yjGzNskylPOtEs8rf1O0xLMf6PIoVaCD+M4h7yGmnnZr cOMWIJIXYicTprYc/fEfyO0UPOt4/d1nqZ59yIYqpb4sAYyWh+NlRcWwmqPAxu4fhZFn5G nCh1/n0RQE6Cc7ybpRhcN1yG40eIyiIyaWLrO3QAwZbCsHeQcs0sDpZjVAbKnDTsF2Cwn9 sFuUYy45W0yiHMCoVCbqRPdffj3R3rl1OdWKEGqL9Z+Wyrarcs2Oc0JGlla48A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718023583; a=rsa-sha256; cv=none; b=Yd03pe1C2YOF4whUvL3nmabn2AoYmi7F0fXRrmJo7nom+0Fr1anOMde/EmBD8Acat8LPQI QotbswiFILPQ9ks72DhIFaBp2byc39u4ei3ay+UL71MNhe/3DiDVKblUNiPa32ReE8v6j9 46iLpqFw1v/cYRN05KrCDZ8+RY/+2bEipu596N0yLZXhBv7deCLzjGw5/sL9xrpPQz4A0b 6xlWnIcppQx8VXcXuisU3645ExqMTHllNNp/CUABQKvCxiCLlloG41u8j6i+yNOZG1kk7M 2CkTJF/+j6v/vRyWpb2RkvKmCEKUcnJcAVV8udHH5YB3Z0EJP12kZyszLO2MBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718023583; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eePjmacLE1vcXvNk1fDglgsRbGWrjGoP25742CEvHIA=; b=eVeeVDlkJzKuiqk6oYcd4cTvqcTVlOetHQ4t757dm56iX7+2YIpxFhL6QV13a0seM/7QEp Y3N8UCCXzr4y6hB20eUWFObQ6mXTfLPHzD/3nGu3uwdcA0x4SQjAJqln47o/vnj6rWFAfQ Ri0lsvr5+Vvtw/tHtrqK05xVbEk64128wpAohFka0MBpknxRJ3oZsrFUeDkfc/lmGk1eM5 YgSHr+Amg6jg/NIya85EKayNjk5o1QxlhenYV0HhKn7cADS4Af3QhsrAkl83BSdL/s9R0l pB8apG6U+QWc+c9GgxOW6iVj8d2CRZqVHken5FZZNmO2UDE+aO3zZPGcbMQyCA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VyWl35l88zQPy; Mon, 10 Jun 2024 12:46:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45ACkNnn068146; Mon, 10 Jun 2024 12:46:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45ACkNvS068142; Mon, 10 Jun 2024 12:46:23 GMT (envelope-from git) Date: Mon, 10 Jun 2024 12:46:23 GMT Message-Id: <202406101246.45ACkNvS068142@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wei Hu Subject: git: fd911ae60924 - main - Hyper-V: remove unused alloc_pcpu_ptr() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: whu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fd911ae609247ef5c91493fb5506e77aa6e497bc Auto-Submitted: auto-generated The branch main has been updated by whu: URL: https://cgit.FreeBSD.org/src/commit/?id=fd911ae609247ef5c91493fb5506e77aa6e497bc commit fd911ae609247ef5c91493fb5506e77aa6e497bc Author: Wei Hu AuthorDate: 2024-06-10 12:33:46 +0000 Commit: Wei Hu CommitDate: 2024-06-10 12:33:46 +0000 Hyper-V: remove unused alloc_pcpu_ptr() Fixes: 2b887687edc25bb4553f0d8a1183f454a85d413d Sponsored by: Microsoft --- sys/dev/hyperv/vmbus/vmbus.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/dev/hyperv/vmbus/vmbus.c b/sys/dev/hyperv/vmbus/vmbus.c index a3daed05c21a..c1fa9107d3c2 100644 --- a/sys/dev/hyperv/vmbus/vmbus.c +++ b/sys/dev/hyperv/vmbus/vmbus.c @@ -140,7 +140,6 @@ static void vmbus_event_proc_dummy(struct vmbus_softc *, static bus_dma_tag_t vmbus_get_dma_tag(device_t parent, device_t child); static struct vmbus_softc *vmbus_sc; static void free_pcpu_ptr(void); -static void alloc_pcpu_ptr(void); SYSCTL_NODE(_hw, OID_AUTO, vmbus, CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "Hyper-V vmbus"); From nobody Mon Jun 10 14:42:06 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VyZJZ5fFSz5M2fS; Mon, 10 Jun 2024 14:42:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VyZJZ54z9z4dnr; Mon, 10 Jun 2024 14:42:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718030526; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fgcgGBKjYEcFCGJNizz09DE9sKJ1yj6ZQMrquyiKN3c=; b=gW42pLZa5RBUZ7fiCxSAWvxz3fR6rg9mvvbh82mRElqKNdOTUnkZKBlr7bcvLPvm6SO1n/ l5IDAPc4/O6rX6xtvVDlDVVwztArUyazD9LojAvzVzqmUbabYrBITUC7/RQY9PrjIbi5NM xL3iGJaHvswd71G42Q/UNu3/TqLe3TfMM2CR+diAVwgJ00tFaOhwkVDOKQZpFmsTWfbl1R 9zPKMoIklcNQBIwx6As+wc2kb6o6vek8V74pBAkelBvauqFfPZ2JNdI2gWGsvC5eUtrUio yll8vB5P0KVu900+Ss2Lel7X+8m8VF0g0h3kBcMCeqX6UHMS4c5I31uJtHTetw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718030526; a=rsa-sha256; cv=none; b=IXGtUvEp8uFxY/KbCCzeRupIFcW5RGydECetSVTyMPkYO705uWtV6yZHBRFCxL+UUTlPgc m6F0ETYZP3tIKHlHGd26qo0UuP3zTmAFg92Z3lGLfBkERx1svpgaNx9Noe9HATPDbjgrI6 OH94TPgbZ1yldsDL+5gnutY9ANHyv210vJLfjcBg9ykbxFQdaG6aINrKAEwKHvLoQbSqZQ Cs0P0UlzNqH9YLHHlcKpyKDs/hACcVlLIyQkc77Z+0//CFBz2KwO4oPN4rTrOwdU2lqxo7 fItSLlQIz33JhLwetZGrHEwlyrPPOp0wNazqalbQbnwx1B1UUdcbDFWE/0svZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718030526; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fgcgGBKjYEcFCGJNizz09DE9sKJ1yj6ZQMrquyiKN3c=; b=Rf+x5Oo31ZqqVZWLv2FW19h162mfQ2UzSPEzP1RPUqr/Wx/qvzy3ZrabD9Qhg23biXKol6 e7PoWCJxkr11SK+LZEK5oTsLL5G5XELvHst1Mh+o7EREH+KViHdbP1nbkMjXaI5v+28V0R 0p+nBfS407LTWgx9s8FsUp3i2tzNLmXGLsz+Z5ODXSHB4451NzHR1KFB34f6Qq7+PQa0oT 9xMw4mAefOGKeieFG5e+kztV5SESQQRymA7RmhTglIki4Z4Yl7okopoYN/OQm9QoSjXOC0 JIfsFIbBHyhCoCCeWQqufFvXS6uQjagX0PUvi+4iDbp1uZR/CI6+ze1RGvdKwA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VyZJZ4gx1zVdR; Mon, 10 Jun 2024 14:42:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45AEg6nv067963; Mon, 10 Jun 2024 14:42:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45AEg68w067960; Mon, 10 Jun 2024 14:42:06 GMT (envelope-from git) Date: Mon, 10 Jun 2024 14:42:06 GMT Message-Id: <202406101442.45AEg68w067960@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: a87651e2ff18 - main - ktrace(1): add xref to namei(9) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a87651e2ff189cec4c26cb220354f1bc93794f31 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=a87651e2ff189cec4c26cb220354f1bc93794f31 commit a87651e2ff189cec4c26cb220354f1bc93794f31 Author: Ed Maste AuthorDate: 2024-06-10 12:51:01 +0000 Commit: Ed Maste CommitDate: 2024-06-10 14:41:45 +0000 ktrace(1): add xref to namei(9) namei was mistaken for a typo (see GitHub pull request #1284). Add an xref to make it clear. Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45546 --- usr.bin/ktrace/ktrace.1 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/usr.bin/ktrace/ktrace.1 b/usr.bin/ktrace/ktrace.1 index da39aac7800f..162706c65e6e 100644 --- a/usr.bin/ktrace/ktrace.1 +++ b/usr.bin/ktrace/ktrace.1 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 20, 2024 +.Dd June 10, 2024 .Dt KTRACE 1 .Os .Sh NAME @@ -48,7 +48,8 @@ The utility enables kernel trace logging for the specified processes. Kernel trace data is logged to the file .Pa ktrace.out . -The kernel operations that are traced include system calls, namei +The kernel operations that are traced include system calls, +.Xr namei 9 translations, signal processing, and .Tn I/O . .Pp @@ -199,7 +200,8 @@ Disable tracing of all user-owned processes: .Xr truss 1 , .Xr ktrace 2 , .Xr utrace 2 , -.Xr capsicum 4 +.Xr capsicum 4 , +.Xr namei 9 .Sh HISTORY The .Nm From nobody Mon Jun 10 14:49:05 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VyZSd4H01z5M2vy; Mon, 10 Jun 2024 14:49:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VyZSd3d0yz4fQl; Mon, 10 Jun 2024 14:49:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718030945; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uA5QBy+JWvBS6QuDXc6T51KQDsNfN0ATxEECn/bC7vE=; b=FaSaobLpmVD9ZVr/N9NYHP1p3hV0ycOpcQfeAncgX5amQQVBA2vqzPNoYDjowRnsNU3mUq Lq2Bv4XGOF4JMHQbcwa+eC9tfjJtIslrMPgy1EGt1mWkaub19iwWvmzfs9LNOoS7pv9ShR /BCkmRYPTAIJsoU3u7yAB+cVXe0xqo3lA/vMgQYZZccAbaPmCru4W6y4fNaWBmcc4Acgln BzjGwxCgz8H0Izp4qWgOBtT4U1bQDuRafh804rfmyvFiVEn1diW7ILo8k1gu5N2YZj0puo C1PQOlpwu4+RLESwual26T+hvlcGRPopGKIRTeYmxZa8tNWY6xOEN35RsIYgAA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718030945; a=rsa-sha256; cv=none; b=lvMOVbHDH6Zs18NWaX8Dn6o1OREVo7GsD9o/o/ZYdthEmYEwfy3QzDcv6I0PB/dUkJG7V/ MlR2ECH2coe1E+PnPjXXPH3t+fx4+/IffUHY3g3AVahKX5N3pUzkgitFYzx0TwfFR2DHN9 pN3hY/uZDgLwdkIAvmiDEiGc2NaKcr/Flr4R3/1nEs6barPrun5321XpCJhYiJDy+dA/Xj /5NMvu3DWk0P+J7ZwpWMJTI/ghCRDeu+uEe6eqvm5+xefVxwAQgY3k9cRz/XzgV3KwFFXj Dme9JfxS2AoCEmqqlQyZxKi7IAMKV12pBe1RfbZBC1MRDzRNesulV2bJzXzB1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718030945; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uA5QBy+JWvBS6QuDXc6T51KQDsNfN0ATxEECn/bC7vE=; b=XjN2glp2/QyO/0BaMWXCRndneAkWOICUZhJPPqa/q7+XWphUvFyrJ6jCF3UqqiMGFedXsm YiwUC7IbROszoGuo0P/GOmknFDOVsTMpMzZBm3zH8Kq0ziViF7x5zQbIp0psLmH6Wa2t1y yA2hO2v8onoFRPW2mqltdChSxrl41fzxWfaI2hYEHWc4UwMs8349iuP805JXD0xiVf20td o9c5BP8GZJKxE7s+68shSR4iW8SxKB0WizoRk97FZClpRDQeEzsZvA/KdgFGgJpD/WTOFJ I5Yrxa2z11ouMG84e+ebLhzedD4kdQ8iVs5C28TRlmBU3vrkslWlDa5zMk0olg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VyZSd3DwPzVWY; Mon, 10 Jun 2024 14:49:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45AEn5Vl071287; Mon, 10 Jun 2024 14:49:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45AEn5oE071284; Mon, 10 Jun 2024 14:49:05 GMT (envelope-from git) Date: Mon, 10 Jun 2024 14:49:05 GMT Message-Id: <202406101449.45AEn5oE071284@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 87e5b17c149e - main - prepare-commit-msg: add 50 column marker List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 87e5b17c149ef7e68c23c7dfd18734b3e0abe48d Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=87e5b17c149ef7e68c23c7dfd18734b3e0abe48d commit 87e5b17c149ef7e68c23c7dfd18734b3e0abe48d Author: Ed Maste AuthorDate: 2024-06-09 17:24:13 +0000 Commit: Ed Maste CommitDate: 2024-06-10 14:48:32 +0000 prepare-commit-msg: add 50 column marker A common convention suggests a 50 column commit subject line (the first line of the commit message). Add a 50 column marker to the commit message template Reviewed by: lwhsu Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45538 --- tools/tools/git/hooks/prepare-commit-msg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/tools/git/hooks/prepare-commit-msg b/tools/tools/git/hooks/prepare-commit-msg index ac3844accec2..e8e0e2887c3f 100755 --- a/tools/tools/git/hooks/prepare-commit-msg +++ b/tools/tools/git/hooks/prepare-commit-msg @@ -38,7 +38,7 @@ outfile=$(mktemp /tmp/freebsd-git-commit.XXXXXXXX) cat >$outfile < To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 63f7a383434a - main - vmm: Only link the arm64 hyp code in vmm.ko once List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 63f7a383434ae81cdccc6250045f637f8ae9615a Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=63f7a383434ae81cdccc6250045f637f8ae9615a commit 63f7a383434ae81cdccc6250045f637f8ae9615a Author: Andrew Turner AuthorDate: 2024-06-10 14:58:15 +0000 Commit: Andrew Turner CommitDate: 2024-06-10 15:16:10 +0000 vmm: Only link the arm64 hyp code in vmm.ko once This code runs at EL2 while the kernel runs at EL1. We build these files for EL2 through a dependency in vmm_hyp_blob.elf.full so there is no need to include them in SRCS. Reviewed by: imp, kib, markj Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45467 --- sys/modules/vmm/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/modules/vmm/Makefile b/sys/modules/vmm/Makefile index 6737d868f2ea..8f6eb915290a 100644 --- a/sys/modules/vmm/Makefile +++ b/sys/modules/vmm/Makefile @@ -34,8 +34,7 @@ SRCS+= vgic.c \ vgic_v3.c \ vtimer.c -SRCS+= vmm_hyp_exception.S vmm_hyp.c - +CLEANFILES+= vmm_hyp_exception.o vmm_hyp.o CLEANFILES+= vmm_hyp_blob.elf.full CLEANFILES+= vmm_hyp_blob.elf vmm_hyp_blob.bin From nobody Mon Jun 10 15:29:41 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VybMV13ryz5M5sL; Mon, 10 Jun 2024 15:29:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VybMT70lbz4jS8; Mon, 10 Jun 2024 15:29:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718033382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=94W+ZvKT5OasXHusGERtFwrQ6m4AOlwtx8t/wc8UMX4=; b=OI3Loz/Vp2Mhxdzi0eBolzsGVpkpL+w4NssLWFCv7uOfl38npH6OlEv3ut1Fs/YuD4n599 tw6AN2gMc8t0bd1kR8PKqJOF++dnSrVC79z6wxdvtCjsK/Cqlq1inRvRI0xsS/r9DwXvuj FDf5zYxD5rMmuKh/ZQrDjdZYfJQ4p4ghqyoahPZ0T3f+kXpYTcIZ3koBu1WCG4geJXTPrX fcXfFQ0U34ncBPXhIymPRjnBvrVGhjCiKGEprSRulY3UJy9ALPgB9JV35aQV/GwlIfhldf rDQ4oYi50tRto2JwAFUwO0y2IwELqsmxsy/dWAaZqgOlPp1MfxQBjdalo0ga2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718033382; a=rsa-sha256; cv=none; b=dBllFcB3XPELpF/BConsEcdwJDVP8T6qQUDdXwf67dGIo3WD6qFfzPFbGjzyV9v4rTJTre vo/jS4pIaiGZfrNSaxOJmav74vUwHad9FOVEFRRepq05k0AEVtcL2DioQlNKJR7X265Tke 2S/FCnhs00naQRX6XjUkPUL5qLZ7l8j/VsgesrGhonOQFWhUZFj859ynwTg5sVVm7p0POC kSLacFCkC5A4dvHxt9dEu4/sQjpK/BR9Sro3Z+askBnDtaLveXJWMx/jgPV/uhHnXZFNgk 3Wu5Ho/10JQ/vOTounAxKnIlQwDhRFdSDaZXCyo47qDX8yTOQ32ZQDn0yLzNlQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718033382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=94W+ZvKT5OasXHusGERtFwrQ6m4AOlwtx8t/wc8UMX4=; b=ZHq5t6NArdx2l1x2epicksZ9zpkDXrxOaCdo9PxoY6zMW3k48c8ycOCGxYODwkzkS5JOco 3K7qd/9/sPLAl5AABu+J0BVW7SxhEuzsgmNooiYeFDqB/es/TjAnlLeE3Ul3IGnFHFyM4d TQx4hbYhpnTijbi/LH5y/lZ44CHluIj4/8CWGlj62XgfBZZJZ0hLk8VW9f60XMzAKI5r8S Kto5TqbdbYIoMIHV4SrkKQfwnUY6zvH5gAOXrUKGN1HsgdOcNR3XiePRhnx1W0zvFrfOj6 fHT4gcvY5qQfOYqLg3Dxi4IKazudgZC2G9DR4T/GwGIO5COrkGI3xaXcCPvxMw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VybMT6YS6zX5j; Mon, 10 Jun 2024 15:29:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45AFTfiA039322; Mon, 10 Jun 2024 15:29:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45AFTf10039319; Mon, 10 Jun 2024 15:29:41 GMT (envelope-from git) Date: Mon, 10 Jun 2024 15:29:41 GMT Message-Id: <202406101529.45AFTf10039319@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 86bafddd61ab - main - arm64: Fix indentation to be consistent List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 86bafddd61aba115bc46bcf1d7e0afb125850b5f Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=86bafddd61aba115bc46bcf1d7e0afb125850b5f commit 86bafddd61aba115bc46bcf1d7e0afb125850b5f Author: Andrew Turner AuthorDate: 2024-06-10 14:58:22 +0000 Commit: Andrew Turner CommitDate: 2024-06-10 15:16:10 +0000 arm64: Fix indentation to be consistent Adjust the mair_el1 macro indentation to be consistent with the surrounding macros. Reviewed by: emaste Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45524 --- sys/arm64/include/armreg.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/arm64/include/armreg.h b/sys/arm64/include/armreg.h index 7bdb28aad1e5..194731c98902 100644 --- a/sys/arm64/include/armreg.h +++ b/sys/arm64/include/armreg.h @@ -1505,13 +1505,13 @@ #define ID_ISAR5_VCMA_IMPL (UL(0x1) << ID_ISAR5_VCMA_SHIFT) /* MAIR_EL1 - Memory Attribute Indirection Register */ -#define MAIR_ATTR_MASK(idx) (UL(0xff) << ((n)* 8)) -#define MAIR_ATTR(attr, idx) ((attr) << ((idx) * 8)) -#define MAIR_DEVICE_nGnRnE UL(0x00) -#define MAIR_DEVICE_nGnRE UL(0x04) -#define MAIR_NORMAL_NC UL(0x44) -#define MAIR_NORMAL_WT UL(0xbb) -#define MAIR_NORMAL_WB UL(0xff) +#define MAIR_ATTR_MASK(idx) (UL(0xff) << ((n)* 8)) +#define MAIR_ATTR(attr, idx) ((attr) << ((idx) * 8)) +#define MAIR_DEVICE_nGnRnE UL(0x00) +#define MAIR_DEVICE_nGnRE UL(0x04) +#define MAIR_NORMAL_NC UL(0x44) +#define MAIR_NORMAL_WT UL(0xbb) +#define MAIR_NORMAL_WB UL(0xff) /* MDCCINT_EL1 */ #define MDCCINT_EL1 MRS_REG(MDCCINT_EL1) From nobody Mon Jun 10 15:29:42 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VybMW3Nslz5M67S; Mon, 10 Jun 2024 15:29:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VybMW0ls1z4jsZ; Mon, 10 Jun 2024 15:29:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718033383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZTLBIWbl17+xdTv3RdygrTJlnVLm2glnBGHHAk9ew9c=; b=UJ8mhL/RS97G6iAGWTXMtEj0YQ5N+srJpgdxJ7kJ+07gkcHeFAZg5+1qJq4b6uFp2OmxdR WRGdqoWpXyKjDnbzLo+A51nfzUJsC0GRXi4cmlrpdFuXvmpAELiTaP52KS3DiwUq3XQEhK 8TSvROk03R48ppy7XlUXrKRH/6jcCDG11Y9EpWiW9tqLpGZId32c4rIjJ7+LGYMYe608eG BBhkPrHZexvjvjZD9BQKSZogtliYMR1/irpySSd4SLGorp/pRvqSaFrh9Toyg1AdJ4eu46 m6dKini1Va1kITPhPt5UQnRpuoRkfG3LrY7u2Wrd1gbJHX+vMqqrx1YO1uUCKQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718033383; a=rsa-sha256; cv=none; b=RyJWFj9jqHpseGUnZCGOQHfOFtUOMN0yV6StvCskNZQY2wOscfQCq+MTmzJqDco66u/WDd lWXXCp1ew4iVtrD3YuK1CYMyfl9dsVqHyRS9ncadFFR0+NJDm8r/bKVztknJS7LF0KQn3X h6SUnTSyjP+yUkyF8+xxFVWW/OXbrOZsiw20no+jSIHtynAAPEu5uYaRW5gzjc73j9a5BT cKG4Qjew4fyIQ1AnjUQsnPjnd/WXiLf70XdTg3yZfvxUU6/T2j1sw625PI82nvu4oFwaD5 puAajsrx7+sLHR6RHWXx78RfjHTGZeV3vzlygBgUt79j4qDMkAi6/dj4odKkHQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718033383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZTLBIWbl17+xdTv3RdygrTJlnVLm2glnBGHHAk9ew9c=; b=rCw/i3LYQYkm7BhmQNbyZ656o1KCg+x9De7sR5JD4bG59z4vKO9iy9eK0cPGPVYvtSp7/m TBi0dqgBNGmol2PWnF2sYJFlEzicq6wsAhPELNyqqRXE9kSPkjet0rx1WEDbrk2FdOfQH5 rVqaZgj3ZcstF9xOIY+nHopp2cj9pr6zq7Tr/oOJUqc0QRG99nDMxN+WdSAkMA904htqoP PArdVFMXnUm9lSuP2ygTv31wrk5lcphHgt4dUVT4iLfH4IdyMmPvkP92vJOovTt9mJVTWm hPrw2ofHqTtIfYTAugX+U0QA7vHrIK2uAeqRb3qyb3NdMuV5keDMWvmSz3Ejjg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VybMW0BjkzX88; Mon, 10 Jun 2024 15:29:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45AFTgJc039366; Mon, 10 Jun 2024 15:29:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45AFTgY7039363; Mon, 10 Jun 2024 15:29:42 GMT (envelope-from git) Date: Mon, 10 Jun 2024 15:29:42 GMT Message-Id: <202406101529.45AFTgY7039363@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 6abad5b6062d - main - Remove the arm FIQ support List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6abad5b6062d9e8f7e6dd08eaa4033a5358b952e Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=6abad5b6062d9e8f7e6dd08eaa4033a5358b952e commit 6abad5b6062d9e8f7e6dd08eaa4033a5358b952e Author: Andrew Turner AuthorDate: 2024-06-10 14:58:47 +0000 Commit: Andrew Turner CommitDate: 2024-06-10 15:16:10 +0000 Remove the arm FIQ support It isn't used, and only masks/unmasks FIQs on the local CPU so will be broken on SMP. Reviewed by: mmel Differential Revision: https://reviews.freebsd.org/D33804 --- sys/arm/arm/autoconf.c | 2 +- sys/arm/arm/exception.S | 37 +---------- sys/arm/arm/fiq.c | 163 ------------------------------------------------ sys/arm/arm/fiq_subr.S | 92 --------------------------- sys/arm/arm/machdep.c | 2 +- sys/arm/arm/pmap-v6.c | 4 +- sys/arm/arm/syscall.c | 2 - sys/arm/arm/trap-v6.c | 4 +- sys/arm/arm/undefined.c | 2 - sys/arm/include/cpu.h | 2 +- sys/arm/include/fiq.h | 71 --------------------- sys/conf/files.arm | 2 - 12 files changed, 9 insertions(+), 374 deletions(-) diff --git a/sys/arm/arm/autoconf.c b/sys/arm/arm/autoconf.c index 23289db9c19a..fe2882dc6d9f 100644 --- a/sys/arm/arm/autoconf.c +++ b/sys/arm/arm/autoconf.c @@ -90,7 +90,7 @@ static void configure_final(void *dummy) { - enable_interrupts(PSR_I | PSR_F); + enable_interrupts(PSR_I); cninit_finish(); cold = 0; } diff --git a/sys/arm/arm/exception.S b/sys/arm/arm/exception.S index d2e55bd7d84d..d0be3bd9c90a 100644 --- a/sys/arm/arm/exception.S +++ b/sys/arm/arm/exception.S @@ -165,12 +165,12 @@ _C_LABEL(dtrace_invop_jump_addr): #define DO_AST \ ldr r0, [sp]; /* Get the SPSR from stack */ \ mrs r4, cpsr; /* save CPSR */ \ - orr r1, r4, #(PSR_I|PSR_F); \ + orr r1, r4, #(PSR_I); \ msr cpsr_c, r1; /* Disable interrupts */ \ and r0, r0, #(PSR_MODE); /* Returning to USR mode? */ \ teq r0, #(PSR_USR32_MODE); \ bne 2f; /* Nope, get out now */ \ - bic r4, r4, #(PSR_I|PSR_F); \ + bic r4, r4, #(PSR_I); \ 1: GET_CURTHREAD_PTR(r5); \ ldr r1, [r5, #(TD_AST)]; \ teq r1, #0; \ @@ -178,7 +178,7 @@ _C_LABEL(dtrace_invop_jump_addr): msr cpsr_c, r4; /* Restore interrupts */ \ mov r0, sp; \ bl _C_LABEL(ast); /* ast(frame) */ \ - orr r0, r4, #(PSR_I|PSR_F); \ + orr r0, r4, #(PSR_I); \ msr cpsr_c, r0; \ b 1b; \ 2: @@ -315,21 +315,6 @@ ASENTRY_NP(irq_entry) b _C_LABEL(intr_irq_handler)/* trapframe to the handler. */ END(irq_entry) -/* - * Entry point for an FIQ interrupt. - * - * We don't currently support FIQ handlers very much. Something can - * install itself in the FIQ vector using code (that may or may not work - * these days) in fiq.c. If nobody does that and an FIQ happens, this - * default handler just disables FIQs and otherwise ignores it. - */ -ASENTRY_NP(fiq_entry) - mrs r8, cpsr /* FIQ handling isn't supported, */ - bic r8, #(PSR_F) /* just disable FIQ and return. */ - msr cpsr_c, r8 /* The r8 we trash here is the */ - subs pc, lr, #4 /* banked FIQ-mode r8. */ -END(fiq_entry) - /* * Entry point for an Address Exception exception. * This is an arm26 exception that should never happen. @@ -378,8 +363,6 @@ _C_LABEL(page0): ldr pc, .Ldata_abort_entry ldr pc, .Laddr_exception_entry ldr pc, .Lirq_entry -.fiqv: ldr pc, .Lfiq_entry - .space 256 /* room for some fiq handler code */ _C_LABEL(page0_data): .Lreset_entry: .word reset_entry @@ -389,18 +372,4 @@ _C_LABEL(page0_data): .Ldata_abort_entry: .word data_abort_entry .Laddr_exception_entry: .word addr_exception_entry .Lirq_entry: .word irq_entry -.Lfiq_entry: .word fiq_entry - -/* - * These items are used by the code in fiq.c to install what it calls the - * "null" handler. It's actually our default vector entry that just jumps - * to the default handler which just disables FIQs and returns. - */ - .global _C_LABEL(fiq_nullhandler_code), _C_LABEL(fiq_nullhandler_size) - -_C_LABEL(fiq_nullhandler_code): - .word .fiqv -_C_LABEL(fiq_nullhandler_size): - .word 4 - diff --git a/sys/arm/arm/fiq.c b/sys/arm/arm/fiq.c deleted file mode 100644 index e517bbeaf01b..000000000000 --- a/sys/arm/arm/fiq.c +++ /dev/null @@ -1,163 +0,0 @@ -/* $NetBSD: fiq.c,v 1.5 2002/04/03 23:33:27 thorpej Exp $ */ - -/*- - * SPDX-License-Identifier: BSD-4-Clause - * - * Copyright (c) 2001, 2002 Wasabi Systems, Inc. - * All rights reserved. - * - * Written by Jason R. Thorpe for Wasabi Systems, Inc. - * - * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed for the NetBSD Project by - * Wasabi Systems, Inc. - * 4. The name of Wasabi Systems, Inc. may not be used to endorse - * or promote products derived from this software without specific prior - * written permission. - * - * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``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 WASABI SYSTEMS, INC - * 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 -#include - -#include -#include -#include -#include -#include -#include -#include - -TAILQ_HEAD(, fiqhandler) fiqhandler_stack = - TAILQ_HEAD_INITIALIZER(fiqhandler_stack); - -extern char *fiq_nullhandler_code; -extern uint32_t fiq_nullhandler_size; - -/* - * fiq_installhandler: - * - * Actually install the FIQ handler down at the FIQ vector. - * - * The FIQ vector is fixed by the hardware definition as the - * seventh 32-bit word in the vector page. - * - * Note: If the FIQ is invoked via an extra layer of - * indirection, the actual FIQ code store lives in the - * data segment, so there is no need to manipulate - * the vector page's protection. - */ -static void -fiq_installhandler(void *func, size_t size) -{ - const uint32_t fiqvector = 7 * sizeof(uint32_t); - - memcpy((void *)(vector_page + fiqvector), func, size); - icache_sync((vm_offset_t) fiqvector, size); -} - -/* - * fiq_claim: - * - * Claim the FIQ vector. - */ -int -fiq_claim(struct fiqhandler *fh) -{ - struct fiqhandler *ofh; - u_int oldirqstate; - int error = 0; - - if (fh->fh_size > 0x100) - return (EFBIG); - - oldirqstate = disable_interrupts(PSR_F); - - if ((ofh = TAILQ_FIRST(&fiqhandler_stack)) != NULL) { - if ((ofh->fh_flags & FH_CANPUSH) == 0) { - error = EBUSY; - goto out; - } - - /* Save the previous FIQ handler's registers. */ - if (ofh->fh_regs != NULL) - fiq_getregs(ofh->fh_regs); - } - - /* Set FIQ mode registers to ours. */ - if (fh->fh_regs != NULL) - fiq_setregs(fh->fh_regs); - - TAILQ_INSERT_HEAD(&fiqhandler_stack, fh, fh_list); - - /* Now copy the actual handler into place. */ - fiq_installhandler(fh->fh_func, fh->fh_size); - - /* Make sure FIQs are enabled when we return. */ - oldirqstate &= ~PSR_F; - - out: - restore_interrupts(oldirqstate); - return (error); -} - -/* - * fiq_release: - * - * Release the FIQ vector. - */ -void -fiq_release(struct fiqhandler *fh) -{ - u_int oldirqstate; - struct fiqhandler *ofh; - - oldirqstate = disable_interrupts(PSR_F); - - /* - * If we are the currently active FIQ handler, then we - * need to save our registers and pop the next one back - * into the vector. - */ - if (fh == TAILQ_FIRST(&fiqhandler_stack)) { - if (fh->fh_regs != NULL) - fiq_getregs(fh->fh_regs); - TAILQ_REMOVE(&fiqhandler_stack, fh, fh_list); - if ((ofh = TAILQ_FIRST(&fiqhandler_stack)) != NULL) { - if (ofh->fh_regs != NULL) - fiq_setregs(ofh->fh_regs); - fiq_installhandler(ofh->fh_func, ofh->fh_size); - } - } else - TAILQ_REMOVE(&fiqhandler_stack, fh, fh_list); - - if (TAILQ_FIRST(&fiqhandler_stack) == NULL) { - /* Copy the NULL handler back down into the vector. */ - fiq_installhandler(fiq_nullhandler_code, fiq_nullhandler_size); - - /* Make sure FIQs are disabled when we return. */ - oldirqstate |= PSR_F; - } - - restore_interrupts(oldirqstate); -} diff --git a/sys/arm/arm/fiq_subr.S b/sys/arm/arm/fiq_subr.S deleted file mode 100644 index e2fc793d2fd3..000000000000 --- a/sys/arm/arm/fiq_subr.S +++ /dev/null @@ -1,92 +0,0 @@ -/* $NetBSD: fiq_subr.S,v 1.3 2002/04/12 18:50:31 thorpej Exp $ */ - -/*- - * Copyright (c) 2001 Wasabi Systems, Inc. - * All rights reserved. - * - * Written by Jason R. Thorpe for Wasabi Systems, Inc. - * - * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed for the NetBSD Project by - * Wasabi Systems, Inc. - * 4. The name of Wasabi Systems, Inc. may not be used to endorse - * or promote products derived from this software without specific prior - * written permission. - * - * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``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 WASABI SYSTEMS, INC - * 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 -#include - -/* - * MODE_CHANGE_NOP should be inserted between a mode change and a - * banked register (R8--R15) access. - */ -#if defined(CPU_ARM2) || defined(CPU_ARM250) -#define MODE_CHANGE_NOP mov r0, r0 -#else -#define MODE_CHANGE_NOP /* Data sheet says ARM3 doesn't need it */ -#endif - -#define SWITCH_TO_FIQ_MODE \ - mrs r2, cpsr ; \ - mov r3, r2 ; \ - bic r2, r2, #(PSR_MODE) ; \ - orr r2, r2, #(PSR_FIQ32_MODE) ; \ - msr cpsr_fsxc, r2 - -#define BACK_TO_SVC_MODE \ - msr cpsr_fsxc, r3 - -/* - * fiq_getregs: - * - * Fetch the FIQ mode banked registers into the fiqhandler - * structure. - */ -ENTRY(fiq_getregs) - SWITCH_TO_FIQ_MODE - - stmia r0, {r8-r13} - - BACK_TO_SVC_MODE - RET -END(fiq_getregs) - -/* - * fiq_setregs: - * - * Load the FIQ mode banked registers from the fiqhandler - * structure. - */ -ENTRY(fiq_setregs) - SWITCH_TO_FIQ_MODE - - ldmia r0, {r8-r13} - - BACK_TO_SVC_MODE - RET -END(fiq_setregs) - diff --git a/sys/arm/arm/machdep.c b/sys/arm/arm/machdep.c index f54113e3d0ca..fdaf5d3dade8 100644 --- a/sys/arm/arm/machdep.c +++ b/sys/arm/arm/machdep.c @@ -314,7 +314,7 @@ spinlock_enter(void) td = curthread; if (td->td_md.md_spinlock_count == 0) { - cspr = disable_interrupts(PSR_I | PSR_F); + cspr = disable_interrupts(PSR_I); td->td_md.md_spinlock_count = 1; td->td_md.md_saved_cspr = cspr; critical_enter(); diff --git a/sys/arm/arm/pmap-v6.c b/sys/arm/arm/pmap-v6.c index 8d7292f7aa02..de1082e7ae62 100644 --- a/sys/arm/arm/pmap-v6.c +++ b/sys/arm/arm/pmap-v6.c @@ -3364,7 +3364,7 @@ pmap_change_pte1(pmap_t pmap, pt1_entry_t *pte1p, vm_offset_t va, * will be affected by the broken mapping, disable interrupts * until the mapping change is completed. */ - cspr = disable_interrupts(PSR_I | PSR_F); + cspr = disable_interrupts(PSR_I); pte1_clear(pte1p); pmap_tlb_flush_pte1(pmap, va, npte1); pte1_store(pte1p, npte1); @@ -3389,7 +3389,7 @@ pmap_change_pte1(pmap_t pmap, pt1_entry_t *pte1p, vm_offset_t va, * mappings. It's absolutely safe in UP case when interrupts * are disabled. */ - cspr = disable_interrupts(PSR_I | PSR_F); + cspr = disable_interrupts(PSR_I); pte1_clear(pte1p); pmap_tlb_flush_pte1(pmap, va, npte1); pte1_store(pte1p, npte1); diff --git a/sys/arm/arm/syscall.c b/sys/arm/arm/syscall.c index 73ac0560cd91..cce63cdadf32 100644 --- a/sys/arm/arm/syscall.c +++ b/sys/arm/arm/syscall.c @@ -160,8 +160,6 @@ swi_handler(struct trapframe *frame) if (td->td_md.md_spinlock_count == 0) { if (__predict_true(frame->tf_spsr & PSR_I) == 0) enable_interrupts(PSR_I); - if (__predict_true(frame->tf_spsr & PSR_F) == 0) - enable_interrupts(PSR_F); } syscall(td, frame); diff --git a/sys/arm/arm/trap-v6.c b/sys/arm/arm/trap-v6.c index 681f1f90eec6..d58f8c2e4a48 100644 --- a/sys/arm/arm/trap-v6.c +++ b/sys/arm/arm/trap-v6.c @@ -408,8 +408,6 @@ abort_handler(struct trapframe *tf, int prefetch) if (td->td_md.md_spinlock_count == 0) { if (__predict_true(tf->tf_spsr & PSR_I) == 0) enable_interrupts(PSR_I); - if (__predict_true(tf->tf_spsr & PSR_F) == 0) - enable_interrupts(PSR_F); } p = td->td_proc; @@ -565,7 +563,7 @@ abort_fatal(struct trapframe *tf, u_int idx, u_int fsr, u_int far, mode = usermode ? "user" : "kernel"; rw_mode = fsr & FSR_WNR ? "write" : "read"; - disable_interrupts(PSR_I|PSR_F); + disable_interrupts(PSR_I); if (td != NULL) { printf("Fatal %s mode data abort: '%s' on %s\n", mode, diff --git a/sys/arm/arm/undefined.c b/sys/arm/arm/undefined.c index dc29b55ae596..e882a911ba4a 100644 --- a/sys/arm/arm/undefined.c +++ b/sys/arm/arm/undefined.c @@ -226,8 +226,6 @@ undefinedinstruction(struct trapframe *frame) /* Enable interrupts if they were enabled before the exception. */ if (__predict_true(frame->tf_spsr & PSR_I) == 0) enable_interrupts(PSR_I); - if (__predict_true(frame->tf_spsr & PSR_F) == 0) - enable_interrupts(PSR_F); VM_CNT_INC(v_trap); diff --git a/sys/arm/include/cpu.h b/sys/arm/include/cpu.h index b2c370d01cdc..75b0956d0620 100644 --- a/sys/arm/include/cpu.h +++ b/sys/arm/include/cpu.h @@ -729,7 +729,7 @@ get_cyclecount(void) #define cpu_spinwait() /* nothing */ #define cpu_lock_delay() DELAY(1) -#define ARM_NVEC 8 +#define ARM_NVEC 7 #define ARM_VEC_ALL 0xffffffff extern vm_offset_t vector_page; diff --git a/sys/arm/include/fiq.h b/sys/arm/include/fiq.h deleted file mode 100644 index f01011bb63ce..000000000000 --- a/sys/arm/include/fiq.h +++ /dev/null @@ -1,71 +0,0 @@ -/* $NetBSD: fiq.h,v 1.1 2001/12/20 01:20:23 thorpej Exp $ */ - -/*- - * SPDX-License-Identifier: BSD-4-Clause - * - * Copyright (c) 2001 Wasabi Systems, Inc. - * All rights reserved. - * - * Written by Jason R. Thorpe for Wasabi Systems, Inc. - * - * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed for the NetBSD Project by - * Wasabi Systems, Inc. - * 4. The name of Wasabi Systems, Inc. may not be used to endorse - * or promote products derived from this software without specific prior - * written permission. - * - * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``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 WASABI SYSTEMS, INC - * 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. - * - */ - -#ifndef _MACHINE_FIQ_H_ -#define _MACHINE_FIQ_H_ - -#include - -struct fiqregs { - u_int fr_r8; /* FIQ mode r8 */ - u_int fr_r9; /* FIQ mode r9 */ - u_int fr_r10; /* FIQ mode r10 */ - u_int fr_r11; /* FIQ mode r11 */ - u_int fr_r12; /* FIQ mode r12 */ - u_int fr_r13; /* FIQ mode r13 */ -}; - -struct fiqhandler { - TAILQ_ENTRY(fiqhandler) fh_list;/* link in the FIQ handler stack */ - void *fh_func; /* FIQ handler routine */ - size_t fh_size; /* size of FIQ handler */ - int fh_flags; /* flags; see below */ - struct fiqregs *fh_regs; /* pointer to regs structure */ -}; - -#define FH_CANPUSH 0x01 /* can push this handler out of the way */ - -int fiq_claim(struct fiqhandler *); -void fiq_release(struct fiqhandler *); - -void fiq_getregs(struct fiqregs *); -void fiq_setregs(struct fiqregs *); - -#endif /* _MACHINE_FIQ_H_ */ diff --git a/sys/conf/files.arm b/sys/conf/files.arm index 110c0a9e9dbf..b049479fbe82 100644 --- a/sys/conf/files.arm +++ b/sys/conf/files.arm @@ -25,8 +25,6 @@ arm/arm/elf_machdep.c standard arm/arm/elf_note.S standard arm/arm/exception.S standard arm/arm/exec_machdep.c standard -arm/arm/fiq.c standard -arm/arm/fiq_subr.S standard arm/arm/fusu.S standard arm/arm/gdb_machdep.c optional gdb arm/arm/generic_timer.c optional generic_timer From nobody Mon Jun 10 15:50:52 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vybqw5Qzjz5M86L; Mon, 10 Jun 2024 15:50:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vybqw4ykKz4nFn; Mon, 10 Jun 2024 15:50:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718034652; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mGSmmELcqh3i7jJumYf0o3qNwTaZmHzxSOcNRnMeMCc=; b=AGJuZ3dxh5guZ+5Cmm4FXFG6OGRIHPpoCMgsmwzAhoqspR2GYUxYfOdQLynJWUuTbqHNEv WhPbK/YrKZ+0QuIF7yRfU6FEBsXiVo5BVhiB5lsiVS9Y7EeBqvuXQ5KKWsi0ZkUcJJLSC/ V5r1U8q1jTE5KBPnRiB1ZTKJKy147RJyu3tZHxoUb64mBcR8xsB1kYhll7PNXsz+iTuzlQ YQ3pIVfsjSCmjgBRrutTQNn7N5l9OiMR9sLK2B96qXJdLBay7/IWldoPCMoqMHqgJWQMmf ivHhI05of4kfYe35GK210cR/mGco0L/7CdsjcQP/al71EgNbDlgyhtMI9xgD3w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718034652; a=rsa-sha256; cv=none; b=WS5xmdQYhrH6cnaeY19LB2IJxT6529omJqemE9jI5gpKK5wAegWMifbhg4yYf8abT0ZcHu kyCERV8rjMFVMeGRgsqgkvtbKQQOJTQ3mqwJP3sfuWd5hEzPgI7Y+PuH88ztQRTBSd0oq9 oXr4pxpVBmLoWLVGUOlP/ttY7iIfFyJcnux4u0Y/Eeq/jZtuc9SqwMyx6BBdEZ7LL5HDPU AXIxMlOSdjoPvzH38OSOhNKRVbjCZDEeGYgAQTrfOnxbeYOS3Mtfo6N9jXZC5kvWfzHj7V gRObnJMRvyHms7w/MzsfnBY7o6Gxn27BMSDz1T5OdTLsvmyuU0ICb4LdiVI8oA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718034652; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mGSmmELcqh3i7jJumYf0o3qNwTaZmHzxSOcNRnMeMCc=; b=GKFxofYD4XGUDNf2Hzy+gyTaiIemBHuQxGnQs/zCFYhsn3KwmRYWBU5wn0VglVYK5MJdw3 NjdSiZAY5NPYt1IUkLXQfyoMOEwxydeybnNaqUWgsWDOsaXRmroH0GpBSoBnhWb3oU2sdf VilSbV2FsH5+oc5Hl34/wo+WUM9JDA9ZMiSp4/jF7x7vCKiVCo53UriaZF3jsXWu97rfS2 sWyVZG8h6Rol/IfZwDaf4duQd4jJF/etYnNnOom6HveJECejp8/fXSCo742uP1XWuVSrpX RHVIjBSyibBtbHwvYFxRNy1hP+WtKJ/dZtZwmoz99OqA38vOQZYCBpsKZa7+9A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vybqw4YcVzXMX; Mon, 10 Jun 2024 15:50:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45AFoqkG084876; Mon, 10 Jun 2024 15:50:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45AFoqFl084873; Mon, 10 Jun 2024 15:50:52 GMT (envelope-from git) Date: Mon, 10 Jun 2024 15:50:52 GMT Message-Id: <202406101550.45AFoqFl084873@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 0e34d0993096 - main - Add WITHOUT_LLVM_BINUTILS src.conf description List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0e34d099309687f19420c615c5c56c032f30119d Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=0e34d099309687f19420c615c5c56c032f30119d commit 0e34d099309687f19420c615c5c56c032f30119d Author: Ed Maste AuthorDate: 2024-06-10 15:45:41 +0000 Commit: Ed Maste CommitDate: 2024-06-10 15:50:32 +0000 Add WITHOUT_LLVM_BINUTILS src.conf description Before FreeBSD 15 I plan to switch to LLVM_BINUTILS by default. Add the src.conf description now, for the benefit of downstream branches and testing/CI. PR: 258872 [exp-run] Sponsored by: The FreeBSD Foundation --- tools/build/options/WITHOUT_LLVM_BINUTILS | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tools/build/options/WITHOUT_LLVM_BINUTILS b/tools/build/options/WITHOUT_LLVM_BINUTILS new file mode 100644 index 000000000000..35cc0c0e034f --- /dev/null +++ b/tools/build/options/WITHOUT_LLVM_BINUTILS @@ -0,0 +1,17 @@ +Install ELF Tool Chain's binary utilities instead of LLVM's. +This includes +.Xr addr2line 1 , +.Xr ar 1 , +.Xr nm 1 , +.Xr objcopy 1 , +.Xr ranlib 1 , +.Xr readelf 1 , +.Xr size 1 , +and +.Xr strip 1 . +Regardless of this setting, LLVM tools are used for +.Xr c++filt 1 +and +.Xr objdump 1 . +.Xr strings 1 +is always provided by ELF Tool Chain. From nobody Mon Jun 10 16:01:41 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vyc4Q0hJNz5M8vy; Mon, 10 Jun 2024 16:01:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vyc4Q01XJz4pgm; Mon, 10 Jun 2024 16:01:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718035302; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6Vf277lJNZJ+GbTKdYYqxyQC4w4Y2Pk8lhI6BXUY/ak=; b=K9W4KlyeX7bDjPWOhFX/BRlCrRyd5ZemV24X48Y5CQG3VW4jth1Q8SQM33c1ksyU1sMfUK BxaUR9whCBBk1pshxyHu7WGQ+Fua6WtGXmLsfQC0WKbWWMnvbnb/vKSox1t4e2f0ijbDAQ mudpoytpcdm7MRLpHILbUGy+gJH5bIpC10hN4D9aL/adsps45x/AnwsT1bNpAJojt7XlGK RqQ1kwNO4DiuYY9PcvGbhya+N6aONif24mj4WVd1FnMPXlT9UYxtenph7nwHGrm7f/uLXz BOVPBdwQuzLEtgVgjiRS0EY0SZXnLrkJhWAeofZZVWyGFrJ0JgTsTR9X/TL/KA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718035302; a=rsa-sha256; cv=none; b=W+E0ro+/AsV6pKbz2RMJjlHBKnYr7IDKMDVFwLwvnEiRr2RRb8KDBq/AhupmNtH/pC2j7I +PJDT79t4560UU7W89joZXVLWd3DpH7qCaJTEkbE7MlgTXUb3/j68KPZy1UrfU1M6n0AHk ZfJmIwEp92GmZe4kIfpyQCY+xiCLaSIXGQF5bEscvReFVz+coQTUTFlyD2oITHFQrZRxs9 LFu0jPiv5UE0gwKC26oMrTA8qYtyInoj2/og1klIuIysWTeXIyJe7CM3TtzLJX+vcwgtkH 5Lwdf4J3MBFUkJki2YQoVU2eN5R6Q/tOhzT4d71PWePsHwYu109StXjotJWfQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718035302; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6Vf277lJNZJ+GbTKdYYqxyQC4w4Y2Pk8lhI6BXUY/ak=; b=m8I9kS6wrfY6nj7bHDXFT2n6DZAVuaIUBOac5Mq/nYZFLYBvRZuqujcSFCZDrGe6F80Vgl +FkVkZooPacylpMwBZofLJNbYDWG7jPnzg5QHwgF/rh6vXQxB3bq52MqLTbqeWHK1H9FHL BqdIisMB255tGZOYipgP/iQjsGOip+UqdOqhh5c+u9rccm2R3xGzEbHotOitFofx0bjbAO H0TqXLZ21Q217h4SlfB0T6nM1q0I5fiQt5PuZ7gE6S0rShHPcw6fbe1XROjbNsQn0eeGap OeECIpB++0Azskh/a0p+EfCQzHGD69CmQlWTxeQUJsyGVZJry/I6Qx5bnr6/DQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vyc4P6jxqzXQH; Mon, 10 Jun 2024 16:01:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45AG1fa5001344; Mon, 10 Jun 2024 16:01:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45AG1fQw001341; Mon, 10 Jun 2024 16:01:41 GMT (envelope-from git) Date: Mon, 10 Jun 2024 16:01:41 GMT Message-Id: <202406101601.45AG1fQw001341@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: 9747d11d9164 - main - Add some ATF tests for ctladm List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9747d11d91642cb9b81602d88e8aebeb388543c7 Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=9747d11d91642cb9b81602d88e8aebeb388543c7 commit 9747d11d91642cb9b81602d88e8aebeb388543c7 Author: Alan Somers AuthorDate: 2024-06-05 20:16:25 +0000 Commit: Alan Somers CommitDate: 2024-06-10 16:01:25 +0000 Add some ATF tests for ctladm So far only "ctladm port -c" and "ctladm port -r" are covered. MFC after: 2 weeks Sponsored by: Axcient Reviewed by: mav Pull Request: https://github.com/freebsd/freebsd-src/pull/1279 --- etc/mtree/BSD.tests.dist | 2 + usr.sbin/ctladm/Makefile | 3 + usr.sbin/ctladm/tests/Makefile | 10 +++ usr.sbin/ctladm/tests/port.sh | 155 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 170 insertions(+) diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 3f447f9ec25e..86db4304b932 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -90,6 +90,8 @@ .. .. usr.sbin + ctladm + .. dtrace common aggs diff --git a/usr.sbin/ctladm/Makefile b/usr.sbin/ctladm/Makefile index 5e0df8065cce..b563891672be 100644 --- a/usr.sbin/ctladm/Makefile +++ b/usr.sbin/ctladm/Makefile @@ -23,4 +23,7 @@ MAN= ctladm.8 CFLAGS+= -DWANT_ISCSI .endif +HAS_TESTS= +SUBDIR.${MK_TESTS}+= tests + .include diff --git a/usr.sbin/ctladm/tests/Makefile b/usr.sbin/ctladm/tests/Makefile new file mode 100644 index 000000000000..73ac94d77d21 --- /dev/null +++ b/usr.sbin/ctladm/tests/Makefile @@ -0,0 +1,10 @@ + +PACKAGE= tests + +ATF_TESTS_SH= port + +# "ctladm port" does not report the name of the port just created, so we can't +# cleanup unless we assume that no other test created a port too. +TEST_METADATA+= is_exclusive="true" + +.include diff --git a/usr.sbin/ctladm/tests/port.sh b/usr.sbin/ctladm/tests/port.sh new file mode 100644 index 000000000000..b2cdea6f1de2 --- /dev/null +++ b/usr.sbin/ctladm/tests/port.sh @@ -0,0 +1,155 @@ +# Things that aren't tested due to lack of kernel support: +# * Creating camsim ports +# * Creating tpc ports +# * Creating camtgt ports +# * Creating umass ports + +# TODO +# * Creating iscsi ports +# * Creating nvmf ports +# * Creating ha ports +# * Creating fc ports + +skip_if_ctld() { + if service ctld onestatus > /dev/null; then + # If ctld is running on this server, let's not interfere. + atf_skip "Cannot run this test while ctld is running" + fi +} + +cleanup() { + driver=$1 + + if [ -e after-ports ]; then + diff before-ports after-ports | awk "/$driver/ {print \$2}" | xargs -n1 ctladm port -r -d ioctl -p + fi +} + +atf_test_case create_ioctl cleanup +create_ioctl_head() +{ + atf_set "descr" "ctladm can create a new ioctl port" + atf_set "require.user" "root" +} +create_ioctl_body() +{ + skip_if_ctld + + atf_check -o save:before-ports ctladm portlist -qf ioctl + atf_check ctladm port -c -d "ioctl" + atf_check -o save:after-ports ctladm portlist -qf ioctl + if test `wc -l before-ports | cut -w -f2` -ge `wc -l after-ports | cut -w -f2`; then + atf_fail "Did not create a new ioctl port" + fi +} +create_ioctl_cleanup() +{ + cleanup ioctl +} + +atf_test_case create_ioctl_options cleanup +create_ioctl_options_head() +{ + atf_set "descr" "ctladm can set options when creating a new ioctl port" + atf_set "require.user" "root" +} +create_ioctl_options_body() +{ + skip_if_ctld + + atf_check -o save:before-ports ctladm portlist -qf ioctl + atf_check ctladm port -c -d "ioctl" -O pp=101 -O vp=102 + atf_check -o save:after-ports ctladm portlist -qf ioctl + if test `wc -l before-ports | cut -w -f2` -ge `wc -l after-ports | cut -w -f2`; then + atf_fail "Did not create a new ioctl port" + fi + if ! egrep -q '101[[:space:]]+102' after-ports; then + ctladm portlist + atf_fail "Did not create the port with the specified options" + fi +} +create_ioctl_options_cleanup() +{ + cleanup ioctl +} + + +atf_test_case disable_ioctl cleanup +disable_ioctl_head() +{ + atf_set "descr" "ctladm can disable an ioctl port" + atf_set "require.user" "root" +} +disable_ioctl_body() +{ + skip_if_ctld + + atf_check -o save:before-ports ctladm portlist -qf ioctl + atf_check ctladm port -c -d "ioctl" + atf_check -o save:after-ports ctladm portlist -qf ioctl + if test `wc -l before-ports | cut -w -f2` -ge `wc -l after-ports | cut -w -f2`; then + atf_fail "Did not create a new ioctl port" + fi + portnum=`diff before-ports after-ports | awk '/ioctl/ {print $2}'`; + atf_check -o ignore ctladm port -o off -p $portnum + atf_check -o match:"^$portnum *NO" ctladm portlist -qf ioctl +} +disable_ioctl_cleanup() +{ + cleanup ioctl +} + +atf_test_case enable_ioctl cleanup +enable_ioctl_head() +{ + atf_set "descr" "ctladm can enable an ioctl port" + atf_set "require.user" "root" +} +enable_ioctl_body() +{ + skip_if_ctld + + atf_check -o save:before-ports ctladm portlist -qf ioctl + atf_check ctladm port -c -d "ioctl" + atf_check -o save:after-ports ctladm portlist -qf ioctl + if test `wc -l before-ports | cut -w -f2` -ge `wc -l after-ports | cut -w -f2`; then + atf_fail "Did not create a new ioctl port" + fi + portnum=`diff before-ports after-ports | awk '/ioctl/ {print $2}'`; + atf_check -o ignore ctladm port -o off -p $portnum + atf_check -o ignore ctladm port -o on -p $portnum + atf_check -o match:"^$portnum *YES" ctladm portlist -qf ioctl +} +enable_ioctl_cleanup() +{ + cleanup ioctl +} + +atf_test_case remove_ioctl +remove_ioctl_head() +{ + atf_set "descr" "ctladm can remove an ioctl port" + atf_set "require.user" "root" +} +remove_ioctl_body() +{ + skip_if_ctld + + atf_check -o save:before-ports ctladm portlist -qf ioctl + atf_check ctladm port -c -d "ioctl" + atf_check -o save:after-ports ctladm portlist -qf ioctl + if test `wc -l before-ports | cut -w -f2` -ge `wc -l after-ports | cut -w -f2`; then + atf_fail "Did not create a new ioctl port" + fi + portnum=`diff before-ports after-ports | awk '/ioctl/ {print $2}'`; + atf_check ctladm port -r -d ioctl -p $portnum +} + +atf_init_test_cases() +{ + atf_add_test_case create_ioctl + atf_add_test_case create_ioctl_options + atf_add_test_case disable_ioctl + atf_add_test_case enable_ioctl + atf_add_test_case remove_ioctl +} From nobody Mon Jun 10 16:01:42 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vyc4R20rpz5M8jn; Mon, 10 Jun 2024 16:01:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vyc4R16DFz4pQp; Mon, 10 Jun 2024 16:01:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718035303; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C0ji/nvjaNzzTYpSWrddn05wSI4iZ7S7wOMpm8Oypmw=; b=veNFPYu2ziBAqWL5+V/K85TXzSL95fZ90FW+O0v8uG6RRzCYj82Yie1cDWGNB8orvejXwq G8cpc0sT6i5/HZjFJMbWypnsrp/bQhArXEGcFHWLcE2b9W4tnbA343X3XHbbqGL7agEB0E I1bp3TEq3FEzdooi/bRj+VYtd5xeqcnjYTLNofxOo66XgfjDstkBbXGjx/uvRJthPUi4uy yGblVprluJQBJEZ0FsCRiYvqWtypAihrB+sb8FSZSShjnMHD/HcquMaNo9k/dxBw8NhAZ7 aDF+6T6PGMnw0yZfNoPXysAS0d+w0xso2vvrrHpxvcLWHjfXUwK3TjekUgSZnw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718035303; a=rsa-sha256; cv=none; b=bcnCUjGu62CmAAXQpCMmPCrn1/EQuf2K88/kziLQSDXeFRvmO/eFMOH3xMdeK3ESlMjIAW JJdVi/QoRkKWkdzv08vUXdZBshVdn6hjbeY96WsYeW/ZA2yPDFI9IR7j4uUfkE0b80erMh DUNOyOMIONc3rlcNtmS/c+1xIudf1Kg0GjdmmnujUsnuj8HnpKFjbo4dOv8kB2iOZf5HFX 2zOTIKL3S/YgbrjBqnd69AeMFHIpaLplZGsh3kEef80VHM0LDDaaqgmoJ16CDL0GPwbBdB 8y89P+QfagSlQOSP5a2zIrvzH9x3Xb28Kra7yIkdecsYWMTEUT7fwb7YPqY9aw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718035303; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C0ji/nvjaNzzTYpSWrddn05wSI4iZ7S7wOMpm8Oypmw=; b=MiKd5AlK0y6QAHKVbWSE43btUEOBINvSPRbIO0sEZztmoKDl12PTOG479ltXwJ1WE/hFBp MunZc5N5/SBEcJbhJG2/ModvbWgkhksLZP5pqMXKinMBFuwR9dUi+TWRZeU58YIHxIE10i lKktcVTx6ejhuyeJmd5mPa7/vmXjlO4veLaX5X7lQikusMaVZTtTQ6TG0nVwp6fqGh8BcM khPxBCj1VJMfBkeRYCv9njrGMx2C6rxibXoxKI5qEmD3SEfsIdvpQKjT182GlEuEsT08vQ 4ao6U5t9IzjU6VIbHJwUWe1oKDsusYDZCsUf0yj2RMnj+WwZ3RbasRda1ZjpAA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vyc4R0gVpzXQJ; Mon, 10 Jun 2024 16:01:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45AG1gEZ001401; Mon, 10 Jun 2024 16:01:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45AG1gdG001398; Mon, 10 Jun 2024 16:01:42 GMT (envelope-from git) Date: Mon, 10 Jun 2024 16:01:42 GMT Message-Id: <202406101601.45AG1gdG001398@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: 591de7534fb3 - main - ctladm: print port number with a succesful "port -c" command List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 591de7534fb3acb2e6eef94a1e5e92000d2cf83d Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=591de7534fb3acb2e6eef94a1e5e92000d2cf83d commit 591de7534fb3acb2e6eef94a1e5e92000d2cf83d Author: Alan Somers AuthorDate: 2024-06-05 23:54:46 +0000 Commit: Alan Somers CommitDate: 2024-06-10 16:01:25 +0000 ctladm: print port number with a succesful "port -c" command Make "ctladm port -c" print the port number of the newly successful port. This way it won't have to be guessed by a subsequent "ctladm portlist" command. That means it's safe to use it concurrently with other ctladm processes. In particular, this allows the tests to be run in parallel. MFC after: 2 weeks Sponsored by: Axcient Reviewed by: mav Pull Request: https://github.com/freebsd/freebsd-src/pull/1279 --- usr.sbin/ctladm/ctladm.c | 18 +++++++++++ usr.sbin/ctladm/tests/Makefile | 4 --- usr.sbin/ctladm/tests/port.sh | 70 ++++++++++++++++++++---------------------- 3 files changed, 52 insertions(+), 40 deletions(-) diff --git a/usr.sbin/ctladm/ctladm.c b/usr.sbin/ctladm/ctladm.c index 28f9a39386d3..14951797ddf1 100644 --- a/usr.sbin/ctladm/ctladm.c +++ b/usr.sbin/ctladm/ctladm.c @@ -397,7 +397,9 @@ static struct ctladm_opts cctl_fe_table[] = { static int cctl_port(int fd, int argc, char **argv, char *combinedopt) { + char result_buf[1024]; int c; + uint64_t created_port = -1; int32_t targ_port = -1; int retval = 0; int wwnn_set = 0, wwpn_set = 0; @@ -587,6 +589,8 @@ cctl_port(int fd, int argc, char **argv, char *combinedopt) case CCTL_PORT_MODE_CREATE: { bzero(&req, sizeof(req)); strlcpy(req.driver, driver, sizeof(req.driver)); + req.result = result_buf; + req.result_len = sizeof(result_buf); if (port_mode == CCTL_PORT_MODE_REMOVE) { req.reqtype = CTL_REQ_REMOVE; @@ -619,6 +623,20 @@ cctl_port(int fd, int argc, char **argv, char *combinedopt) warnx("warning: %s", req.error_str); break; case CTL_LUN_OK: + if (port_mode == CCTL_PORT_MODE_CREATE) { + req.result_nvl = nvlist_unpack(result_buf, req.result_len, 0); + if (req.result_nvl == NULL) { + warnx("error unpacking result nvlist"); + break; + } + created_port = nvlist_get_number(req.result_nvl, "port_id"); + printf("Port created successfully\n" + "frontend: %s\n" + "port: %ju\n", driver, + (uintmax_t) created_port); + nvlist_destroy(req.result_nvl); + } else + printf("Port destroyed successfully\n"); break; default: warnx("unknown status: %d", req.status); diff --git a/usr.sbin/ctladm/tests/Makefile b/usr.sbin/ctladm/tests/Makefile index 73ac94d77d21..825e38e6c6e3 100644 --- a/usr.sbin/ctladm/tests/Makefile +++ b/usr.sbin/ctladm/tests/Makefile @@ -3,8 +3,4 @@ PACKAGE= tests ATF_TESTS_SH= port -# "ctladm port" does not report the name of the port just created, so we can't -# cleanup unless we assume that no other test created a port too. -TEST_METADATA+= is_exclusive="true" - .include diff --git a/usr.sbin/ctladm/tests/port.sh b/usr.sbin/ctladm/tests/port.sh index b2cdea6f1de2..ccc4a6fc502e 100644 --- a/usr.sbin/ctladm/tests/port.sh +++ b/usr.sbin/ctladm/tests/port.sh @@ -20,8 +20,9 @@ skip_if_ctld() { cleanup() { driver=$1 - if [ -e after-ports ]; then - diff before-ports after-ports | awk "/$driver/ {print \$2}" | xargs -n1 ctladm port -r -d ioctl -p + if [ -e port-create.txt ]; then + portnum=`awk '/port:/ {print $2}' port-create.txt` + ctladm port -r -d $driver -p $portnum fi } @@ -35,12 +36,13 @@ create_ioctl_body() { skip_if_ctld - atf_check -o save:before-ports ctladm portlist -qf ioctl - atf_check ctladm port -c -d "ioctl" - atf_check -o save:after-ports ctladm portlist -qf ioctl - if test `wc -l before-ports | cut -w -f2` -ge `wc -l after-ports | cut -w -f2`; then - atf_fail "Did not create a new ioctl port" - fi + atf_check -o save:port-create.txt ctladm port -c -d "ioctl" + atf_check egrep -q "Port created successfully" port-create.txt + atf_check egrep -q "frontend: *ioctl" port-create.txt + atf_check egrep -q "port: *[0-9]+" port-create.txt + portnum=`awk '/port:/ {print $2}' port-create.txt` + atf_check -o save:portlist.txt ctladm portlist -qf ioctl + atf_check egrep -q "$portnum *YES *ioctl *ioctl" portlist.txt } create_ioctl_cleanup() { @@ -57,13 +59,13 @@ create_ioctl_options_body() { skip_if_ctld - atf_check -o save:before-ports ctladm portlist -qf ioctl - atf_check ctladm port -c -d "ioctl" -O pp=101 -O vp=102 - atf_check -o save:after-ports ctladm portlist -qf ioctl - if test `wc -l before-ports | cut -w -f2` -ge `wc -l after-ports | cut -w -f2`; then - atf_fail "Did not create a new ioctl port" - fi - if ! egrep -q '101[[:space:]]+102' after-ports; then + atf_check -o save:port-create.txt ctladm port -c -d "ioctl" -O pp=101 -O vp=102 + atf_check egrep -q "Port created successfully" port-create.txt + atf_check egrep -q "frontend: *ioctl" port-create.txt + atf_check egrep -q "port: *[0-9]+" port-create.txt + portnum=`awk '/port:/ {print $2}' port-create.txt` + atf_check -o save:portlist.txt ctladm portlist -qf ioctl + if ! egrep -q '101[[:space:]]+102' portlist.txt; then ctladm portlist atf_fail "Did not create the port with the specified options" fi @@ -84,13 +86,9 @@ disable_ioctl_body() { skip_if_ctld - atf_check -o save:before-ports ctladm portlist -qf ioctl - atf_check ctladm port -c -d "ioctl" - atf_check -o save:after-ports ctladm portlist -qf ioctl - if test `wc -l before-ports | cut -w -f2` -ge `wc -l after-ports | cut -w -f2`; then - atf_fail "Did not create a new ioctl port" - fi - portnum=`diff before-ports after-ports | awk '/ioctl/ {print $2}'`; + atf_check -o save:port-create.txt ctladm port -c -d "ioctl" + portnum=`awk '/port:/ {print $2}' port-create.txt` + atf_check -o save:portlist.txt ctladm portlist -qf ioctl atf_check -o ignore ctladm port -o off -p $portnum atf_check -o match:"^$portnum *NO" ctladm portlist -qf ioctl } @@ -109,13 +107,9 @@ enable_ioctl_body() { skip_if_ctld - atf_check -o save:before-ports ctladm portlist -qf ioctl - atf_check ctladm port -c -d "ioctl" - atf_check -o save:after-ports ctladm portlist -qf ioctl - if test `wc -l before-ports | cut -w -f2` -ge `wc -l after-ports | cut -w -f2`; then - atf_fail "Did not create a new ioctl port" - fi - portnum=`diff before-ports after-ports | awk '/ioctl/ {print $2}'`; + atf_check -o save:port-create.txt ctladm port -c -d "ioctl" + portnum=`awk '/port:/ {print $2}' port-create.txt` + atf_check -o save:portlist.txt ctladm portlist -qf ioctl atf_check -o ignore ctladm port -o off -p $portnum atf_check -o ignore ctladm port -o on -p $portnum atf_check -o match:"^$portnum *YES" ctladm portlist -qf ioctl @@ -135,14 +129,18 @@ remove_ioctl_body() { skip_if_ctld - atf_check -o save:before-ports ctladm portlist -qf ioctl - atf_check ctladm port -c -d "ioctl" - atf_check -o save:after-ports ctladm portlist -qf ioctl - if test `wc -l before-ports | cut -w -f2` -ge `wc -l after-ports | cut -w -f2`; then - atf_fail "Did not create a new ioctl port" + # Specify exact pp and vp to make the post-removal portlist check + # unambiguous + atf_check -o save:port-create.txt ctladm port -c -d "ioctl" -O pp=10001 -O vp=10002 + portnum=`awk '/port:/ {print $2}' port-create.txt` + atf_check -o save:portlist.txt ctladm portlist -qf ioctl + atf_check -o inline:"Port destroyed successfully\n" ctladm port -r -d ioctl -p $portnum + # Check that the port was removed. A new port may have been added with + # the same ID, so match against the pp and vp numbers, too. + if ctladm portlist -qf ioctl | egrep -q "^${portnum} .*10001 *10002"; then + ctladm portlist -qf ioctl + atf_fail "port was not removed" fi - portnum=`diff before-ports after-ports | awk '/ioctl/ {print $2}'`; - atf_check ctladm port -r -d ioctl -p $portnum } atf_init_test_cases() From nobody Mon Jun 10 16:01:44 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vyc4S408Rz5M8y7; Mon, 10 Jun 2024 16:01:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vyc4S2BZtz4pdt; Mon, 10 Jun 2024 16:01:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718035304; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IruziadEJW24JeCXhHM/QBcqtuqY7kubVzg+gAAe8yk=; b=guM4Uq5Trs+oI8hiu2jgUmicxDx6XATc/AXjdSneY2g8eidP6BOwoME486dXhl7PkqZpYd A2r0/PXREVcwpguxJPzpvYlsg/oJe55wyvCqlATtgzqPVlkh5evIRAi/AjkECK2CQs2HfZ 9bEdDLkd6nzH47F1ekBk1IFUrSv170yXeVX93kx0lTAM/mkcc8jXcBvkxdfCp6mWNjjnfo U4kxS7BjodcBB2wxoPuf1AZtXM9thFguS1fly1BIVvnylIazkfhFXnYKJ5VUavn/bgdTNj CIQLXsYsCTn46y8XFLdeyu71WNv0eAAA2LsxbDdkAQlwQLCTH5r09mqyV+9CHQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718035304; a=rsa-sha256; cv=none; b=k4M84180Wl42wSIL5qWJ4zUUKaBtDO44S0sCBUSpJZ1a2TkBPp5WQKjGvfw+gNZRyCSs23 vHYGw7FJShyLnbVD/mE/ZP60VTzsk0emCpCYfLplNzTERToyoDynT2FJQJXARysAdM6nZ9 ZctO6tCcIXGZFXDFIfqSZ2JlfsdTp70KumDiC9SJBCrNkDqXfbWbx3tVLW16kBiCQNqh4a yPV6VPzfWh3r9UFY9p/H11KZI3bXVNMhxW2uh9tUMFAMcspSxjAYgSbU3B7p1I+/p3Gjse basicDvImuv33QGXaBR23f+3eztXYMWItFQwg6EVUgDYr4mQsVejx/EC8yASxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718035304; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IruziadEJW24JeCXhHM/QBcqtuqY7kubVzg+gAAe8yk=; b=RHqezWjail/nJ3sqQ5fLkhn4gAmAFnb7Y1/AxBFdrkF+Ju0YAvwYPAbTDxH962B7T1/WWv 0710cXLIOmP5Ls1VnBag9gw0SIOqGpp1jWL6321JM+/lZiOfd8uLVBwnPw/lDRgRQtM4Pn nqwyfvWJ4mUCuivfmQst/LVa0k+2hhLfCCeqM+bJvl5JwNa1kATSG6nTpBLmVPPUenSOH6 dSVKiBLUaUtchcLIE/wkQxAxj0b5EWYVMz/fWvtU60CbZ7i+kaaKBM4oPwDymP8COhdMdy sKGW66lnmqI4d4vmwLcwJ4biGHC8r93vBKKtLqN/uBb8UZF93aS5T3gF30tQ+w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vyc4S1lSdzXQL; Mon, 10 Jun 2024 16:01:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45AG1iTq001461; Mon, 10 Jun 2024 16:01:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45AG1iff001458; Mon, 10 Jun 2024 16:01:44 GMT (envelope-from git) Date: Mon, 10 Jun 2024 16:01:44 GMT Message-Id: <202406101601.45AG1iff001458@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: afecc74cd715 - main - ctladm: better documentation for adding and removing cfiscsi ports List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: afecc74cd7158da8e89c26c5267bc715c2417fe7 Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=afecc74cd7158da8e89c26c5267bc715c2417fe7 commit afecc74cd7158da8e89c26c5267bc715c2417fe7 Author: Alan Somers AuthorDate: 2024-06-06 17:19:19 +0000 Commit: Alan Somers CommitDate: 2024-06-10 16:01:25 +0000 ctladm: better documentation for adding and removing cfiscsi ports MFC after: 2 weeks Sponsored by: Axcient Reviewed by: mav Pull Request: https://github.com/freebsd/freebsd-src/pull/1279 --- sys/cam/ctl/ctl_frontend_iscsi.c | 27 ++++++-- usr.sbin/ctladm/ctladm.8 | 32 +++++++-- usr.sbin/ctladm/tests/port.sh | 146 ++++++++++++++++++++++++++++++++++++++- 3 files changed, 191 insertions(+), 14 deletions(-) diff --git a/sys/cam/ctl/ctl_frontend_iscsi.c b/sys/cam/ctl/ctl_frontend_iscsi.c index fe3b1a943206..e8a3fe7cd36a 100644 --- a/sys/cam/ctl/ctl_frontend_iscsi.c +++ b/sys/cam/ctl/ctl_frontend_iscsi.c @@ -2149,17 +2149,24 @@ cfiscsi_ioctl_port_create(struct ctl_req *req) uint16_t tag; target = dnvlist_get_string(req->args_nvl, "cfiscsi_target", NULL); - alias = dnvlist_get_string(req->args_nvl, "cfiscsi_target_alias", NULL); + if (target == NULL) { + req->status = CTL_LUN_ERROR; + snprintf(req->error_str, sizeof(req->error_str), + "Missing required argument: cfiscsi_target"); + return; + } + val = dnvlist_get_string(req->args_nvl, "cfiscsi_portal_group_tag", NULL); - - if (target == NULL || val == NULL) { + if (val == NULL) { req->status = CTL_LUN_ERROR; snprintf(req->error_str, sizeof(req->error_str), - "Missing required argument"); + "Missing required argument: cfiscsi_portal_group_tag"); return; } + alias = dnvlist_get_string(req->args_nvl, "cfiscsi_target_alias", NULL); + tag = strtoul(val, NULL, 0); ct = cfiscsi_target_find_or_create(&cfiscsi_softc, target, alias, tag); if (ct == NULL) { @@ -2250,13 +2257,19 @@ cfiscsi_ioctl_port_remove(struct ctl_req *req) uint16_t tag; target = dnvlist_get_string(req->args_nvl, "cfiscsi_target", NULL); + if (target == NULL) { + req->status = CTL_LUN_ERROR; + snprintf(req->error_str, sizeof(req->error_str), + "Missing required argument: cfiscsi_target"); + return; + } + val = dnvlist_get_string(req->args_nvl, "cfiscsi_portal_group_tag", NULL); - - if (target == NULL || val == NULL) { + if (val == NULL) { req->status = CTL_LUN_ERROR; snprintf(req->error_str, sizeof(req->error_str), - "Missing required argument"); + "Missing required argument: cfiscsi_portal_group_tag"); return; } diff --git a/usr.sbin/ctladm/ctladm.8 b/usr.sbin/ctladm/ctladm.8 index b3af4b45ba26..5c6e4aa04c77 100644 --- a/usr.sbin/ctladm/ctladm.8 +++ b/usr.sbin/ctladm/ctladm.8 @@ -35,7 +35,7 @@ .\" .\" $Id: //depot/users/kenm/FreeBSD-test2/usr.sbin/ctladm/ctladm.8#3 $ .\" -.Dd June 5, 2024 +.Dd June 6, 2024 .Dt CTLADM 8 .Os .Sh NAME @@ -166,7 +166,7 @@ .Op Fl o Ar on|off .Op Fl w Ar wwpn .Op Fl W Ar wwnn -.Op Fl O Ar pp|vp +.Op Fl O Ar name=value .Op Fl p Ar targ_port .Op Fl r .Op Fl t Ar fe_type @@ -625,7 +625,7 @@ The WWNN and WWPN may both be specified at the same time, but cannot be combined with enabling/disabling or listing ports. .Bl -tag -width 12n .It Fl c -Create new frontend port using free pp and vp=0. +Create new frontend port. .It Fl d Ar driver Specify the name of the frontend driver used by the .Pq Fl c @@ -644,7 +644,31 @@ If no port number or port type is specified, all ports are turned on or off. .It Fl O Ar pp|vp Specify generic options on the ioctl frontend port. -At present, only pp and vp port numbers can be set. +The list of recognized options is driver-dependent. +The +.Dq ioctl +driver recognizes +.Dq pp +and +.Dq vp . +The +.Dq iscsi +driver recongizes +.Dq cfiscsi_portal_group_tag , +.Dq cfiscsi_target , +and +.Dq cfiscsi_target_alias . +The +.Dq nvmf +driver recognizes +.Dq subnqn , +.Dq portid , +.Dq max_io_qsize , +.Dq enable_timeout , +.Dq ioccsz , +.Dq nn , +and +.Dq serial . .It Fl p Ar targ_port Specify the frontend port number. The port numbers can be found in the frontend port list. diff --git a/usr.sbin/ctladm/tests/port.sh b/usr.sbin/ctladm/tests/port.sh index ccc4a6fc502e..1f2c9aaed5c1 100644 --- a/usr.sbin/ctladm/tests/port.sh +++ b/usr.sbin/ctladm/tests/port.sh @@ -5,11 +5,20 @@ # * Creating umass ports # TODO -# * Creating iscsi ports # * Creating nvmf ports # * Creating ha ports # * Creating fc ports +# The PGTAG can be any 16-bit number. The only constraint is that each +# PGTAG,TARGET pair must be globally unique. +PGTAG=30257 + +load_cfiscsi() { + if ! kldstat -q -m cfiscsi; then + kldload cfiscsi || atf_skip "could not load cfscsi kernel mod" + fi +} + skip_if_ctld() { if service ctld onestatus > /dev/null; then # If ctld is running on this server, let's not interfere. @@ -21,8 +30,18 @@ cleanup() { driver=$1 if [ -e port-create.txt ]; then - portnum=`awk '/port:/ {print $2}' port-create.txt` - ctladm port -r -d $driver -p $portnum + case "$driver" in + "ioctl") + PORTNUM=`awk '/port:/ {print $2}' port-create.txt` + ctladm port -r -d $driver -p $PORTNUM + ;; + "iscsi") + TARGET=`awk '/target:/ {print $2}' port-create.txt` + # PORTNUM is ignored, but must be set + PORTNUM=9999 + ctladm port -r -d $driver -p "$PORTNUM" -O cfiscsi_portal_group_tag=$PGTAG -O cfiscsi_target=$TARGET + ;; + esac fi } @@ -49,6 +68,75 @@ create_ioctl_cleanup() cleanup ioctl } +atf_test_case create_iscsi cleanup +create_iscsi_head() +{ + atf_set "descr" "ctladm can create a new iscsi port" + atf_set "require.user" "root" +} +create_iscsi_body() +{ + skip_if_ctld + load_cfiscsi + + TARGET=iqn.2018-10.myhost.create_iscsi + atf_check -o save:port-create.txt ctladm port -c -d "iscsi" -O cfiscsi_portal_group_tag=$PGTAG -O cfiscsi_target="$TARGET" + echo "target: $TARGET" >> port-create.txt + atf_check egrep -q "Port created successfully" port-create.txt + atf_check egrep -q "frontend: *iscsi" port-create.txt + atf_check egrep -q "port: *[0-9]+" port-create.txt + atf_check -o save:portlist.txt ctladm portlist -qf iscsi + # Unlike the ioctl driver, the iscsi driver creates ports in a disabled + # state, so the port's lunmap may be set before enabling it. + atf_check egrep -q "$portnum *NO *iscsi *iscsi.*$TARGET" portlist.txt +} +create_iscsi_cleanup() +{ + cleanup iscsi +} + +atf_test_case create_iscsi_alias cleanup +create_iscsi_alias_head() +{ + atf_set "descr" "ctladm can create a new iscsi port with a target alias" + atf_set "require.user" "root" +} +create_iscsi_alias_body() +{ + skip_if_ctld + load_cfiscsi + + TARGET=iqn.2018-10.myhost.create_iscsi_alias + ALIAS="foobar" + atf_check -o save:port-create.txt ctladm port -c -d "iscsi" -O cfiscsi_portal_group_tag=$PGTAG -O cfiscsi_target="$TARGET" -O cfiscsi_target_alias="$ALIAS" + echo "target: $TARGET" >> port-create.txt + atf_check egrep -q "Port created successfully" port-create.txt + atf_check egrep -q "frontend: *iscsi" port-create.txt + atf_check egrep -q "port: *[0-9]+" port-create.txt + atf_check -o save:portlist.txt ctladm portlist -qvf iscsi + atf_check egrep -q "cfiscsi_target_alias=$ALIAS" portlist.txt +} +create_iscsi_alias_cleanup() +{ + cleanup iscsi +} + +atf_test_case create_iscsi_without_required_args +create_iscsi_without_required_args_head() +{ + atf_set "descr" "ctladm will gracefully fail to create an iSCSI target if required arguments are missing" + atf_set "require.user" "root" +} +create_iscsi_without_required_args_body() +{ + skip_if_ctld + load_cfiscsi + + TARGET=iqn.2018-10.myhost.create_iscsi + atf_check -s exit:1 -e match:"Missing required argument: cfiscsi_target" ctladm port -c -d "iscsi" -O cfiscsi_portal_group_tag=$PGTAG + atf_check -s exit:1 -e match:"Missing required argument: cfiscsi_portal_group_tag" ctladm port -c -d "iscsi" -O cfiscsi_target=$TARGET +} + atf_test_case create_ioctl_options cleanup create_ioctl_options_head() { @@ -143,11 +231,63 @@ remove_ioctl_body() fi } +atf_test_case remove_iscsi +remove_iscsi_head() +{ + atf_set "descr" "ctladm can remove an iscsi port" + atf_set "require.user" "root" +} +remove_iscsi_body() +{ + skip_if_ctld + load_cfiscsi + + TARGET=iqn.2018-10.myhost.remove_iscsi + atf_check -o save:port-create.txt ctladm port -c -d "iscsi" -O cfiscsi_portal_group_tag=$PGTAG -O cfiscsi_target="$TARGET" + portnum=`awk '/port:/ {print $2}' port-create.txt` + atf_check -o save:portlist.txt ctladm portlist -qf iscsi + atf_check -o inline:"Port destroyed successfully\n" ctladm port -r -d iscsi -p 9999 -O cfiscsi_portal_group_tag=$PGTAG -O cfiscsi_target="$TARGET" + # Check that the port was removed. A new port may have been added with + # the same ID, so match against the target and tag, too. + PGTAGHEX=0x7631 # PGTAG in hex + if ctladm portlist -qf iscsi | egrep -q "^${portnum} .*$PGTAG +[0-9]+ +$TARGET,t,$PGTAGHEX"; then + ctladm portlist -qf iscsi + atf_fail "port was not removed" + fi +} + +atf_test_case remove_iscsi_without_required_args cleanup +remove_iscsi_without_required_args_head() +{ + atf_set "descr" "ctladm will gracefully fail to remove an iSCSI target if required arguments are missing" + atf_set "require.user" "root" +} +remove_iscsi_without_required_args_body() +{ + skip_if_ctld + load_cfiscsi + + TARGET=iqn.2018-10.myhost.remove_iscsi_without_required_args + atf_check -o save:port-create.txt ctladm port -c -d "iscsi" -O cfiscsi_portal_group_tag=$PGTAG -O cfiscsi_target="$TARGET" + echo "target: $TARGET" >> port-create.txt + atf_check -s exit:1 -e match:"Missing required argument: cfiscsi_portal_group_tag" ctladm port -r -d iscsi -p 9999 -O cfiscsi_target="$TARGET" + atf_check -s exit:1 -e match:"Missing required argument: cfiscsi_target" ctladm port -r -d iscsi -p 9999 -O cfiscsi_portal_group_tag=$PGTAG +} +remove_iscsi_without_required_args_cleanup() +{ + cleanup iscsi +} + atf_init_test_cases() { atf_add_test_case create_ioctl + atf_add_test_case create_iscsi + atf_add_test_case create_iscsi_without_required_args + atf_add_test_case create_iscsi_alias atf_add_test_case create_ioctl_options atf_add_test_case disable_ioctl atf_add_test_case enable_ioctl atf_add_test_case remove_ioctl + atf_add_test_case remove_iscsi + atf_add_test_case remove_iscsi_without_required_args } From nobody Mon Jun 10 16:01:45 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vyc4T4LnHz5M8y8; Mon, 10 Jun 2024 16:01:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vyc4T2nMdz4pWy; Mon, 10 Jun 2024 16:01:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718035305; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+gGCURNHyXgNtnm6cbe+d1MFAdv7+rScwceCtsiaWDQ=; b=iWXgxDKe5+E09buIPpzHAkgmoft0BWft5MOxVEt7JCcb1O/c8zOtxdkbZBZyjaP5NNQbyp CyqI5a9CEjxar+MlDWD31VVGyK/dNTSwRJ1nkVEQkQcM8hYdoV00kXVFYbUtOeEuUwaBEY NZahP5J84y0nCLJMFYFV8Blcyv4MgWzW4oLY6JB4kL95MW3X9xp17nSmIMi7b3B+qugEXj WtOSJWykXNhEDPnC0kOaNdXFmss8ArlkRBOTp4EtjvMALWrYih5m1CudAK4l6nT2RuNIKx vlm/V1tNGOCkaF0CNbPjqKmL+65EC+zj3+NYK5ibsaIsZt1/FMXdiy1Pm6v5GQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718035305; a=rsa-sha256; cv=none; b=akwtykSj2PUZ4F4oYEgokPkaLnjH2FGt+JOSy5zRmBNItVCIcKd6Q0S0DaM3b0QHnv0v5n Km5nj+cnhPRQtjBCgZWocVyHBzVd/DUBq7SVbG5YmCqm1I5OlbeaGoL8m9RWx4xAIq3vBZ e/E5hBCisUDZ7A+oLunVrclaV/lG/K+lxJufKb+gJE0hbZJ0VCt5/Yai899E+8wgzmjjqT IFT3ByqqhZ3vnhYNuZWLrmI92PwQjYnHeihMnJHK/JmXsEQ2k7k4wxBnaqPS48cXEB5Yv0 P7PbqZPKbTSJKelpMqE1542ypKl/e8j1JbuAlhKwBSS+Py24u169DoYbMXKjjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718035305; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+gGCURNHyXgNtnm6cbe+d1MFAdv7+rScwceCtsiaWDQ=; b=LncYoxTG93FtxBmZaId6/Bb9yC9nortz9PDhyyTEXqktOlU8vBFe4lp+FU/4Hi5894k/VR qvMN9WwvApsp4nJfuqHSOf9HBB6vWsr3DW1hk3E6uqo74YaX1VDptHazmjo1g2bkPS/BuL 2iGyUn0eAUPllxpnE/qdmCPTMDq8ufu5eULLf3L6GTNvS2Mg2mvfsB+K1IFXBwyOEaNFnj 6k1GaefSosQezHXSqUhRgh4aqsqPjbfyiDURh8FWX9rV4CbIgDsJRLaQIAqZMqmfQcgvHp mXNsC6/EYsuVvMfzrmyTN0rhGQykliBWp1VxE+OMPZJH25V7F8c3vDggD6lUDA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vyc4T2Pv2zXqJ; Mon, 10 Jun 2024 16:01:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45AG1jVg001519; Mon, 10 Jun 2024 16:01:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45AG1jSb001516; Mon, 10 Jun 2024 16:01:45 GMT (envelope-from git) Date: Mon, 10 Jun 2024 16:01:45 GMT Message-Id: <202406101601.45AG1jSb001516@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: edbd489d09ba - main - ctladm: don't require the use of "-p" with "port -r" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: edbd489d09babebdc6c03924a912013be584c409 Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=edbd489d09babebdc6c03924a912013be584c409 commit edbd489d09babebdc6c03924a912013be584c409 Author: Alan Somers AuthorDate: 2024-06-06 19:14:43 +0000 Commit: Alan Somers CommitDate: 2024-06-10 16:01:25 +0000 ctladm: don't require the use of "-p" with "port -r" When removing a port, the ioctl frontend requires the "-p" argument. But other frontends, like cfiscsi, do not. So don't require that argument in the ctladm command. The frontend driver will report an error if any required argument is missing. MFC after: 2 weeks Sponsored by: Axcient Reviewed by: mav Pull Request: https://github.com/freebsd/freebsd-src/pull/1279 --- sys/cam/ctl/ctl_frontend_ioctl.c | 2 +- usr.sbin/ctladm/ctladm.8 | 3 +-- usr.sbin/ctladm/ctladm.c | 10 +++------- usr.sbin/ctladm/tests/port.sh | 28 +++++++++++++++++++++++----- 4 files changed, 28 insertions(+), 15 deletions(-) diff --git a/sys/cam/ctl/ctl_frontend_ioctl.c b/sys/cam/ctl/ctl_frontend_ioctl.c index 7fc8deac82b3..3449154afb38 100644 --- a/sys/cam/ctl/ctl_frontend_ioctl.c +++ b/sys/cam/ctl/ctl_frontend_ioctl.c @@ -267,7 +267,7 @@ cfi_ioctl_port_remove(struct ctl_req *req) if (port_id == -1) { req->status = CTL_LUN_ERROR; snprintf(req->error_str, sizeof(req->error_str), - "port_id not provided"); + "Missing required argument: port_id"); return; } diff --git a/usr.sbin/ctladm/ctladm.8 b/usr.sbin/ctladm/ctladm.8 index 5c6e4aa04c77..72f0162eed54 100644 --- a/usr.sbin/ctladm/ctladm.8 +++ b/usr.sbin/ctladm/ctladm.8 @@ -673,8 +673,7 @@ and Specify the frontend port number. The port numbers can be found in the frontend port list. .It Fl r -Remove port specified with -.Pq Fl p Ar targ_port . +Remove a port. .It Fl t Ar fe_type Specify the frontend type used by the .Pq Fl o , diff --git a/usr.sbin/ctladm/ctladm.c b/usr.sbin/ctladm/ctladm.c index 14951797ddf1..46b7b88547dd 100644 --- a/usr.sbin/ctladm/ctladm.c +++ b/usr.sbin/ctladm/ctladm.c @@ -580,11 +580,6 @@ cctl_port(int fd, int argc, char **argv, char *combinedopt) break; } case CCTL_PORT_MODE_REMOVE: - if (targ_port == -1) { - warnx("%s: -r requires -p", __func__); - retval = 1; - goto bailout; - } /* FALLTHROUGH */ case CCTL_PORT_MODE_CREATE: { bzero(&req, sizeof(req)); @@ -594,8 +589,9 @@ cctl_port(int fd, int argc, char **argv, char *combinedopt) if (port_mode == CCTL_PORT_MODE_REMOVE) { req.reqtype = CTL_REQ_REMOVE; - nvlist_add_stringf(option_list, "port_id", "%d", - targ_port); + if (targ_port != -1) + nvlist_add_stringf(option_list, "port_id", "%d", + targ_port); } else req.reqtype = CTL_REQ_CREATE; diff --git a/usr.sbin/ctladm/tests/port.sh b/usr.sbin/ctladm/tests/port.sh index 1f2c9aaed5c1..139e1a7d29a0 100644 --- a/usr.sbin/ctladm/tests/port.sh +++ b/usr.sbin/ctladm/tests/port.sh @@ -37,8 +37,6 @@ cleanup() { ;; "iscsi") TARGET=`awk '/target:/ {print $2}' port-create.txt` - # PORTNUM is ignored, but must be set - PORTNUM=9999 ctladm port -r -d $driver -p "$PORTNUM" -O cfiscsi_portal_group_tag=$PGTAG -O cfiscsi_target=$TARGET ;; esac @@ -68,6 +66,25 @@ create_ioctl_cleanup() cleanup ioctl } +atf_test_case remove_ioctl_without_required_args cleanup +remove_ioctl_without_required_args_head() +{ + atf_set "descr" "ctladm will gracefully fail to remove an ioctl target if required arguments are missing" + atf_set "require.user" "root" +} +remove_ioctl_without_required_args_body() +{ + skip_if_ctld + + atf_check -o save:port-create.txt ctladm port -c -d "ioctl" + atf_check egrep -q "Port created successfully" port-create.txt + atf_check -s exit:1 -e match:"Missing required argument: port_id" ctladm port -r -d "ioctl" +} +remove_ioctl_without_required_args_cleanup() +{ + cleanup ioctl +} + atf_test_case create_iscsi cleanup create_iscsi_head() { @@ -246,7 +263,7 @@ remove_iscsi_body() atf_check -o save:port-create.txt ctladm port -c -d "iscsi" -O cfiscsi_portal_group_tag=$PGTAG -O cfiscsi_target="$TARGET" portnum=`awk '/port:/ {print $2}' port-create.txt` atf_check -o save:portlist.txt ctladm portlist -qf iscsi - atf_check -o inline:"Port destroyed successfully\n" ctladm port -r -d iscsi -p 9999 -O cfiscsi_portal_group_tag=$PGTAG -O cfiscsi_target="$TARGET" + atf_check -o inline:"Port destroyed successfully\n" ctladm port -r -d iscsi -O cfiscsi_portal_group_tag=$PGTAG -O cfiscsi_target="$TARGET" # Check that the port was removed. A new port may have been added with # the same ID, so match against the target and tag, too. PGTAGHEX=0x7631 # PGTAG in hex @@ -270,8 +287,8 @@ remove_iscsi_without_required_args_body() TARGET=iqn.2018-10.myhost.remove_iscsi_without_required_args atf_check -o save:port-create.txt ctladm port -c -d "iscsi" -O cfiscsi_portal_group_tag=$PGTAG -O cfiscsi_target="$TARGET" echo "target: $TARGET" >> port-create.txt - atf_check -s exit:1 -e match:"Missing required argument: cfiscsi_portal_group_tag" ctladm port -r -d iscsi -p 9999 -O cfiscsi_target="$TARGET" - atf_check -s exit:1 -e match:"Missing required argument: cfiscsi_target" ctladm port -r -d iscsi -p 9999 -O cfiscsi_portal_group_tag=$PGTAG + atf_check -s exit:1 -e match:"Missing required argument: cfiscsi_portal_group_tag" ctladm port -r -d iscsi -O cfiscsi_target="$TARGET" + atf_check -s exit:1 -e match:"Missing required argument: cfiscsi_target" ctladm port -r -d iscsi -O cfiscsi_portal_group_tag=$PGTAG } remove_iscsi_without_required_args_cleanup() { @@ -288,6 +305,7 @@ atf_init_test_cases() atf_add_test_case disable_ioctl atf_add_test_case enable_ioctl atf_add_test_case remove_ioctl + atf_add_test_case remove_ioctl_without_required_args atf_add_test_case remove_iscsi atf_add_test_case remove_iscsi_without_required_args } From nobody Mon Jun 10 16:53:01 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VydCg53ggz5MFZh for ; Mon, 10 Jun 2024 16:53:03 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VydCg4br8z4vcH; Mon, 10 Jun 2024 16:53:03 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718038383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nskcfSZLKFqPtNSCHb+tHVDhAzTvWuXgXULd/1t8wE4=; b=KLLmg6uZKbWH9U/73loL78qd39dM7mIVDo1lN27PJwoAf455oYRIkwbPigYwZ5o2pYZ4yX nXuDI4vdB5MrzTDuuxsiN9IEhcExFNPwziu4kAlSFxqNrxmx9X6iyzxBMdJygC2dS2j5jK 6kHWRrplRMZTejNeiDZrYqy9g30Vl7BinxXVeIF1yetEU8pGa7VOjI6XJ5hEwN33/L4M/9 XrpWtO4E4JTAH7TKvcys9aeoDo89TRLPE7fc/krQ0aOvl8wSPPzzI4+oaZtNSuvnwYZiXD npKtCZhNi8IwJRWwK2WLVqiolWc8YydtsRz6eX6BdWk3M2t2dJHOmbPr08I8HA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718038383; a=rsa-sha256; cv=none; b=oTYt1irKTd1l7KBHXbKecLYRMegSFmKkcegK3VE1vAh6Z3uNu9z20bknhFmDQCN61mR/15 pfwYR6qDD04eRzOktvOvgEC3rF8Er+JTR31E0whk2baqSh206EIDjtnXcf8vNkXiyBOx+O mXct1PcsBj3aK9zG9so0YMOXeYWdL3BoO3IYsU9z1bQV0ut00zZ/SovQyyXUq2NL7AXtgv VWm2p8lPbKBxGtgzAytPnkFLA43a7XJMDJqkGQJog4rDX7abZ3Z1c8JyueGMq4QsKDRjP8 O6WG64bYeaJirokfyq/eQ9y8dQFBHovXPam0JTWggjkoAEoKoCxzHrSNq2CkfQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718038383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nskcfSZLKFqPtNSCHb+tHVDhAzTvWuXgXULd/1t8wE4=; b=ltMd5qobGR+bRhBNEq2j3VdLufYsHpymuiY/tjoDUQ34F2MdkrbKM0zck0XAKSp+RXxMJr 0sI98FERYUeulUAd68k6kdA6jGeVJCmX1hdgfWzgz1/K0PO/t9VT6sACt7E70+edMEAzzs +2Cp3GcB/l0lWGeJuu1moreTfYWa1L4ZB/+O3kFg/NHNWQx1J/eTPbJod08jcsMw9hMoXD fyxfDb/2YFYBLeHJ0oR+w1oqmL8PdCQW1t81FUdey6kPD4CjKxLdrgafvIAvg43WE9JWqy YL87dlyfn+7SM0j7GPApO/dDWpFhJjflNAmJvbQgHPt9jG68Om0uPwIxLZxblg== Received: from [IPV6:2601:644:937f:4c50:ddd0:3ab8:e148:d3c9] (unknown [IPv6:2601:644:937f:4c50:ddd0:3ab8:e148:d3c9]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4VydCf6z7pz1DRG; Mon, 10 Jun 2024 16:53:02 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <3678a53a-4871-426d-9c4b-e0d145353b82@FreeBSD.org> Date: Mon, 10 Jun 2024 09:53:01 -0700 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: generated sources Was: git: 408957613bc0 - main - Regen Content-Language: en-US To: Brooks Davis , Gleb Smirnoff Cc: Dmitry Salychev , Lexi Winter , Mariusz Zaborski , dev-commits-src-all@freebsd.org References: <3edabe3b-4b51-401f-ad64-e36c84fd455b@FreeBSD.org> From: John Baldwin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 5/23/24 2:37 PM, Brooks Davis wrote: > On Thu, May 23, 2024 at 11:20:08AM -0700, Gleb Smirnoff wrote: >> Hi, >> >> sorry for slightly diverting the discussion, but looks like this thread is the >> right place... >> >> On Wed, May 22, 2024 at 12:55:24PM -0700, John Baldwin wrote: >> J> I don't think it's worth reverting at this point. For `make sysent` I would >> J> suggest 'sysent: Regen' as a commit log in the future. We typically use >> J> 'src.conf.5: Regen' after running `make makeman`. >> >> On Wed, May 22, 2024 at 05:05:14PM +0000, Brooks Davis wrote: >> B> This is more or less standard practice for generated files. These >> B> commits are of basically no interest. Historically they had to exist >> B> because the source file $FreeBSD$ entries were embedded in the generated >> B> files and thus had to be final. That isn't true any more so I often just >> B> include them in the origional commit unless I'm doing a lot of minor >> B> changes to the source files. >> >> Is it possible to generate the files during normal kernel build? That would >> require lua packages installed, but we already almost require git installed to >> work with FreeBSD sources. Absence of lua can be checked in Makefile and a >> verbose error message would be printed. Or may be we can use the small lua that >> we have in the loader? Sorry if the very last suggestion was stupid - really >> don't have any knowledge in the area. > > TL;DR: No one likes the current state of affairs, but it's complicated > to fix or we'd have done it long ago. > > We'd like to generate these files at build time, but at least > sys/sys/syscall.mk is difficult to handle as it's required to build libc > so I belive we'd need to arrange to create it before entering lib/libc. > The others seem straightforward, but right now we've got a single script > to generate everything and we'd want to be selective about generating > things so we did it in the right place. I know there's some work in > progress to turn sys/tools/makesyscalls.lua into something more > library-like, but it's not done. (I've not been helping by adding > things to makesyscalls.lua and thus moving the goalposts...) > >> After the xz/liblzma backdoor all the generated code committed manually makes >> me concerned, as it has 0% chance to get reviewed by community. > > This is a valid, but not very practical concern. We check that these > are in sync routinely in github CI and could easily factor those checks > out to do in jenkins if we wanted more immediate post-commit feedback. Also, FWIW, the discussion I've seen on some other lists (e.g. for GDB/binutils) is actually favoring checking in auto-generated files like configure since it's easier to validate what files are used to generate a release tarball as a counter to the xz case where one of the issues is that the release tarball was justn't a straight tarball of a git tag which gave an opportunity for the actor to inject other changes into the release tarball. -- John Baldwin From nobody Mon Jun 10 17:30:52 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vyf3J63LMz5MJWj; Mon, 10 Jun 2024 17:30:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vyf3J54qTz3yp0; Mon, 10 Jun 2024 17:30:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718040652; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J5ebToySv2y0cJeSHAD51IXBFkbFEy94GxTUNZqkD/w=; b=YZTI+bq0a7PHIndJJy44uqyarOCi8QQg2kB9ut2rZklVrHlN7WATxrXPo0EC8N9DSKSEpH h9ezmfj+H9yddSwufieQPd6xj9MFIjQSohQvRol0fqjKbVQm8/LN2HDEG5XZhSJ+AHJTow TKKjV07s1QhdTIMeIL+A6Aya2P5rU0O0qQ2ezqvegXmcy8LzGGV5ltpB9csyDIw70TxoVK XWKV5rKLaZg8f6pcO6VWBLcFIwCX3XCuO6/pyiUwhLroWeiGh1V6oYopMBWYg80hpyA1w6 5EffIexmM7Qkc4XYK3xAP8gH7poUUB5YXTknjDf3pkEnMokC+AJmW5zrSV7Dow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718040652; a=rsa-sha256; cv=none; b=wkddUV++TPwFbqUBN8Oeqogea70c5OmPrrmLMKfiVF9UjZDVEROBXASbu94vgaLJ+XvTPH EklJnGlCfjZEcor4ZOztHATrWDVRcH7EQWoop9oBpw5FSJpsnMACek0SGXUmTuXWX7PmoF GoL9H1fjeqwUJ8t2kELjRi2qkYpxL8luY0lZCT2wkBwaikHuDMC114HID/IsNVxcs9FD60 t/ic7Ebq+IzHGy+Cg9Wz+C5VXRsXyyPkq78dSpenCpKpOZ7Udl/7HNdU+52g4NlAPObk8Y 5k4/GZ2z6vBjqIi92tjm17EFGkKonEa5iyipDJhaEPh71azX7rQiWiFdprOz3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718040652; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J5ebToySv2y0cJeSHAD51IXBFkbFEy94GxTUNZqkD/w=; b=SoLL/GJ3DZg7vjW/OPFEcj3KhzceBrs3nRC0XIGEQY096aatfeyFZwA7rt5CH3idUJwrMN RlEAkCoqSkt6WOp8F7intp7NloStDO06P3zeYvVryDBrsb8DpuIA93I3xpIdcXTob19UK0 fD5qCHKjB1opTrc789W5Jx2D2uu3ii6zMC5d9AnorZMMx55uQXTmL2ljbk/E2jOWzJiQxp oqGzZ99LjVA1FYC/v060zRy+mTSfudPV1keW9fmgGyUuXjL7HCDbg/c8d+DpYbkAr/79xk /ywoybCLxgPynZZCGFNPrshznEUlwFfIoirBvVUuOVTL+3b+e6wW8DEUtSX3QA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vyf3J4hLszZrM; Mon, 10 Jun 2024 17:30:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45AHUqEp052030; Mon, 10 Jun 2024 17:30:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45AHUqtv052027; Mon, 10 Jun 2024 17:30:52 GMT (envelope-from git) Date: Mon, 10 Jun 2024 17:30:52 GMT Message-Id: <202406101730.45AHUqtv052027@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: 81ef0a89fcc0 - main - Fix mtree entry for ctladm tests List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 81ef0a89fcc055bdf3d0f1affbadb643412ebce9 Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=81ef0a89fcc055bdf3d0f1affbadb643412ebce9 commit 81ef0a89fcc055bdf3d0f1affbadb643412ebce9 Author: Alan Somers AuthorDate: 2024-06-10 17:29:48 +0000 Commit: Alan Somers CommitDate: 2024-06-10 17:29:48 +0000 Fix mtree entry for ctladm tests MFC after: 2 weeks MFC with: 9747d11d91642cb9b81602d88e8aebeb388543c7 Sponsored by: Axcient --- etc/mtree/BSD.tests.dist | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 86db4304b932..92501766ef88 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -90,8 +90,6 @@ .. .. usr.sbin - ctladm - .. dtrace common aggs @@ -1225,6 +1223,8 @@ usr.sbin chown .. + ctladm + .. daemon .. etcupdate From nobody Mon Jun 10 17:34:41 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vyf7k1yCTz5MK77; Mon, 10 Jun 2024 17:34:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vyf7j703dz40m5; Mon, 10 Jun 2024 17:34:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718040882; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CD4qut4vP0U2vUj+wtYY92DJiVgP2zeB4wpAVV9pG+E=; b=gMSteZmUD5/KD5bkmsesceg8inqWBspwPS5UDrNmO0Q6rhuPx4i1BjzyqY517ARymkCfU4 ACaSfZ1jKzppJ7VNdSfDW6rXUl0jmCqi5vvPzb7uY2/JAAwHJXIFbutFxvylzo9rsQ6LuI m6sh71apLUTDczL55wMcnvStusFZAsv4VdRfS1icJIuaabBJTkFjPk9OoWPtP/RtzJjYcn xUjy9BNg+2ZFtc3nvtMjV7ZCxXgo92zUFf7yryeUJjUtVjPmCSaavKXpVomuZ48O6ypbiK kJphBdBZEtuy0JxDHafMOp42hZJTu26poYrQ8nhMUAszg6j9G8M5eT63iQz9Tg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718040882; a=rsa-sha256; cv=none; b=cERCJowu1cyQGbii6H0SgNQBwIQ1HtRN8T1dMEf9Vb7NSgh55ItQWtFEnXTmP0ZAcC5rqb nkx8w36Mj7ufmB1hLNKH2zjbGEF2hOISBioLE0tyPYFyMKFKT6OhmSN7WKhBQf/1gKse+o gnsrxJq/Jf6lWoDpsA5G/y3cLn6DENXviiEna6fBbeyb6pjitVuOKcOsjdZn7W9QTaMWO5 UHYOuuUdh54fnO2coOlPD0vp6NyjYB9tQyGgmg/msjJL8h0yLlc2b4dhJbu4KkA/kWe6a+ S05cogr/eTd2G9PY7D1JDcuoNU6zerhQCE23J5SBP7FcQGZnibATCJ9kw+AVQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718040882; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CD4qut4vP0U2vUj+wtYY92DJiVgP2zeB4wpAVV9pG+E=; b=i1dG9ojukdOD1aOQoVVTn1WU6jh3Gkj1WXsTki35EgQh88y2+wBKdBRAXUkWDu3jz11ADq Pz/TThIzUzygvyc3mjjisCfHUHxDL1xK1fpMy8QgUT+o1FYorqIfXythjJjC2RqsqOnQTn b9TMdvcDmY5661i4Nss0wCC7cWr2BFpPWpU+TGmF3iN5F29MmQ87UbBy+YI/fVDwN20Mjj yoOoc0DEySXk6EohO+2jCt/oMwDNw+A3b1l6T53r4kO16TH8h5Ewu1TRO2MRHao6WTlAgC IPmzAwFWPMuh39OoGhIBjFBRn0hgP8hcaXyg65/LuqGgeByhcPi5xN+jbi6uAw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vyf7j6T7WzZrm; Mon, 10 Jun 2024 17:34:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45AHYfLV058108; Mon, 10 Jun 2024 17:34:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45AHYf4a058105; Mon, 10 Jun 2024 17:34:41 GMT (envelope-from git) Date: Mon, 10 Jun 2024 17:34:41 GMT Message-Id: <202406101734.45AHYf4a058105@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: 7affbeeab1c9 - main - virstor: basic functional test List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7affbeeab1c99685012df0d72df2d7a87e09e472 Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=7affbeeab1c99685012df0d72df2d7a87e09e472 commit 7affbeeab1c99685012df0d72df2d7a87e09e472 Author: Ryan Libby AuthorDate: 2024-06-10 17:32:22 +0000 Commit: Ryan Libby CommitDate: 2024-06-10 17:32:22 +0000 virstor: basic functional test Reviewed by: asomers, markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D45535 --- tests/sys/geom/class/Makefile | 1 + tests/sys/geom/class/virstor/Makefile | 9 ++++ tests/sys/geom/class/virstor/conf.sh | 31 ++++++++++++ tests/sys/geom/class/virstor/virstor_test.sh | 73 ++++++++++++++++++++++++++++ 4 files changed, 114 insertions(+) diff --git a/tests/sys/geom/class/Makefile b/tests/sys/geom/class/Makefile index 10b01a043ddf..b640b0b46859 100644 --- a/tests/sys/geom/class/Makefile +++ b/tests/sys/geom/class/Makefile @@ -19,6 +19,7 @@ TESTS_SUBDIRS+= shsec TESTS_SUBDIRS+= stripe TESTS_SUBDIRS+= union TESTS_SUBDIRS+= uzip +TESTS_SUBDIRS+= virstor ${PACKAGE}FILES+= geom_subr.sh diff --git a/tests/sys/geom/class/virstor/Makefile b/tests/sys/geom/class/virstor/Makefile new file mode 100644 index 000000000000..67242879e33f --- /dev/null +++ b/tests/sys/geom/class/virstor/Makefile @@ -0,0 +1,9 @@ +PACKAGE= tests + +TESTSDIR= ${TESTSBASE}/sys/geom/class/${.CURDIR:T} + +ATF_TESTS_SH+= virstor_test + +${PACKAGE}FILES+= conf.sh + +.include diff --git a/tests/sys/geom/class/virstor/conf.sh b/tests/sys/geom/class/virstor/conf.sh new file mode 100644 index 000000000000..46b0fd1308a3 --- /dev/null +++ b/tests/sys/geom/class/virstor/conf.sh @@ -0,0 +1,31 @@ +#!/bin/sh + +class="virstor" +base=$(atf_get ident) +TEST_VIRSTOR_DEVS_FILE="${TMPDIR}/test_virstor_devs.$(basename $0)" + +gvirstor_dev_setup() +{ + # Pick a random name and record it for cleanup. + local vdevbase="$(mktemp -u virstor.XXXXXX)" || aft_fail "mktemp" + echo "$vdevbase" >> "$TEST_VIRSTOR_DEVS_FILE" + eval "${1}='${vdevbase}'" +} + +gvirstor_test_cleanup() +{ + local vdevbase + if [ -f "$TEST_VIRSTOR_DEVS_FILE" ]; then + while read vdevbase; do + if [ -c "/dev/$class/$vdevbase" ]; then + echo "# Destroying test virstor device:" \ + "$vdevbase" + gvirstor destroy "$vdevbase" + fi + done < "$TEST_VIRSTOR_DEVS_FILE" + fi + geom_test_cleanup +} + +ATF_TEST=true +. `dirname $0`/../geom_subr.sh diff --git a/tests/sys/geom/class/virstor/virstor_test.sh b/tests/sys/geom/class/virstor/virstor_test.sh new file mode 100644 index 000000000000..4f2047bffe97 --- /dev/null +++ b/tests/sys/geom/class/virstor/virstor_test.sh @@ -0,0 +1,73 @@ +# +# Copyright (c) 2024 Dell Inc. or its subsidiaries. All Rights Reserved. +# +# SPDX-License-Identifier: BSD-2-Clause +# + +. $(atf_get_srcdir)/conf.sh + +atf_test_case basic cleanup +basic_head() +{ + atf_set "descr" "geom virstor basic functional test" + atf_set "require.user" "root" +} +basic_body() +{ + geom_atf_test_setup + # Choose a virstor device name + gvirstor_dev_setup name + + # Create an md backing device and initialize it with junk + psecsize=512 + attach_md md -t swap -S $psecsize -s 5M || atf_fail "attach_md" + jot -b uninitialized 0 | dd status=none of=/dev/$md 2> /dev/null + + # Create a virstor device + vsizemb=64 + vsize=$((vsizemb * 1024 * 1024)) + atf_check -o ignore -e ignore \ + gvirstor label -v -s ${vsizemb}M -m 512 $name /dev/$md + devwait + vdev="/dev/$class/$name" + + ssize=$(diskinfo $vdev | awk '{print $2}') + atf_check_equal $psecsize $ssize + + size=$(diskinfo $vdev | awk '{print $3}') + atf_check_equal $vsize $size + + # Write the first and last sectors of the virtual address space + hasha=$(jot -b a 0 | head -c $ssize | sha1) + hashz=$(jot -b z 0 | head -c $ssize | sha1) + zsector=$((vsize / ssize - 1)) + jot -b a 0 | dd status=none of=$vdev bs=$ssize count=1 conv=notrunc + jot -b z 0 | dd status=none of=$vdev bs=$ssize count=1 conv=notrunc \ + seek=$zsector + + # Read back and compare + hashx=$(dd status=none if=$vdev bs=$ssize count=1 | sha1) + atf_check_equal $hasha $hashx + hashx=$(dd status=none if=$vdev bs=$ssize count=1 skip=$zsector | sha1) + atf_check_equal $hashz $hashx + + # Destroy, then retaste and reload + atf_check -o ignore gvirstor destroy $name + true > /dev/$md + devwait + + # Read back and compare + hashx=$(dd status=none if=$vdev bs=$ssize count=1 | sha1) + atf_check_equal $hasha $hashx + hashx=$(dd status=none if=$vdev bs=$ssize count=1 skip=$zsector | sha1) + atf_check_equal $hashz $hashx +} +basic_cleanup() +{ + gvirstor_test_cleanup +} + +atf_init_test_cases() +{ + atf_add_test_case basic +} From nobody Mon Jun 10 17:46:23 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VyfPT5FStz5ML0Z; Mon, 10 Jun 2024 17:46:37 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-oi1-f180.google.com (mail-oi1-f180.google.com [209.85.167.180]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VyfPT0FT1z41Dw; Mon, 10 Jun 2024 17:46:37 +0000 (UTC) (envelope-from asomers@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=freebsd.org (policy=none); spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.167.180 as permitted sender) smtp.mailfrom=asomers@gmail.com Received: by mail-oi1-f180.google.com with SMTP id 5614622812f47-3c9cc66c649so2492708b6e.1; Mon, 10 Jun 2024 10:46:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718041595; x=1718646395; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2ESWg2qw2B3NhTH7SPlyI1u/Pfv9xEWpOKR8ooph3Ws=; b=qQDy3HrZlGyC5WbNrfRMsMxTzMgy0rcY3UVcIrnHaVvtshKH0ttacZoRLpnp34qVZq Mnx+WziBhu8ipsRtVWjkWygIsX2QPrxjUTt8Gp2gxClwnNZRdDtSrQboRyvHJM0+iiAq 4mNkQK9+CvPkPHgsXs4fzzqsmehBjFlpw8QIHZKCqoVsUCeDOsxO61pmQtCkd1cGsMYp c/fVHzTLAdIhJ5B5YyCiQiRtngDMkJZzO5HyhBUgeiPo38zu/zZi+VndJxRlMyXSg3tg v8O8LhEEZGf3zeyYB4MvUC8PFMUDUUBdj39qOX6U5WIB5w4clTmfDijLrLrTALWesEN9 corA== X-Forwarded-Encrypted: i=1; AJvYcCWtvNWM2jOrXPs1d9hsWDCh2oMYWuwxSeu9zfVFt7xtOslpvcxPZaQmzYPr8OGp/0FaXK35lMl935KM8dNusu7J+AIrz3ABfanMbZ7BhRBGvKZcbs6+rMUOin2BfVlntQIna4UZ1XONES79IztF1fZFQQ== X-Gm-Message-State: AOJu0YzjcDeQfhHKD8BTtszV9eT0dSdhXUDNHJ5oaK7i/3CqnEYBD9Cq 4GVxtiPEpih7dyxHB9Psz4bCho8wTqAXpeQ3g7ix90zgStcYfdk6KzFqJuHpbfyDz0AaYtn/i7R CvauYGgArfBtnSuxWOpV1mWk841etuw== X-Google-Smtp-Source: AGHT+IHFCY1jw482fEkrEFcrCfHhNjmRF1urZHKJkwsQH89H09vGqw7svWIGnSnVwMWznB7oZrd1SVvpDV1R1KKOSpQ= X-Received: by 2002:a05:6808:2206:b0:3d2:2084:3e33 with SMTP id 5614622812f47-3d220843f8dmr7194788b6e.40.1718041594804; Mon, 10 Jun 2024 10:46:34 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <202404231227.43NCRKnq030628@gitrepo.freebsd.org> In-Reply-To: <202404231227.43NCRKnq030628@gitrepo.freebsd.org> From: Alan Somers Date: Mon, 10 Jun 2024 11:46:23 -0600 Message-ID: Subject: Re: git: 91d35fb663e0 - main - Remove WITHOUT_CAPSICUM build support To: Ed Maste Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.89 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.998]; NEURAL_HAM_MEDIUM(-0.99)[-0.989]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MIME_GOOD(-0.10)[text/plain]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), No valid DKIM,none]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FREEFALL_USER(0.00)[asomers]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_COUNT_ONE(0.00)[1]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.167.180:from]; RCVD_IN_DNSWL_NONE(0.00)[209.85.167.180:from]; R_DKIM_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com]; FROM_HAS_DN(0.00)[]; MISSING_XM_UA(0.00)[]; ARC_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; RCPT_COUNT_THREE(0.00)[4] X-Rspamd-Queue-Id: 4VyfPT0FT1z41Dw On Tue, Apr 23, 2024 at 6:27=E2=80=AFAM Ed Maste wrote= : > > The branch main has been updated by emaste: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D91d35fb663e0276abc4963ae55= 9e4759ea929842 > > commit 91d35fb663e0276abc4963ae559e4759ea929842 > Author: Ed Maste > AuthorDate: 2024-04-23 11:20:59 +0000 > Commit: Ed Maste > CommitDate: 2024-04-23 12:26:28 +0000 > > Remove WITHOUT_CAPSICUM build support > > Capsicum is non-optional as of c24c117b9644 ("Remove > WITHOUT_{CAPSICUM,CASPER} options"). > > `#ifndef WITHOUT_CAPSICUM` is left in the source for the benefit of > downstream consumers, but is never defined in FreeBSD. > > Reviewed by: oshogbo > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D42077 Should we now remove the caph_enter family of functions? Or do they still have utility for downstream consumers? From nobody Mon Jun 10 18:58:10 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vyh024Snzz5MwlS; Mon, 10 Jun 2024 18:58:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vyh023y3Tz46dK; Mon, 10 Jun 2024 18:58:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718045890; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hWEnQDAoXxNNndyKGUVJHlnvlTQP8B33Rf7X8WEVxn0=; b=M+MRmGXazqOGpgDcv+8EDRkqeyLPkbmcSIWPZcXy02F/oTx/8a5JCp4Y6Ui0Rfc18Vwe7I AAFU/rgvjHmtqlT2+b4E9+BazY98mWmnzZ5Ux2/qfcQhXYVxHPQEWRACfQguSK5zhEEsaK JqcceHRRGWz/7lIi1AovCHL+8uYvBd/LWqzyPOendw63tYRnzzhknXb7IU671o4YqtdBmv 5M7z5/E4fdkNt+ApdNF6QdXz2YB+F0pG+dnu7dsaSPn9WFuGY+ZCJjMmCfX3eNv2DXtK8c y0qPideoywelQAcrmt8y97b996q5wECKfeMhHseGSpZ5YwmFdfbVcnBWyIrvkQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718045890; a=rsa-sha256; cv=none; b=wbS+Fo4Pe7K1SA3n0wu1hyA3ZPd7JZ9ZUP2CuYJPnmX+m+9qtP79oMG0dYT35m2iAuoBMh 4hk+CHt98+e9MYc+oO+xQSdGXoO2FnAKi5DG2HlVmg7qmiVdbhVainwvzonmOqx8sHC5Xn ltNyj6QU1kYAvP9FvDgTIJ5lKiEvlFUulUm6UVP1yskw3wruzmB8mYXdGNsYiBIhXB/SVt godzH5o2N7k7l2ORvyjs4qAS2WJq9ut3g1+Kv0diO6BKPvpFNIE9GKBRdGdvn/TRfA/GxE GpoV+EQ77SPg6+ZuTSquN5Bn1gvxzp3yv0rN87iidVYnrEaXovSCowvhYNKfTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718045890; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hWEnQDAoXxNNndyKGUVJHlnvlTQP8B33Rf7X8WEVxn0=; b=RwlQ30RU6mmeJbY5HaiqdgvFiqmlcxkpKDbd9iXmYmbgY5rAPgPvD2q8MW49SX1ka7zeJg IgUZFp8XziSO4m3ePuoFmGDwDpQIxgXooamGtK/UDcaNf5nMeytIL5/T1TpQv3oLkvE2NK nY8emToYfUfwIdnbZgKIJs8ti9XUHba3YUZ6nWhWcDzCGXdrguaQBJJvoeK4qrDEq+B0RW GR8i24vjfGyx0XmiEhW6mGWyqup6tHf8834nfx8vwtAzHq48Y30iu5WRs1AeiZVveOAxn6 rxpbLaK9+9B97WoaxZnZzojpnZpvKqrG2qzM3Vjk4mqsvHmEdfHnCwOTAFpG2Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vyh023RxpzcsW; Mon, 10 Jun 2024 18:58:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45AIwAgi093120; Mon, 10 Jun 2024 18:58:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45AIwAam093117; Mon, 10 Jun 2024 18:58:10 GMT (envelope-from git) Date: Mon, 10 Jun 2024 18:58:10 GMT Message-Id: <202406101858.45AIwAam093117@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: 0f409d2673f2 - main - BSD.tests.dist: add entry for virstor test List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0f409d2673f2b2f0958d66744f0a1dc877ce4ff0 Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=0f409d2673f2b2f0958d66744f0a1dc877ce4ff0 commit 0f409d2673f2b2f0958d66744f0a1dc877ce4ff0 Author: Ryan Libby AuthorDate: 2024-06-10 18:56:18 +0000 Commit: Ryan Libby CommitDate: 2024-06-10 18:56:18 +0000 BSD.tests.dist: add entry for virstor test Reviewed by: markj Fixes: 7affbeeab1c9 virstor: basic functional test Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D45551 --- etc/mtree/BSD.tests.dist | 2 ++ 1 file changed, 2 insertions(+) diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 92501766ef88..375e4900b5d5 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -835,6 +835,8 @@ etalon .. .. + virstor + .. .. .. kern From nobody Mon Jun 10 19:53:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VyjDc2k1hz5N29t; Mon, 10 Jun 2024 19:54:08 +0000 (UTC) (envelope-from oshogbo.vx@gmail.com) Received: from mail-oo1-f42.google.com (mail-oo1-f42.google.com [209.85.161.42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VyjDc0xMQz4DY5; Mon, 10 Jun 2024 19:54:08 +0000 (UTC) (envelope-from oshogbo.vx@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-oo1-f42.google.com with SMTP id 006d021491bc7-5bad7941dcfso160397eaf.3; Mon, 10 Jun 2024 12:54:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718049246; x=1718654046; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Vy5RfWUHCX4RRoTwRBwDpJgTL24NLEl8YDrlT9TeScs=; b=e7kKS4FcTfp3a5LPG/TOx1lNJymyBBsdKxb5et13X3Txtfw0tdJ2PBtonW2jjeosSi t0lvxcErM68hcDRkKtpf+lcGD3I0WXm9YiB24gHfMqArXgeBFyr++/4m2xuCnOqj3sAX 2PPvYfqZU8n8e/o6IEDQ7nKSrqi/qlwlRWgDuhl5PRTHH8zstm00GDFKvIsOuC5LKjqR vcR4OJkxd4ENJW5O3kRf4RlNwSdQF3fW2EpHIrxFDfKdIxB6Zywuzpx6GgcpWjeWIXWD OWhNCkVtnqBhHoJqraKUZ5rRHxah4Zvmgmfqli8c4FVeUlnDE+1KOu6Li1h2cUGPwjqD BVZA== X-Forwarded-Encrypted: i=1; AJvYcCVvfpHAL2U4Fue9qxT7/r4q+Fa986kZgPrcUj1M6/Wpx1szskJZWXr/g+u4DLBrwx3VpHVal+3UYlRABfnSQhYzcyoRFJMal+QU7UTDU3e7g79edSYmwT2eYcSwwZiIBvDdlUaAzfFeArWgvzMna4k9+11hvRlS7rj327b2gWOovkskrk3NR+1kHDxUL20= X-Gm-Message-State: AOJu0YzrK82V0afREBclR0Qsefg9JJuV/domL4kGShLPqKf+1mCJGeRn GQiGChCnxXq7mZeGenN8RYBO0FIU/fc1+lEIZBTZQHsXh3R5Ts8sfGVLx+YGuNu379Vpb6TYja7 eVKBjcToeHA1k1u1cRcYGv855F5sxj/zI X-Google-Smtp-Source: AGHT+IFRmp5MrRgn76MEwis6EQDw3LK14ipaj66N0Op9F6n5R6Z8WlFVpEvExKNox7OohQ0hMchrai38akY+ORlfNd8= X-Received: by 2002:a4a:d483:0:b0:5ba:ef94:7dc3 with SMTP id 006d021491bc7-5baef94829bmr5237229eaf.1.1718049246307; Mon, 10 Jun 2024 12:54:06 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <202404231227.43NCRKnq030628@gitrepo.freebsd.org> In-Reply-To: From: Mariusz Zaborski Date: Mon, 10 Jun 2024 21:53:55 +0200 Message-ID: Subject: Re: git: 91d35fb663e0 - main - Remove WITHOUT_CAPSICUM build support To: Alan Somers Cc: Ed Maste , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000086c87061a8e8308" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4VyjDc0xMQz4DY5 --000000000000086c87061a8e8308 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello Alan, Kernel still can be built without Capsicum support. So caph_* functions still are useful. Thanks, Mariusz On Mon, 10 Jun 2024 at 19:46, Alan Somers wrote: > On Tue, Apr 23, 2024 at 6:27=E2=80=AFAM Ed Maste wro= te: > > > > The branch main has been updated by emaste: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D91d35fb663e0276abc4963ae559e475= 9ea929842 > > > > commit 91d35fb663e0276abc4963ae559e4759ea929842 > > Author: Ed Maste > > AuthorDate: 2024-04-23 11:20:59 +0000 > > Commit: Ed Maste > > CommitDate: 2024-04-23 12:26:28 +0000 > > > > Remove WITHOUT_CAPSICUM build support > > > > Capsicum is non-optional as of c24c117b9644 ("Remove > > WITHOUT_{CAPSICUM,CASPER} options"). > > > > `#ifndef WITHOUT_CAPSICUM` is left in the source for the benefit of > > downstream consumers, but is never defined in FreeBSD. > > > > Reviewed by: oshogbo > > Sponsored by: The FreeBSD Foundation > > Differential Revision: https://reviews.freebsd.org/D42077 > > Should we now remove the caph_enter family of functions? Or do they > still have utility for downstream consumers? > --000000000000086c87061a8e8308 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello Alan,

Kernel still can be built without Capsi= cum support.
So caph_* functions still are useful.

Thanks,
Mar= iusz

--000000000000086c87061a8e8308-- From nobody Mon Jun 10 23:31:02 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vyp3D3Lmmz5N7Yy; Mon, 10 Jun 2024 23:31:20 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vyp3C3MNPz4bst; Mon, 10 Jun 2024 23:31:19 +0000 (UTC) (envelope-from rlibby@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=PPrsqTZf; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of rlibby@gmail.com designates 2a00:1450:4864:20::22e as permitted sender) smtp.mailfrom=rlibby@gmail.com Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-2ebed33cbafso11372851fa.1; Mon, 10 Jun 2024 16:31:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718062275; x=1718667075; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=HR9RLGvpB6hmp5kvMy9vruVlowUG53VrVwT56QGrXdo=; b=PPrsqTZfYKrwruwqSC3qjD5UsvhDIiCKx6NK+goz1OzcBxpRqh8XFAjHcx0CSEWYsA busIevHCKy8a4LDLx7Eg7STbTvNesb0ZMWsgjmg9wET4Tfxm758T5lBDFGmtfmHpA4SN DALNoZydzopYKAlBzprCikw/UH04xvs/8pYOMz0/WJqcBEieFrtXUEAkzjyeKP0WNxsu Nv4QZ+7fmXu7tY6GRuS/b8GRh26bSESwCtL2nfHgcpivgs+SdpX1QDRJ12Wa10TJQNKf KNCa233HTVFYz5lxw7cbi643DvQucBg6/SXgO5l4HYW0uPv4Ak4PN865fhSdeJ8rGso4 LD3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718062275; x=1718667075; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HR9RLGvpB6hmp5kvMy9vruVlowUG53VrVwT56QGrXdo=; b=Zkm9fDzTy3zJUcCNb955Zxpb6WtVyCTdaFEWqgAcQeSVYwbc6W0BsI423lykBT7ScX 2+OxU8YMGbQnoTqYDsQEtFZlgp7NRtmuRM7XjzrHJJf7Ddaw4PjRWcnU+Ifa6SbIFHj9 j3zIm4DvVD9AnsUzuoBXxaHqcaekvJC/j97n5fi3+HqXWSBlnALU1ytYDcx8fwR7MGrm vPD1548NWR+hkEY3DIRTXxzmOwGAssBXhJ/jj49gIQvsqznUDTNrvf+V6idbpOkLkLlc HUqameMG8+vg2Xky0B0Vi2noLDd8nVf00GRB4ByPWDASWAig1IMTsBIC+TrI4ppPkLzh DhRQ== X-Forwarded-Encrypted: i=1; AJvYcCVqUH/hJl9p94EGU2iin0hq+Fqe/htnQVWEs/zONHl7XZdJAnTt+3EBVJ3rIMYt6MFpx2u7m4zdJiO7BmOfg1RTqt42rXhk1LtBmlNAofFdDFeTlqw2reipeer1tmxV3GuUjK4lxN1T+VXOixALUlpS379yYZ+/vNXoDUsbUZjVp3XzfeY= X-Gm-Message-State: AOJu0Yyoq2enYEmEF0Cwtk/yKv5ciNDh8SfGbhG+WLLPW197jAil/2SM QFrfKI+qp14KSdtaodtlrAgvXipfG+sIbYMWdPhOqH4+/0YHAKyK/4ilajIkdahgA2oBDpwr7C/ pIADp2xu6PEfrA1YwtxAY+9EH65E5sDv+iOE= X-Google-Smtp-Source: AGHT+IFHF57uBrhTvu8f5ZlkpZEbN+EIKCOOrlJ/xDwGFjHlKczwnFciDWsBO7ej/2gsUL83YlaQtTNzXk+ATGYZekw= X-Received: by 2002:a05:6512:114a:b0:52c:8a39:83d7 with SMTP id 2adb3069b0e04-52c8a39846emr3026919e87.52.1718062274195; Mon, 10 Jun 2024 16:31:14 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <202406081556.458FuJYN022360@gitrepo.freebsd.org> In-Reply-To: <202406081556.458FuJYN022360@gitrepo.freebsd.org> From: Ryan Libby Date: Mon, 10 Jun 2024 16:31:02 -0700 Message-ID: Subject: Re: git: 888796ade284 - main - libm: fma: correct zero sign with small inputs To: Ed Maste , kargl@freebsd.org Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: --- X-Spamd-Result: default: False [-4.00 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::22e:from]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_FIVE(0.00)[5]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; MID_RHS_MATCH_FROMTLD(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_ONE(0.00)[1]; FREEFALL_USER(0.00)[rlibby]; MISSING_XM_UA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com] X-Rspamd-Queue-Id: 4Vyp3C3MNPz4bst On Sat, Jun 8, 2024 at 8:56=E2=80=AFAM Ed Maste wrote: > > The branch main has been updated by emaste: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D888796ade2842486d3167067e8= 034254c38aadd3 > > commit 888796ade2842486d3167067e8034254c38aadd3 > Author: Ed Maste > AuthorDate: 2024-03-19 14:31:39 +0000 > Commit: Ed Maste > CommitDate: 2024-06-08 15:55:36 +0000 > > libm: fma: correct zero sign with small inputs > > PR: 277783 > Reported by: Victor Stinner > Submitted by: kargl > MFC after: 1 week > Differential Revision: https://reviews.freebsd.org/D44433 > --- > lib/msun/src/s_fma.c | 4 +++- > lib/msun/src/s_fmal.c | 4 +++- > 2 files changed, 6 insertions(+), 2 deletions(-) > > diff --git a/lib/msun/src/s_fma.c b/lib/msun/src/s_fma.c > index b8a342646d85..4d08b40cc71a 100644 > --- a/lib/msun/src/s_fma.c > +++ b/lib/msun/src/s_fma.c > @@ -267,7 +267,9 @@ fma(double x, double y, double z) > */ > fesetround(oround); > volatile double vzs =3D zs; /* XXX gcc CSE bug workaround= */ > - return (xy.hi + vzs + ldexp(xy.lo, spread)); > + xs =3D ldexp(xy.lo, spread); > + xy.hi +=3D vzs; > + return (xy.hi =3D=3D 0 ? xs : xy.hi + xs); > } > > if (oround !=3D FE_TONEAREST) { > diff --git a/lib/msun/src/s_fmal.c b/lib/msun/src/s_fmal.c > index 3d333632127c..12f9c364670b 100644 > --- a/lib/msun/src/s_fmal.c > +++ b/lib/msun/src/s_fmal.c > @@ -248,7 +248,9 @@ fmal(long double x, long double y, long double z) > */ > fesetround(oround); > volatile long double vzs =3D zs; /* XXX gcc CSE bug worka= round */ > - return (xy.hi + vzs + ldexpl(xy.lo, spread)); > + xs =3D ldexpl(xy.lo, spread); > + xy.hi +=3D vzs; > + return (xy.hi =3D=3D 0 ? xs : xy.hi + xs); > } > > if (oround !=3D FE_TONEAREST) { This seems to have caused the lib/msun/fma_tests:zeroes test to fail in the FE_ROUNDDOWN mode on amd64, now finding 0 while expecting -0. I don't know if the test is wrong or too strict, or if the new result is wrong. https://ci.freebsd.org/job/FreeBSD-main-amd64-test/25249/testReport/junit/l= ib.msun/fma_test/zeroes/ Reproduces with kyua debug -k /usr/tests/Kyuafile lib/msun/fma_test:zeroes Ryan From nobody Tue Jun 11 00:42:05 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vyqcs3wzGz5NG8K; Tue, 11 Jun 2024 00:42:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vyqcs3LTdz4gvM; Tue, 11 Jun 2024 00:42:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718066525; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5XWFV3eTLygesr5Ef65UtKkqdJertJNz8LE9gLwulYg=; b=CoTSL3XCuvgLtlHfL53/2o3mfYqEQ3SWmHfBUeeRWfMj+MZk0rcArKX70+fY/fAIX0RduH wxfoMd7l9agBPHN3AAbEBlHhz4SBvbEKOEC0riJ7WXzaY5TT6j3U4C8WKvz7yZDdoIlzEm MmUTOlZr4c4rP79HTiEDq9MYeFMd0OW7SGK//OG4tc22tKyYmUai2RAZMWJWTsHmxNJsZc WUo17mcDGy2r1X+0t6khTYd6IccLZIER+0cFYgo7tJnLj4F0RLJeduSEUL82lgz9uNqp8s 3M4FtlWgNUzIleXp2Mf8K7rQ1eCIFu7O4A2LuTfjN0mA6xaeHGGVQjneOfZivg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718066525; a=rsa-sha256; cv=none; b=SjT1ObU8U2k2S7ImfiqsBiYCGHJa6wafpbWTNCfnUZXN7CFQ3eBLRHZTTEMx7L99p0zopC 4ilSgBUoUisLgJ/qlvXrILCxJdwtAvbpCJ2IrVmQIFi+qDxlWzip+AI+tW2kDIPGRkkUtU 8TnAzstHhAkY/1gUlrAHEeBGA9mczNr97IIY188EAf2sWjj/vIAgg0ekCUldubkbRwl4B6 jJidfdRb8RH8UHLZpar2OiTMoiuJb7aEwBZUXdZhvuUhEVJP3hoo02YZnvf9XOrQSwWpjB jIp4f13aPbf29n5DDt4nTDns+BFHfKim/Qcx0k/eFfHkjXcnsEQTGi7QDnCazg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718066525; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5XWFV3eTLygesr5Ef65UtKkqdJertJNz8LE9gLwulYg=; b=rbgJehzDbECDv7+MhHHV1/OBXfgEHC6ruGiV7pQGV6CEnZY5bwoXAakqz+n5gTbjs4+Cy1 AlyMOGmCfpi0pxyJAB011bd7TzZMzPUYR802GUi5tpqDJ1qn2tHLGKO8f4wraKP1/qudUe TIv6A0D7yxfPE6RGbN8SNGilo/YCnP+ZRV+fN9H3YVjdW9Ftlpp8hkut/gj6ClSjCvLLUQ gvHJM8mhPwI6cYkzOOllt34WfDBzxm0pjT+zi3XF8PTsW2g0EiZP6i0XWXolX1wnyIiyj9 Jm+USlvKIMX4ZAvMr10Za6BwBPcw5MAotTZYOh5Hh3zxm+3OhzrV6NavzNCS+Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vyqcs2xs8znhp; Tue, 11 Jun 2024 00:42:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45B0g5gp082655; Tue, 11 Jun 2024 00:42:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45B0g5b2082652; Tue, 11 Jun 2024 00:42:05 GMT (envelope-from git) Date: Tue, 11 Jun 2024 00:42:05 GMT Message-Id: <202406110042.45B0g5b2082652@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: a2fda816eb05 - main - virstor: write large maps in chunks during label List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a2fda816eb054d5873be223ef2461741dfcc253c Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=a2fda816eb054d5873be223ef2461741dfcc253c commit a2fda816eb054d5873be223ef2461741dfcc253c Author: Ryan Libby AuthorDate: 2024-06-11 00:36:20 +0000 Commit: Ryan Libby CommitDate: 2024-06-11 00:36:20 +0000 virstor: write large maps in chunks during label During the initial label of a virstor device, write out the allocation map in chunks if it is large (> 1 MB) in order to avoid large mallocs. Even though the kernel virstor geom may still do a large malloc to represent the allocation map, this may still be useful to avoid a ulimit. Reviewed by: markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D45517 --- lib/geom/virstor/geom_virstor.c | 59 ++++++++++++++++++++++++++++++----------- 1 file changed, 43 insertions(+), 16 deletions(-) diff --git a/lib/geom/virstor/geom_virstor.c b/lib/geom/virstor/geom_virstor.c index 131ece0107c7..6a7dfb27fe43 100644 --- a/lib/geom/virstor/geom_virstor.c +++ b/lib/geom/virstor/geom_virstor.c @@ -157,8 +157,7 @@ virstor_label(struct gctl_req *req) char param[32]; int hardcode, nargs, error; struct virstor_map_entry *map; - size_t total_chunks; /* We'll run out of memory if - this needs to be bigger. */ + size_t total_chunks, write_max_map_entries; unsigned int map_chunks; /* Chunks needed by the map (map size). */ size_t map_size; /* In bytes. */ ssize_t written; @@ -325,28 +324,56 @@ virstor_label(struct gctl_req *req) sprintf(param, "%s%s", _PATH_DEV, name); fd = open(param, O_RDWR); } - if (fd < 0) + if (fd < 0) { gctl_error(req, "Cannot open provider %s to write map", name); + return; + } - /* Do it with calloc because there might be a need to set up chunk flags - * in the future */ - map = calloc(total_chunks, sizeof(*map)); + /* + * Initialize and write the map. Don't malloc the whole map at once, + * in case it's large. Use calloc because there might be a need to set + * up chunk flags in the future. + */ + write_max_map_entries = 1024 * 1024 / sizeof(*map); + if (write_max_map_entries > total_chunks) + write_max_map_entries = total_chunks; + map = calloc(write_max_map_entries, sizeof(*map)); if (map == NULL) { gctl_error(req, "Out of memory (need %zu bytes for allocation map)", - map_size); + write_max_map_entries * sizeof(*map)); + close(fd); + return; } - - written = pwrite(fd, map, map_size, 0); - free(map); - if ((size_t)written != map_size) { - if (verbose) { - fprintf(stderr, "\nTried to write %zu, written %zd (%s)\n", - map_size, written, strerror(errno)); + for (size_t chunk = 0; chunk < total_chunks; + chunk += write_max_map_entries) { + size_t bytes_to_write, entries_to_write; + + entries_to_write = total_chunks - chunk; + if (entries_to_write > write_max_map_entries) + entries_to_write = write_max_map_entries; + bytes_to_write = entries_to_write * sizeof(*map); + for (size_t off = 0; off < bytes_to_write; off += written) { + written = write(fd, ((char *)map) + off, + bytes_to_write - off); + if (written < 0) { + if (verbose) { + fprintf(stderr, + "\nError writing map at offset " + "%zu of %zu: %s\n", + chunk * sizeof(*map) + off, + map_size, strerror(errno)); + } + gctl_error(req, + "Error writing out allocation map!"); + free(map); + close(fd); + return; + } } - gctl_error(req, "Error writing out allocation map!"); - return; } + free(map); + map = NULL; close (fd); if (verbose) From nobody Tue Jun 11 00:42:06 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vyqct5wJWz5NG8M; Tue, 11 Jun 2024 00:42:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vyqct4hgSz4hDr; Tue, 11 Jun 2024 00:42:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718066526; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pYGvoGtTff2JVuVia+V1ajuwXIsxAkjQ8jqbJQwgDuU=; b=DrTTqsHVngCtFnAwAROnikbjpjppsihyGK6mOEODCGJVSXM7oCajN+pGknXBQUXw73A9ZQ 6FYyrdYkN2xZdNw1zV04ILfcY8+1FDga8W988O+4Fty21mdpmmxKYclmHbf727xy0hWmoe qQ+uobaaV2NFZwdfshXDUato+qJIuGJvSKwQzOWF1UiTGbA8M3nV6iqXu79sK4J7HYrZ96 hqZICJvWLGctXLVLxQ89J/jJH/wtXejNv9TV5k8+iY+Ehc8JnQDi3hmHoVuuuGvYiMjIKd YwnrbatopXIdPQsjTvMllngRNnm0lBRGkt+uPQlzMmqUVk6GmkYflaWcT9gjFw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718066526; a=rsa-sha256; cv=none; b=M6JC2veTHDg129qv24oodZNyPjLbgI+h4cIcbEEuXHSHGdusbDjBUYFRGKjM1qhSSmZrvs cta+h7PwgbiNwe5DTMPcMlr32gWMVk72cX2jA9AhXBgCpOQEAZ/BNjA1XpN3q2ocBvgHXq jN+NPwjEbixlX+Zw8zUUsv4lZSyCUups5G4YRCZywRck6EitxQSavuD/xYA43SNITlMEOc MLPectT+R3h9Heb8UOazxOoLVC/Qir7CPyu1BIegF0+lkUNoDqFgH87cqmT5NcorsZaDMR UXhVLMWkgx185DVBL38O8RqDbvluWtQVNzJ2XrmQ5T9+84BwTrRZp1MfMM4Sxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718066526; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pYGvoGtTff2JVuVia+V1ajuwXIsxAkjQ8jqbJQwgDuU=; b=lPTPldBlVDKDiEYU89fd9vPAoaXCgSpaqIu7yubERkXM422lw1WYbJFepWy9ess0n2nIFY Cp+/dLWomHd8G4jEiRhKpO178uQ8NcJ3GtD7IbR57/w5OWo5c4sEiwJBcOUdoi8x/iFLY7 GuerWJNbpNO0gafuSdlFy7Jk0WOui6WqLfOtzuzX6SKapN0Wj5kToXMFXTGaeK6Uf17840 4fOz9jvei1Lq4v9/NHLaj41NgWF4t5eI3mzC+rlhNCsCm0OhjByCo4Ajgi21PcnDnAslXA Ju+jWx21YLAzWfciBlZGpc87gwpkmWxYXeBCnzzYV0+cyjMReXW77jyFJTjgww== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vyqct4Jt9znhs; Tue, 11 Jun 2024 00:42:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45B0g6tP082706; Tue, 11 Jun 2024 00:42:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45B0g6aJ082703; Tue, 11 Jun 2024 00:42:06 GMT (envelope-from git) Date: Tue, 11 Jun 2024 00:42:06 GMT Message-Id: <202406110042.45B0g6aJ082703@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: e754909cb0ae - main - virstor: remove relation between chunk size and MAXPHYS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e754909cb0aeaf759cddf79c14a04a42f8d894bc Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=e754909cb0aeaf759cddf79c14a04a42f8d894bc commit e754909cb0aeaf759cddf79c14a04a42f8d894bc Author: Ryan Libby AuthorDate: 2024-06-11 00:38:17 +0000 Commit: Ryan Libby CommitDate: 2024-06-11 00:38:17 +0000 virstor: remove relation between chunk size and MAXPHYS There's no reason why the virstor chunk size needs to relate to MAXPHYS. Remove it. Instead, just make sure that the chunk size is a multiple of the sector size. Reviewed by: imp Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D45518 --- lib/geom/virstor/geom_virstor.c | 40 ++++++++++++++-------------------------- 1 file changed, 14 insertions(+), 26 deletions(-) diff --git a/lib/geom/virstor/geom_virstor.c b/lib/geom/virstor/geom_virstor.c index 6a7dfb27fe43..5f5087e99213 100644 --- a/lib/geom/virstor/geom_virstor.c +++ b/lib/geom/virstor/geom_virstor.c @@ -195,27 +195,6 @@ virstor_label(struct gctl_req *req) return; } - if (md.md_chunk_size % MAXPHYS != 0) { - /* XXX: This is not strictly needed, but it's convenient to - * impose some limitations on it, so why not MAXPHYS. */ - size_t new_size = rounddown(md.md_chunk_size, MAXPHYS); - if (new_size < md.md_chunk_size) - new_size += MAXPHYS; - fprintf(stderr, "Resizing chunk size to be a multiple of " - "MAXPHYS (%d kB).\n", MAXPHYS / 1024); - fprintf(stderr, "New chunk size: %zu kB\n", new_size / 1024); - md.md_chunk_size = new_size; - } - - if (md.md_virsize % md.md_chunk_size != 0) { - off_t chunk_count = md.md_virsize / md.md_chunk_size; - md.md_virsize = chunk_count * md.md_chunk_size; - fprintf(stderr, "Resizing virtual size to be a multiple of " - "chunk size.\n"); - fprintf(stderr, "New virtual size: %zu MB\n", - (size_t)(md.md_virsize/(1024 * 1024))); - } - msize = secsize = 0; for (i = 1; i < (unsigned)nargs; i++) { snprintf(param, sizeof(param), "arg%u", i); @@ -240,11 +219,20 @@ virstor_label(struct gctl_req *req) } if (md.md_chunk_size % secsize != 0) { - fprintf(stderr, "Error: chunk size is not a multiple of sector " - "size."); - gctl_error(req, "Chunk size (in bytes) must be multiple of %u.", - (unsigned int)secsize); - return; + size_t new_size = roundup(md.md_chunk_size, secsize); + fprintf(stderr, "Resizing chunk size to be a multiple of " + "sector size (%zu bytes).\n", secsize); + fprintf(stderr, "New chunk size: %zu kB\n", new_size / 1024); + md.md_chunk_size = new_size; + } + + if (md.md_virsize % md.md_chunk_size != 0) { + off_t chunk_count = md.md_virsize / md.md_chunk_size; + md.md_virsize = chunk_count * md.md_chunk_size; + fprintf(stderr, "Resizing virtual size to be a multiple of " + "chunk size.\n"); + fprintf(stderr, "New virtual size: %zu MB\n", + (size_t)(md.md_virsize / (1024 * 1024))); } total_chunks = md.md_virsize / md.md_chunk_size; From nobody Tue Jun 11 01:33:50 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VyrmZ1wR0z5NLQR; Tue, 11 Jun 2024 01:33:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VyrmZ1Qlsz4n1r; Tue, 11 Jun 2024 01:33:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718069630; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cptJ0DlMG35yLKgs4bpuIcgWduHvYoe9B6DMPFiYYdM=; b=kJWbvR8o+HrUa3PcujACkAfCZmTsB/EiBqGeao+Bf2HKqlHNkgseawng0ZH8JsacMfTKmr UOnv6JwZIwFGDZZ832QqLDgmHgXUZGO49SefQFE8W68vFAad6ig9+q0hsoPLP4Eu+nBICS PpN+75ufxnKrcaSwihwg6RvB8ISAX+NBnGoJz9ZVWHdf3Uxckcl2jYo6V59wfhxo73BTc4 mLWho+GsVAcFctRCU8RueLwb+VT104NSFHYBd2DAPPTbm+DzayrMK9l8kImmfYN/SumVbT X/Vb8ybaRSYti3PptnFqRZrszcB5VUF0PBqGqxhDoYCk/4qav5mproAEAIVqow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718069630; a=rsa-sha256; cv=none; b=qDVcl/b/7bMc01mehPHnxSkpYQcwWbBc+Igsfk6B+vYR7NRfsSUPt351Dhi5DzLFExWlZ4 ZVpTtWp2PYMTpQz3c9n1rczVbtkSDhT005UJk2ZujW8Cdr5BabYIK+//emWS6hMB5a/YMC SK1bjt2qZts3Nr8+NYTgQTOxu2Ps9j3lryd3IlJi2HWte103MTL4rs+eYs/XzwtqFL+eYb AVrsDCz8GzePXfAcKflaN8kh6S3ynvxxaEdEgDF2abGqolKlS8ZSZ2gnhEKxuxcHXI92Rc GNfbJblv8EM9uvJVldaE5rpIO7RwjlGYO+yaaweSmhxmeDgrxCbE6xdJdFOBeA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718069630; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cptJ0DlMG35yLKgs4bpuIcgWduHvYoe9B6DMPFiYYdM=; b=Bi3eFAGl9TYU0a+ar6BfnU54ADKLIzeVlt7/7lyHqk2InhIg7EALoI6U9dCZK/ab1wsmoA 0AgGfsvg8KxIytKZp5mWPCXngyyH3eaaBnKSbJP+NtqhpLpjV5i2Ves+YkvPjO8nFxNQ7W kYEo7CtgKBSQRHHRFV4tPqauTshlrksP+ILomOVqwUSJi6uBl75w2XGuLeSbxhHVbDjuJa VeNwUx13n83HjSni/Jyz25dtL/bPcfk0Le+oj2XQNK3XlzHIWTkENyz8ceDsArdVvukt8V fxwUGeb8TCUNcZVnG79zfHi/PO1dUtJmgOk1GO0xqX7q6k1bpiDiWnYk2d4+TQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VyrmZ11tpzq3m; Tue, 11 Jun 2024 01:33:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45B1XoKs068679; Tue, 11 Jun 2024 01:33:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45B1Xo9c068676; Tue, 11 Jun 2024 01:33:50 GMT (envelope-from git) Date: Tue, 11 Jun 2024 01:33:50 GMT Message-Id: <202406110133.45B1Xo9c068676@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gleb Smirnoff Subject: git: a3f7b81fdd22 - stable/14 - mbuf: provide m_freemp() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a3f7b81fdd2205207085ba5d038b402aba748c6e Auto-Submitted: auto-generated The branch stable/14 has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=a3f7b81fdd2205207085ba5d038b402aba748c6e commit a3f7b81fdd2205207085ba5d038b402aba748c6e Author: Gleb Smirnoff AuthorDate: 2024-06-11 01:31:02 +0000 Commit: Gleb Smirnoff CommitDate: 2024-06-11 01:31:02 +0000 mbuf: provide m_freemp() This function follows both m_nextpkt and m_next linkage freeing all mbufs. Note that existing m_freem() follows only m_next. Reviewed by: khng Differential Revision: https://reviews.freebsd.org/D45477 (cherry picked from commit badf44cc21249a56e7d822a77acfdd21f8352d50) --- sys/kern/kern_mbuf.c | 19 +++++++++++++++++++ sys/kern/uipc_mbuf.c | 3 +++ sys/sys/mbuf.h | 2 ++ 3 files changed, 24 insertions(+) diff --git a/sys/kern/kern_mbuf.c b/sys/kern/kern_mbuf.c index 0897ac4cc2db..002e508e91cc 100644 --- a/sys/kern/kern_mbuf.c +++ b/sys/kern/kern_mbuf.c @@ -1569,6 +1569,25 @@ m_freem(struct mbuf *mb) mb = m_free(mb); } +/* + * Free an entire chain of mbufs and associated external buffers, following + * both m_next and m_nextpkt linkage. + * Note: doesn't support NULL argument. + */ +void +m_freemp(struct mbuf *m) +{ + struct mbuf *n; + + MBUF_PROBE1(m__freemp, m); + do { + n = m->m_nextpkt; + while (m != NULL) + m = m_free(m); + m = n; + } while (m != NULL); +} + /* * Temporary primitive to allow freeing without going through m_free. */ diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c index f1e986eaa348..b10e524e6e4b 100644 --- a/sys/kern/uipc_mbuf.c +++ b/sys/kern/uipc_mbuf.c @@ -113,6 +113,9 @@ SDT_PROBE_DEFINE1_XLATE(sdt, , , m__free, SDT_PROBE_DEFINE1_XLATE(sdt, , , m__freem, "struct mbuf *", "mbufinfo_t *"); +SDT_PROBE_DEFINE1_XLATE(sdt, , , m__freemp, + "struct mbuf *", "mbufinfo_t *"); + #include /* diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h index 757eba3165f9..f7925da795cd 100644 --- a/sys/sys/mbuf.h +++ b/sys/sys/mbuf.h @@ -67,6 +67,7 @@ SDT_PROBE_DECLARE(sdt, , , m__cljget); SDT_PROBE_DECLARE(sdt, , , m__cljset); SDT_PROBE_DECLARE(sdt, , , m__free); SDT_PROBE_DECLARE(sdt, , , m__freem); +SDT_PROBE_DECLARE(sdt, , , m__freemp); #endif /* _KERNEL */ @@ -844,6 +845,7 @@ void m_extadd(struct mbuf *, char *, u_int, m_ext_free_t, u_int m_fixhdr(struct mbuf *); struct mbuf *m_fragment(struct mbuf *, int, int); void m_freem(struct mbuf *); +void m_freemp(struct mbuf *); void m_free_raw(struct mbuf *); struct mbuf *m_get2(int, int, short, int); struct mbuf *m_get3(int, int, short, int); From nobody Tue Jun 11 01:33:51 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vyrmb3PtRz5NLbj; Tue, 11 Jun 2024 01:33:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vyrmb2j9tz4mtD; Tue, 11 Jun 2024 01:33:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718069631; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sLKzVWpxx//zMnpfq8dciJ0e6CKODOU1Rbhfx99RWk4=; b=vapllASqZLXJpCuSoq0v5J/Ufdxnvhwd1dtWYDt2bY2sbGVvfbhtT7c+2cc/O2yx7UO0CD QEh5u6ZuzpACwB/Ns3OHmt5EqoAv1bEaLDscWDOs0iv151gWbASQLLmmBw6KIqa9tj03d2 ELwWBn41+KrgrxXSZn4wptMGgxQ5EExDA5kmxpMFXiI6G+iCcj3s6Ilqe2qgb3E39EJsPx pmq0izGfMDsuEEvrepF2dzayckSGqsqAGeM81zkGH7mR2+6H+01zcCRwmOjLcvxBaVizd0 /6W9c8eMtwgQDoDJ+qmiJP28O82/kuj9axmxs5r+IrnLSgR3jeKwX/x8dCacRw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718069631; a=rsa-sha256; cv=none; b=ZYxbkidHMRBotF4YwCnSI/sGJ/+StqMqz/mZ+awchpHjLLM+WITDODvH18uzflslQd8rpu lf6jMeON//TSbmPr01H9cevIOUy7otakzXzgtzh0RGWvjz2qzqMtTepSAYh6mXPa/25Nx2 jVfSuVVKxT7GwOkOgJIiAR97LpC1fq4FMHVWouZvB+npraIomIJMm/1dgnvrPIpvUtrdbz bkCJ6e5dmx8FmRPgiQX7hOX0eXREqs97jOssJEZc72fO/Gd5PAE1UjjCy2tC5sfKwNMGkV 3P8dIA1P+cwp7e6Lz8fNmjmC0tBnk0DlVadRGDysCGnbQ2FRpd2rnfZpu2uWnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718069631; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sLKzVWpxx//zMnpfq8dciJ0e6CKODOU1Rbhfx99RWk4=; b=Uz9O6nY1neYmK/A3JMM3VyFppMfe21rax2pIF1tG+LZUTiMz4RAH42C7EcYAOq1jLMD20C h85GvPT1aLp2CFPWVCq/VPhYw5lucMY9ZIcm+R6YCg2wmcU7cB3KURtsOx096I+r5uDHiC 62p3JdOmFM4WFACvr3Pn+gETb3j4HBYZ2YVJ7BIYZonMJdCDKCFHIjprx8xKJlQfyKmJZz +5RbeWfCoWHZux/fXPnTlXoj9AkZLasgsdoXg5aopcMoaqg0PIUXt9I1Q2IPYE/5SAV8pw pRf91LD/TYYuYSYNcHPIEITSdfxH6Dc4BSPvxXocsC8j6Iyyc5d9+WShFKfw5w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vyrmb2KbMzpgs; Tue, 11 Jun 2024 01:33:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45B1XpGv068730; Tue, 11 Jun 2024 01:33:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45B1XpOC068727; Tue, 11 Jun 2024 01:33:51 GMT (envelope-from git) Date: Tue, 11 Jun 2024 01:33:51 GMT Message-Id: <202406110133.45B1XpOC068727@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gleb Smirnoff Subject: git: f70581ff7d55 - stable/14 - unix: use m_freemp() when disposing unix socket buffers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f70581ff7d556aa49a130fa24c876e74b877278c Auto-Submitted: auto-generated The branch stable/14 has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=f70581ff7d556aa49a130fa24c876e74b877278c commit f70581ff7d556aa49a130fa24c876e74b877278c Author: Gleb Smirnoff AuthorDate: 2024-06-11 01:31:08 +0000 Commit: Gleb Smirnoff CommitDate: 2024-06-11 01:31:08 +0000 unix: use m_freemp() when disposing unix socket buffers The new unix/dgram uses m_nextpkt linkage, while the old unix/stream uses m_next linkage. This fixes memory leak. Diagnosed by: khng Reviewed by: khng, markj PR: 279467 Fixes: 458f475df8e5912609c14208c189414a8255c738 Differential Revision: https://reviews.freebsd.org/D45478 (cherry picked from commit a9b55a66440ce67e545b60f2861badbfc5ec6327) --- sys/kern/uipc_usrreq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index e54cd01956bf..87b82763b5f1 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -2189,7 +2189,7 @@ unp_disconnect(struct unpcb *unp, struct unpcb *unp2) if (m != NULL) { unp_scan(m, unp_freerights); - m_freem(m); + m_freemp(m); } } @@ -3276,7 +3276,7 @@ unp_dispose(struct socket *so) if (m != NULL) { unp_scan(m, unp_freerights); - m_freem(m); + m_freemp(m); } } From nobody Tue Jun 11 02:57:52 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VytfH1Cjsz5NShp for ; Tue, 11 Jun 2024 02:58:31 +0000 (UTC) (envelope-from kargls@comcast.net) Received: from resqmta-a2p-658764.sys.comcast.net (resqmta-a2p-658764.sys.comcast.net [IPv6:2001:558:fd01:2bb4::6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4VytfG53BSz4vLn for ; Tue, 11 Jun 2024 02:58:30 +0000 (UTC) (envelope-from kargls@comcast.net) Authentication-Results: mx1.freebsd.org; none Received: from resomta-a2p-647655.sys.comcast.net ([96.103.145.235]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 256/256 bits) (Client did not present a certificate) by resqmta-a2p-658764.sys.comcast.net with ESMTPS id GrRRsprH7tlfdGriEsxAGG; Tue, 11 Jun 2024 02:58:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=20190202a; t=1718074698; bh=9v6Xc2S/uuN2YQFOTqlYJeElIta2L0eczBP0+LNAxB4=; h=Received:Received:Message-ID:Date:MIME-Version:Subject:To:From: Content-Type:Xfinity-Spam-Result; b=0p/IUOcPOFgOp9AdQyg+zGvfSCiijXwdLm4w5ynrcn/Gx2haQs1KinvL4CNeDD+Bp abnJ9Dh4PjfJ0Fk7uy2RBtbVagIPuRcYLs99cIYMmFRsR5pg/jQNxb3hbDTiAsh8LQ C9qfk2P9zrCFa8A0QBJ9WmS8Q2EOmCiS05Q34m4xdtYCprESQ83+K8SGqyEr5RuMW0 VfokPsy54zindSK8q6vrom1hmd5kKXXSdIF5y9CHLp8JArZOVWYwCHhhf9+yXrfZNO kq/E1J48X/g/xgRNeEWNwfcm3EAAiLOOp8aAj6fd8lsuBVnwkKSG8R+dc94m82GN4u /F6Kc1tvOrf4w== Received: from [10.0.0.95] ([76.146.78.191]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 256/256 bits) (Client did not present a certificate) by resomta-a2p-647655.sys.comcast.net with ESMTPSA id GrhqsfSpcfo1cGrhrsObbb; Tue, 11 Jun 2024 02:57:57 +0000 Message-ID: <2f772a89-50c5-4005-876e-8893e9f59e7c@comcast.net> Date: Mon, 10 Jun 2024 19:57:52 -0700 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 888796ade284 - main - libm: fma: correct zero sign with small inputs To: Ryan Libby , Ed Maste , kargl@freebsd.org Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202406081556.458FuJYN022360@gitrepo.freebsd.org> Content-Language: en-US From: Steve Kargl In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4xfKd+yzzCJ9ABzc10O3zITYWGm/c2nTGn3hm3LwnyFGTLWplepUZBriP1sQEYc2UF4/A2i1HE5Kb8xjPPFw5xbQRLYswr6A61V9rJiiSoNexvbISXbJkX tcwnfGT7JDkARuLiR7LQbtsnjyOYW7rpI0M/8QxiVSvLKXXXY3RmHGPiGWpTQ121WgrsHQiUsiqQK7DZPyH7nO5jxRdE2fQJAz/+JnXmSPiURoYyEyP085bC FG2zGPY/q7xBmm9CfP8YeyIU6tTH8SYjIS0JBdkGcNyM5JDtAc29+p2oFmpp9+glndfcRfDxqDqcPrnG09XLX8zLktsB5VgPwTrbhWU5tTcpwy4W86jcDns/ ThfqZGpGTqpuLWAYWrdvJxKoyTOISA== X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:7922, ipnet:2001:558::/29, country:US] X-Rspamd-Queue-Id: 4VytfG53BSz4vLn On 6/10/24 16:31, Ryan Libby wrote: > On Sat, Jun 8, 2024 at 8:56 AM Ed Maste wrote: >> The branch main has been updated by emaste: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=888796ade2842486d3167067e8034254c38aadd3 >> >> commit 888796ade2842486d3167067e8034254c38aadd3 >> Author: Ed Maste >> AuthorDate: 2024-03-19 14:31:39 +0000 >> Commit: Ed Maste >> CommitDate: 2024-06-08 15:55:36 +0000 >> >> libm: fma: correct zero sign with small inputs >> >> PR: 277783 >> Reported by: Victor Stinner >> Submitted by: kargl >> MFC after: 1 week >> Differential Revision: https://reviews.freebsd.org/D44433 >> --- >> lib/msun/src/s_fma.c | 4 +++- >> lib/msun/src/s_fmal.c | 4 +++- >> 2 files changed, 6 insertions(+), 2 deletions(-) >> >> diff --git a/lib/msun/src/s_fma.c b/lib/msun/src/s_fma.c >> index b8a342646d85..4d08b40cc71a 100644 >> --- a/lib/msun/src/s_fma.c >> +++ b/lib/msun/src/s_fma.c >> @@ -267,7 +267,9 @@ fma(double x, double y, double z) >> */ >> fesetround(oround); >> volatile double vzs = zs; /* XXX gcc CSE bug workaround */ >> - return (xy.hi + vzs + ldexp(xy.lo, spread)); >> + xs = ldexp(xy.lo, spread); >> + xy.hi += vzs; >> + return (xy.hi == 0 ? xs : xy.hi + xs); >> } >> >> if (oround != FE_TONEAREST) { >> diff --git a/lib/msun/src/s_fmal.c b/lib/msun/src/s_fmal.c >> index 3d333632127c..12f9c364670b 100644 >> --- a/lib/msun/src/s_fmal.c >> +++ b/lib/msun/src/s_fmal.c >> @@ -248,7 +248,9 @@ fmal(long double x, long double y, long double z) >> */ >> fesetround(oround); >> volatile long double vzs = zs; /* XXX gcc CSE bug workaround */ >> - return (xy.hi + vzs + ldexpl(xy.lo, spread)); >> + xs = ldexpl(xy.lo, spread); >> + xy.hi += vzs; >> + return (xy.hi == 0 ? xs : xy.hi + xs); >> } >> >> if (oround != FE_TONEAREST) { > This seems to have caused the lib/msun/fma_tests:zeroes test to fail in > the FE_ROUNDDOWN mode on amd64, now finding 0 while expecting -0. I > don't know if the test is wrong or too strict, or if the new result is > wrong. > > https://ci.freebsd.org/job/FreeBSD-main-amd64-test/25249/testReport/junit/lib.msun/fma_test/zeroes/ > > Reproduces with > kyua debug -k /usr/tests/Kyuafile lib/msun/fma_test:zeroes The test is unreadable except by the original author. I'll note that there is a comment in fma_test.c /*  * This is needed because clang constant-folds fma in ways that are incorrect  * in rounding modes other than FE_TONEAREST.  */ static volatile double one = 1.0; and the failing tests are     testall(-one, one, one, rd ? -0.0 : 0.0, ALL_STD_EXCEPT, 0);     testall(one, -one, one, rd ? -0.0 : 0.0, ALL_STD_EXCEPT, 0);     testall(-one, -one, -one, rd ? -0.0 : 0.0, ALL_STD_EXCEPT, 0); If one compares against MPFR,    fesetround(FE_TONEAREST);    dx = -1;    dy = dz = 1;    mpfr_fma(a, x, y, z, MPFR_RNDN);    mpfr_printf("% Re % e\n", a, fma(dx, dy, dz));    fesetround(FE_DOWNWARD);    mpfr_fma(a, x, y, z, MPFR_RNDD);    mpfr_printf("% Re % e\n", a, fma(dx, dy, dz));    fesetround(FE_UPWARD);    mpfr_fma(a, x, y, z, MPFR_RNDU);    mpfr_printf("% Re % e\n", a, fma(dx, dy, dz));    fesetround(FE_TOWARDZERO);    mpfr_fma(a, x, y, z, MPFR_RNDZ);    mpfr_printf("% Re % e\n", a, fma(dx, dy, dz)); % gcc13 -fno-builtin -o z a.c -I/usr/local/include -L/usr/local/lib -lmpfr -lgmp -lm % ./z  0.0000000000000000e+00  0.000000e+00 -0.0000000000000000e+00 -0.000000e+00  0.0000000000000000e+00  0.000000e+00  0.0000000000000000e+00  0.000000e+00  0.0000000000000000e+00  0.000000e+00 -0.0000000000000000e+00 -0.000000e+00  0.0000000000000000e+00  0.000000e+00  0.0000000000000000e+00  0.000000e+00  0.0000000000000000e+00  0.000000e+00 -0.0000000000000000e+00 -0.000000e+00  0.0000000000000000e+00  0.000000e+00  0.0000000000000000e+00  0.000000e+00 cc gives a similar result. -- steve From nobody Tue Jun 11 03:13:45 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vytzv4C56z5NV2F; Tue, 11 Jun 2024 03:13:47 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vytzv3Wnpz4wkj; Tue, 11 Jun 2024 03:13:47 +0000 (UTC) (envelope-from kevans@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718075627; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mbzGZv4Mc49xYLdn58m9Gv92nckSMVhZxoVgPNAxedI=; b=kxmTaoLmZjcwohiseZDolek0VZMRVTfmp76W5P+bpie6e5tIvLuK3hEGjYjKrNo2jZb068 0+jHADVCS9ZovCaXji0LdqyRZPmMPALXJHW8Lzk/B6VMOgv1bPID2ftHTXlEJOu22ypi6e IsowlOjprl0TZ9n5fu6d5qtInTSE6/UyGKq0trUIzAZaoBZ6SPZgipXcnKeGDL/JvlWJX+ 8o1a6lnesrfAd7xMQxAWrgXy1VAsOT4fMDOInO5PfvIdSvfcMDdnnu/g9mVgD7tRVJo4gg F2zEDJCPskstIkgD4ZlqISscUtYeqy+cGLt2OvGRWxiyk3kMqTaJN8Wg2RMeuQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718075627; a=rsa-sha256; cv=none; b=adxApBotX8DpfGSN2Dz124u/jFjOtSwBzvVxqC33qV29j+HPP80nSSd/HrgjhOI3q7igQX F1F9yXU6QbI0x/FC/xVq9wlvM9S4QYLvioOIO0vL1WAQ9B0k42MJa/Faxr6N6iHm1j7Vb1 +af6SX0s1W+UQzL6MmtYuPoudYVFEoWhSmhNMQGivKSbez/6dx8VSKLKPx+BRnVyeHPpg4 4GHjX+aPCpKR40G2p3uhgxTOTVjZbDw+Gj0d0Vzk6jaUXPjzvRNQSVAmhnRAln4AmCYKa/ kU3qL1NMjGmrsDhREV3ZBYkxIlio5S3DpmUokI2mUN0BxDxjT2FkV1oIX0gRQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718075627; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mbzGZv4Mc49xYLdn58m9Gv92nckSMVhZxoVgPNAxedI=; b=kX9jPmZgPjYDiSNT7rpFK2kfyn3f0gE9c7SJumxKdd2rAft28puICrkFqxgJNSOe8wvVyR XAjaQdjB/DkLM9YvmRO8Mh6Y9j3VJZoardd1wqhR8XMdjtZugDu/OBQ2ZW9ewJeErn0wY3 3PgJoDB9tTPcrFnR7syTnOd4WmVO/7r5TXIkIAD9/POehqNIXbYmQ+p1VYN5pUzzLyEKRQ pEb6cq7XyymMHfi1AxPaD4Dkm6C2UWFpcQhmexq5aUdO/XGrRk6cgJtckwORDDWsieB0cs 83lVkhnMoZq8E84FM82yTQk8wMTn6cvKXGK6l0ZZPhUAUS7Uf9B4GBWUofYJMA== Received: from [10.9.4.95] (unknown [209.182.120.176]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: kevans/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Vytzv0H3tz1R1V; Tue, 11 Jun 2024 03:13:46 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Message-ID: <58e93be2-d0bc-403c-8aaf-6d3f5e0dd069@FreeBSD.org> Date: Mon, 10 Jun 2024 22:13:45 -0500 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 6e824f371301 - main - time: siginfo_recvd needs to be marked volatile To: Konstantin Belousov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202405220537.44M5bugu007292@gitrepo.freebsd.org> Content-Language: en-US From: Kyle Evans In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 5/31/24 14:52, Konstantin Belousov wrote: > On Wed, May 22, 2024 at 05:37:56AM +0000, Kyle Evans wrote: >> The branch main has been updated by kevans: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=6e824f3713011f7955a4f88fb16445e8e2cbe72c >> >> commit 6e824f3713011f7955a4f88fb16445e8e2cbe72c >> Author: Kyle Evans >> AuthorDate: 2024-05-22 05:36:29 +0000 >> Commit: Kyle Evans >> CommitDate: 2024-05-22 05:37:41 +0000 >> >> time: siginfo_recvd needs to be marked volatile > I do not think so. It happens to work with the compilers we currently use. > Sorry, I meant to respond but it got lost somewhere in the stack. Can you expand on this specifically a bit more? I was under the impression that we'd generally need volatility due to write from SIGINFO handler / read repeatedly from main(), which serves to demonstrate my ignorance here. Is it that there are sufficient side-effect-y things between loads in the wait4() loop that the compiler won't do anything hinky, or more that it's insufficient and should have been fenced as well? >> >> sig_atomic_t does not imply volatility, we must do it ourselves to avoid >> caching of siginfo_recvd loads. > For this purpose, standard provides atomic_signal_fence(). > > You would need to put it before read of siginfo_recvd (after wait4()), and > after update of siginfo_recvd in the signal handler. From nobody Tue Jun 11 04:49:26 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vyx6G3fGCz5Ncyy; Tue, 11 Jun 2024 04:49:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vyx6G360fz54lM; Tue, 11 Jun 2024 04:49:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718081366; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uUCeRuhUJSkztkUveV/NPSp0ko2XRfS/KamdqW2gdLk=; b=KizvdMw4qtJP/ZmjA8e95Bi+Drh+Lcdr3BKZJfdDOneO7MWsSS9M9lq0b+wxd2HXVAcGwd P5bjjFEd3uWcrLCj/iZ16E1k5j2djH4MORox9f8gZmX/CRsRTZkOdUMMs3l6rZ9Izwsfmc KevgZjuuj2UwYWUwoB2nYWOFPcDxw+4w6cHPM+YTXP0yMdYs5RkIX2WycLWSIMHc6WTit6 ZuUG4ZasTbr2I1sNqWsVrvwJgIxBs1dDsubh/h/U2pur2PJaGP/vGiYwsy3UjF1VDE0R4J ABsYcoqqXN8i3l9KYqvskO0yj7mp8IxOa/PMp05wchpV+XxJ/8BKCkw47gq0gQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718081366; a=rsa-sha256; cv=none; b=CAwPAHVXlUb6YZ7yByyD/SVxb+fbtgmZXFmn2k3ZXM+q/JBmar27bUZ4cooNQBN+yeQLjy 7V6JR4DxZOzAyOpnHNGHw4tfCUf6+F2iDINdYbJrs8rJGa1USHquvNBGc7M7WMT4eLN729 aaD3M3WkpZsBLEB1CbpxgXtIf1HO1Ie89iBmNZDVxyYHNcMpqvNENrIZZEdHVr86P8Zbn3 gINQT7IQIC7Mfw/kcUg2303bimQ8KaBvmp3xb7WEoaGryfXuobx+H9HIiG2m9ShLEfU70g HxU8b3C44EH/01x0pv1tx/lT+QdfTF7PvWo+0WEJrvMKvqR0QJ+oJQLfM6kqFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718081366; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uUCeRuhUJSkztkUveV/NPSp0ko2XRfS/KamdqW2gdLk=; b=N7kMkf9nnUsV2TrWA3QKMCmSE/AS69pJgzAtPBwXOnx5YzIpyczl989QcWglkMfCIIYsCu YdT+Dy1/t3gIgguo+EUbDDKd2WuiFrrxtn+7tOyEpezzmdH7D52U+FuhxCai7XI3HdbgJE AlSRlldNR35cbtQwt+H3AA/X8+L6/wXjnP/VKBRyqR6ku/It70ElSRGFaZSx9/H/jzjHGz 4hrUwynpOTEHPT0Te3k1qQfLx2sTpxlxVjxd6AF90RaPpjrqC9bVZnUIpxWEKIcAF+MWiL 1nETl33SI+940c8IjlkAYWjZEVcwR2HVQi8mb8FdgYCkoUstBGwNSOOjWp6NDw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vyx6G2hsXzvkM; Tue, 11 Jun 2024 04:49:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45B4nQMi092247; Tue, 11 Jun 2024 04:49:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45B4nQJ6092244; Tue, 11 Jun 2024 04:49:26 GMT (envelope-from git) Date: Tue, 11 Jun 2024 04:49:26 GMT Message-Id: <202406110449.45B4nQJ6092244@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 9cd77bd9c68b - stable/14 - sys/sysctl.h: Fix wrong assertion with multiple access flags List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9cd77bd9c68bda6134c6672e9a923869b7923343 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=9cd77bd9c68bda6134c6672e9a923869b7923343 commit 9cd77bd9c68bda6134c6672e9a923869b7923343 Author: Zhenlei Huang AuthorDate: 2024-06-08 03:21:11 +0000 Commit: Zhenlei Huang CommitDate: 2024-06-11 04:48:59 +0000 sys/sysctl.h: Fix wrong assertion with multiple access flags With multiple flags passed in, e.g., CTLFLAG_RD | CTLFLAG_CAPRD, due to the precedence rules, this will result in false positive assertion. Fix that by surrounding the replacement lists with parentheses. Reviewed by: imp, erj Fixes: 10a1e981d411 iflib: mark isc_driver_version as constant MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D45531 (cherry picked from commit 23f4131ad685debef98566351cb9f0e0a5903903) --- sys/sys/sysctl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h index bc7a2bc601a1..76cbae25f4e5 100644 --- a/sys/sys/sysctl.h +++ b/sys/sys/sysctl.h @@ -395,14 +395,14 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry); #define SYSCTL_CONST_STRING(parent, nbr, name, access, arg, descr) \ SYSCTL_OID(parent, nbr, name, CTLTYPE_STRING | CTLFLAG_MPSAFE | (access),\ __DECONST(char *, arg), 0, sysctl_handle_string, "A", descr); \ - CTASSERT(!(access & CTLFLAG_WR)); \ + CTASSERT(!((access) & CTLFLAG_WR)); \ CTASSERT(((access) & CTLTYPE) == 0 || \ ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_STRING) #define SYSCTL_ADD_CONST_STRING(ctx, parent, nbr, name, access, arg, descr) \ ({ \ char *__arg = __DECONST(char *, arg); \ - CTASSERT(!(access & CTLFLAG_WR)); \ + CTASSERT(!((access) & CTLFLAG_WR)); \ CTASSERT(((access) & CTLTYPE) == 0 || \ ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_STRING); \ sysctl_add_oid(ctx, parent, nbr, name, CTLTYPE_STRING | \ From nobody Tue Jun 11 04:50:19 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vyx7J0NX2z5NdHT; Tue, 11 Jun 2024 04:50:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vyx7H70mzz5581; Tue, 11 Jun 2024 04:50:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718081420; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KwCCbCkvpjj+7pjUHk7PsQRDgMRG6Xw5WABsn/ELX8I=; b=F20ItGeysmz9NIgXIF0DwUL6Ze6izDspPNfONE8zf+pjR8cSvR25g7/EHQEPSmhZUmIR4s 0xTgN06H0vgVHBfGRdYTM3wf06vvP0hDknVGEn167LLJ/WI0pfZ7A2PdL8r+eYCBMtwDDz 1SW5YAcJuEplC7bNtzhmreTODlO+D4vd7wWWwleFiA4RHszAhlqI4A9lD8UoniPzycWMhz DBcIg09iyRcHN9gUEt70tU/fddh8wirCAcd9KBjSd8qkzrrhsOchxLRugMbe5m9UAefX03 ryijo5bzh7kN56PtcAdUkOosvA+l6YKRXNNHx6YUSfLQrD1OogveGcchucWEzw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718081420; a=rsa-sha256; cv=none; b=PW3FoSvfw3CgYvbjkh7LkwNBvk1dhWBsqpxMn2bThVMkQGNvYkazYqhJxGxprh4NcCukaT dTsdOSV54GwjRlBi+mSPosccqsWG7ClizNDBNsrL9ewAwyvKMUHbSFtg82zFFTk0L5hrCz wY5AUesLbRXOWxbjPLXfsqq1fXVAKM2lFNuP9Athl+XEaNOpC0Wei8VdOPCooQxssfmjBZ ARF64P0iLPXeFt+qAl/sGOAG0x+kf6jXNi1K/+AhhX/MJRSg43vyy/6+iGJeuWymqKXX+8 urbqh5ziQ0Viyix3C+mOEyyb7rDsetMFfZuQ+gsLsDXKZ0mKcR2tPQ1DbLkAag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718081420; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KwCCbCkvpjj+7pjUHk7PsQRDgMRG6Xw5WABsn/ELX8I=; b=DZhhJCyksyGqcpjMMcX48YFw9rU4AIO9UyJ/lMnotb0/A8Eqm1fGM5+cFX/+mw0PYXMgK3 KIMUBuLloLFtL4nFvscTtI8+DCbmUXOWXZegDO6BfUVyBOsrk4FF4SYulw2yJbZXPQRLno O5Pd4mijW6n2+PnOxXMLxWez5tN8VeLwHjvsb4khNoSZaUcOKOZikQSqXFVTZ+sw3aaWWS We98SOJ2zGpildRzBx5to7ewRivijfZuUeUO6AMt+TZgcjyvhwFW8kbPAJYTNrBcGDbUUw ZEYgm7rCQNhk6m5Z34erIPb8I1Ycrv5RLlSRa2I41ax7BWL7osJF/+530mYIvg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vyx7H6czczvVp; Tue, 11 Jun 2024 04:50:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45B4oJFw001064; Tue, 11 Jun 2024 04:50:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45B4oJaY001061; Tue, 11 Jun 2024 04:50:19 GMT (envelope-from git) Date: Tue, 11 Jun 2024 04:50:19 GMT Message-Id: <202406110450.45B4oJaY001061@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: c720ff8f95fc - stable/13 - sys/sysctl.h: Fix wrong assertion with multiple access flags List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c720ff8f95fc2e36944f503d1b40301cea7b7687 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=c720ff8f95fc2e36944f503d1b40301cea7b7687 commit c720ff8f95fc2e36944f503d1b40301cea7b7687 Author: Zhenlei Huang AuthorDate: 2024-06-08 03:21:11 +0000 Commit: Zhenlei Huang CommitDate: 2024-06-11 04:49:58 +0000 sys/sysctl.h: Fix wrong assertion with multiple access flags With multiple flags passed in, e.g., CTLFLAG_RD | CTLFLAG_CAPRD, due to the precedence rules, this will result in false positive assertion. Fix that by surrounding the replacement lists with parentheses. Reviewed by: imp, erj Fixes: 10a1e981d411 iflib: mark isc_driver_version as constant MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D45531 (cherry picked from commit 23f4131ad685debef98566351cb9f0e0a5903903) (cherry picked from commit 9cd77bd9c68bda6134c6672e9a923869b7923343) --- sys/sys/sysctl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h index 3a61f1153c5a..ff87e32df2b7 100644 --- a/sys/sys/sysctl.h +++ b/sys/sys/sysctl.h @@ -382,14 +382,14 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry); #define SYSCTL_CONST_STRING(parent, nbr, name, access, arg, descr) \ SYSCTL_OID(parent, nbr, name, CTLTYPE_STRING | CTLFLAG_MPSAFE | (access),\ __DECONST(char *, arg), 0, sysctl_handle_string, "A", descr); \ - CTASSERT(!(access & CTLFLAG_WR)); \ + CTASSERT(!((access) & CTLFLAG_WR)); \ CTASSERT(((access) & CTLTYPE) == 0 || \ ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_STRING) #define SYSCTL_ADD_CONST_STRING(ctx, parent, nbr, name, access, arg, descr) \ ({ \ char *__arg = __DECONST(char *, arg); \ - CTASSERT(!(access & CTLFLAG_WR)); \ + CTASSERT(!((access) & CTLFLAG_WR)); \ CTASSERT(((access) & CTLTYPE) == 0 || \ ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_STRING); \ sysctl_add_oid(ctx, parent, nbr, name, CTLTYPE_STRING | \ From nobody Tue Jun 11 05:56:30 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vyybt5Sy0z5Nk6x for ; Tue, 11 Jun 2024 05:56:42 +0000 (UTC) (envelope-from kargls@comcast.net) Received: from resqmta-h2p-567039.sys.comcast.net (resqmta-h2p-567039.sys.comcast.net [IPv6:2001:558:fd02:2446::9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vyybs5dBFz3xGP for ; Tue, 11 Jun 2024 05:56:41 +0000 (UTC) (envelope-from kargls@comcast.net) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=comcast.net header.s=20190202a header.b=I5XV8F7w; dmarc=pass (policy=none) header.from=comcast.net; spf=pass (mx1.freebsd.org: domain of kargls@comcast.net designates 2001:558:fd02:2446::9 as permitted sender) smtp.mailfrom=kargls@comcast.net Received: from resomta-h2p-555359.sys.comcast.net ([96.102.179.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 256/256 bits) (Client did not present a certificate) by resqmta-h2p-567039.sys.comcast.net with ESMTPS id GuUjsd5GcpB5eGuUjsf2be; Tue, 11 Jun 2024 05:56:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=20190202a; t=1718085393; bh=7vS0o2pEtJ4oUHOE2/uWA24W73x3CxZ60a+InyHxk4U=; h=Received:Received:Message-ID:Date:MIME-Version:Subject:From:To: Content-Type:Xfinity-Spam-Result; b=I5XV8F7wa7OXY8bef5c4XYDnAjUJDgVFbTl2uisx33P7/WTqzMOgtUz/eBHrdzI4e MXSrUfgkvmiz8XEyFvUDTOZvwJonXeAum0HI5SqpWUOP3v13idHB6PUerukHQSBfTr a7zV4rfwLo/CXSGU7sh047cQC6ri7J+MmYlmxzSh4WtMKU3hK65q+tYyav92soOcRO Y6xElmXKc0xNroG+uX7NIVr3pAnnIFy4JKE/YVEjNlJcFK58DUQdArFIypFRqkHjeg KG/Hd93f0jHYPqzV7lTd9YZmlnJ1q3SR24zzL9vtMuzk/FJwKj8Q0/yDkQFcqAZrJP JowTYNh5UDnNA== Received: from [10.0.0.95] ([76.146.78.191]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 256/256 bits) (Client did not present a certificate) by resomta-h2p-555359.sys.comcast.net with ESMTPSA id GuUhs2vWhUCWWGuUisaIg1; Tue, 11 Jun 2024 05:56:33 +0000 Message-ID: Date: Mon, 10 Jun 2024 22:56:30 -0700 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 888796ade284 - main - libm: fma: correct zero sign with small inputs From: Steve Kargl To: Ryan Libby , Ed Maste , kargl@freebsd.org Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202406081556.458FuJYN022360@gitrepo.freebsd.org> <2f772a89-50c5-4005-876e-8893e9f59e7c@comcast.net> Content-Language: en-US In-Reply-To: <2f772a89-50c5-4005-876e-8893e9f59e7c@comcast.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4xfGmDgPwnHk2ZNxkgKSgFgKMKZTHz6g+kxhGdmy5BXnrrqaasfBKknB0SZ+7SnJicP5kuK0WztNCzwt2ZHMYtf5ikmpCfQBojshS1vqNaAVvysBZhIlGD WGBnZ3j+1fZcD7eX2cnV0YQrGkV1UQhvNBsw8HyMtSYUKTXvPruI7DTxei9eblcIyEDmOSeXGIa4swiFMCVMaS6oRwPP0hdDffZiImH4n/br4ZxEGkSAFvmg sSPXBNZFLLD2sVdskqAh/TvHEBeBmArRqZoIxi4zv1mVqCpARF4v/qTN1XnX1XF6KoS11YZvVaP6dCyDnrB9Zj7aiDkM6hC8JHIrzg960qmHOm0lKXdf3643 z/Ie0dJlWHb+Zyp01JW8EfZw1JR+Hw== X-Spamd-Bar: / X-Spamd-Result: default: False [0.33 / 15.00]; HFILTER_HELO_5(3.00)[resqmta-h2p-567039.sys.comcast.net]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[comcast.net,none]; NEURAL_SPAM_SHORT(0.32)[0.317]; R_DKIM_ALLOW(-0.20)[comcast.net:s=20190202a]; R_SPF_ALLOW(-0.20)[+ip6:2001:558:fd02:2446::/64:c]; MIME_GOOD(-0.10)[text/plain]; XM_UA_NO_VERSION(0.01)[]; FREEMAIL_TO(0.00)[gmail.com,freebsd.org]; TO_DN_SOME(0.00)[]; ARC_NA(0.00)[]; FREEMAIL_FROM(0.00)[comcast.net]; FREEMAIL_ENVFROM(0.00)[comcast.net]; MIME_TRACE(0.00)[0:+]; FROM_HAS_DN(0.00)[]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[comcast.net:+]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; DWL_DNSWL_NONE(0.00)[comcast.net:dkim]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:7922, ipnet:2001:558::/29, country:US]; RCPT_COUNT_FIVE(0.00)[6] X-Rspamd-Queue-Id: 4Vyybs5dBFz3xGP On 6/10/24 19:57, Steve Kargl wrote > > % gcc13 -fno-builtin -o z a.c -I/usr/local/include -L/usr/local/lib > -lmpfr -lgmp -lm > % ./z >  0.0000000000000000e+00  0.000000e+00 > -0.0000000000000000e+00 -0.000000e+00 >  0.0000000000000000e+00  0.000000e+00 >  0.0000000000000000e+00  0.000000e+00 I was in the wrong source tree.  Ryan is right that there seems to be an issue. I need to go back to the original test to see what corner fma[l] is hitting. -- steve From nobody Tue Jun 11 07:39:26 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vz0tQ3hn7z5NrtT; Tue, 11 Jun 2024 07:39:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vz0tQ2BJTz45r1; Tue, 11 Jun 2024 07:39:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718091566; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JwKpq69yxlz18qgXNeDEvupfk9JvomfPXYFyTkK7+3E=; b=ADZtI2K932Rw3AUTBPM3yi6Prw7pT3GpKaZs0jPIazQVOm4zH8MxxjbwgxNGdc7RMeBVjL QQdku36OjQl0L+EykX4zsgUNzEa+XoZHG5tqvuUek9HhjkrZ3w5WU7lXP+tK5ozf0jz04A ZIRsA/nBITUUb545wHwUR6+g7Wk35pHjHgeQ9GJ9kw8IeH2YFXbGpeGpvBc/oEFNIHIrU2 qIlgWmKqYtC6FLdFNqr+9i3HOKvLAGqJL8OwXZzfqYtUgxFSIWiLD+PQQ8a1EKIv056IR+ uM1f+7c/QHTbPVrhw8RkymNZ+fF2N0ZqvmbDrBX0r4EMut9LksjfU7xDSiNJIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718091566; a=rsa-sha256; cv=none; b=NCssFBbRLFackfoOa1nSx37YsI5Y6xwcSkrP8uAmT0fF/voc96xKtvinAPqu6/ZxoxwCMi i5zZAx5RCh+ST12GuIPo7Rjb51J2bXX0ofa8zcpywb1mfmh6Ku9nj8btJhT209v9/U3CPt HWx963iPQt6/Vto2aig78rDfboL7lKqH+06NV9t4beCzBBCbWaurd2EvdqlKjHHX8imOKO oDVhERYca3UxC5MR7gO+2Fj99oDTXSAw8rV9CSSFFdXlPoGabZVCrDhA/Qpuj+UEgSsefE 6wKqFzFXwky6I6xa9u/gZSUFs106a15et22XlupLIq3qpzRfNHcXVPpMdmNDxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718091566; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JwKpq69yxlz18qgXNeDEvupfk9JvomfPXYFyTkK7+3E=; b=hrlvKBhL9vVvu+OMylJqJw8TuLFC4SdXU8GFPQXN/cur53DdUGmhKZQfYo75Ou2KHAxe2G xDG9zUJUwhsqHHTlMfiHzP7yTKT8/sZxctpI8S7fh9kGRbmH7X83muecyRzKnor8LFCIHF EUZt/pbxHfZGcQyTEb+blrf9ES1eEDno3uhL5V8P7oIAfe8R0QyTLXC7q2RHtiG0Uq0k5R 04eTDDRVr+ns/V7HTO65Qz1PLrqcD6++0YC5gJpPm2ydCkmAHtrykbNcs/PKZ1QBynKJ75 e4i2Z63x5krz3PBuKcCkOa4ZxHsctKR6aT0Qi0fqKGRXo3NGB5+ENs+u1M5isA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vz0tQ1cgsz10kR; Tue, 11 Jun 2024 07:39:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45B7dQRs080010; Tue, 11 Jun 2024 07:39:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45B7dQfg080007; Tue, 11 Jun 2024 07:39:26 GMT (envelope-from git) Date: Tue, 11 Jun 2024 07:39:26 GMT Message-Id: <202406110739.45B7dQfg080007@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: f65d0b18d937 - main - stress2: Replace rename() with arc4random() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f65d0b18d9372b522e247c7bd58422a7ab3d30d8 Auto-Submitted: auto-generated The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=f65d0b18d9372b522e247c7bd58422a7ab3d30d8 commit f65d0b18d9372b522e247c7bd58422a7ab3d30d8 Author: Peter Holm AuthorDate: 2024-06-11 07:38:13 +0000 Commit: Peter Holm CommitDate: 2024-06-11 07:38:13 +0000 stress2: Replace rename() with arc4random() --- tools/test/stress2/misc/nfsrename.sh | 4 ++-- tools/test/stress2/misc/umountf2.sh | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/test/stress2/misc/nfsrename.sh b/tools/test/stress2/misc/nfsrename.sh index b6513fba1553..864c64aed8ac 100755 --- a/tools/test/stress2/misc/nfsrename.sh +++ b/tools/test/stress2/misc/nfsrename.sh @@ -137,7 +137,7 @@ write_file(void) unlink(path); } - fprintf(fp, "blah blah blah garbage %ld\n", random()); + fprintf(fp, "blah blah blah garbage %ld\n", (long)arc4random()); fclose(fp); if (rename(path, filename) < 0) { warn("rename"); @@ -150,7 +150,7 @@ random_sleep(int base, int slop) { long val; - val = random() % slop; + val = arc4random() % slop; usleep(base + val); } diff --git a/tools/test/stress2/misc/umountf2.sh b/tools/test/stress2/misc/umountf2.sh index 5018a804c403..cd5b53616f97 100755 --- a/tools/test/stress2/misc/umountf2.sh +++ b/tools/test/stress2/misc/umountf2.sh @@ -886,11 +886,12 @@ test(void) { unsigned long offset; unsigned long size = maxoplen; - unsigned long rv = random(); + unsigned long rv; unsigned long op = rv % (3 + !lite + mapped_writes); /* turn off the map read if necessary */ + arc4random_buf(&rv, sizeof(rv)); if (op == 2 && !mapped_reads) op = 0; From nobody Tue Jun 11 10:12:36 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vz4H847vdz5P50p; Tue, 11 Jun 2024 10:12:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vz4H83hvRz4NPt; Tue, 11 Jun 2024 10:12:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718100756; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MwCHNiTKYqRpoO8WnuxdwxIuC7NTiYBoQH8yk2WnvoQ=; b=cF7IWw3/9E3VIraGN38/b86XMIp9eG5Sf4wYFgZ8FPd/xYsqLokLIYYqwA3Jeo4ak7Q39s sn6X7JTPRarldmTPh0eFK1StFSDfyPx/EimpS/nZ1z6eBbryj3/q0EC3DCjCO/a/FSps4q Da5QfA8zy1qqwiueMQoKcunfe6YxKzSDUGJrgDPKtAD93nS+O0oi7sI0pf+0UU4wi1Aix6 h0XAykyRoSx5eqavVU3tm3CQO2gOoWSOf7SUQi6JnqOx38sHarHjBNp+tN1ThFOKDx5jcC UN7c9bMS/dxguSxjbtbiyS6NHE7QgwO7EyeZaEi/f7GSXJ2IF0ZziJxhViZizQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718100756; a=rsa-sha256; cv=none; b=rLis9+6+NezpCWB9eMrHCeCWmTvfPC9sLjnV6XunFsG42GVBdWU2IlcltwfYw49dT5/9VS INxQyBRhvh1qDWhYHfGpNsqdagG4YKxF/xRG56gYTKyqTQJS3FmY3xZJySZ2LeaLsziGf3 56hM8ZIHzZUnGoSzGDMv2x3O9jpJEmXpQQkvrMSgpp1P/sY/9FhfSCIgRkCta5SpVlRave dq45oP0YsOBY5n0VtShSgvYLe/Ju1suaICNxMCFUffMIXOknceCMz4OP/sYpOXzaNkqLqW 0bsYBuafLcCYo5VJPFoVf9taDY/MirTaituY062qhT9K30jCJLY+im1VD+KpSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718100756; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MwCHNiTKYqRpoO8WnuxdwxIuC7NTiYBoQH8yk2WnvoQ=; b=X/Tj71fcCsD74GmT5FIaX9LHCw+qJs0FT07NIls9jnJogvQ/Xas/OMlZoC1n9B7veAY+FY 9WoNb6PpGri8/tYRFGLq9qm42OCSfk7DM6AZ5FztWBsw6JY/Uc8syPAyBoTFfjZAVtEGyk /2pv24w9cKVeh3489SfD6TDpuIO6zG+uNZwIJgfdaMOpmiMrmylIRf3W++FQV7J8r+j6VI fjkl2hcTG9V7yMYX8TOlU+ehMhnwHvhpzOxY5W/snqSoXnSQ/moZZwYY+rpofpnHI7x4EV HGT4pESrS54Fc91losGgsQ2cd0diKtLqedVvQBi9M1IX5+N6HuYAPIRdtqMj8g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vz4H82vt4z14Hd; Tue, 11 Jun 2024 10:12:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45BACaAm049928; Tue, 11 Jun 2024 10:12:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45BACaFw049925; Tue, 11 Jun 2024 10:12:36 GMT (envelope-from git) Date: Tue, 11 Jun 2024 10:12:36 GMT Message-Id: <202406111012.45BACaFw049925@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wei Hu Subject: git: e02d20ddff7f - main - Hyper_V: add a boot parameter to tlb flush hypercall List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: whu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e02d20ddff7f9f9509b28095459327bc183dab8a Auto-Submitted: auto-generated The branch main has been updated by whu: URL: https://cgit.FreeBSD.org/src/commit/?id=e02d20ddff7f9f9509b28095459327bc183dab8a commit e02d20ddff7f9f9509b28095459327bc183dab8a Author: Wei Hu AuthorDate: 2024-06-11 10:05:21 +0000 Commit: Wei Hu CommitDate: 2024-06-11 10:05:21 +0000 Hyper_V: add a boot parameter to tlb flush hypercall Add boot parameter hw.vmbus.tlb_hcall for tlb flush hypercall. By default it is set to 1 to allow hyercall tlb flush. It can be set to 0 in loader.conf to turn off hypercall and use system provided tlb flush routine. The change also changes flag in the per cpu contiguous memory allocation to no wait to avoid panic happened some cases which there are no enough contiguous memery available at boot time. Reported by: gbe Tested by: whu MFC after: 1 week Fixes: 2b887687edc25bb4553f0d8a1183f454a85d413d Sponsored by: Microsoft --- sys/dev/hyperv/vmbus/vmbus.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/sys/dev/hyperv/vmbus/vmbus.c b/sys/dev/hyperv/vmbus/vmbus.c index c1fa9107d3c2..f55f0329b017 100644 --- a/sys/dev/hyperv/vmbus/vmbus.c +++ b/sys/dev/hyperv/vmbus/vmbus.c @@ -147,6 +147,13 @@ SYSCTL_NODE(_hw, OID_AUTO, vmbus, CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, static int vmbus_pin_evttask = 1; SYSCTL_INT(_hw_vmbus, OID_AUTO, pin_evttask, CTLFLAG_RDTUN, &vmbus_pin_evttask, 0, "Pin event tasks to their respective CPU"); + +#if defined(__x86_64__) +static int hv_tlb_hcall = 1; +SYSCTL_INT(_hw_vmbus, OID_AUTO, tlb_hcall , CTLFLAG_RDTUN, + &hv_tlb_hcall, 0, "Use Hyper_V hyercall for tlb flush"); +#endif + uint32_t vmbus_current_version; static const uint32_t vmbus_version[] = { @@ -756,8 +763,19 @@ vmbus_synic_setup(void *xsc) if (VMBUS_PCPU_GET(sc, vcpuid, cpu) > hv_max_vp_index) hv_max_vp_index = VMBUS_PCPU_GET(sc, vcpuid, cpu); hv_cpu_mem = DPCPU_ID_PTR(cpu, hv_pcpu_mem); - *hv_cpu_mem = contigmalloc(PAGE_SIZE, M_DEVBUF, M_WAITOK | M_ZERO, + *hv_cpu_mem = contigmalloc(PAGE_SIZE, M_DEVBUF, M_NOWAIT | M_ZERO, 0ul, ~0ul, PAGE_SIZE, 0); + +#if defined(__x86_64__) + if (*hv_cpu_mem == NULL && hv_tlb_hcall) { + hv_tlb_hcall = 0; + if (bootverbose && sc) + device_printf(sc->vmbus_dev, + "cannot alloc contig memory for hv_pcpu_mem, " + "use system provided tlb flush call.\n"); + } +#endif + /* * Setup the SynIC message. */ @@ -1502,7 +1520,8 @@ vmbus_doattach(struct vmbus_softc *sc) sc->vmbus_flags |= VMBUS_FLAG_SYNIC; #if defined(__x86_64__) - smp_targeted_tlb_shootdown = &hyperv_vm_tlb_flush; + if (hv_tlb_hcall) + smp_targeted_tlb_shootdown = &hyperv_vm_tlb_flush; #endif /* From nobody Tue Jun 11 13:12:54 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vz8HC18XHz5Ldw2; Tue, 11 Jun 2024 13:12:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vz8HC0WWgz4d3l; Tue, 11 Jun 2024 13:12:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718111575; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HpKxnrp3lNs1s9NtP4I+KAK7UtHVeOzsmIPFP2iCrQw=; b=WAiZA8xxRImRGH8V3WP+AOQQmxq4mq6WKakOxjG0f+0dZ4CrpFA0o0geFsUPwiPSqWPjUz p4UsfRW9Gl7/YxDr8tVR2iocFvK82UddhchaqQf9fapqQ7YkVNUSKbBIJejV3WKRTpvXOY Ck07hpsEAS8WxLHywanXhMeGSHvZiWYWBxZqyxyfDA5QNEKjC3lgJ6A8jUVuGPccJ8BVD1 657d/M6UAD8lxeca3ab2bO/nfFbqNkOoUY9eBzEnpB+SSGhOFTMkg4i/Mcg109xsdg8XoF QZgXNj/uwW4TM9cV66aqHht+T3sSN8sUYtRrL9NDLM/HFQMV1oxWAdqL4765tA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718111575; a=rsa-sha256; cv=none; b=eNTRGP/jOWJzVqGbu1ZR2TKU+OJjmBtwFEq08JJJkvl+COBq4JQdNOmriZskuiFB16o9gT wLkAmAmimL7gmuzvs/uGlxVSnIL4aDR4/q68NbohriCNKpjyxwjqvdNbtdPJMO2bDgrTDc 7rysSHLFv8jgHVdkzEfkWZz2LJHzQORqRA/a+PY1Rpycjvc8gQNlppFa8OD7piCUFyxBHu P/O8uuv88V5tj8nhfEE8R6aCnkfJLI+Ix2nV6htFcNuH11FQM+Xi3EzNCHhugqORM+YDvu Z6J73VA1MiKtovMwa6pLNyCx8lHby6xOcyzrLrMzqTNSYEx1hQ/7KS84a6ULww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718111575; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HpKxnrp3lNs1s9NtP4I+KAK7UtHVeOzsmIPFP2iCrQw=; b=FSI8NkrMIhz/5qKhOWwitEeSr0X/tsdYrz+DK2MH/U6qN9t0c5eFY2LLOMQD8GNXiXKFLV HdRJ6YmzvUWUfjqF40nNCtiwpRMN5P62KhdBbO8+tsdfiqhQc1GHA2HZb+MybsNVoxKwGq 66oMGz5JOEEMfjD51GIk/XmCd6Bi1f+D4N6kgDX4IF+DM4IDNgF3oQ4Yr8wHAEQRDMLak4 Ikt0SK1r3W4LOLJa+FCuCXD1zhC2eoXf8MmiSN69dedZxn5Q/ceKXMRj0T4l6ttmIZ01e3 LpfX4Z73EdRNS1+pfgjhIp6PN+tr8r4Z6GJYy/DZVNBvXyBHsmEI7aCzr4VwGw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vz8HC07Cqz191H; Tue, 11 Jun 2024 13:12:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45BDCsDm054684; Tue, 11 Jun 2024 13:12:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45BDCsGI054681; Tue, 11 Jun 2024 13:12:54 GMT (envelope-from git) Date: Tue, 11 Jun 2024 13:12:54 GMT Message-Id: <202406111312.45BDCsGI054681@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: abf239cf097b - main - arm64/vmm: Add braces to fix the gcc build List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: abf239cf097b7a16defb9857027165427341c38c Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=abf239cf097b7a16defb9857027165427341c38c commit abf239cf097b7a16defb9857027165427341c38c Author: Andrew Turner AuthorDate: 2024-06-11 08:49:14 +0000 Commit: Andrew Turner CommitDate: 2024-06-11 13:12:43 +0000 arm64/vmm: Add braces to fix the gcc build Reviewed by: markj, emaste Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45548 --- sys/arm64/vmm/vmm_arm64.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/arm64/vmm/vmm_arm64.c b/sys/arm64/vmm/vmm_arm64.c index e0547bcef914..6b058a993cdd 100644 --- a/sys/arm64/vmm/vmm_arm64.c +++ b/sys/arm64/vmm/vmm_arm64.c @@ -1352,7 +1352,7 @@ vmmops_setcap(void *vcpui, int num, int val) switch (num) { case VM_CAP_BRK_EXIT: - if ((val != 0) == (hypctx->setcaps & (1ul << num)) != 0) + if ((val != 0) == ((hypctx->setcaps & (1ul << num)) != 0)) break; if (val != 0) hypctx->mdcr_el2 |= MDCR_EL2_TDE; @@ -1360,7 +1360,7 @@ vmmops_setcap(void *vcpui, int num, int val) hypctx->mdcr_el2 &= ~MDCR_EL2_TDE; break; case VM_CAP_SS_EXIT: - if ((val != 0) == (hypctx->setcaps & (1ul << num)) != 0) + if ((val != 0) == ((hypctx->setcaps & (1ul << num)) != 0)) break; if (val != 0) { @@ -1382,7 +1382,7 @@ vmmops_setcap(void *vcpui, int num, int val) } break; case VM_CAP_MASK_HWINTR: - if ((val != 0) == (hypctx->setcaps & (1ul << num)) != 0) + if ((val != 0) == ((hypctx->setcaps & (1ul << num)) != 0)) break; if (val != 0) { From nobody Tue Jun 11 13:12:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vz8HD2R7bz5Ldn9; Tue, 11 Jun 2024 13:12:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vz8HD1X0wz4d8J; Tue, 11 Jun 2024 13:12:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718111576; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MeEiukgf7ec9yqhbjHV1RM4cCw8WR9KtPHiqY20lbN8=; b=F3NCAQ6ZRBuV88QM/geIq0BOQAclj6KjuLld7qKpp9CSwuAuQaofpwWuyDOgj1MkSbFd2H 0rtT3uI5QdQwqlS+S/Te9YiWnboH1QrJm67EQGM/ujmnYskIF1MFfoFLqAsrcvxfExgGOZ M8R2jNayJYIHh+MJNnQ13lxlpYfzrRs0ZoiX65VTiIcGgoyjEw7z7Db1pK9Qt69P+Xvjer 3c9qXfrYkrmT/7VFve/N9x+G53kcRrVnf6vuR48B5AzmL02CW8dNJu6Gi6DCqxigO4jm9k guJWh7E5RITF49qiwg0JHx+8lPp7TjsI25V0pgu3hHyueErCAwz1cu+MuEX9dA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718111576; a=rsa-sha256; cv=none; b=jKUlOBd+rKLbiNEQM3ujvZ7of2qF51ZpUo2NCjRaVjMjL/LoXh4qDHCCz+Ecjui1QvikOC njBs6LyEOCTZnkbst5CZgXZPq645bT9L67bhFTJ1M5HAgI1JFuScTQD4FhKQkzPtw/uCCW lV7fQuJp0o7vE1vXryWBwMM8Ax9SWcxaF9/Bfe8Wqqhq46VaSZK7WzpCP+L/nJEdW4qGSG T19ar8jHO4zNtCLtQnv2hc3+cV/SPi2AE6yFHQYpNYwkDfEvlzG0ZeaY9Qdpw8LI9+rPHF d2hC9lK7WvG4E/+G28Byc7TLGhi9iCxgyG37/21TXStzK0RB9hiAsXrHg6PrVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718111576; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MeEiukgf7ec9yqhbjHV1RM4cCw8WR9KtPHiqY20lbN8=; b=NESnECreFea3SK4bjXaSuNP7a5Y+mfsopuh2dvh0cdGNMk9gau7dRT4MJW93X66hbtO9Ov u6BlU1ltjp7uVFItEgdLe31C7VGkOx/kWi2Av73CnwphCbpLeiWyAuzFRrLFikDyA8yMWN n7NtoGsd3+ogb7aHXKxYG7HwFy6FHUbPowc9KftM/0Dt9eo1Rqlj9k756GyBO9iktPMH4K mn/ES7iCUGu9tnfzhhdIDUMi9xLGGkIvaz2eZMOlszE2uMvOk9ESChpvzBO2G0qfFi3nTC 8AWbBMRr2RS3jN/YsIFPhHEhORbQZucedNClO5HCKOc4ZjEMAtgr1TGGuJJ1qA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vz8HD17Nfz19Lc; Tue, 11 Jun 2024 13:12:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45BDCuP5054730; Tue, 11 Jun 2024 13:12:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45BDCuMc054727; Tue, 11 Jun 2024 13:12:56 GMT (envelope-from git) Date: Tue, 11 Jun 2024 13:12:56 GMT Message-Id: <202406111312.45BDCuMc054727@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 9a4813e1dc17 - main - bhyve: Fix the build with gcc List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9a4813e1dc1781d952d8db017fc7cc005095c6a0 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=9a4813e1dc1781d952d8db017fc7cc005095c6a0 commit 9a4813e1dc1781d952d8db017fc7cc005095c6a0 Author: Andrew Turner AuthorDate: 2024-06-11 08:49:32 +0000 Commit: Andrew Turner CommitDate: 2024-06-11 13:12:43 +0000 bhyve: Fix the build with gcc gcc doesn't like const and static to not be at the start of a variable declaration. Update the gdb_regset arrays to make it more obvious they are arrays of struct gdb_reg and to fix the gcc build. Reviewed by: corvink, markj Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45550 --- usr.sbin/bhyve/gdb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/bhyve/gdb.c b/usr.sbin/bhyve/gdb.c index 6df8026a0245..a13166e1e2c8 100644 --- a/usr.sbin/bhyve/gdb.c +++ b/usr.sbin/bhyve/gdb.c @@ -166,10 +166,10 @@ static bool gdb_active = false; struct gdb_reg { enum vm_reg_name id; int size; -} +}; #ifdef __amd64__ -static const gdb_regset[] = { +static const struct gdb_reg gdb_regset[] = { { .id = VM_REG_GUEST_RAX, .size = 8 }, { .id = VM_REG_GUEST_RBX, .size = 8 }, { .id = VM_REG_GUEST_RCX, .size = 8 }, @@ -212,7 +212,7 @@ static const gdb_regset[] = { { .id = VM_REG_GUEST_EFER, .size = 8 }, }; #else /* __aarch64__ */ -static const gdb_regset[] = { +static const struct gdb_reg gdb_regset[] = { { .id = VM_REG_GUEST_X0, .size = 8 }, { .id = VM_REG_GUEST_X1, .size = 8 }, { .id = VM_REG_GUEST_X2, .size = 8 }, From nobody Tue Jun 11 13:27:38 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vz8cC1fZGz5LgHG; Tue, 11 Jun 2024 13:27:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vz8cC0nYtz4flb; Tue, 11 Jun 2024 13:27:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718112459; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ECPxdYIc86+g8kFFhxd94cAZrQJ0sGEKAhgYiEWXMkM=; b=XkE1u2cewEH5AaHb/trz5jdDF0qxBAOhnid5H3lgTfh/rs9Di2DqGed12VF+jEa5dbDq45 2VwStyLH8sqLiDwMSVPrnmlD5lqJVgnJ9S/2Jp6M9/twTZ8b9vduHKltt25ONwhMgNCOeT loPc/7kLadM919O/3FnQjjwIN4cjdswlRE24iiOtobBAwqSIzXIRfVQIZATtSrs0x9IG7W h3STh4rD3DbV+nxTmdiIr6/MDzYweEl9HeYsFnA21S2Vd1hYqPzvOGwZ9ziqfTTB4R31fn DO3qVRUXTsEywPF/FQ4SGBevi6fteT9BMSK+2WwqBOzbNR1KclAv7D31FRQsOw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718112459; a=rsa-sha256; cv=none; b=idM4RZT5hr1RQyX7sfdwOqk4/U78yvhqU5fh94TeAZI+S5A0c/DbV4NrElu/bM07u58ZSK yD3y4SQAcbQqLMmDFy0pn5fuEdiIs3ahLxwUddmhLnDpohuohjbaj8mbjjVYu8APMcM6bH 3OCR3s6BuX9XKTMtfnRKsUoHarqtNKgsy2LEQyhDxpSUpvPE4Lal7dEtErlqNADb5b5/ei nMv//d049ei+sa34fEQzQnmbl6W8UgjAJS+ZYLWbxbELJRf7GFdhzYK+bVSreXElBuGypt g1Y03JoDq1TOU3IOOx4IqfektyQAtdX5IUggJRAPEC10PCkZuitM3utxbZoxvA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718112459; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ECPxdYIc86+g8kFFhxd94cAZrQJ0sGEKAhgYiEWXMkM=; b=UDA9Hi6n9SUVkZaKEGmbKqEWQQoQPTsD7/DQ+3uULYi9n4UYEgZzwsGW56cRxoQkRzsZjQ JriNrFhNvRfAhiHDwsJfv9Glvj6hcePHzQI4bWAksCRo8j0AWADwPW7CsvhqLmGUBj8h+l xx0QCR2+SY6RbFOlAhCpcYlBfKknfThAtFg0+oepMswOGS+RyJCv7+TqL7Pfwp2sHJ1FJJ u7PR1aoialOfsQFnCkpzU7pMqsie+SJtQJbAxmuSlmfpGl6E9eCsVLG8kwER11ZTckweKZ 3ClpQlFsqa56xx3wGIpf+aOkZjNFYafv0S6b+a/q8RO+dnyKIH42Elw07U1I/A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vz8cC0GgWz199G; Tue, 11 Jun 2024 13:27:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45BDRcul072731; Tue, 11 Jun 2024 13:27:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45BDRcE0072728; Tue, 11 Jun 2024 13:27:38 GMT (envelope-from git) Date: Tue, 11 Jun 2024 13:27:38 GMT Message-Id: <202406111327.45BDRcE0072728@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: c3fe41b3a375 - stable/14 - vnet tests: check for if_bridge.ko List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c3fe41b3a375bebef2bec5f0a5c2159b4a2ba347 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=c3fe41b3a375bebef2bec5f0a5c2159b4a2ba347 commit c3fe41b3a375bebef2bec5f0a5c2159b4a2ba347 Author: Kristof Provost AuthorDate: 2024-06-04 18:02:18 +0000 Commit: Kristof Provost CommitDate: 2024-06-11 06:03:23 +0000 vnet tests: check for if_bridge.ko A number of tests create a bridge, but did not check if if_bridge.ko is loaded. We usually get away with that, because `ifconfig bridge create` autoloads the module, but if we run the tests in a jail (e.g. because of kyua's upcoming execenv.jail.params feature) we can't load the module and these tests can fail. Check if the module is loaded, skip the test if it is not. Reviewed by: markj MFC after: 1 week Event: Kitchener-Waterloo Hackathon 202406 Differential Revision: https://reviews.freebsd.org/D45487 (cherry picked from commit 480ad4055314efbfff7eedbb34272031d836ba89) --- tests/sys/common/vnet.subr | 7 +++++++ tests/sys/net/if_bridge_test.sh | 13 +++++++++++++ tests/sys/net/if_ovpn/if_ovpn.sh | 2 ++ tests/sys/netinet/carp.sh | 7 ++++++- tests/sys/netpfil/common/rdr.sh | 1 + tests/sys/netpfil/pf/altq.sh | 4 +--- tests/sys/netpfil/pf/pfsync.sh | 1 + tests/sys/netpfil/pf/sctp.sh | 1 + tests/sys/netpfil/pf/tcp.sh | 1 + 9 files changed, 33 insertions(+), 4 deletions(-) diff --git a/tests/sys/common/vnet.subr b/tests/sys/common/vnet.subr index 50abadaec81d..0f7dec0dc6f1 100644 --- a/tests/sys/common/vnet.subr +++ b/tests/sys/common/vnet.subr @@ -26,6 +26,13 @@ vnet_mkepair() echo ${ifname%a} } +vnet_init_bridge() +{ + if ! kldstat -q -m if_bridge; then + atf_skip "This test requires if_bridge" + fi +} + vnet_mkbridge() { ifname=$(ifconfig bridge create) diff --git a/tests/sys/net/if_bridge_test.sh b/tests/sys/net/if_bridge_test.sh index 44370a905223..66656be1d84f 100755 --- a/tests/sys/net/if_bridge_test.sh +++ b/tests/sys/net/if_bridge_test.sh @@ -39,6 +39,7 @@ bridge_transmit_ipv4_unicast_head() bridge_transmit_ipv4_unicast_body() { vnet_init + vnet_init_bridge epair_alcatraz=$(vnet_mkepair) epair_singsing=$(vnet_mkepair) @@ -76,6 +77,7 @@ stp_head() stp_body() { vnet_init + vnet_init_bridge epair_one=$(vnet_mkepair) epair_two=$(vnet_mkepair) @@ -142,6 +144,7 @@ stp_vlan_head() stp_vlan_body() { vnet_init + vnet_init_bridge epair_one=$(vnet_mkepair) epair_two=$(vnet_mkepair) @@ -216,6 +219,7 @@ static_head() static_body() { vnet_init + vnet_init_bridge epair=$(vnet_mkepair) bridge=$(vnet_mkbridge) @@ -273,6 +277,7 @@ span_head() span_body() { vnet_init + vnet_init_bridge epair=$(vnet_mkepair) epair_span=$(vnet_mkepair) @@ -326,6 +331,7 @@ delete_with_members_head() delete_with_members_body() { vnet_init + vnet_init_bridge bridge=$(vnet_mkbridge) epair=$(vnet_mkepair) @@ -352,6 +358,7 @@ mac_conflict_head() mac_conflict_body() { vnet_init + vnet_init_bridge epair=$(vnet_mkepair) @@ -390,6 +397,7 @@ inherit_mac_head() inherit_mac_body() { vnet_init + vnet_init_bridge bridge=$(vnet_mkbridge) epair=$(vnet_mkepair) @@ -418,6 +426,7 @@ stp_validation_head() stp_validation_body() { vnet_init + vnet_init_bridge epair_one=$(vnet_mkepair) epair_two=$(vnet_mkepair) @@ -461,6 +470,7 @@ gif_head() gif_body() { vnet_init + vnet_init_bridge epair=$(vnet_mkepair) @@ -545,6 +555,7 @@ check_mtu() mtu_body() { vnet_init + vnet_init_bridge epair=$(vnet_mkepair) gif=$(ifconfig gif create) @@ -606,6 +617,7 @@ vlan_head() vlan_body() { vnet_init + vnet_init_bridge vid=1 @@ -673,6 +685,7 @@ many_bridge_members_head() many_bridge_members_body() { vnet_init + vnet_init_bridge bridge=$(vnet_mkbridge) ifcount=256 diff --git a/tests/sys/net/if_ovpn/if_ovpn.sh b/tests/sys/net/if_ovpn/if_ovpn.sh index 88df430aead6..3623f57115ac 100644 --- a/tests/sys/net/if_ovpn/if_ovpn.sh +++ b/tests/sys/net/if_ovpn/if_ovpn.sh @@ -584,6 +584,7 @@ multi_client_head() multi_client_body() { ovpn_init + vnet_init_bridge bridge=$(vnet_mkbridge) srv=$(vnet_mkepair) @@ -796,6 +797,7 @@ ra_head() ra_body() { ovpn_init + vnet_init_bridge bridge=$(vnet_mkbridge) srv=$(vnet_mkepair) diff --git a/tests/sys/netinet/carp.sh b/tests/sys/netinet/carp.sh index d08940d433d7..d0e10bc2c085 100755 --- a/tests/sys/netinet/carp.sh +++ b/tests/sys/netinet/carp.sh @@ -71,6 +71,7 @@ basic_v4_head() basic_v4_body() { carp_init + vnet_init_bridge bridge=$(vnet_mkbridge) epair_one=$(vnet_mkepair) @@ -105,7 +106,6 @@ basic_v4_cleanup() vnet_cleanup } - atf_test_case "unicast_v4" "cleanup" unicast_v4_head() { @@ -116,6 +116,7 @@ unicast_v4_head() unicast_v4_body() { carp_init + vnet_init_bridge bridge=$(vnet_mkbridge) epair_one=$(vnet_mkepair) @@ -173,6 +174,7 @@ basic_v6_head() basic_v6_body() { carp_init + vnet_init_bridge bridge=$(vnet_mkbridge) epair_one=$(vnet_mkepair) @@ -220,6 +222,7 @@ unicast_v6_head() unicast_v6_body() { carp_init + vnet_init_bridge bridge=$(vnet_mkbridge) epair_one=$(vnet_mkepair) @@ -281,6 +284,7 @@ unicast_ll_v6_head() unicast_ll_v6_body() { carp_init + vnet_init_bridge j=carp_uni_ll_v6 @@ -391,6 +395,7 @@ nd6_ns_source_mac_head() nd6_ns_source_mac_body() { carp_init + vnet_init_bridge bridge=$(vnet_mkbridge) epair_one=$(vnet_mkepair) diff --git a/tests/sys/netpfil/common/rdr.sh b/tests/sys/netpfil/common/rdr.sh index 7d6297870e6c..0d6f27694c8c 100644 --- a/tests/sys/netpfil/common/rdr.sh +++ b/tests/sys/netpfil/common/rdr.sh @@ -83,6 +83,7 @@ local_redirect_body() firewall=$1 firewall_init $firewall nat_init $firewall + vnet_init_bridge bridge=$(vnet_mkbridge) ifconfig ${bridge} 192.0.2.1/24 up diff --git a/tests/sys/netpfil/pf/altq.sh b/tests/sys/netpfil/pf/altq.sh index 57a9edf11366..a902c7caaf4f 100644 --- a/tests/sys/netpfil/pf/altq.sh +++ b/tests/sys/netpfil/pf/altq.sh @@ -156,9 +156,7 @@ codel_bridge_body() { altq_init is_altq_supported codel - if ! kldstat -q -m if_bridge; then - atf_skip "This test requires if_bridge" - fi + vnet_init_bridge epair=$(vnet_mkepair) ifconfig ${epair}a 192.0.2.1/24 up diff --git a/tests/sys/netpfil/pf/pfsync.sh b/tests/sys/netpfil/pf/pfsync.sh index 91c7b8410a08..441221f39d27 100644 --- a/tests/sys/netpfil/pf/pfsync.sh +++ b/tests/sys/netpfil/pf/pfsync.sh @@ -326,6 +326,7 @@ pbr_common_body() atf_skip "This test requires carp" fi pfsynct_init + vnet_init_bridge bridge0=$(vnet_mkbridge) bridge1=$(vnet_mkbridge) diff --git a/tests/sys/netpfil/pf/sctp.sh b/tests/sys/netpfil/pf/sctp.sh index 66225e132d1c..c6dba1719d00 100644 --- a/tests/sys/netpfil/pf/sctp.sh +++ b/tests/sys/netpfil/pf/sctp.sh @@ -504,6 +504,7 @@ pfsync_body() sctp_init pfsynct_init + vnet_init_bridge if ! kldstat -q -m carp then atf_skip "This test requires carp" diff --git a/tests/sys/netpfil/pf/tcp.sh b/tests/sys/netpfil/pf/tcp.sh index 84536480b44e..f1bffdba2bfa 100644 --- a/tests/sys/netpfil/pf/tcp.sh +++ b/tests/sys/netpfil/pf/tcp.sh @@ -39,6 +39,7 @@ rst_head() rst_body() { pft_init + vnet_init_bridge epair_srv=$(vnet_mkepair) epair_cl=$(vnet_mkepair) From nobody Tue Jun 11 13:27:39 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vz8cD1LwGz5Lfq1; Tue, 11 Jun 2024 13:27:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vz8cD0knPz4fPC; Tue, 11 Jun 2024 13:27:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718112460; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TyJhvn/xrlfx/I+ohgQZBuAaK+thlvUSmCZrQYmJx7s=; b=tNzBKi3iP9fp0wMP6WZpMFXVTYhRroTcfcWtkcRmpIEgoE7xglV3pslLj8SsNMoxhrIauC p/vYTjxiovkgcuOubGfvR8cHRSZ2AZa3SWd+xId3ZifMyXuT2TczW6mGRJnoxIRuCUhVDL Ytk+RxFr0+/Y0FB2U3zGxAJFY/pAiZcs6XosAPK2mc10qFJce0VXn5ybi/cO9yqk6ZJwxw BiOXEme1UGQE4o57aKY4jVEvxaLAaP3T2LPJmkC4PhECaP5l8vKjCFdMf7yaeSYRmTQY3T 2rE2wJOyB8NLgUOMh5Yg2jYH7r+Xv9Y1fvPCUlkQSubUtgcTLH9EEnzP/kgSFA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718112460; a=rsa-sha256; cv=none; b=jSWTZw3lTU5DQfezH/oMLxphER0Af1taC2Kbp2XmxP3I8fmi3kI7cWQJKIapqvpkFf5eoS 7hRpMdKdHIa64KClzkQY8xpjjko1zsT6hdULTVsrQmz+lxl79m43sekAgNKKcGON++In8V kE3FHtOCPfZD/AHY8eqFzcmZqUzbFKWc9KwX8dfgz+jaJByfQTzkZghcWpC/v3FN/ksI/b QfMkhnD1ES+Y5hDOBITBsaJ6+EivBTqGvJdhZSAuAnaw+3ZL1LaRnlbYOAsv2V/JqqPoe2 FQxrjnyAAL/mQtEUnWrgB2l5J2ck5ebC0Mi0AxW44E+Zz3GPuil2TEuP3TM3yw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718112460; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TyJhvn/xrlfx/I+ohgQZBuAaK+thlvUSmCZrQYmJx7s=; b=K/1Jk4H7K05NCG+HvA5WXLBYqRIA/pJxASoQRabnQb8vl0lIuRFq1wZn4OGjiEa8sjUCgp V8ck09InIaGndnFmPwQ910BRNVJVMMgOfCef4RvuImI9vd9u1rXvaUJuEO8oWQRLlB5p64 /PpJEtFunZ+hQvR6hggOxCg4uxpEx7/GKgRpirMSpaN9VtU/8loI+hWh0sAkU0KFH4xOF1 6fOGqyUXbl4AEONldqSkqg7/XX02yzEgJfIFmvK2lh6iSboYPxNJPePP/TUBLjZtNSzB3w WGpjxzQOlOOkg0IP4xzMfJJiFYUozL4gpxRYrQHP7g/NOzYAVUyIse/nZzrH8g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vz8cD0MKnz19nt; Tue, 11 Jun 2024 13:27:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45BDRdQn072833; Tue, 11 Jun 2024 13:27:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45BDRdgJ072830; Tue, 11 Jun 2024 13:27:39 GMT (envelope-from git) Date: Tue, 11 Jun 2024 13:27:39 GMT Message-Id: <202406111327.45BDRdgJ072830@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 154dd1eaa643 - stable/13 - vnet tests: check for if_bridge.ko List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 154dd1eaa643ffff4df525dca2e747490df61df3 Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=154dd1eaa643ffff4df525dca2e747490df61df3 commit 154dd1eaa643ffff4df525dca2e747490df61df3 Author: Kristof Provost AuthorDate: 2024-06-04 18:02:18 +0000 Commit: Kristof Provost CommitDate: 2024-06-11 06:05:13 +0000 vnet tests: check for if_bridge.ko A number of tests create a bridge, but did not check if if_bridge.ko is loaded. We usually get away with that, because `ifconfig bridge create` autoloads the module, but if we run the tests in a jail (e.g. because of kyua's upcoming execenv.jail.params feature) we can't load the module and these tests can fail. Check if the module is loaded, skip the test if it is not. Reviewed by: markj MFC after: 1 week Event: Kitchener-Waterloo Hackathon 202406 Differential Revision: https://reviews.freebsd.org/D45487 (cherry picked from commit 480ad4055314efbfff7eedbb34272031d836ba89) --- tests/sys/common/vnet.subr | 7 +++++++ tests/sys/net/if_bridge_test.sh | 11 +++++++++++ tests/sys/netinet/carp.sh | 2 ++ tests/sys/netpfil/common/rdr.sh | 1 + tests/sys/netpfil/pf/altq.sh | 4 +--- tests/sys/netpfil/pf/pfsync.sh | 1 + tests/sys/netpfil/pf/sctp.sh | 1 + tests/sys/netpfil/pf/tcp.sh | 1 + 8 files changed, 25 insertions(+), 3 deletions(-) diff --git a/tests/sys/common/vnet.subr b/tests/sys/common/vnet.subr index cc04b326c9db..9e92adc0db75 100644 --- a/tests/sys/common/vnet.subr +++ b/tests/sys/common/vnet.subr @@ -16,6 +16,13 @@ vnet_mkepair() echo ${ifname%a} } +vnet_init_bridge() +{ + if ! kldstat -q -m if_bridge; then + atf_skip "This test requires if_bridge" + fi +} + vnet_mkbridge() { ifname=$(ifconfig bridge create) diff --git a/tests/sys/net/if_bridge_test.sh b/tests/sys/net/if_bridge_test.sh index b9540c79faaa..f67978e25900 100755 --- a/tests/sys/net/if_bridge_test.sh +++ b/tests/sys/net/if_bridge_test.sh @@ -39,6 +39,7 @@ bridge_transmit_ipv4_unicast_head() bridge_transmit_ipv4_unicast_body() { vnet_init + vnet_init_bridge epair_alcatraz=$(vnet_mkepair) epair_singsing=$(vnet_mkepair) @@ -76,6 +77,7 @@ stp_head() stp_body() { vnet_init + vnet_init_bridge epair_one=$(vnet_mkepair) epair_two=$(vnet_mkepair) @@ -142,6 +144,7 @@ stp_vlan_head() stp_vlan_body() { vnet_init + vnet_init_bridge epair_one=$(vnet_mkepair) epair_two=$(vnet_mkepair) @@ -216,6 +219,7 @@ static_head() static_body() { vnet_init + vnet_init_bridge epair=$(vnet_mkepair) bridge=$(vnet_mkbridge) @@ -273,6 +277,7 @@ span_head() span_body() { vnet_init + vnet_init_bridge epair=$(vnet_mkepair) epair_span=$(vnet_mkepair) @@ -326,6 +331,7 @@ delete_with_members_head() delete_with_members_body() { vnet_init + vnet_init_bridge bridge=$(vnet_mkbridge) epair=$(vnet_mkepair) @@ -352,6 +358,7 @@ mac_conflict_head() mac_conflict_body() { vnet_init + vnet_init_bridge epair=$(vnet_mkepair) @@ -390,6 +397,7 @@ inherit_mac_head() inherit_mac_body() { vnet_init + vnet_init_bridge bridge=$(vnet_mkbridge) epair=$(vnet_mkepair) @@ -418,6 +426,7 @@ stp_validation_head() stp_validation_body() { vnet_init + vnet_init_bridge epair_one=$(vnet_mkepair) epair_two=$(vnet_mkepair) @@ -461,6 +470,7 @@ gif_head() gif_body() { vnet_init + vnet_init_bridge epair=$(vnet_mkepair) @@ -526,6 +536,7 @@ many_bridge_members_head() many_bridge_members_body() { vnet_init + vnet_init_bridge bridge=$(vnet_mkbridge) ifcount=256 diff --git a/tests/sys/netinet/carp.sh b/tests/sys/netinet/carp.sh index 8136b174785f..23dccaf90de6 100755 --- a/tests/sys/netinet/carp.sh +++ b/tests/sys/netinet/carp.sh @@ -66,6 +66,7 @@ basic_v4_head() basic_v4_body() { carp_init + vnet_init_bridge bridge=$(vnet_mkbridge) epair_one=$(vnet_mkepair) @@ -110,6 +111,7 @@ basic_v6_head() basic_v6_body() { carp_init + vnet_init_bridge bridge=$(vnet_mkbridge) epair_one=$(vnet_mkepair) diff --git a/tests/sys/netpfil/common/rdr.sh b/tests/sys/netpfil/common/rdr.sh index 7d6297870e6c..0d6f27694c8c 100644 --- a/tests/sys/netpfil/common/rdr.sh +++ b/tests/sys/netpfil/common/rdr.sh @@ -83,6 +83,7 @@ local_redirect_body() firewall=$1 firewall_init $firewall nat_init $firewall + vnet_init_bridge bridge=$(vnet_mkbridge) ifconfig ${bridge} 192.0.2.1/24 up diff --git a/tests/sys/netpfil/pf/altq.sh b/tests/sys/netpfil/pf/altq.sh index 0ced82a3a942..8622ce72dfbf 100644 --- a/tests/sys/netpfil/pf/altq.sh +++ b/tests/sys/netpfil/pf/altq.sh @@ -156,9 +156,7 @@ codel_bridge_body() { altq_init is_altq_supported codel - if ! kldstat -q -m if_bridge; then - atf_skip "This test requires if_bridge" - fi + vnet_init_bridge epair=$(vnet_mkepair) ifconfig ${epair}a 192.0.2.1/24 up diff --git a/tests/sys/netpfil/pf/pfsync.sh b/tests/sys/netpfil/pf/pfsync.sh index ada98699efec..8fcfdc2dcfa3 100644 --- a/tests/sys/netpfil/pf/pfsync.sh +++ b/tests/sys/netpfil/pf/pfsync.sh @@ -323,6 +323,7 @@ pbr_common_body() atf_skip "This test requires carp" fi pfsynct_init + vnet_init_bridge bridge0=$(vnet_mkbridge) bridge1=$(vnet_mkbridge) diff --git a/tests/sys/netpfil/pf/sctp.sh b/tests/sys/netpfil/pf/sctp.sh index 66225e132d1c..c6dba1719d00 100644 --- a/tests/sys/netpfil/pf/sctp.sh +++ b/tests/sys/netpfil/pf/sctp.sh @@ -504,6 +504,7 @@ pfsync_body() sctp_init pfsynct_init + vnet_init_bridge if ! kldstat -q -m carp then atf_skip "This test requires carp" diff --git a/tests/sys/netpfil/pf/tcp.sh b/tests/sys/netpfil/pf/tcp.sh index 84536480b44e..f1bffdba2bfa 100644 --- a/tests/sys/netpfil/pf/tcp.sh +++ b/tests/sys/netpfil/pf/tcp.sh @@ -39,6 +39,7 @@ rst_head() rst_body() { pft_init + vnet_init_bridge epair_srv=$(vnet_mkepair) epair_cl=$(vnet_mkepair) From nobody Tue Jun 11 13:27:39 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vz8cD42b1z5LgCw; Tue, 11 Jun 2024 13:27:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vz8cD1LpDz4fjY; Tue, 11 Jun 2024 13:27:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718112460; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CHRWY0guO7Rnr4of2N3ya8sMMzr6M3J5Kdz0izQHV0Y=; b=xLiashf6P7IXjJNgS8GFgs/MI0Oah9eRM5IEn9c/W0LRXdSj8Vz9mLQqKMeML/cDyNFTMZ kmmenBtYUEOoCuA6g/EMxGIVibPxQCeNeRhXdgryKDAKKbhoTH7tFpAdfH61CCUSoS9hxm ERaGiHo2u2NLxB9zOKqGNR9LVVF8oTjf+ahuDZTr0A0h2zMm5G9CJnspKmqzWZ/+Pr9fdX +pA3+cDqYTeoECJJke8J3TOq0XP8KjJww0bwBldMqPhtFRoh+3ZSmX6ZMlhLA80WOnMvfx UhjQZXUpfyXSFLfs5sI3r4DJ5Xb0zJ8ab5lzDrg3Yi1L92/7ZrSp17aPIqtL6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718112460; a=rsa-sha256; cv=none; b=q8GIeDhylmIC356GnGKRsliBoIpRkPGqtwox93PqwFHwvk+YQ8xaiHp/+DTyFcl3Ch7HKR N/fZELNFXMPDwPvXKxFWBFhI7pAYfydrFo0eRNq5WxcUt/I0WxribS0rhaWQOevFXCtZqK hiW4XIHYbhs1KIgQi5CyEmlYjUDXSJ/BhMYfI/98Dgw6BtJsivooJAPk5/u3MJxCnrPu4i kEv2+p275xHEWghAUEAZZykt7cqF+A7nZEFBIG2F1aKoNjrH50EexdAEV+UatfkhZuIO2S ugdyEXXeLYkQbTw28EKO6+pkk7F4DITNeNlti2J1uXfUpWMv1rlDcDqAsOmRQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718112460; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CHRWY0guO7Rnr4of2N3ya8sMMzr6M3J5Kdz0izQHV0Y=; b=NWZL0DFHvnwnlnaP+Xzc1voKjPFbMcZ/gSzIZ/HaRD6kMeiDexTB9qwLfZqX20/wIO+lIW 40HJzpzNz7G/eGtNltnBvd0YZTlolWKdJvZYrVSLvGLplMis7DFw8+wiHihgzeXGWs0Y4r ROxNO+yWedPILn1xZdSB7OSMaC7T1jMKnrAdjd8bG9siz+kjy7xJbBtfa2NXOy4UBagX+R z2GTzq6NZg1wzCBM1VYwXwLxgF09nUthzXzBwSnp1anAqtz68UJ1+ucgqsS1i2F8B7naL9 KSFd8+w+pCauShJLlyS2JEt7FdOBugPAWMdheXqfdD5HagPbcl5YgPenhmHP2Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vz8cD0mBYz199H; Tue, 11 Jun 2024 13:27:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45BDRdSA072884; Tue, 11 Jun 2024 13:27:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45BDRdmv072881; Tue, 11 Jun 2024 13:27:39 GMT (envelope-from git) Date: Tue, 11 Jun 2024 13:27:39 GMT Message-Id: <202406111327.45BDRdmv072881@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 357d111ef71f - stable/14 - pf tests: make ether:dummynet test a little more robust List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 357d111ef71fabba9590d2f59a1539d5d27a1f82 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=357d111ef71fabba9590d2f59a1539d5d27a1f82 commit 357d111ef71fabba9590d2f59a1539d5d27a1f82 Author: Kristof Provost AuthorDate: 2024-06-01 20:37:36 +0000 Commit: Kristof Provost CommitDate: 2024-06-11 06:05:38 +0000 pf tests: make ether:dummynet test a little more robust Allow slightly more bandwidth, but cause ping to give up sooner. MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 1c5b886e111663d3c7e30beddae9c10445f620d4) --- tests/sys/netpfil/pf/ether.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/sys/netpfil/pf/ether.sh b/tests/sys/netpfil/pf/ether.sh index 9a1ab1b005d7..e1855949476b 100644 --- a/tests/sys/netpfil/pf/ether.sh +++ b/tests/sys/netpfil/pf/ether.sh @@ -415,7 +415,7 @@ dummynet_body() # Sanity check atf_check -s exit:0 -o ignore ping -i .1 -c 3 -s 1200 192.0.2.2 - jexec alcatraz dnctl pipe 1 config bw 30Byte/s + jexec alcatraz dnctl pipe 1 config bw 300Byte/s jexec alcatraz pfctl -e pft_set_rules alcatraz \ "ether pass in dnpipe 1" @@ -430,14 +430,14 @@ dummynet_body() ping -i .1 -c 5 -s 1200 192.0.2.2 # We should now be hitting the limits and get this packet dropped. - atf_check -s exit:2 -o ignore ping -c 1 -s 1200 192.0.2.2 + atf_check -s exit:2 -o ignore ping -c 1 -t 1 -s 1200 192.0.2.2 # We can now also dummynet outbound traffic! pft_set_rules alcatraz \ "ether pass out dnpipe 1" # We should still be hitting the limits and get this packet dropped. - atf_check -s exit:2 -o ignore ping -c 1 -s 1200 192.0.2.2 + atf_check -s exit:2 -o ignore ping -c 1 -t 1 -s 1200 192.0.2.2 } dummynet_cleanup() From nobody Tue Jun 11 13:27:41 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vz8cF2WmVz5LfqP; Tue, 11 Jun 2024 13:27:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vz8cF1q3Tz4fd6; Tue, 11 Jun 2024 13:27:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718112461; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YxxQzD0llWaoJtPi+o213mhovubUdjIOHN49Y4UVRaA=; b=W6z+hnOaL0nmcgFk5zoaln5LuQejaSuLBeH6Z5Du+MAz8V3QvX9U53NnIYUYIq6sbSGV8d j5i15ssNQDhUSppeAdR3ehGkOj+9yADR+cmMpLR0L62LKgY/dQ6R16Y0cIk82gCKFMjBd8 lNC4NAxx6pHZDF124W2n4XFfP+eZYUdRzYuqOiIqkuYYzFXYxdMW+ziOjsTNnmNye/5jPl ozKkzA9WL9/pA1+VPewF7i2JzV8GP90V5n79hGB0IPUJCYI8x0nN2N/beej3Aa8D6FhT05 etAfGGBI4rkM4IfhAuaBDRJYihl9wePS5Qrst6Zg4D7TInFohzT4wnguGLw21A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718112461; a=rsa-sha256; cv=none; b=T/x3PV56B8xa9PYzcDatsJrJXZj6wbu634Ae8VSX2pUAuwTznpVTx1SQsQh8V77D6iYq5/ Vfpyw6MsZh1dmFI6YnNrc3Z8AZNEgz+2eM5nPP9ugZSuJF48EzfQMxn6PC1tJxwy3wjd1H cqifkQHzyAvdi6hvtCgS3XyLIIaW3wZhCUGd4Soc4gFy0FuREQAxXdD9j/Dx1pQI/KxCoj rxndMQcSQpwjvW4r69jcHwaOR44O+Z3IbJeHLv8TPaUYG0i3r8OpN5PgeTmLLxvozYZUgQ lGzWYT/ynY+TSez104I4hAwWnJsBVzZZ9lrZ0mYuIhSaUCjtlHIdue3tcM/6hA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718112461; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YxxQzD0llWaoJtPi+o213mhovubUdjIOHN49Y4UVRaA=; b=NDDsfjObUQtSGdlZ2hpy4me2bvN9LthUcuHVEHJNxHWzoR6gY0aVOL8n2CAzc2UvlmuvaV z7VvVSylgzpf5/eiznVJcPkk/hYrajX+Uxq5nDb3Yj1ppjcUehjv4JJUgTGuQo1w9tPTEe kGvyKvjSl1xFUbUaBWC+2lb/96xnkjg4LtVioahBEJU/HR+wbrzu/+JFPMU/p+so35wz1S XhEGKW1X+1hYxuPUbhkFkvsfMX6CBgaRVn0CVdZrd9gbvDA21lNvH7pjdF6hLDG77TSp5+ Kef4+kviB7uSI0V4phrqlIJWBvr3spu2znYSqh1talxcfz7HDZH/I6bbVBr3Pg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vz8cF1M06z19M9; Tue, 11 Jun 2024 13:27:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45BDRfxE072980; Tue, 11 Jun 2024 13:27:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45BDRfV6072976; Tue, 11 Jun 2024 13:27:41 GMT (envelope-from git) Date: Tue, 11 Jun 2024 13:27:41 GMT Message-Id: <202406111327.45BDRfV6072976@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: d92f239a92c4 - stable/13 - pf: fix overly large copy in pf_rule_to_krule() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d92f239a92c448f2954fd4c14775a36532a78dc6 Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=d92f239a92c448f2954fd4c14775a36532a78dc6 commit d92f239a92c448f2954fd4c14775a36532a78dc6 Author: Kristof Provost AuthorDate: 2024-06-04 12:55:02 +0000 Commit: Kristof Provost CommitDate: 2024-06-11 06:06:11 +0000 pf: fix overly large copy in pf_rule_to_krule() The timeout array in struct pf_rule has PFTM_OLD_MAX entries, the one in struct pf_krule has PFTM_MAX entries (and PFTM_MAX > PFTM_OLD_MAX). Use the smaller of the sizes when copying. Reported by: CheriBSD MFC after: 1 week Event: Kitchener-Waterloo Hackathon 202406 (cherry picked from commit 4779b16fa61f858ad5c449834f550fbd5e162d98) --- sys/netpfil/pf/pf_ioctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 98b5ce318596..a7f9f2604068 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -1799,7 +1799,8 @@ pf_rule_to_krule(const struct pf_rule *rule, struct pf_krule *krule) krule->os_fingerprint = rule->os_fingerprint; krule->rtableid = rule->rtableid; - bcopy(rule->timeout, krule->timeout, sizeof(krule->timeout)); + /* pf_rule->timeout is smaller than pf_krule->timeout */ + bcopy(rule->timeout, krule->timeout, sizeof(rule->timeout)); krule->max_states = rule->max_states; krule->max_src_nodes = rule->max_src_nodes; krule->max_src_states = rule->max_src_states; From nobody Tue Jun 11 13:27:41 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vz8cF2SMQz5LfdZ; Tue, 11 Jun 2024 13:27:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vz8cF1mh2z4fJx; Tue, 11 Jun 2024 13:27:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718112461; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xh6s/wN9zph7UNogDV0de46i8ybs0UHDYG47w1GnU6k=; b=PuiHbo6vx0pBHm7HZEOpgcT7E/UpoRRcKMIPiRHK1LNqkyKXrEDS/yaTa9/hNXNI49TU0p ra/W5yKPqJ1/XVyG/xUZIm0oMsMVaKEFzGKSrCSKiqD1p3mNIzyjwDpSohQvaexA3AeSwn aWLbZz7GnzECyqp8k0iqi0kG50AOvk63iBSrhZEaxz1IdBMllkrDv1CYEjaeFrn1dUHsLM CCPI4sOeWHA96bVMWtVm3M3oA7ksyO0IRlK0yAWOg9XdjzT25Y7ao1mt30tPWgTxSWk1LQ +2e5Zs2OPUsKem8ipG0yrAr0WCVSeYaEx1XsrGx1quFgJm1yI5gj+BcYSXhPgw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718112461; a=rsa-sha256; cv=none; b=qYE2Q0VszJd+sUBD0qlZiwtOazJrmxyM7M/s+lVFzsYHv6hQkAmBpSvFV9aCx5Uy7UetNk iHdh6MtK6Opdr+8U49w0v8x1LvTehfZ/OqriaXE/5Xf2Urp6TLA2eJNFdxnflJ6zeFE/zh ImFyUEMShmPMHRD91O3GOVTADvAi+P7Peo4SWkFSLZr1qe3tJ7uikoYPuhkpUEQ2WDm4GH m0kym5OmkfENfVRIjZ+3V3p1P5GMi+EASu7z+BWfnblKLSyBQaERALlm0kwBfW8hdI/fNa 7X7xdHtVyvBnCiiUe13/vccctUaXPw39v6wkUogBXl1lWc8z4qvwZL3Ggm6ydQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718112461; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xh6s/wN9zph7UNogDV0de46i8ybs0UHDYG47w1GnU6k=; b=jnAvVbdUGusQtf8ULQQti2fkk5SVVlT4YH/JPCyEyzvtiaM60NgIrT0gIdICLmGZU0T5+m Q/0yTJs8Pe1KmI8IzF2nKqiIapdBAYf8bVXK+balhacTvYYAqf0zmxvowPXMQ/LOGl/0qW kzVtPTMTcGxf4zHNkD9jGN01L1UuQID7jS9fvniiGeSH7F5A5ADG2mtOOVcIYPFZZ8YsH6 ieyH3wn3+oc8EjxHs9e9TqeLNpY+GbaOVtT42OjaGbnyuuLjfnJdFPq5PnZwi+bGG4ZSc3 njbXhRYBRPWVVyZVQPjw4VltN5VYK9jvPWyJw+Zib0KgG3SJ2X0Kr/UEbSePSA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vz8cF1KSJz19nv; Tue, 11 Jun 2024 13:27:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45BDRfw0072979; Tue, 11 Jun 2024 13:27:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45BDRfmr072971; Tue, 11 Jun 2024 13:27:41 GMT (envelope-from git) Date: Tue, 11 Jun 2024 13:27:41 GMT Message-Id: <202406111327.45BDRfmr072971@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 8fb5dc88ad8e - stable/14 - pf: fix overly large copy in pf_rule_to_krule() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8fb5dc88ad8edbf3ab2a60fff4c2af2ad71fceae Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=8fb5dc88ad8edbf3ab2a60fff4c2af2ad71fceae commit 8fb5dc88ad8edbf3ab2a60fff4c2af2ad71fceae Author: Kristof Provost AuthorDate: 2024-06-04 12:55:02 +0000 Commit: Kristof Provost CommitDate: 2024-06-11 06:06:04 +0000 pf: fix overly large copy in pf_rule_to_krule() The timeout array in struct pf_rule has PFTM_OLD_MAX entries, the one in struct pf_krule has PFTM_MAX entries (and PFTM_MAX > PFTM_OLD_MAX). Use the smaller of the sizes when copying. Reported by: CheriBSD MFC after: 1 week Event: Kitchener-Waterloo Hackathon 202406 (cherry picked from commit 4779b16fa61f858ad5c449834f550fbd5e162d98) --- sys/netpfil/pf/pf_ioctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 1a383ae6fd09..7c148d857144 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -2071,7 +2071,8 @@ pf_rule_to_krule(const struct pf_rule *rule, struct pf_krule *krule) krule->os_fingerprint = rule->os_fingerprint; krule->rtableid = rule->rtableid; - bcopy(rule->timeout, krule->timeout, sizeof(krule->timeout)); + /* pf_rule->timeout is smaller than pf_krule->timeout */ + bcopy(rule->timeout, krule->timeout, sizeof(rule->timeout)); krule->max_states = rule->max_states; krule->max_src_nodes = rule->max_src_nodes; krule->max_src_states = rule->max_src_states; From nobody Tue Jun 11 13:52:17 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vz98d4FMwz5Lxwl; Tue, 11 Jun 2024 13:52:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vz98d2JTxz4jCv; Tue, 11 Jun 2024 13:52:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718113937; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T9HX3vOBq/AR7cQ+f9zgcxtz1udth20JzRFV5aPzJL4=; b=JAQgtHs+8bbrk1PYMoJYGlclmjtXgSTQ4cJ7tLMJwTKMG1Yh/JM54z1v8TVHwL+8PjIDOZ 5qiMnH104wGv8eAg4qGwaI9wNuncXY1vgHnZWap3n19od2xNnYk499m44rMTZ5SZLzAO6w kBIc00PeoSdtfcpAhEVRtYz5dSkrv3YnfMo60W63UYt50DoEOZs9cpIfaIdcWWbYu/22WK kkNvoG+V8s5R6X9uObbwN42I8A/RFttX3IRA7zkTPNDbELysCBUGR4EhxpbgvLFwSImnzW nXlcJcfYjfS1mSgb1g+pP37hW/K7+yrz2upwssgcmjkGI79akNR2bn9Kgo64eQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718113937; a=rsa-sha256; cv=none; b=YJCQZuHG+HRdORQ8KGre7Yfdvr6jpsHh4vWHsggk0+zZFez2nEAYVLrjpWezQxy7eBDAaZ 3RNc9KiFmJafNVBjxA37BpgJnj+ZftkhGG5KqVN8jOFdOMAnSj/XOWGKJVkzZGQVVLToYv 3FNrCK17Ul21VFbudUF3eQv8rG9Eqdtj4nmRFO7pAP1O2SGk3uYz9et7jJJlDEJIXnpj8X EJsoAuQIPLZ9kuWYYsUKoa2NCO3ct6oe7x2/ZWzvJIcPtooLK6v2LRgKkzvGMB6tIMLGyO hEzrbJBOcZmFgHguaU8uEw7XseKW9bBI5QPlhcl+1dHMkuVsGr7cd49pi2dIeg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718113937; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T9HX3vOBq/AR7cQ+f9zgcxtz1udth20JzRFV5aPzJL4=; b=Sbe1bdB63Ms9Cv3L3EBz34jgcxKwc0rIIPWABF6iboLmht7EY7W7VMGtnhQPTncbF+FZV+ EBQqJgA0nUtCBRUxogRfN6DCBj0XzIi08xDXCazj+3oDYeWaWuX7q58Om0nTHDUfP9n61b I8PWruRlJK8jB9PjUhCNC8mz3Msfn9p9PscIk5P4qoHgzxfRhO2y91JE/FOCjrLWFDbgTh 8Aq4utBNoSYO7KWnv5ZvyjSYrMSfWSTBhVWEBtcqE0VaIFXZavlwUh7VaHdTZNYoJi1r3Q korsj25TdDZfgXEw1bwZ38fuBLUiksBrKybyWkxbYlEH0/9C0aYkoUAPuiL6Fw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vz98d1wbVz19fK; Tue, 11 Jun 2024 13:52:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45BDqHYo022142; Tue, 11 Jun 2024 13:52:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45BDqHoG022139; Tue, 11 Jun 2024 13:52:17 GMT (envelope-from git) Date: Tue, 11 Jun 2024 13:52:17 GMT Message-Id: <202406111352.45BDqHoG022139@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: cb53f83d8ad8 - main - Revert "stress2: Replace rename() with arc4random()" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cb53f83d8ad8ee6fd9778c38b30e71244254e5bb Auto-Submitted: auto-generated The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=cb53f83d8ad8ee6fd9778c38b30e71244254e5bb commit cb53f83d8ad8ee6fd9778c38b30e71244254e5bb Author: Peter Holm AuthorDate: 2024-06-11 13:51:21 +0000 Commit: Peter Holm CommitDate: 2024-06-11 13:51:21 +0000 Revert "stress2: Replace rename() with arc4random()" This reverts commit f65d0b18d9372b522e247c7bd58422a7ab3d30d8. Misleading commit message --- tools/test/stress2/misc/nfsrename.sh | 4 ++-- tools/test/stress2/misc/umountf2.sh | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/test/stress2/misc/nfsrename.sh b/tools/test/stress2/misc/nfsrename.sh index 864c64aed8ac..b6513fba1553 100755 --- a/tools/test/stress2/misc/nfsrename.sh +++ b/tools/test/stress2/misc/nfsrename.sh @@ -137,7 +137,7 @@ write_file(void) unlink(path); } - fprintf(fp, "blah blah blah garbage %ld\n", (long)arc4random()); + fprintf(fp, "blah blah blah garbage %ld\n", random()); fclose(fp); if (rename(path, filename) < 0) { warn("rename"); @@ -150,7 +150,7 @@ random_sleep(int base, int slop) { long val; - val = arc4random() % slop; + val = random() % slop; usleep(base + val); } diff --git a/tools/test/stress2/misc/umountf2.sh b/tools/test/stress2/misc/umountf2.sh index cd5b53616f97..5018a804c403 100755 --- a/tools/test/stress2/misc/umountf2.sh +++ b/tools/test/stress2/misc/umountf2.sh @@ -886,12 +886,11 @@ test(void) { unsigned long offset; unsigned long size = maxoplen; - unsigned long rv; + unsigned long rv = random(); unsigned long op = rv % (3 + !lite + mapped_writes); /* turn off the map read if necessary */ - arc4random_buf(&rv, sizeof(rv)); if (op == 2 && !mapped_reads) op = 0; From nobody Tue Jun 11 13:53:40 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vz9BD5ZVqz5Ly8s; Tue, 11 Jun 2024 13:53:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vz9BD51Bcz4jhg; Tue, 11 Jun 2024 13:53:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718114020; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Gqx9rxUu0kixtEs2AkdN9O9prToKqpYENgy09XKllo0=; b=PNAj/MOgSgOqB3FUW35FkUCiLQUUVd9h36m/qnPkbuhF0XC1QtOrRAzt1OZvuw05hB9GZt FZZxg/fFawRAVugVW+O8Tx8+zBP4COg6SVRSI9qainnrc/kaZR2jEmmYljG2VmygZ2iJ5k Lxkpj4VDNEiineIsBsDoDQmPorne+qUY8RQ312AjlDnioNcNA+ldthyasmRCBLvh14QxCQ YU8DCccqYsFY87ium1xhCig7ULrECmSSfzOSJdHoZ4gC898k2HkXnDlxS2Utl2s4ewmlBd 9RxRMywdaO2NyhqQQo6ELTPZLNJwKoUyI6xIawtjbrRbasDgpgdpHIgZb5AV9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718114020; a=rsa-sha256; cv=none; b=px8rjskrI61fOLPVYMPmVvHpmPJqvOPPW1qLW5POiwmOQB4OE+8FLTI3rmhnSTUe/OIF8r LW3oBfWBc8vOChsq8WnDAo3v4oCOo9N3nxbB4SA9xE0QGIKiHJRKmPTG3xpEkMn0fmzb/y fSmFhBJIIpNlde/42PGqQahjNCeg+P5SkbFexbS3QRZM5O8pcSiVBDWwhOgHVm0P80rUti tfNLL2NAm6BQ1+gMdyBqqS3MUD+hbPos8Qamwh3zNUsIFwxJmR70myf7toGN9pdFGyHpd/ RPJ8yRRyqEYrSr4iVGYo6HV8U42ALUKwS14VdF4IZVknmQx236enWs/nUVQDbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718114020; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Gqx9rxUu0kixtEs2AkdN9O9prToKqpYENgy09XKllo0=; b=ePgg3dr3pou7cwqk6wC1z9NYQHpcE4cRwh1nFUVFwKMW2OCUxaluXdPKMz9lQr6dS9s+H0 8og5qOlLuEeaa5G25Ra5wsqyC7i9njr0YLeTNRtlAC12zy7Sm9nPaIN/YAh7XDxe1E8GrE etmX2j9cF1GLieHTGI7BIZfqvRKVT8vTNQnYaf5EwMUiCqmG3KnxyDXEvFx9vgclvcxZSq +sPETcETccMQPshe5LmveAnCZ4wqjVJ+PfnPTNrutBqMv/656FgW6BgqlENezp0oRINW+/ vhpWgKWMFv9v1gl90JhZbzDh6i/q+YAyuGkf8Af3UXONHKwbpPLjWR4XNQf8wg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vz9BD4SpYz1BKR; Tue, 11 Jun 2024 13:53:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45BDreIe022473; Tue, 11 Jun 2024 13:53:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45BDremQ022470; Tue, 11 Jun 2024 13:53:40 GMT (envelope-from git) Date: Tue, 11 Jun 2024 13:53:40 GMT Message-Id: <202406111353.45BDremQ022470@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: ff4a72c159e0 - main - stress2: Replace random() with arc4random() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ff4a72c159e06c15a4573b9a4b40f6dc55544538 Auto-Submitted: auto-generated The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=ff4a72c159e06c15a4573b9a4b40f6dc55544538 commit ff4a72c159e06c15a4573b9a4b40f6dc55544538 Author: Peter Holm AuthorDate: 2024-06-11 13:52:34 +0000 Commit: Peter Holm CommitDate: 2024-06-11 13:52:34 +0000 stress2: Replace random() with arc4random() --- tools/test/stress2/misc/nfsrename.sh | 4 ++-- tools/test/stress2/misc/umountf2.sh | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/test/stress2/misc/nfsrename.sh b/tools/test/stress2/misc/nfsrename.sh index b6513fba1553..864c64aed8ac 100755 --- a/tools/test/stress2/misc/nfsrename.sh +++ b/tools/test/stress2/misc/nfsrename.sh @@ -137,7 +137,7 @@ write_file(void) unlink(path); } - fprintf(fp, "blah blah blah garbage %ld\n", random()); + fprintf(fp, "blah blah blah garbage %ld\n", (long)arc4random()); fclose(fp); if (rename(path, filename) < 0) { warn("rename"); @@ -150,7 +150,7 @@ random_sleep(int base, int slop) { long val; - val = random() % slop; + val = arc4random() % slop; usleep(base + val); } diff --git a/tools/test/stress2/misc/umountf2.sh b/tools/test/stress2/misc/umountf2.sh index 5018a804c403..cd5b53616f97 100755 --- a/tools/test/stress2/misc/umountf2.sh +++ b/tools/test/stress2/misc/umountf2.sh @@ -886,11 +886,12 @@ test(void) { unsigned long offset; unsigned long size = maxoplen; - unsigned long rv = random(); + unsigned long rv; unsigned long op = rv % (3 + !lite + mapped_writes); /* turn off the map read if necessary */ + arc4random_buf(&rv, sizeof(rv)); if (op == 2 && !mapped_reads) op = 0; From nobody Tue Jun 11 15:02:14 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzBjL3ssrz5M4nZ; Tue, 11 Jun 2024 15:02:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzBjL2Jfbz4rPs; Tue, 11 Jun 2024 15:02:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718118134; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YxMg/QThTXuRykh+Q1LQbJP7h0XoMOeqeD1JWGCfqdk=; b=jptgu/AtE4JIaRBvP53dt7FMN1OuA30Sbl2alpWchCxE+z6G2l8WL94n6ROITseSU9pSD2 B7xMyabx3kFmf4FS/V0EE8tvt0KxEa1t9yGRUsDJzUR18eLoNs4T3ezgnSKwxwKfbkRjzC NOZnO8pm3UTAp9nUIch3KHzbX+iKsrz6lkXAF1m9J0PyvNk1HpIU5nTQ7+u2vwYMaYyhWz 0bCxa+Q1WT4Nxkhlglg2psvTGKl4YzyuNo1Q3K+KTJqeG/+ol/jv52tAXMMTXcWbOxNoi3 Z5/UdaLTfLpCFlF1CdPZRF3x9bdVPZqTpEe++zYezpV9slg+36HAZCJhO8FRAA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718118134; a=rsa-sha256; cv=none; b=wdFjpjBn11EIBdS9XmTYnTPCAqHE8EWj4VwJYrb+IIjBpEPewStsrVdjolsxmFV4uGSM9l E2c5tOaxnbH/pD+kWxENQvtk0NPoYtmdU9ZNWXZ1n4X6YbgZDOzvAoZAs2LihameCJTxvy xdp8CkEsMClQI7Qsm4DID2exuoLHkoIYGeyYazjsPUdySTcclQ9cCD+BtmSxwtgssQBc8c deLvEmK8L2I5VnMgctDzJTndUcz1VIp8Qq6oH38mgNVpB1rnxyCnU/X3TJ/lSYPJmE/GlM 3mZWTidnh/G6cG5VWIXCeY/OHxyBsPG9dnnWlsx8IcQxN2l0+l4LjaE7dBVldw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718118134; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YxMg/QThTXuRykh+Q1LQbJP7h0XoMOeqeD1JWGCfqdk=; b=jA5pJMYMIw6m8ebs2hZj/vMHiYXA9WbWg3iDDMFRDeQ0B7xdwzOqE6OleLm55w8X9FTOOJ K7hjDfY/uSUwd3fyrt6BTYBdpzVGrjqRtRkPgQRYgROEjaiZ4kaU77jP4uFtZibBcfsg3c m/J0nC3MRbZIZ4c1j5YSclmhA+KcLQ7KI4d/HKmbmpjpl9qE4/9husGq/owtRh2jD8fEKn EK7uMdMPiZLt35bT6Eu3Sp4+J37yhD19q4kXFpQCCJdIyAYdvhezckK5OPSGns9dlSL16Y B7J+orYBKHikPYjQ2cGMuLQykNPKD0lIoaQP+V8DqeIBe4E9WUB87tI0Y5uAjg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzBjL1wRszDyl; Tue, 11 Jun 2024 15:02:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45BF2Eau041814; Tue, 11 Jun 2024 15:02:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45BF2EQq041811; Tue, 11 Jun 2024 15:02:14 GMT (envelope-from git) Date: Tue, 11 Jun 2024 15:02:14 GMT Message-Id: <202406111502.45BF2EQq041811@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 0277c0c6f72a - main - ktrace(1): add more xrefs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0277c0c6f72a964bf0439db1f4558551052e4f3b Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=0277c0c6f72a964bf0439db1f4558551052e4f3b commit 0277c0c6f72a964bf0439db1f4558551052e4f3b Author: Ed Maste AuthorDate: 2024-06-11 00:31:08 +0000 Commit: Ed Maste CommitDate: 2024-06-11 15:02:00 +0000 ktrace(1): add more xrefs Following commit a87651e2ff18 add xrefs to intro(2) and sigaction(2), and use a consistent form. Suggested by: kib, arrowd Reviewed by: kib (earlier) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45555 --- usr.bin/ktrace/ktrace.1 | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/usr.bin/ktrace/ktrace.1 b/usr.bin/ktrace/ktrace.1 index 162706c65e6e..5cc6df52d69a 100644 --- a/usr.bin/ktrace/ktrace.1 +++ b/usr.bin/ktrace/ktrace.1 @@ -48,9 +48,13 @@ The utility enables kernel trace logging for the specified processes. Kernel trace data is logged to the file .Pa ktrace.out . -The kernel operations that are traced include system calls, -.Xr namei 9 -translations, signal processing, and +The kernel operations that are traced include system calls +.Pq see Xr intro 2 , +file system path lookups +.Pq Xr namei 9 , +signal processing +.Pq Xr sigaction 2 , +and .Tn I/O . .Pp Once tracing is enabled on a process, trace data will be logged until @@ -120,7 +124,9 @@ trace page faults trace .Tn I/O .It Cm n -trace namei translations +trace +.Xr namei 9 +translations .It Cm p trace capability check failures .It Cm s @@ -198,7 +204,9 @@ Disable tracing of all user-owned processes: .Xr dtrace 1 , .Xr kdump 1 , .Xr truss 1 , +.Xr intro 2 , .Xr ktrace 2 , +.Xr sigaction 2 , .Xr utrace 2 , .Xr capsicum 4 , .Xr namei 9 From nobody Tue Jun 11 16:38:49 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzDrn2Ltnz5MG8d; Tue, 11 Jun 2024 16:38:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzDrn1rM4z446Z; Tue, 11 Jun 2024 16:38:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718123929; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X38Vb9Ae8sBST2naD9Wco9gIujfwVLxCgIiq+wxDbZo=; b=Hr7WkmXiVI9aRZgD56QWohYV7jWfBPNyHshdTS+RitGDZ5aY5HBJe5djAY6XN3lHTpDpxg 8+4EAL7zyAQHyvYjsGkzgR6kz++EKmx0PybznKIelQ215JUkin6GWvdNnLeb5iAhjvBs+e +ExBtBERTHEftb/FMWcbeF5+k7USZqem0aD6sE/dxgGkHUgnhH5vyyC4R9WYoDUH5K10jb BTA/fqI79c4LPOFdyatGBdezhkx1myw/+Ef0ADB0Rbcc1L3Au3QpXzx1EkH+dECLLJq9TY WiYYa2JFBxYNzZ4aFW1rvc+srH2ze9IKNm8M5hPh7j90S5xL3W6XVisrjsCbxw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718123929; a=rsa-sha256; cv=none; b=uR4vV2goanb6NT4ovp15j/pobAGws4GfPm0KM5sXqTi2n7f2WyJv2DFPhMUk4NEs3r7BWr urgSeikNaFpSIaQKIXIHGaJwchtb540faEdjXB+oOHytp1Z79W63usPYOAbMWwOEt3arUw iy324MPNPH5/G7Nu0xjdpzenNf90lLlNtZ6x82Gy2SCmOFci4JyqCzjoTJijhk7YrDmlg5 y533GLUkKcDHHx1wPTLnRKFK5xJQBGZW+QOzFYKvJGxGDUavb2D1s6bSGM0tNt6h2pGqkt oIYCtdTiEwFpwBSNBeAsuMNUI+OEijp3vYToJYRN1l+817WoID0jMoHm4m0/eA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718123929; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X38Vb9Ae8sBST2naD9Wco9gIujfwVLxCgIiq+wxDbZo=; b=u7Uvm0ezwDUx2EcsmrWQdpx4yUX9rhEkPp2IQkTRyRKneRB1NmGmgXws8mqu+fxHNkLwOA IPUVceEqlIsP6qSy0Ft0Sn/qj/hudP8jVSnm5Ue2MQY/5BHFf+SkIPZhNw/QbjLOIobsjU XXQyhg5uMpWHPyzjfTT/ZBw0fiiS1n9KTHKNKDXk4IpIRJFF3JyCS3O53iR9uBqOMr5+Fn 7LUqvlrKox94UcRbg4VsHsR/KuaLva3anQL0fBgzfAfQVjX/hCV/m8FfeZGBY1ZNKJGiNc ayMN3d9bpPtSxgi2ffKMWKlPWct1QV6zQ4BlI+rkgQHX6Y/Wqpt/Ji1Rt+ijkQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzDrn1KCHzHBX; Tue, 11 Jun 2024 16:38:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45BGcnYx099473; Tue, 11 Jun 2024 16:38:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45BGcnhX099470; Tue, 11 Jun 2024 16:38:49 GMT (envelope-from git) Date: Tue, 11 Jun 2024 16:38:49 GMT Message-Id: <202406111638.45BGcnhX099470@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: dd0e5c02ab13 - main - swap_pager: small improvement to find_least List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dd0e5c02ab13b9eb240d42a71a8f41a8b036bd33 Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=dd0e5c02ab13b9eb240d42a71a8f41a8b036bd33 commit dd0e5c02ab13b9eb240d42a71a8f41a8b036bd33 Author: Doug Moore AuthorDate: 2024-06-11 16:36:23 +0000 Commit: Doug Moore CommitDate: 2024-06-11 16:36:23 +0000 swap_pager: small improvement to find_least Drop an unneeded test, a branch and a needless computation to save a few instructions. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D45558 --- sys/vm/swap_pager.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index a07a38481490..15f227457bba 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -2289,22 +2289,17 @@ swap_pager_find_least(vm_object_t object, vm_pindex_t pindex) VM_OBJECT_ASSERT_LOCKED(object); MPASS((object->flags & OBJ_SWAP) != 0); - if (pctrie_is_empty(&object->un_pager.swp.swp_blks)) - return (object->size); sb = SWAP_PCTRIE_LOOKUP_GE(&object->un_pager.swp.swp_blks, rounddown(pindex, SWAP_META_PAGES)); if (sb == NULL) return (object->size); - if (sb->p < pindex) { - for (i = pindex % SWAP_META_PAGES; i < SWAP_META_PAGES; i++) { - if (sb->d[i] != SWAPBLK_NONE) - return (sb->p + i); - } - sb = SWAP_PCTRIE_LOOKUP_GE(&object->un_pager.swp.swp_blks, - roundup(pindex, SWAP_META_PAGES)); - if (sb == NULL) - return (object->size); + for (i = pindex - sb->p; i < SWAP_META_PAGES; i++) { + if (sb->d[i] != SWAPBLK_NONE) + return (sb->p + i); } + sb = SWAP_PCTRIE_LOOKUP_GE(&object->un_pager.swp.swp_blks, pindex); + if (sb == NULL) + return (object->size); for (i = 0; i < SWAP_META_PAGES; i++) { if (sb->d[i] != SWAPBLK_NONE) return (sb->p + i); @@ -2314,7 +2309,7 @@ swap_pager_find_least(vm_object_t object, vm_pindex_t pindex) * We get here if a swblk is present in the trie but it * doesn't map any blocks. */ - MPASS(0); + __unreachable(); return (object->size); } From nobody Tue Jun 11 16:43:25 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzDy53wVHz5MGq1; Tue, 11 Jun 2024 16:43:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzDy536Trz44Zv; Tue, 11 Jun 2024 16:43:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718124205; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+/op6jWVFt1MhhWmh0Kb+C0PO+NsZF3GQudXgYFRock=; b=bvkSI30x6yBnXIJuPYAZxkkGGmBl+jhx+4IXRfHSihWB9RtatsAKnELJC2YdFosX2LRMOm 12nVgM5TsUaVLqPW4V/MZ3sDUFO+2R3bggUvyjhDkEelxTJ3/4m6kBJ+t4gktQzSUTLLAD DSbBtGWNgI16q/d4FyXfhGP3zHo8THCyx/OJNZ09LiqWtVc9sv34FobXa4AVn+6AL9A+SZ JwBAE/71eBb6pvsJnta8VV8lEwut8BXjYOqv0hGUZfHSoDwY9nVPocmk2h/d+NQogAhwf8 HuWZ+b8bV3jrXm9Sjc+sgJUoN9S3Ln4hIZOWFgJqK3Oqd4MQpl8/zORJci34lg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718124205; a=rsa-sha256; cv=none; b=UpO+Uqu16nOfZw+sstTJAdPA7O76lMMWq80Iue9Z40SSPaQni1BhmqDIBgK0AEkpoGk+Uo XIdkHJY5LJi5+S266kpgKYmSw4A1N52sd5WNnQw+fC/PkSIhytf9ckTqI0qLF82cwNI6Ts i1v/bNR4ewx3LZFE4oFUVAQtjA7mrrQlUgE3tcGh9Iy1RUeAnTNeVE0TByqV7fIlw4TtTU 56/Qb5mV3hSALw+2UjsLNPh0u4w5phwG7SsjykmUITETZseAwzkSpyLCq8QIZNhOOIphWs q6qYnPVlQaku9as8eLIRASibnrDYIyLAjEEwnGK3/a6gbTHK2b8hs4wUA9vkzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718124205; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+/op6jWVFt1MhhWmh0Kb+C0PO+NsZF3GQudXgYFRock=; b=BThHlTVcdmj3jR8A+QF6bAhszuUDgvPGx+sOBRVGBaotO8SZF3Y5kTO+aL/3D7ajq86H6o yPRpWFamJiD66U5fILDUZmQvr7Nr0nwPr4y6noFGiF7TI4Wrd8Y8ob72h1V0tLFX5vovz6 dKxI7pyDAVumWlnsv4H/zcRS4rxtD0wBajtqij+cRqM2NrB3uPsp6g9qAAL5jW12qgM8Jg rdGpPPoMGtnx+VMXyD0UdX8G+m8mhS7Thr8IaB21izATVETDNS8PsX/EvDgFWf7E1RMRi3 dsVpPNuIUYHqYG67q43ACCAudH4bG64gQBRukseNqjktcm36g+RYUD92cWHzew== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzDy52g2jzHC5; Tue, 11 Jun 2024 16:43:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45BGhPPw015232; Tue, 11 Jun 2024 16:43:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45BGhP3k015229; Tue, 11 Jun 2024 16:43:25 GMT (envelope-from git) Date: Tue, 11 Jun 2024 16:43:25 GMT Message-Id: <202406111643.45BGhP3k015229@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 703768a23590 - main - mx25l.4: Document the correct disk device path List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 703768a23590d8faf65b0f16dd395248ff7273f6 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=703768a23590d8faf65b0f16dd395248ff7273f6 commit 703768a23590d8faf65b0f16dd395248ff7273f6 Author: Jessica Clarke AuthorDate: 2024-06-11 16:43:18 +0000 Commit: Jessica Clarke CommitDate: 2024-06-11 16:43:18 +0000 mx25l.4: Document the correct disk device path This was true at time of commit, but the path was changed 2 weeks later to just be the /dev/flash/spiN name, without updating the manpage. Reported by: David Gilbert Fixes: 68dd77957786 ("Give the mx25l device sole ownership of the name /dev/flash/spi* ...") MFC after: 1 week --- share/man/man4/mx25l.4 | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/share/man/man4/mx25l.4 b/share/man/man4/mx25l.4 index ff2e78a8c5aa..5dffdebcf43e 100644 --- a/share/man/man4/mx25l.4 +++ b/share/man/man4/mx25l.4 @@ -22,7 +22,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd February 26, 2019 +.Dd June 11, 2024 .Dt MX25L 4 .Os .Sh NAME @@ -60,7 +60,7 @@ such as block size, sector size, and device capacity. When a supported device is found, the .Nm driver creates a disk device and makes it accessible at -.Pa /dev/flash/mx25l? . +.Pa /dev/flash/spi? . The new disk device is then tasted by the available .Xr geom 4 modules as with any disk device. @@ -189,13 +189,9 @@ Set the high bit (1 << 31) to invert the logic level of the chip select line. The SPI mode (0-3) to use when communicating with this device. .El .Sh FILES -.Bl -tag -width /dev/flash/mx25l? -.It Pa /dev/flash/mx25l? -Provides read/write access to the storage device. +.Bl -tag -width /dev/flash/spi? .It Pa /dev/flash/spi? -An alias for the -.Pa /dev/mx25l? -device, for backwards compatibility with older versions of the driver. +Provides read/write access to the storage device. .El .Sh SEE ALSO .Xr fdt 4 , From nobody Wed Jun 12 00:30:35 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzRK74YqMz5NKtm; Wed, 12 Jun 2024 00:30:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzRK742sgz4mbH; Wed, 12 Jun 2024 00:30:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718152235; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JRKbVD3dQ3xNwFCOc2SI/cRJwrYAE6F6g06U4wWX6bE=; b=M6cjWxodRcSkcUQPKBet0K5elqxhKjo1s2GN6LhuAKzXzMI3xlBP4+/NEg2Bf1DKKsTian PWf/RVv4QNdk3Mp8TZgqCGrMx2mINIQ63FlpOaqUXMvJDZgWrzAq/EwYNZOKHe2YNEuACt l0BkxhZSMQ+TN2pMIlEiK8b9fEKAevkLag7hLnPiAHtOHW27KOYCcCy9ZIGpfg2BaURKar hBv/WH8JKIEQeGX+oXSHm41VjhY0N3cuhGJt/JgUJtVhBfohneTP6MUpUtilBC0V0Ns44U VG2cZgtCoTW+iKXt0oZWhS/BSsboE4XSdk4IUgiRXGp8oU4DYoWyXNHZjk0IEA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718152235; a=rsa-sha256; cv=none; b=icwCMPwa3tResbhvzcGOiPXvHGIepGiyk932pDqnt0tbsbWSDywno9owAsWeotF/gmTHuZ 2OCaMgCLtu0wmAbtLMtWmzgoexJdCzCC7P5pghLJOA1q2Wb5vHuzqtPx1FClDOQj5QA5JM 1zjHl2JYS/KVAAXnr+vP8FxyLkZLAkIv+raKPKpInmyDIj6E8XRBB4/CVrg7v8Uxg2Hdtm fxhvS7mlrTR2+sxHGorq8+O97M1W6EOBLv04kHwI480V0N3ycsGaW7sPEu1E18+aOfuAor EmJJ8d4vc5QZgeeFgX2T16EM1pA7zEVCry3M5IA4MXgc9xQ+hTcmws8Cam0p9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718152235; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JRKbVD3dQ3xNwFCOc2SI/cRJwrYAE6F6g06U4wWX6bE=; b=cWxOLcx849TDze3iNEH4/TO1TlJc4Z+P7ntvie8KYi2LDLD8lpXknrozBmiZJ4qmyDeDiQ c8IKPBAnaKu8Jyttc0fcBw8E/9Weg1H7AGBJ4ZSgSMh5NDlr07U4Mw8mnbk+sgCiNoPn3S 2AVqcdUDMj4gYkr/6Fl0otXW53A3gZRyMTFeAcbvVbjcV4kDTGhxZ01nN1gTR50j4hdOUv IhoKjAQ9c6DoVdwwZoy6Eyq2HefGvGDPQvjr5ouQab47g5MNh2Bpz+ppB2ns+dvJQ6REC3 NhF9/SzROXZTSn/1F25SycWiIwifACi9JDT4WB/bDJIpiOd6hzoZT/gEtWgfjg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzRK73dg3zX5X; Wed, 12 Jun 2024 00:30:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45C0UZw1001789; Wed, 12 Jun 2024 00:30:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45C0UZ2Q001786; Wed, 12 Jun 2024 00:30:35 GMT (envelope-from git) Date: Wed, 12 Jun 2024 00:30:35 GMT Message-Id: <202406120030.45C0UZ2Q001786@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 92927b8bcf51 - main - msun: update Clang bug reference in fma test List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 92927b8bcf51dcbcf99d633c1b3cab3cab2373ac Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=92927b8bcf51dcbcf99d633c1b3cab3cab2373ac commit 92927b8bcf51dcbcf99d633c1b3cab3cab2373ac Author: Ed Maste AuthorDate: 2024-06-12 00:23:44 +0000 Commit: Ed Maste CommitDate: 2024-06-12 00:29:27 +0000 msun: update Clang bug reference in fma test LLVM bugzilla bug 8100 became issue #8472 with the migration to GitHub. https://github.com/llvm/llvm-project/issues/8472 --- lib/msun/src/s_fma.c | 4 ++-- lib/msun/src/s_fmal.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/msun/src/s_fma.c b/lib/msun/src/s_fma.c index 4d08b40cc71a..686e80e66f5d 100644 --- a/lib/msun/src/s_fma.c +++ b/lib/msun/src/s_fma.c @@ -244,7 +244,7 @@ fma(double x, double y, double z) zs = copysign(DBL_MIN, zs); fesetround(FE_TONEAREST); - /* work around clang bug 8100 */ + /* work around clang issue #8472 */ volatile double vxs = xs; /* @@ -278,7 +278,7 @@ fma(double x, double y, double z) * rounding modes. */ fesetround(oround); - /* work around clang bug 8100 */ + /* work around clang issue #8472 */ volatile double vrlo = r.lo; adj = vrlo + xy.lo; return (ldexp(r.hi + adj, spread)); diff --git a/lib/msun/src/s_fmal.c b/lib/msun/src/s_fmal.c index 12f9c364670b..a53d85f5ca57 100644 --- a/lib/msun/src/s_fmal.c +++ b/lib/msun/src/s_fmal.c @@ -225,7 +225,7 @@ fmal(long double x, long double y, long double z) zs = copysignl(LDBL_MIN, zs); fesetround(FE_TONEAREST); - /* work around clang bug 8100 */ + /* work around clang issue #8472 */ volatile long double vxs = xs; /* @@ -259,7 +259,7 @@ fmal(long double x, long double y, long double z) * rounding modes. */ fesetround(oround); - /* work around clang bug 8100 */ + /* work around clang issue #8472 */ volatile long double vrlo = r.lo; adj = vrlo + xy.lo; return (ldexpl(r.hi + adj, spread)); From nobody Wed Jun 12 01:38:25 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzSqP2Tc4z5NQm9; Wed, 12 Jun 2024 01:38:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzSqP1psyz4rlk; Wed, 12 Jun 2024 01:38:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718156305; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z5ZUCawdiz1kakdn1ERbDsO5LDDF/haEmFK/zuDPAMM=; b=bAIjXrhqKJRQoE7/fpb6UCXIhr2z4Z733IiQGL5KkYzLgvhuqjYTYlMHr1WLvyMzPDVwpq o1BYFK2c7wEszqlhJULLfmh4Zor70t9y2N6V4J4ytKDvAQ75ClUgjilXGzL5ubYHRDGNWs Bu5GeC+YGOh8wl+4W/7dGCaHG3bx1D0o03iwLwYEEnRutCX5QcIBWG7mE7ul7xnH8BEeK6 JiuCxJG9q3hXGWeEBwYbHjRP5DlvEtCnq7qimeg/NqnsR9gA17mZHsGYf5FBz5OMd2Oydj FtlxaNMNQOQW2Av2oHwY+t1/yn9XumXtuafbhOFW8qiCyqdIL8IC4GR6/454VA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718156305; a=rsa-sha256; cv=none; b=iOaTvudMez8tJrwIC2VMCu/e8WCHYHyltTug0lxVvXpfz4HdhWPHQKrW6BejnuaqmQsXmA TQvsmioTZWZk8kbMqrNfNMW0i/TiYQ1Fm8qomjFCExYxRS9/77vbgKnUlE0vgzGGhjYPEo tyodO7YVeGavAaqDBsUWsRVCveopZNMRoGkWoOm6eJs+CdZa+XblwQvCmpOHcHQh0K11hL tBwBiCVjbsq5Z2iYUMKm99npGy1vecb3Le/7/wZ5WdE1HmyoLQuaanZSd5SfvMWZavYoX8 nbEVRW42c5GL0h2qQ2Eg9g0FyIs+f7u5G4Ui1N/DAwNqn/phIAyyo0CZ98vp6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718156305; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z5ZUCawdiz1kakdn1ERbDsO5LDDF/haEmFK/zuDPAMM=; b=EeAdIIy4/hfegMTm4F+MWVga0kMJ1s3kfG/GOnsTBgmEjGkMbG62eJ6IuR4Uo2cOxq88Fv cYuQ9hUKonnBfH/2OVb/IhlpPcNVs/n8Eimr11th+XOFlHiMR9xW1oZJw5kN6RdmVfOweW zkiB9K8EgNONcxVbSf+JzUbpcyjukuiGXlx9m+btpkmJMTCeibh6EPtN32Qfy4a9j+Ms85 qEuMhVkWG7tJh2xLLD+PefWZSf2Z51rVYruyGfxHyj/B9TF7OxAJc3kY7Dym0AFbyx9GkM DHMSuPTlmSita5peFpiOYmZgznXRecFH6M6GRGNmCGgDG7cf121FKrTWNVV2Vg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzSqP1PrkzYrb; Wed, 12 Jun 2024 01:38:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45C1cPYW009738; Wed, 12 Jun 2024 01:38:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45C1cPvs009735; Wed, 12 Jun 2024 01:38:25 GMT (envelope-from git) Date: Wed, 12 Jun 2024 01:38:25 GMT Message-Id: <202406120138.45C1cPvs009735@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: e77ad954bb82 - main - Revert "libm: fma: correct zero sign with small inputs" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e77ad954bb825983b4346b9cc646c9c910b1be24 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=e77ad954bb825983b4346b9cc646c9c910b1be24 commit e77ad954bb825983b4346b9cc646c9c910b1be24 Author: Ed Maste AuthorDate: 2024-06-12 01:34:02 +0000 Commit: Ed Maste CommitDate: 2024-06-12 01:36:12 +0000 Revert "libm: fma: correct zero sign with small inputs" This change introduced a test failure, so revert until that can be addressed. This reverts commit 888796ade2842486d3167067e8034254c38aadd3. PR: 277783 Reported by: rlibby Sponsored by: The FreeBSD Foundation --- lib/msun/src/s_fma.c | 4 +--- lib/msun/src/s_fmal.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/msun/src/s_fma.c b/lib/msun/src/s_fma.c index 686e80e66f5d..16902d321290 100644 --- a/lib/msun/src/s_fma.c +++ b/lib/msun/src/s_fma.c @@ -267,9 +267,7 @@ fma(double x, double y, double z) */ fesetround(oround); volatile double vzs = zs; /* XXX gcc CSE bug workaround */ - xs = ldexp(xy.lo, spread); - xy.hi += vzs; - return (xy.hi == 0 ? xs : xy.hi + xs); + return (xy.hi + vzs + ldexp(xy.lo, spread)); } if (oround != FE_TONEAREST) { diff --git a/lib/msun/src/s_fmal.c b/lib/msun/src/s_fmal.c index a53d85f5ca57..9d08bc72e12e 100644 --- a/lib/msun/src/s_fmal.c +++ b/lib/msun/src/s_fmal.c @@ -248,9 +248,7 @@ fmal(long double x, long double y, long double z) */ fesetround(oround); volatile long double vzs = zs; /* XXX gcc CSE bug workaround */ - xs = ldexpl(xy.lo, spread); - xy.hi += vzs; - return (xy.hi == 0 ? xs : xy.hi + xs); + return (xy.hi + vzs + ldexpl(xy.lo, spread)); } if (oround != FE_TONEAREST) { From nobody Wed Jun 12 02:00:18 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzTJw3nhjz5NScb; Wed, 12 Jun 2024 02:00:32 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io1-f49.google.com (mail-io1-f49.google.com [209.85.166.49]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzTJv4tXYz4vHW; Wed, 12 Jun 2024 02:00:31 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=freebsd.org (policy=none); spf=pass (mx1.freebsd.org: domain of carpeddiem@gmail.com designates 209.85.166.49 as permitted sender) smtp.mailfrom=carpeddiem@gmail.com Received: by mail-io1-f49.google.com with SMTP id ca18e2360f4ac-7eb6b1045f7so158971439f.3; Tue, 11 Jun 2024 19:00:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718157630; x=1718762430; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=adkH3B0P351fOCjwxemGWGrfCjIGNVmlsfWIbs7ua44=; b=Tvjx6qH0n87ENacRRxFPcKPNqpNxHJbfYESzk0KDnstB5VpWaXIEr/qSG7znbLej1G QZivKFYLTNPN5q6dZmllzVO3sVMLIOvycMKLhSXAlzUyF/z34cGu+0xh1HiStNRdWdyf l2Bx7k9yP+fiN924crtIJfkIxnlhJxq7CQ2S+hoqew0rSnHOwVF4RGivir61wJ2FTyNw RUwZM4ZonEDHqOYmDBl3XhNdIKDaN3vHzu5CKXVwaXfLW2i5z6u1yY17sDpuvADKLIPn GM46j1ww6TTVabxBIgdReYDiXc+LkFp8ktWnL6qvqxtU7cyeIxHTF5huWziAkSZo2NAz rHtQ== X-Forwarded-Encrypted: i=1; AJvYcCUKXWgW1HxjQeAwi7E/f0tHSuS4i4qowLwgZfrltPdlsdEO1iG5LKf0KbbIaqYZS+qjD0K8/tUzDp9jVGeHOLhoZfvHrcFRkzYyaU3lF/bQs5ZN7mm59qQ85s+4HliOnHF1aCFyvs/mYihLkbmL31GHZ9VKEIh1ct1J23GRLg6lyDfNx4MUkJmPOVP3Ri0= X-Gm-Message-State: AOJu0YxyVuFfqf7GYGQTJmDMrXrTuCZiQvE92debVFcWWg9Pj7pWcFOj rzk7QpPaSyBJ4OFeI9oA63VS4Alx4Hc3qW23SIKJkNlWkEE4lDcdBKIrAmRGcrO+n5jsJrMyLD6 24/S1QOK6RteHJ+/X8F1kLJ/SoX2lDQ== X-Google-Smtp-Source: AGHT+IFHnY/MmykvcAp/K70fUxb6B+vGwCoRtgpuw+rtPAi220Tx2ZstXCgeM61dK9T8DLJeLpEgd03kA2dq3nTixJg= X-Received: by 2002:a05:6602:14d4:b0:7eb:7df7:45fd with SMTP id ca18e2360f4ac-7ebcd1a1f5amr74923539f.21.1718157629719; Tue, 11 Jun 2024 19:00:29 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <202406081556.458FuJYN022360@gitrepo.freebsd.org> In-Reply-To: From: Ed Maste Date: Tue, 11 Jun 2024 22:00:18 -0400 Message-ID: Subject: Re: git: 888796ade284 - main - libm: fma: correct zero sign with small inputs To: Ryan Libby Cc: kargl@freebsd.org, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, Steve Kargl Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.89 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.995]; NEURAL_HAM_MEDIUM(-0.99)[-0.994]; FORGED_SENDER(0.30)[emaste@freebsd.org,carpeddiem@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), No valid DKIM,none]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_TO(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; ARC_NA(0.00)[]; FREEMAIL_CC(0.00)[freebsd.org,comcast.net]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+]; FROM_HAS_DN(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; RCVD_IN_DNSWL_NONE(0.00)[209.85.166.49:from]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_NEQ_ENVFROM(0.00)[emaste@freebsd.org,carpeddiem@gmail.com]; MISSING_XM_UA(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.166.49:from]; FREEFALL_USER(0.00)[carpeddiem]; RCPT_COUNT_FIVE(0.00)[6] X-Rspamd-Queue-Id: 4VzTJv4tXYz4vHW On Mon, 10 Jun 2024 at 19:31, Ryan Libby wrote: > > On Sat, Jun 8, 2024 at 8:56=E2=80=AFAM Ed Maste wrot= e: > > > > The branch main has been updated by emaste: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D888796ade2842486d3167067= e8034254c38aadd3 > > > > commit 888796ade2842486d3167067e8034254c38aadd3 > > Author: Ed Maste > > AuthorDate: 2024-03-19 14:31:39 +0000 > > Commit: Ed Maste > > CommitDate: 2024-06-08 15:55:36 +0000 > > > > ... > This seems to have caused the lib/msun/fma_tests:zeroes test to fail in > the FE_ROUNDDOWN mode on amd64, now finding 0 while expecting -0. I > don't know if the test is wrong or too strict, or if the new result is > wrong. Thanks - I have reverted the change for now to avoid leaving a failing test (even if it's actually the test at fault). I'll recommit it after the test situation is resolved. From nobody Wed Jun 12 03:23:53 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzW9M3V6kz5NZJg; Wed, 12 Jun 2024 03:24:07 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzW9K5hHnz43dc; Wed, 12 Jun 2024 03:24:05 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none); spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 45C3NrdC017309; Wed, 12 Jun 2024 06:23:56 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 45C3NrdC017309 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 45C3NraR017308; Wed, 12 Jun 2024 06:23:53 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 12 Jun 2024 06:23:53 +0300 From: Konstantin Belousov To: Kyle Evans Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 6e824f371301 - main - time: siginfo_recvd needs to be marked volatile Message-ID: References: <202405220537.44M5bugu007292@gitrepo.freebsd.org> <58e93be2-d0bc-403c-8aaf-6d3f5e0dd069@FreeBSD.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <58e93be2-d0bc-403c-8aaf-6d3f5e0dd069@FreeBSD.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on tom.home X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.80 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.80)[-0.801]; MIME_GOOD(-0.10)[text/plain]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none]; ARC_NA(0.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; MIME_TRACE(0.00)[0:+]; MISSING_XM_UA(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; HAS_XAW(0.00)[]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_THREE(0.00)[4] X-Rspamd-Queue-Id: 4VzW9K5hHnz43dc On Mon, Jun 10, 2024 at 10:13:45PM -0500, Kyle Evans wrote: > On 5/31/24 14:52, Konstantin Belousov wrote: > > On Wed, May 22, 2024 at 05:37:56AM +0000, Kyle Evans wrote: > > > The branch main has been updated by kevans: > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=6e824f3713011f7955a4f88fb16445e8e2cbe72c > > > > > > commit 6e824f3713011f7955a4f88fb16445e8e2cbe72c > > > Author: Kyle Evans > > > AuthorDate: 2024-05-22 05:36:29 +0000 > > > Commit: Kyle Evans > > > CommitDate: 2024-05-22 05:37:41 +0000 > > > > > > time: siginfo_recvd needs to be marked volatile > > I do not think so. It happens to work with the compilers we currently use. > > > > Sorry, I meant to respond but it got lost somewhere in the stack. Can you > expand on this specifically a bit more? I was under the impression that > we'd generally need volatility due to write from SIGINFO handler / read > repeatedly from main(), which serves to demonstrate my ignorance here. Is > it that there are sufficient side-effect-y things between loads in the > wait4() loop that the compiler won't do anything hinky, or more that it's > insufficient and should have been fenced as well? Signal fence is provided by standard explicitly to handle the interaction between signal handler and 'main' code. On the other hand, description of the volatile semantic is vague and references possible side effects caused by something not known to the compiler, like memory-mapped device state. It happens that both gcc and clang effectively implement volatile accesses as relaxed atomics loads and stores. This is enough to ensure that the loop you wrote correctly interacts with the signal handler you wrote. But it is compiler-depended. It might be interesting to read gcc documentation about its implementation- dependent semantic of volaties, 'C implementation defined behavior-> Qualifiers' in the texinfo doc. > > > > sig_atomic_t does not imply volatility, we must do it ourselves to avoid > > > caching of siginfo_recvd loads. > > For this purpose, standard provides atomic_signal_fence(). > > > > You would need to put it before read of siginfo_recvd (after wait4()), and > > after update of siginfo_recvd in the signal handler. From nobody Wed Jun 12 03:54:50 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzWrp2qjRz5Ncdt; Wed, 12 Jun 2024 03:54:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzWrp1rr4z468T; Wed, 12 Jun 2024 03:54:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718164490; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tX3lQ2WVcoB51bfG1ngqHvWsxHtQqnYlnrB8i8V7mLw=; b=Fp14KfoHDf+P9hgI2ffMgwkcR8/3kjHneIE86eDq/Hj8c+f2UZLP1Bh8f9pcyW6SJHfUzR 8SAF0pgsZjaHfnJksJVKL9/WmD9rX4iA/sTHKiSM1dopBKIQy5X7w2hxM3hGynCjgZ1Ic9 UgwwGLJ+PuXWr0K2+BQT4a4oOlTzZdQc/Fdg4u1kYRIQBN+qfYQYABDyQsSRNY5Jv0CDwy qGNnS3W/mfSsDEiVaZdFPFqSQnDFitc7qnSFWtyjRH9ciMq4o1rSS/oleAfIgQJtiu4EoO R07D2QPNRX+n5e9N8JmRc0T+ElBr5JYMFPQeO3DIZjdscWa6SKTkbQdXZ/Aggg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718164490; a=rsa-sha256; cv=none; b=XmDF38f7yPSSS5twWrnB18ONFlqY6gUp50mfaMpsDk4ElpyqW7xwAOa8ATvhOpuljB2AIv NEm8HHHylHwE1m0/+B0ZxztEL16/se5UIkWqDsVbnihLCDROHsTtLPiLbQ/JavGu1Pcz5M bmYd6wWvIggtIeqy8smTOpYre9zfpdggf7OXrpPt7rv50fwbl6lcWUB7O01AZ41Ybk9h8q YqxmdZw9cp3rqCA9tJrZ00J8Jpapkl4JXJWQlk2ddldETI/rVU5e+cIVSCL6oIkgvQsAn9 OjRugOpw+ucKca3LUCJoi4alHg2T20KG6WwMkqTWpxSMRTPdS2YzxEC6IvynEA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718164490; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tX3lQ2WVcoB51bfG1ngqHvWsxHtQqnYlnrB8i8V7mLw=; b=ZUb/bUeudWfleyOXXFdQb53jfWwd14NoVB6gb8B+c8b82m2kNJkv8mMyvpiYkLQK+a8DCi FWI+hJNqodWAzUa7olCuyXcJFu8PUi+TaSr2fYPd/at5P0k/8S/nMC+kbl7ciwgi7RW15d L2RFLoCj0c0FSW+LQmMRhopL0wIxCwWi5O2zjHyjWds007gAfWJyoxdIm741H8+bbF8WgI Wacyq2fqso1z8gsXLBBMhY41Ld75AEc2aSGQ1tqNcDq4cZY3YmU9poBzrOtrH3GsmynYvT D30CsgM7jxWaP5tFdwGMwUssidsCX//2gfcqOOrRqmFgyiKX7WaSomJluOsEaA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzWrp13DczdPL; Wed, 12 Jun 2024 03:54:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45C3sor1047138; Wed, 12 Jun 2024 03:54:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45C3soYJ047136; Wed, 12 Jun 2024 03:54:50 GMT (envelope-from git) Date: Wed, 12 Jun 2024 03:54:50 GMT Message-Id: <202406120354.45C3soYJ047136@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: a880104a21bf - main - swap_pager: add new page range struct List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a880104a21bf41ebbb4ead26e6d4adda32bad76c Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=a880104a21bf41ebbb4ead26e6d4adda32bad76c commit a880104a21bf41ebbb4ead26e6d4adda32bad76c Author: Doug Moore AuthorDate: 2024-06-12 03:51:40 +0000 Commit: Doug Moore CommitDate: 2024-06-12 03:54:39 +0000 swap_pager: add new page range struct Define a page_range struct to pair up the two values passed to freerange functions. Have swp_pager_freeswapspace also take a page_range argument rather than a pair of arguments. In swp_pager_meta_free_all, drop a needless test and use a new helper function to do the cleanup for each swap block. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D45562 --- sys/vm/swap_pager.c | 99 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 56 insertions(+), 43 deletions(-) diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index 15f227457bba..3bfda3eea169 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -142,6 +142,15 @@ struct swblk { daddr_t d[SWAP_META_PAGES]; }; +/* + * A page_range structure records the start address and length of a sequence of + * mapped page addresses. + */ +struct page_range { + daddr_t start; + daddr_t num; +}; + static MALLOC_DEFINE(M_VMPGDATA, "vm_pgdata", "swap pager private data"); static struct mtx sw_dev_mtx; static TAILQ_HEAD(, swdevt) swtailq = TAILQ_HEAD_INITIALIZER(swtailq); @@ -471,7 +480,7 @@ static int swapoff_one(struct swdevt *sp, struct ucred *cred, /* * Swap bitmap functions */ -static void swp_pager_freeswapspace(daddr_t blk, daddr_t npages); +static void swp_pager_freeswapspace(const struct page_range *range); static daddr_t swp_pager_getswapspace(int *npages); /* @@ -486,23 +495,21 @@ static void swp_pager_meta_free_all(vm_object_t); static daddr_t swp_pager_meta_lookup(vm_object_t, vm_pindex_t); static void -swp_pager_init_freerange(daddr_t *start, daddr_t *num) +swp_pager_init_freerange(struct page_range *range) { - - *start = SWAPBLK_NONE; - *num = 0; + range->start = SWAPBLK_NONE; + range->num = 0; } static void -swp_pager_update_freerange(daddr_t *start, daddr_t *num, daddr_t addr) +swp_pager_update_freerange(struct page_range *range, daddr_t addr) { - - if (*start + *num == addr) { - (*num)++; + if (range->start + range->num == addr) { + range->num++; } else { - swp_pager_freeswapspace(*start, *num); - *start = addr; - *num = 1; + swp_pager_freeswapspace(range); + range->start = addr; + range->num = 1; } } @@ -906,10 +913,13 @@ swp_pager_strategy(struct buf *bp) * This routine may not sleep. */ static void -swp_pager_freeswapspace(daddr_t blk, daddr_t npages) +swp_pager_freeswapspace(const struct page_range *range) { + daddr_t blk, npages; struct swdevt *sp; + blk = range->start; + npages = range->num; if (npages == 0) return; mtx_lock(&sw_dev_mtx); @@ -1004,11 +1014,12 @@ swap_pager_freespace_pgo(vm_object_t object, vm_pindex_t start, vm_size_t size) int swap_pager_reserve(vm_object_t object, vm_pindex_t start, vm_pindex_t size) { - daddr_t addr, blk, n_free, s_free; + struct page_range range; + daddr_t addr, blk; vm_pindex_t i, j; int n; - swp_pager_init_freerange(&s_free, &n_free); + swp_pager_init_freerange(&range); VM_OBJECT_WLOCK(object); for (i = 0; i < size; i += n) { n = MIN(size - i, INT_MAX); @@ -1022,11 +1033,10 @@ swap_pager_reserve(vm_object_t object, vm_pindex_t start, vm_pindex_t size) addr = swp_pager_meta_build(object, start + i + j, blk + j); if (addr != SWAPBLK_NONE) - swp_pager_update_freerange(&s_free, &n_free, - addr); + swp_pager_update_freerange(&range, addr); } } - swp_pager_freeswapspace(s_free, n_free); + swp_pager_freeswapspace(&range); VM_OBJECT_WUNLOCK(object); return (0); } @@ -1195,6 +1205,7 @@ swap_pager_haspage(vm_object_t object, vm_pindex_t pindex, int *before, static void swap_pager_unswapped(vm_page_t m) { + struct page_range range; struct swblk *sb; vm_object_t obj; @@ -1233,9 +1244,11 @@ swap_pager_unswapped(vm_page_t m) rounddown(m->pindex, SWAP_META_PAGES)); if (sb == NULL) return; - if (sb->d[m->pindex % SWAP_META_PAGES] == SWAPBLK_NONE) + range.start = sb->d[m->pindex % SWAP_META_PAGES]; + if (range.start == SWAPBLK_NONE) return; - swp_pager_freeswapspace(sb->d[m->pindex % SWAP_META_PAGES], 1); + range.num = 1; + swp_pager_freeswapspace(&range); sb->d[m->pindex % SWAP_META_PAGES] = SWAPBLK_NONE; swp_pager_free_empty_swblk(m->object, sb); } @@ -1480,8 +1493,9 @@ static void swap_pager_putpages(vm_object_t object, vm_page_t *ma, int count, int flags, int *rtvals) { + struct page_range range; struct buf *bp; - daddr_t addr, blk, n_free, s_free; + daddr_t addr, blk; vm_page_t mreq; int i, j, n; bool async; @@ -1492,7 +1506,7 @@ swap_pager_putpages(vm_object_t object, vm_page_t *ma, int count, VM_OBJECT_WUNLOCK(object); async = curproc == pageproc && (flags & VM_PAGER_PUT_SYNC) == 0; - swp_pager_init_freerange(&s_free, &n_free); + swp_pager_init_freerange(&range); /* * Assign swap blocks and issue I/O. We reallocate swap on the fly. @@ -1530,8 +1544,7 @@ swap_pager_putpages(vm_object_t object, vm_page_t *ma, int count, addr = swp_pager_meta_build(mreq->object, mreq->pindex, blk + j); if (addr != SWAPBLK_NONE) - swp_pager_update_freerange(&s_free, &n_free, - addr); + swp_pager_update_freerange(&range, addr); MPASS(mreq->dirty == VM_PAGE_BITS_ALL); mreq->oflags |= VPO_SWAPINPROG; } @@ -1603,7 +1616,7 @@ swap_pager_putpages(vm_object_t object, vm_page_t *ma, int count, */ swp_pager_async_iodone(bp); } - swp_pager_freeswapspace(s_free, n_free); + swp_pager_freeswapspace(&range); VM_OBJECT_WLOCK(object); } @@ -2131,9 +2144,9 @@ static void swp_pager_meta_transfer(vm_object_t srcobject, vm_object_t dstobject, vm_pindex_t pindex, vm_pindex_t count, vm_size_t *moved) { + struct page_range range; struct swblk *sb; vm_page_t m; - daddr_t n_free, s_free; vm_pindex_t offset, last; vm_size_t mc; int i, limit, start; @@ -2146,7 +2159,7 @@ swp_pager_meta_transfer(vm_object_t srcobject, vm_object_t dstobject, if (count == 0 || pctrie_is_empty(&srcobject->un_pager.swp.swp_blks)) goto out; - swp_pager_init_freerange(&s_free, &n_free); + swp_pager_init_freerange(&range); offset = pindex; last = pindex + count; for (;;) { @@ -2163,8 +2176,7 @@ swp_pager_meta_transfer(vm_object_t srcobject, vm_object_t dstobject, if (dstobject == NULL || !swp_pager_xfer_source(srcobject, dstobject, sb->p + i - offset, sb->d[i])) { - swp_pager_update_freerange(&s_free, &n_free, - sb->d[i]); + swp_pager_update_freerange(&range, sb->d[i]); } if (moved != NULL) { if (m != NULL && m->pindex != pindex + i - 1) @@ -2184,7 +2196,7 @@ swp_pager_meta_transfer(vm_object_t srcobject, vm_object_t dstobject, uma_zfree(swblk_zone, sb); } } - swp_pager_freeswapspace(s_free, n_free); + swp_pager_freeswapspace(&range); out: if (moved != NULL) *moved = mc; @@ -2207,6 +2219,16 @@ swp_pager_meta_free(vm_object_t object, vm_pindex_t pindex, vm_pindex_t count, swp_pager_meta_transfer(object, NULL, pindex, count, freed); } +static void +swp_pager_meta_free_block(struct swblk *sb, struct page_range *range) +{ + for (int i = 0; i < SWAP_META_PAGES; i++) { + if (sb->d[i] != SWAPBLK_NONE) + swp_pager_update_freerange(range, sb->d[i]); + } + uma_zfree(swblk_zone, sb); +} + /* * SWP_PAGER_META_FREE_ALL() - destroy all swap metadata associated with object * @@ -2217,28 +2239,19 @@ static void swp_pager_meta_free_all(vm_object_t object) { struct swblk *sb; - daddr_t n_free, s_free; + struct page_range range; vm_pindex_t pindex; - int i; VM_OBJECT_ASSERT_WLOCKED(object); - if (pctrie_is_empty(&object->un_pager.swp.swp_blks)) - return; - - swp_pager_init_freerange(&s_free, &n_free); + swp_pager_init_freerange(&range); for (pindex = 0; (sb = SWAP_PCTRIE_LOOKUP_GE( &object->un_pager.swp.swp_blks, pindex)) != NULL;) { pindex = sb->p + SWAP_META_PAGES; - for (i = 0; i < SWAP_META_PAGES; i++) { - if (sb->d[i] == SWAPBLK_NONE) - continue; - swp_pager_update_freerange(&s_free, &n_free, sb->d[i]); - } SWAP_PCTRIE_REMOVE(&object->un_pager.swp.swp_blks, sb->p); - uma_zfree(swblk_zone, sb); + swp_pager_meta_free_block(sb, &range); } - swp_pager_freeswapspace(s_free, n_free); + swp_pager_freeswapspace(&range); } /* From nobody Wed Jun 12 10:01:04 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzgzN3HhPz5P7Pn; Wed, 12 Jun 2024 10:01:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzgzN2PKJz4k5t; Wed, 12 Jun 2024 10:01:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718186464; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wWUV6K9UNxCezBpjCNDfjJ8QLG+Tr1kzPLDBsQbcNhM=; b=puY/GWuTUGmyJpm1H4/m47ojeEvR89duHycCmnHoIFIyFt846gTsm9d/8/bDKidv8k8IJs aNqxJT/LOseBrZMw1MGPdfQgzVG3/W8lRL72vw6OUH+ac0ItPMHdxsqtYamDurFnNsrvBp pekTozVoZ4Co5PkmH4th39s9xNCQ+rqgE6QWmpGNME2ANGRRmn0TZDLbJ+h8BCa6FuOWka 4/Wt7z4YP422IaovXIe4rnJltq8pnokEowMJfbWPYliXT6Ywv/Q8DmVk3KaAuB0DrRYa2P Q0WR6FFy1a5Oy84YV3PgPHkNAgDHTXy7UsLC3f9qJYlSaRkMX4nmgPRRjEGh7g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718186464; a=rsa-sha256; cv=none; b=h8yXjPm1BpX1b3OtOd7o8tzK0yAw+qP6jKGflAXuWbjbghZVu2AMfsVeK+jdzHlAfVBog5 r7PQJGJCoYa8HPpwWWvBna7ylsW72BcOhGTB7Mk5VqUOX9rkqloaqXt+xAPtZfksyl4hNS eXPktIbfcxxWhXX9KWkCYdA9GyZ77tXz21YUW0MkHr9E1KLTmEqZpXwGHMAENB0K+wTZNP sfDsLSpz8Ct1Zqk20d/f1iTMyN3gEsV937u6zZW1SplB4+L0PDjmNfIcU1dZoPNY4N+3qC ZlsjHRs6kWI2AgPI5P0fHfWN0GM3KEe/oI1B+UurIqslrKrknsrGL759ZwKLFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718186464; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wWUV6K9UNxCezBpjCNDfjJ8QLG+Tr1kzPLDBsQbcNhM=; b=h6cg4BAbjKCSi50E3uelj5wyhpmrDaJaaQbyU/Ob5vjqFtGNP1ZcWovyI45lUJvma28ukI g75ewO6A/g75hDIQlZWRYV9wwctCJt83OMmjpBwiOu7Mu58nTK2QIJTmC/Qmq90eo89BLC n/YJWth2oQoFLmpYYhxobBGBsz07ZnH6CP3UtbFwWF4Z9mfCasF0X1ZJnQ5JP9oulzbWkt kv0P8oivLmf4RVT82WLsXOO5HjzDicfO7ii7kOqUccS9/etP4eJpBxpL3XaxFTjyM6a8+J KRF4QvnGBt4S1CrgQKF3PO9WMiNRE6XHwSPdHNwz0KUThoSKjGKkM8MgY8JGjw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzgzN1yFGzp4h; Wed, 12 Jun 2024 10:01:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CA14g7068427; Wed, 12 Jun 2024 10:01:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CA14oS068424; Wed, 12 Jun 2024 10:01:04 GMT (envelope-from git) Date: Wed, 12 Jun 2024 10:01:04 GMT Message-Id: <202406121001.45CA14oS068424@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: f0a0420dfd36 - main - powerof2: replace loops with fls or ilog2 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f0a0420dfd36ae90f86cc9bfb1342b8862b8c9ec Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=f0a0420dfd36ae90f86cc9bfb1342b8862b8c9ec commit f0a0420dfd36ae90f86cc9bfb1342b8862b8c9ec Author: Doug Moore AuthorDate: 2024-06-12 09:26:42 +0000 Commit: Doug Moore CommitDate: 2024-06-12 10:00:48 +0000 powerof2: replace loops with fls or ilog2 In several places, a loop tests for powers of two, or iterates through powers of two. In those places, replace the loop with an invocation of fls or ilog2 without changing the meaning of the code. Reviewed by: alc, markj, kib, np, erj, avg (previous version) Differential Revision: https://reviews.freebsd.org/D45494 --- sys/dev/aic7xxx/aic79xx.c | 3 +-- sys/dev/cxgb/cxgb_sge.c | 7 ++----- sys/dev/cxgbe/t4_sge.c | 4 +--- sys/dev/irdma/irdma_ctrl.c | 16 +++++----------- sys/dev/mlx5/mlx5_en/mlx5_en_main.c | 4 +--- sys/netpfil/ipfw/ip_fw_table.c | 10 +--------- 6 files changed, 11 insertions(+), 33 deletions(-) diff --git a/sys/dev/aic7xxx/aic79xx.c b/sys/dev/aic7xxx/aic79xx.c index 0c4b615c5b24..ab68c3d8b088 100644 --- a/sys/dev/aic7xxx/aic79xx.c +++ b/sys/dev/aic7xxx/aic79xx.c @@ -8593,8 +8593,7 @@ ahd_loadseq(struct ahd_softc *ahd) if (sg_prefetch_align == 0) sg_prefetch_align = 8; /* Round down to the nearest power of 2. */ - while (powerof2(sg_prefetch_align) == 0) - sg_prefetch_align--; + sg_prefetch_align = 1 << ilog2(sg_prefetch_align); cacheline_mask = sg_prefetch_align - 1; diff --git a/sys/dev/cxgb/cxgb_sge.c b/sys/dev/cxgb/cxgb_sge.c index f57494065aec..0c5be9dd6614 100644 --- a/sys/dev/cxgb/cxgb_sge.c +++ b/sys/dev/cxgb/cxgb_sge.c @@ -553,9 +553,7 @@ t3_sge_prep(adapter_t *adap, struct sge_params *p) nqsets *= adap->params.nports; fl_q_size = min(nmbclusters/(3*nqsets), FL_Q_SIZE); - - while (!powerof2(fl_q_size)) - fl_q_size--; + fl_q_size = 1 << ilog2(fl_q_size); use_16k = cxgb_use_16k_clusters != -1 ? cxgb_use_16k_clusters : is_offload(adap); @@ -567,8 +565,7 @@ t3_sge_prep(adapter_t *adap, struct sge_params *p) jumbo_q_size = min(nmbjumbo9/(3*nqsets), JUMBO_Q_SIZE); jumbo_buf_size = MJUM9BYTES; } - while (!powerof2(jumbo_q_size)) - jumbo_q_size--; + jumbo_q_size = 1 << ilog2(jumbo_q_size); if (fl_q_size < (FL_Q_SIZE / 4) || jumbo_q_size < (JUMBO_Q_SIZE / 2)) device_printf(adap->dev, diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c index e1705ae063e2..505f2d1bf677 100644 --- a/sys/dev/cxgbe/t4_sge.c +++ b/sys/dev/cxgbe/t4_sge.c @@ -4220,9 +4220,7 @@ qsize_to_fthresh(int qsize) { u_int fthresh; - while (!powerof2(qsize)) - qsize++; - fthresh = ilog2(qsize); + fthresh = qsize == 0 ? 0 : fls(qsize - 1); if (fthresh > X_CIDXFLUSHTHRESH_128) fthresh = X_CIDXFLUSHTHRESH_128; diff --git a/sys/dev/irdma/irdma_ctrl.c b/sys/dev/irdma/irdma_ctrl.c index dc42b15392c5..6078ac43815e 100644 --- a/sys/dev/irdma/irdma_ctrl.c +++ b/sys/dev/irdma/irdma_ctrl.c @@ -4909,7 +4909,7 @@ irdma_cfg_fpm_val(struct irdma_sc_dev *dev, u32 qp_count) struct irdma_virt_mem virt_mem; u32 i, mem_size; u32 qpwanted, mrwanted, pblewanted; - u32 powerof2, hte; + u32 hte; u32 sd_needed; u32 sd_diff; u32 loop_count = 0; @@ -4938,12 +4938,8 @@ irdma_cfg_fpm_val(struct irdma_sc_dev *dev, u32 qp_count) hmc_info->sd_table.sd_cnt, max_sds); qpwanted = min(qp_count, hmc_info->hmc_obj[IRDMA_HMC_IW_QP].max_cnt); - - powerof2 = 1; - while (powerof2 <= qpwanted) - powerof2 *= 2; - powerof2 /= 2; - qpwanted = powerof2; + if (qpwanted != 0) + qpwanted = 1 << ilog2(qpwanted); mrwanted = hmc_info->hmc_obj[IRDMA_HMC_IW_MR].max_cnt; pblewanted = hmc_info->hmc_obj[IRDMA_HMC_IW_PBLE].max_cnt; @@ -4986,11 +4982,9 @@ irdma_cfg_fpm_val(struct irdma_sc_dev *dev, u32 qp_count) hmc_info->hmc_obj[IRDMA_HMC_IW_MR].cnt = mrwanted; hte = round_up(qpwanted + hmc_info->hmc_obj[IRDMA_HMC_IW_FSIMC].cnt, 512); - powerof2 = 1; - while (powerof2 < hte) - powerof2 *= 2; + hte = hte == 0 ? 1 : 1 << fls(hte - 1); hmc_info->hmc_obj[IRDMA_HMC_IW_HTE].cnt = - powerof2 * hmc_fpm_misc->ht_multiplier; + hte * hmc_fpm_misc->ht_multiplier; if (dev->hw_attrs.uk_attrs.hw_rev == IRDMA_GEN_1) cfg_fpm_value_gen_1(dev, hmc_info, qpwanted); else diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c index 962705e6d258..4d9d1048448b 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c @@ -2331,9 +2331,7 @@ mlx5e_get_wqe_sz(struct mlx5e_priv *priv, u32 *wqe_sz, u32 *nsegs) * Stride size is 16 * (n + 1), as the first segment is * control. */ - for (n = howmany(r, MLX5E_MAX_RX_BYTES); !powerof2(n + 1); n++) - ; - + n = (1 << fls(howmany(r, MLX5E_MAX_RX_BYTES))) - 1; if (n > MLX5E_MAX_BUSDMA_RX_SEGS) return (-ENOMEM); diff --git a/sys/netpfil/ipfw/ip_fw_table.c b/sys/netpfil/ipfw/ip_fw_table.c index b6847d43081b..5cf948ce39a2 100644 --- a/sys/netpfil/ipfw/ip_fw_table.c +++ b/sys/netpfil/ipfw/ip_fw_table.c @@ -1516,15 +1516,7 @@ static uint32_t roundup2p(uint32_t v) { - v--; - v |= v >> 1; - v |= v >> 2; - v |= v >> 4; - v |= v >> 8; - v |= v >> 16; - v++; - - return (v); + return (1 << fls(v - 1)); } /* From nobody Wed Jun 12 11:49:28 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzkNS3hqQz5M4S1; Wed, 12 Jun 2024 11:49:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzkNS2mFXz4vQL; Wed, 12 Jun 2024 11:49:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718192968; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=86Zid2xS7c5HvhErU71LpIwsnHSEIiqrODELozBi3JY=; b=XESdT92N/onbUNd8maoXUuiMl8vxZSAUAeoed/KvMseLFSaBRx7fVX48e0gr1NIJCsfqU+ kQfZWO3QV5xgmuM2ANUBEjSWq6Ki++nf2GpttU3BtEH3p+fQxlYgoTaKZLVwzQXWRg94r8 c17jW04APojM2P2kg/COh48Utd+NHZOgI7N766/OG3XB0TBqSdMNVugmiuV0DiuBFAxHgT lpjF6gTGFoiw32sUw2DdlUpnvnAq1bLa2zk0qXXMyx4AwsAunwK0o9YHnDQxNGCl7B3Ckn qivH/y+Orj5dzvoVgOtbLppZHKAD3AAKYEtjGHivIkY14wtwLBMEXayKp7E5fA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718192968; a=rsa-sha256; cv=none; b=Jd1D5HmPn6Nasn1sK40q7qdCwl+9Pu5ASevef3DiwbKhQxMFMax5uRVsYwupkXMVs0KsOX HTdw3n3qCuZFj0rqhlNh1h01ya3lyfY6NxQr0PCypLTHaZ1sVNxpL271EqY+umWZME3GHA va7Owjy8d380Hivy4F5CLzmUQZDqdfUB+MpD46qRbFY0RvJx8jaM8HN1L8eWIEkUOBxiZj bT8xDWKmFQB6pOnqxYAFF6+V4EVI3dVOLVgFPs2OMmiWSXfvwV9Lcwt7E2Ik3t4ZKbdfYQ PXeI7RFn2eFQF6Di75iuqiWp7Club75U+d8M7Ye9zewYRv/c/6Jh4QSFiaAiqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718192968; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=86Zid2xS7c5HvhErU71LpIwsnHSEIiqrODELozBi3JY=; b=NvAdZ8hczcWPVraNPWYVB1S/SBAuo94hFyvy4xgv4WEN6o/I+qtyTFxvkrEWYCaXhzKmAA Y/Axx+vFmVwKnDwXsLBH7dsLqhrl/VUnQZX1X9J0j8g/D7xnvZO6JuPLepHD4xhdLUYjq7 0o/QmOO7fpRYPaTuAfOofmJTEcnGLrVK86xlzhguJzwKtdOiqkmV+hlecTiRltSXIXcoAA kV00JiSXCqrMI3d1l4aHqih6h/iMk+U/1Z/8Hb9H/ba/OQzuJQ704tQv6u2goGIpSmZkb6 Jts/PrrYTqIZv7vdPaiPaGRfOpHmFG3QYWNnF0yrDhkz2zhIydmse4F7MBJFEg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzkNS2MRGzrnX; Wed, 12 Jun 2024 11:49:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CBnSwS043158; Wed, 12 Jun 2024 11:49:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CBnSLs043155; Wed, 12 Jun 2024 11:49:28 GMT (envelope-from git) Date: Wed, 12 Jun 2024 11:49:28 GMT Message-Id: <202406121149.45CBnSLs043155@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: b8a496dfb6df - main - lib: Remove __ARM_ARCH checks that are always true List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b8a496dfb6df7b86e014d0d4476cd75850e060c1 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=b8a496dfb6df7b86e014d0d4476cd75850e060c1 commit b8a496dfb6df7b86e014d0d4476cd75850e060c1 Author: Andrew Turner AuthorDate: 2024-06-12 11:49:05 +0000 Commit: Andrew Turner CommitDate: 2024-06-12 11:49:05 +0000 lib: Remove __ARM_ARCH checks that are always true Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D45559 --- lib/libc/arm/aeabi/aeabi_vfp.h | 2 +- lib/libc/arm/gen/_setjmp.S | 8 ++++---- lib/libc/arm/gen/setjmp.S | 4 ++-- lib/libsys/arm/__vdso_gettc.c | 7 ------- lib/msun/arm/fenv.c | 6 +----- 5 files changed, 8 insertions(+), 19 deletions(-) diff --git a/lib/libc/arm/aeabi/aeabi_vfp.h b/lib/libc/arm/aeabi/aeabi_vfp.h index f87f9acfd0a2..3b70fe06fab3 100644 --- a/lib/libc/arm/aeabi/aeabi_vfp.h +++ b/lib/libc/arm/aeabi/aeabi_vfp.h @@ -65,7 +65,7 @@ * C Helper macros */ -#if __ARM_ARCH >= 6 && !defined(SOFTFLOAT_FOR_GCC) +#if !defined(SOFTFLOAT_FOR_GCC) /* * Generate a function that will either call into the VFP implementation, * or the soft float version for a given __aeabi_* helper. The function diff --git a/lib/libc/arm/gen/_setjmp.S b/lib/libc/arm/gen/_setjmp.S index 19b8b6b07059..9e655d2e9e2e 100644 --- a/lib/libc/arm/gen/_setjmp.S +++ b/lib/libc/arm/gen/_setjmp.S @@ -58,12 +58,12 @@ ENTRY(_setjmp) ldr r1, .L_setjmp_magic -#if !defined(_STANDALONE) && __ARM_ARCH >= 6 && !defined(SOFTFLOAT_FOR_GCC) +#if !defined(_STANDALONE) && !defined(SOFTFLOAT_FOR_GCC) add r2, r0, #(_JB_REG_D8 * 4) vstmia r2, {d8-d15} vmrs r2, fpscr str r2, [r0, #(_JB_REG_FPSCR * 4)] -#endif /* !_STANDALONE && __ARM_ARCH >= 6 */ +#endif /* !_STANDALONE && !SOFTFLOAT_FOR_GCC */ str r1, [r0] @@ -91,12 +91,12 @@ ENTRY(_longjmp) teq ip, r2 /* magic correct? */ bne botch /* no, botch */ -#if !defined(_STANDALONE) && __ARM_ARCH >= 6 && !defined(SOFTFLOAT_FOR_GCC) +#if !defined(_STANDALONE) && !defined(SOFTFLOAT_FOR_GCC) add ip, r0, #(_JB_REG_D8 * 4) vldmia ip, {d8-d15} ldr ip, [r0, #(_JB_REG_FPSCR * 4)] vmsr fpscr, ip -#endif /* !_STANDALONE && __ARM_ARCH >= 6 */ +#endif /* !_STANDALONE && !SOFTFLOAT_FOR_GCC */ add r0, r0, #(_JB_REG_R4 * 4) /* Restore integer registers */ diff --git a/lib/libc/arm/gen/setjmp.S b/lib/libc/arm/gen/setjmp.S index 5a6c899e2b23..e7f8b788e878 100644 --- a/lib/libc/arm/gen/setjmp.S +++ b/lib/libc/arm/gen/setjmp.S @@ -61,7 +61,7 @@ ENTRY(setjmp) ldr r1, .Lsetjmp_magic -#if __ARM_ARCH >= 6 && !defined(SOFTFLOAT_FOR_GCC) +#if !defined(SOFTFLOAT_FOR_GCC) add r2, r0, #(_JB_REG_D8 * 4) vstmia r2, {d8-d15} vmrs r2, fpscr @@ -102,7 +102,7 @@ ENTRY(__longjmp) bl PIC_SYM(_C_LABEL(sigprocmask), PLT) ldmfd sp!, {r0-r2, r14} -#if __ARM_ARCH >= 6 && !defined(SOFTFLOAT_FOR_GCC) +#if !defined(SOFTFLOAT_FOR_GCC) add ip, r0, #(_JB_REG_D8 * 4) vldmia ip, {d8-d15} ldr ip, [r0, #(_JB_REG_FPSCR * 4)] diff --git a/lib/libsys/arm/__vdso_gettc.c b/lib/libsys/arm/__vdso_gettc.c index ea70dec35cd8..cb4bdec1e8ef 100644 --- a/lib/libsys/arm/__vdso_gettc.c +++ b/lib/libsys/arm/__vdso_gettc.c @@ -37,7 +37,6 @@ #include #include "libc_private.h" -#if __ARM_ARCH >= 6 static inline uint64_t cp15_cntvct_get(void) { @@ -55,7 +54,6 @@ cp15_cntpct_get(void) __asm __volatile("mrrc\tp15, 0, %Q0, %R0, c14" : "=r" (reg)); return (reg); } -#endif #pragma weak __vdso_gettc int @@ -64,7 +62,6 @@ __vdso_gettc(const struct vdso_timehands *th, u_int *tc) if (th->th_algo != VDSO_TH_ALGO_ARM_GENTIM) return (ENOSYS); -#if __ARM_ARCH >= 6 /* * Userspace gettimeofday() is only enabled on ARMv7 CPUs, but * libc is compiled for ARMv6. Due to clang issues, .arch @@ -73,10 +70,6 @@ __vdso_gettc(const struct vdso_timehands *th, u_int *tc) __asm __volatile(".word\t0xf57ff06f" : : : "memory"); /* isb */ *tc = th->th_physical == 0 ? cp15_cntvct_get() : cp15_cntpct_get(); return (0); -#else - *tc = 0; - return (ENOSYS); -#endif } #pragma weak __vdso_gettimekeep diff --git a/lib/msun/arm/fenv.c b/lib/msun/arm/fenv.c index 9f172d5fd7c9..05b3adb05f81 100644 --- a/lib/msun/arm/fenv.c +++ b/lib/msun/arm/fenv.c @@ -32,10 +32,6 @@ #include -#if __ARM_ARCH >= 6 -#define FENV_ARMv6 -#endif - /* When SOFTFP_ABI is defined we are using the softfp ABI. */ #if defined(__VFP_FP__) && !defined(__ARM_PCS_VFP) #define SOFTFP_ABI @@ -52,7 +48,7 @@ const fenv_t __fe_dfl_env = 0; /* If this is a non-mangled softfp version special processing is required */ -#if defined(FENV_MANGLE) || !defined(SOFTFP_ABI) || !defined(FENV_ARMv6) +#if defined(FENV_MANGLE) || !defined(SOFTFP_ABI) /* * The following macros map between the softfloat emulator's flags and From nobody Wed Jun 12 11:49:29 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzkNT4M8Fz5M4pL; Wed, 12 Jun 2024 11:49:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzkNT3Vhjz4v91; Wed, 12 Jun 2024 11:49:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718192969; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LrL/1MNDR84ZpMF1qMHRjz5dwfA0v5VLrZsLvSbl3rc=; b=nADg8x1YyqnJ+MdBdil7K4qgUvo4gH30kxDKtbXpUBdOjWl3jroR4H8UxXJEPWiOi5rwZ6 f9Cgnurf9had740oIov6ZHFbA0gsWCzfa5r+fpAP8yovAQpXboswbrTUQtVL8QsdupmAqH HibVwxjizIV6m9KY2SByyW4+btk3WBpxLLT850eqpD1iwGrsTdpsOK2nfAloTHixOe7gge W+EmYGcI68TCcl1qSFngdmX7WEDBoq+XYfcH2tMpLD69ZhK7XPN3BC3iRSx4ZgNx2Xi7lV DOVCM+6LIdyUsiCfH+4ro1miMFH3XkeEfrPY97u4RGrt/ALqYq0SP7tz7i3Dxw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718192969; a=rsa-sha256; cv=none; b=PXgcVLyJ0saOF5RRc3NMMOYOimViA6O4lh/MzEwwKtusKChcE8TmRxcbegOzqqZMrlAMFQ qeR4kbdlc7uGezY9ua3zwROb9nqmcVcGh3Q7vu5BK0fLBfws+qLHM8JhL1M2+SiCqPMod9 wSLvxdo9aGOEgWzOSomkYCrjJl6RN+BN/dZWDsTNOKPUhjJvnDofvGj0ho2quzMZq6dgCl yuKzDYx1niemHE1JfSCUE1CmiU0S3CXklYB0MJGcwrI1sziAn01yADsdWVoFn6CYixYEOs 2bHyBhA6lGZAMFqHXUbyMnLhtOwmXI1CzyCHq01VcxfFUAYYBetetUxjh0AvJQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718192969; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LrL/1MNDR84ZpMF1qMHRjz5dwfA0v5VLrZsLvSbl3rc=; b=D7RKRMhSs9dTYDoVA3W1Yx2ElMMniZEkk/BhLGLNNLmZ/uVFWhBYnqw4TEyG2ZQf8JJEtO DcXaD6SWnIX87fBnv+P8DNuKOA52fYd0sn9xXlFxVnYuavgdhAqniq/8Xd0ekxpqvmhlNf gNm1xLNc7WLeBjiQ9LprXWCUOUsmOP0oS1dqWJyGjTy5JKDg3fJymMHODSXEMxEPKEAXef rvR8XsClBu9tNGMtRPTlxDvPUJ8i13xyZnT3pJGrDXccb347ayB09s+veFZbawfaxoUiuY G7q1tW7KzjwQt3xpF5giWaKhGPxanSfxvGWj/CfxFYT8pjh2jW074pPsNfNAUg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzkNT376bzrsL; Wed, 12 Jun 2024 11:49:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CBnTme043202; Wed, 12 Jun 2024 11:49:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CBnTA7043199; Wed, 12 Jun 2024 11:49:29 GMT (envelope-from git) Date: Wed, 12 Jun 2024 11:49:29 GMT Message-Id: <202406121149.45CBnTA7043199@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: bbdf32d94c2f - main - nanobsd: Remove pre-armv6 support List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bbdf32d94c2f746b914aa87b1104b579426d8100 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=bbdf32d94c2f746b914aa87b1104b579426d8100 commit bbdf32d94c2f746b914aa87b1104b579426d8100 Author: Andrew Turner AuthorDate: 2024-06-12 11:49:13 +0000 Commit: Andrew Turner CommitDate: 2024-06-12 11:49:13 +0000 nanobsd: Remove pre-armv6 support Remove support for pre-armv6 from nanobsd. It was removed from FreeBSD in 2020. Reviewed by: imp, emaste Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45560 --- tools/tools/nanobsd/embedded/common | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tools/tools/nanobsd/embedded/common b/tools/tools/nanobsd/embedded/common index bcb1061df629..4f5eac7806f2 100644 --- a/tools/tools/nanobsd/embedded/common +++ b/tools/tools/nanobsd/embedded/common @@ -51,7 +51,6 @@ # o documentation for how to run the qemu images # o msdos mtools fallback # o special boot for !x86 !arm platforms -# o qemu image for arm # o qemu image for aarch64 # o qemu image for armv6/armv7 # o easy support for different image / vm formats @@ -503,9 +502,6 @@ std_amd64 ( ) { std_i386 } -std_arm ( ) { -} - std_armv6 ( ) { } From nobody Wed Jun 12 12:41:39 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzlXg5Rp9z5M996; Wed, 12 Jun 2024 12:41:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzlXg510Dz43wb; Wed, 12 Jun 2024 12:41:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718196099; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KN3HDSYzh3h5V0hbZOWwi4e/QB3hKfaftMezO5Y0cqQ=; b=SAeM8sXESYUClxV0coDCO1O3Qq2K4B7E2qvB95bNrQXEcfBrZ4sGVRPgCrSfoqE58PJXO1 wJQwT/u1Xlzni+eaaY63cvD/144dzCaOSUxGpnGX7zQk/2HMlCwEHEmU7n9jt0jxrM01Ag RL3S94PSiYop8PGZSC5Ssx9gCL9bXWJEeo/phVXJRtPFw0uilQtM2nQ/m/Iyyx+2tHHxT8 i+k4QLOHLnh5L64n1XYxjUjFVHOEYU0XghH7JVUnJyPeh6P9M1jF5p0GhmouDBvH3WH6NO qSRj2Y95K7y6/qcVeHuoafR0hOOCwMc9bb699YaTOEVH+nlDKChD9TaTabsBwg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718196099; a=rsa-sha256; cv=none; b=FL2rqLzmhs/np8OIIl5nPHUbhxOvifLFVhulNzNLq48JceBQwTwT0aBfifbUlSj6KtKjx1 0J8Z14LfZ4kwJDwhv49rrFWbkKne6Eo/u1KPiMy7ZdqlRaMYixyuRRsID/1tlBdm/OSy09 r/cr22hyAPhmwqk1zqAM+5TSgPQ2toANsT8d+ws1gyD1zdsPIqm7LXha/MUQKg8/+5QZOD 3BIMvMQqJFJdUI+pLjx4DLlntKG8vqKsA2d4mBKvVK4JN3h7SEs1DtvYGwUKSpIXeE1DQ3 tOGtDl3SrZUMMPLFia/dtUekcHs9GV0wTz8U0oQZr+mOtzvHDQsap12dbz1m+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718196099; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KN3HDSYzh3h5V0hbZOWwi4e/QB3hKfaftMezO5Y0cqQ=; b=s5Of93VVgr0vq2vVFk3q50gyWN384YvS5txtlIrwbwkQhsm4ZyrcjqNj1n7fWfhg4rwT49 6CCQcw+B/QgkWRyrNmFJn7Zae5hzx8Ac6ViZnc6SnhNrFZhCqcmrxGYeQkdkWJcjXcUmpn d2gCINV398o33g6TRc+C6SEw+4fkVUvQV06NUvkOuQurF60FWWXwZ4goLOXvBNH3+Yql1f E9E6Jqmz8ChtjJiekSeYZWmy/4OSxtBuSORSRtyIKyWk3mPymDdV0x6GOBljMFmpP3RUPa 48xLwEE9p5hY3yxBoQ3uL207sh6bYOzFDR8WnpClbpr2m6KxP6xLQT1QM1zxYw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzlXg4c3dzsVJ; Wed, 12 Jun 2024 12:41:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CCfdsY041805; Wed, 12 Jun 2024 12:41:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CCfdw0041802; Wed, 12 Jun 2024 12:41:39 GMT (envelope-from git) Date: Wed, 12 Jun 2024 12:41:39 GMT Message-Id: <202406121241.45CCfdw0041802@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ruslan Bukin Subject: git: 62cb671705eb - main - riscv: include ahci device to GENERIC. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: br X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 62cb671705eb561d5a56c1c2dd2aff2ef984d035 Auto-Submitted: auto-generated The branch main has been updated by br: URL: https://cgit.FreeBSD.org/src/commit/?id=62cb671705eb561d5a56c1c2dd2aff2ef984d035 commit 62cb671705eb561d5a56c1c2dd2aff2ef984d035 Author: Ruslan Bukin AuthorDate: 2024-06-12 12:36:05 +0000 Commit: Ruslan Bukin CommitDate: 2024-06-12 12:40:50 +0000 riscv: include ahci device to GENERIC. This is needed for bhyve guest VM. Reviewed by: mhorne Sponsored by: UKRI Differential Revision: https://reviews.freebsd.org/D45497 --- sys/riscv/conf/GENERIC | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/riscv/conf/GENERIC b/sys/riscv/conf/GENERIC index 52edc01b5c89..ce9038cee4a9 100644 --- a/sys/riscv/conf/GENERIC +++ b/sys/riscv/conf/GENERIC @@ -93,6 +93,7 @@ device riscv_syscon device pci # Block devices +device ahci device scbus device da From nobody Wed Jun 12 15:51:02 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzqlB39yHz5Mxc8; Wed, 12 Jun 2024 15:51:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzqlB2lBhz4Yl5; Wed, 12 Jun 2024 15:51:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718207462; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PfStr5x6YKtunz+h8qBVsH7bwK0Re2e3rJRPzGrjdZ0=; b=E9c1nF/5SUA34iTnDht+Ac7WKPD9vqS4IilTXlPopuI2x99keUTUPP69r31c9YOoa2Q1ud wZh6gAwN69PPi507kvp0Rvqe0G21gPXWzYnOrmNvD6UJL0hK7TqtXQtFcAEJ4fcd+I24W+ aqfYg2lq2MY4ENzGS/144SAgiBkIiztOHZprWKGFb3sAFevautliX+PduhkXtyc7wLu9v5 8hrzdSatYLNbXxXBlgFVnjKyXSYsC76eccvTbxn3KVOHdObTIvknlO7GAddj0hcBB1TmoZ qy4xn8B4HX4BKHPy2XyQgHKJLQP97nUNFtZ1Z/R1WbiqbAmCO7Dl8vmlJtl0iA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718207462; a=rsa-sha256; cv=none; b=jScQguO8EyueeH3gTvi+ABOxsQKqGfrMg49Uq7ba9UsruohJfAe51OqwnvnXViKAt1/ojo 4yegx+pep0b2nRPqHaLEJUOMan5DduIDWmk1vuOb0T+KvnWR7V3zg2Me4uOpxL5Dx/wvyf niYXBCf/xrsJ8H8EHi/H2YeodtIPxZZIm3RbxQKPBkCbLH9qCqyicRfKcN32OH1acWbhgM U2GcHuiBXkGg+kVHKlBP41V6jIwkBfqedrpMbZI5MX9V4yhAdaaGxRO4Tc6ucQDNNJ+uUi vIeujQA4fsBbKnM9cFP0vNaaNY2wmEH2IlfD/RT2afWOWO+FQitcje5XRKoUlA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718207462; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PfStr5x6YKtunz+h8qBVsH7bwK0Re2e3rJRPzGrjdZ0=; b=SAsBp4EKqApHpwPZ4g/AUKwzPehnpDE/so12TcHZ86P4vSmubI1du2FXu7pUalWh9a0FyL ix2l+z//SoH8ReqjyjpoEJz6kfhS/Ih1ZIXkwuKbIgO4JSwX+uW1iDr4NHRKFw37QprX7S HTE81BPl8YD7fRJb2S6wvGONIwf90mbBr0g0VREBclml8v94Nh73hRUH0dEODrI5Hw0p1O pv+14s9lqBh1hNT+Cpo5mA5BLGvLR0YZiL+10PeRtzmbvVOI38O6sOKBewu4Mzk1K5o+3D TBGsfO8SqHuAHwqHdJMsb7MxPC0RHfSKJanXt93UFsBMa9fGy7H0juGYwk012w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzqlB2LqpzySG; Wed, 12 Jun 2024 15:51:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CFp21N057431; Wed, 12 Jun 2024 15:51:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CFp29C057428; Wed, 12 Jun 2024 15:51:02 GMT (envelope-from git) Date: Wed, 12 Jun 2024 15:51:02 GMT Message-Id: <202406121551.45CFp29C057428@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: a7ae78caaa17 - main - cdefs: Add __writeonly to mark write only vars List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a7ae78caaa17ff840da844c1dcaa780d194c9e20 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=a7ae78caaa17ff840da844c1dcaa780d194c9e20 commit a7ae78caaa17ff840da844c1dcaa780d194c9e20 Author: Andrew Turner AuthorDate: 2024-06-12 13:04:13 +0000 Commit: Andrew Turner CommitDate: 2024-06-12 13:04:13 +0000 cdefs: Add __writeonly to mark write only vars When a variable in write only and can't be removed, e.g. for API reasons, it is useful to document this fact similar to __diagused and __witness_used. Add __writeonly to tell the compiler and anyone looking at the code that this variable is expected to only be written to, and to not raise and error. Reviewed by: imp, kib Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45561 --- sys/sys/cdefs.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index 037dfa55f923..c3268791787f 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -180,6 +180,7 @@ #define __aligned(x) __attribute__((__aligned__(x))) #define __section(x) __attribute__((__section__(x))) #endif +#define __writeonly __unused #if __GNUC_PREREQ__(4, 3) || __has_attribute(__alloc_size__) #define __alloc_size(x) __attribute__((__alloc_size__(x))) #define __alloc_size2(n, x) __attribute__((__alloc_size__(n, x))) From nobody Wed Jun 12 15:51:03 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzqlC4cZ7z5MxZc; Wed, 12 Jun 2024 15:51:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzqlC3kM5z4Ywc; Wed, 12 Jun 2024 15:51:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718207463; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qRGhfW0rxgv9/6q7RuI2ynOBM8WSYVV9uyz2A38/uFo=; b=X19Co20vScXC48NaOj0kpt2Pf2ff7wckux4OqcFmHPzHlpE+Z5Hc1klGq+erYXegyoLKom NqbBV3mED4Q2HGJZrQ3DZWfJBoxhGeizJgkbGTSXH8jIB11rW3lIiIu8gnLtwPjdwPPaat fC6MMAGouYWXDuRQOVZGku0bTiA5Y1b07VSuSTutYvSuq+OVjFFZ11cx9eUOLbh7PQto6Y TIJSLLBcco1ZzvsQ9oc8g0f/r5sKdEMl6nwrO/0U0J0X3h5irbuLfhkf6Is+11c1qfmgYA PVsgmeYPvoHmaHeAIKjFHpyH4uPwlhZprs6gS+a+mL1PHJxYU5U/p3hzZjXLYQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718207463; a=rsa-sha256; cv=none; b=WCpv2Ync4td9kT5+eNAND5XRDaa0V8GwFhx22n/Lo5lm0wqTZcHEScTK/zj3kCvohmSi4V tG8E0vsW/25A0EeQsTlAu4MmjSywNBdfGYp4Aqf67IzqjDPKXzzfXMcnWai0E/7Urkzn+9 zgIAg4xvPl6g5AE6CmHTkZiz/BvT3afZFoTnm7rwXqrkReMXU92h5hbLXkbiY7vpBKJMd8 lyDcuxXV9Orm71evVhMdcpsZ8UEt0QflRLN6LH1QZtCaZDZnxAWokRdMkCDsCsl7aLiESV qrE5QUIArIZsRZzVHjS57Il3sl9i5N7ufhEyBXrdpNQsSvo3FyT0mdCS6jPF2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718207463; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qRGhfW0rxgv9/6q7RuI2ynOBM8WSYVV9uyz2A38/uFo=; b=yvPhyw43p3daqZoUnDJQf8GtJZgVRCfCxRzJPH/m6FJiXwRFC5680IaYxZm+tdu++Fs58Z 6ogAB5Dtvbrkvh1StEA2U7Idvf5FG5DrZLXpNQZY4Q80zfbHij6V2ussoO6ZSlZLeRy/k0 qmR044uVkL6NhkpdupFXVJhE5ijDyqHnnL46IMN01Tf+1Hj8SJeNYVdGwS2t8MBdLQ8GJr kx9vsbI5hUzOEhE9TWTYXOq+7zIl/8bSYrqamZrgzfPYYczSJkYLZA1MXeG5nlZ/8mKhGL v2dkS3D1D6nPBmLaPepzlWqIiviDc/rRKr1jHE+591ePsGwp8oSwoGus44qjsg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzqlC3Kpmz101s; Wed, 12 Jun 2024 15:51:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CFp3un057470; Wed, 12 Jun 2024 15:51:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CFp3Nl057467; Wed, 12 Jun 2024 15:51:03 GMT (envelope-from git) Date: Wed, 12 Jun 2024 15:51:03 GMT Message-Id: <202406121551.45CFp3Nl057467@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 19782e5bef34 - main - ibcore: Mark write-only variables List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 19782e5bef3403a6ed65d46653f2e70f81dced37 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=19782e5bef3403a6ed65d46653f2e70f81dced37 commit 19782e5bef3403a6ed65d46653f2e70f81dced37 Author: Andrew Turner AuthorDate: 2024-06-12 13:04:45 +0000 Commit: Andrew Turner CommitDate: 2024-06-12 13:04:45 +0000 ibcore: Mark write-only variables Some LinuxKPI lock macros pass need a flags field passed in. This is written to but never read from so gcc complains. Fix this by marking the flags variables as unused to quieten the compiler. Reviewed by: brooks (earlier version), kib Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45303 --- sys/ofed/drivers/infiniband/core/ib_cache.c | 16 ++++++++-------- sys/ofed/drivers/infiniband/core/ib_cm.c | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sys/ofed/drivers/infiniband/core/ib_cache.c b/sys/ofed/drivers/infiniband/core/ib_cache.c index b170f2b637f9..d2cc680796ef 100644 --- a/sys/ofed/drivers/infiniband/core/ib_cache.c +++ b/sys/ofed/drivers/infiniband/core/ib_cache.c @@ -465,7 +465,7 @@ static int _ib_cache_gid_table_find(struct ib_device *ib_dev, struct ib_gid_table *table; u8 p; int local_index; - unsigned long flags; + unsigned long flags __writeonly; for (p = 0; p < ib_dev->phys_port_cnt; p++) { table = ports_table[p]; @@ -514,7 +514,7 @@ int ib_find_cached_gid_by_port(struct ib_device *ib_dev, unsigned long mask = GID_ATTR_FIND_MASK_GID | GID_ATTR_FIND_MASK_GID_TYPE; struct ib_gid_attr val = {.ndev = ndev, .gid_type = gid_type}; - unsigned long flags; + unsigned long flags __writeonly; if (!rdma_is_port_valid(ib_dev, port)) return -ENOENT; @@ -570,7 +570,7 @@ static int ib_cache_gid_find_by_filter(struct ib_device *ib_dev, struct ib_gid_table **ports_table = ib_dev->cache.gid_cache; struct ib_gid_table *table; unsigned int i; - unsigned long flags; + unsigned long flags __writeonly; bool found = false; if (!ports_table) @@ -879,7 +879,7 @@ int ib_get_cached_gid(struct ib_device *device, struct ib_gid_attr *gid_attr) { int res; - unsigned long flags; + unsigned long flags __writeonly; struct ib_gid_table **ports_table = device->cache.gid_cache; struct ib_gid_table *table = ports_table[port_num - rdma_start_port(device)]; @@ -929,7 +929,7 @@ int ib_get_cached_pkey(struct ib_device *device, u16 *pkey) { struct ib_pkey_cache *cache; - unsigned long flags; + unsigned long flags __writeonly; int ret = 0; if (!rdma_is_port_valid(device, port_num)) @@ -956,7 +956,7 @@ int ib_find_cached_pkey(struct ib_device *device, u16 *index) { struct ib_pkey_cache *cache; - unsigned long flags; + unsigned long flags __writeonly; int i; int ret = -ENOENT; int partial_ix = -1; @@ -997,7 +997,7 @@ int ib_find_exact_cached_pkey(struct ib_device *device, u16 *index) { struct ib_pkey_cache *cache; - unsigned long flags; + unsigned long flags __writeonly; int i; int ret = -ENOENT; @@ -1027,7 +1027,7 @@ int ib_get_cached_lmc(struct ib_device *device, u8 port_num, u8 *lmc) { - unsigned long flags; + unsigned long flags __writeonly; int ret = 0; if (!rdma_is_port_valid(device, port_num)) diff --git a/sys/ofed/drivers/infiniband/core/ib_cm.c b/sys/ofed/drivers/infiniband/core/ib_cm.c index 3ee17a847720..7ace287b1c88 100644 --- a/sys/ofed/drivers/infiniband/core/ib_cm.c +++ b/sys/ofed/drivers/infiniband/core/ib_cm.c @@ -4057,7 +4057,7 @@ static void cm_add_one(struct ib_device *ib_device) struct ib_port_modify port_modify = { .set_port_cap_mask = IB_PORT_CM_SUP }; - unsigned long flags; + unsigned long flags __writeonly; int ret; int count = 0; u8 i; @@ -4150,7 +4150,7 @@ static void cm_remove_one(struct ib_device *ib_device, void *client_data) struct ib_port_modify port_modify = { .clr_port_cap_mask = IB_PORT_CM_SUP }; - unsigned long flags; + unsigned long flags __writeonly; int i; if (!cm_dev) From nobody Wed Jun 12 15:51:04 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzqlF17g3z5MxwW; Wed, 12 Jun 2024 15:51:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzqlD4jz9z4Yhf; Wed, 12 Jun 2024 15:51:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718207464; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/H4aLiNbYgZ2xDWFjvzDLQ/xhXg0+nMwYKpMyzENFi0=; b=SuehpNAobRNOMgo6WLjeP8tmX0FmE0U70ri6P+zsX9GUWe4YNej07COW1djcNwpmY791TE +HmEEvi8KUo6sReplOL2O6+CnSvXk3VnlO0F30dXqM3VElGyt3qaIeXMa/VIB9cYLVMZ31 mA4wXkpNTDtq6u8EmREs/vtijOh01F/UxKQAgcgEl+D+2X3312JZVIBj0hARma+IuHjj6C rj2C6xa4dwNQ5afv2IiHw02gWtrEWpN7g0aK8+KwqJCTXx+e7Z2riNd4IDnQsyt2ef/g5z FER9OsR4uIijGPWxw69hceMpCyhtjmbXjvnZJgzDtwAtZ8trrW1qFK5oY5CmRQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718207464; a=rsa-sha256; cv=none; b=NEnyx2jFCuGHhdnb2Z8gU38X7mVNlKipQn09EW8as5iVBSjTOsYv39UUeCsum79h21lfW7 8C+tSvB/xedNBmW/kki447fLkLkIbh3dTtSj2fPH6D6idMs+nu5XDCeJ9SNXjQm8z5NKaw 4oB7+Mk0/8HPCr/k6sPIMAGDIyy2xh0DZpkimye1MjlnYUFDglLAEO4YsYcCv37PGt2tpy oooNTlZaaOnd00SaXuPJh2DAU/FyZIAMCM+fExyFk1SwzV/tbBfZA8Eyd+XO3EdFGWvugf /K9+absB4UQ/82PUpAWrdlMuFpLvTzLyk65MYhMRTLXwjCOmF+lqeBELvfI5+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718207464; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/H4aLiNbYgZ2xDWFjvzDLQ/xhXg0+nMwYKpMyzENFi0=; b=uO3DhS1bXNLLto/DIZLSsRm9AH4EGO+paVbK7ynwJX0N5fsPbWm0vx3pTgL8KJ12QTKX8X DlKKLmTdKFlVZ2hDBQ2R7KKAWkLYJDKQRr1k5bMOeK3YUbBYm0Etk14RFSv5XmcJq0XFrB 2fLY3xgfy1Jvl3FMJRvTMNZ3gyL8fBhEpXpwh44Oi3VBXTisMQk44gcX5BuIbwjatxkvK2 zqz1F64U6RyF5GAL69pCkiuqj/p2g7eTjhMiHDHT/Ebf9bFfAxZ9gt49QgQLmxY1EiWLlq RGXjQM0XXg2WgOImkhnLIV5lCXIOOYX5YvqxyTSzLNEpx+uW5aGSZvBQ2ciReA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzqlD47grzySK; Wed, 12 Jun 2024 15:51:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CFp48g057519; Wed, 12 Jun 2024 15:51:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CFp4pB057516; Wed, 12 Jun 2024 15:51:04 GMT (envelope-from git) Date: Wed, 12 Jun 2024 15:51:04 GMT Message-Id: <202406121551.45CFp4pB057516@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 4eec584d79c1 - main - arm64: Clear td_frame when returning to userspace List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4eec584d79c1e8375d863c7eec7229ac7ec3f13b Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=4eec584d79c1e8375d863c7eec7229ac7ec3f13b commit 4eec584d79c1e8375d863c7eec7229ac7ec3f13b Author: Andrew Turner AuthorDate: 2024-06-12 13:08:13 +0000 Commit: Andrew Turner CommitDate: 2024-06-12 13:08:13 +0000 arm64: Clear td_frame when returning to userspace When returning from an exception to userspace clear the saved td_frame. On the next exception this should point to the frame, however this is not guaranteed. To ensure the trap frame pointer is either valid or NULL clear it before returning to userspace in the EL0 synchronous exception handler. Reviewed by: kib, markj Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D44807 --- sys/arm64/arm64/exception.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/arm64/arm64/exception.S b/sys/arm64/arm64/exception.S index 662684588e0c..3dff834e27a2 100644 --- a/sys/arm64/arm64/exception.S +++ b/sys/arm64/arm64/exception.S @@ -252,9 +252,11 @@ ENTRY(handle_el0_sync) KMSAN_ENTER ldr x0, [x18, #PC_CURTHREAD] mov x1, sp + mov x22, x0 str x1, [x0, #TD_FRAME] bl do_el0_sync do_ast + str xzr, [x22, #TD_FRAME] KMSAN_LEAVE restore_registers 0 ERET From nobody Wed Jun 12 15:51:05 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzqlG0sFcz5Mxlk; Wed, 12 Jun 2024 15:51:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzqlF5bQgz4YsT; Wed, 12 Jun 2024 15:51:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718207465; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M5iQbyXcI/ur+4ygYGe6W0/oBTCCLvEyVLaNXvvWmB4=; b=X2hz3gaiHkbEiwi9BOBOdaqdVwOuSwKCaqD2jD48niq9+DBilosQasvrQuqK92b/k2tWOj FvjVjwUE00HChuk0d5q2G4rW+tOcGkXELdWvwZ/gOQcUoG6q4wTOi9+cn7Lj6G7DE7t28V 89dQIPHF2rGyKjPTEUBq+T5JjFlT4PWx9No9lG2sG7VOfr4UTUE+WdhKLsW18jhwBWvvgp 4CNoor7Va4K9BYIrmf7CnfqiDQa3NV1eyhWOHmTylR+X6RRJ4F3FSQqEtPhwzfHq4qwjS7 mwF3OFUu4D814cW6dgNDenO8UFDCL5lf5TQA6yB+n+7vlf8t+7gusbi7lciTYA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718207465; a=rsa-sha256; cv=none; b=jkhyu1MAKXYv11PvneRJcxVQiOxRalCLYYxycfXBrP+f9is3wDfeDzOwuXtepPuKataV4y N4v2ClJ4DSZIcGLG1yCUBf9iOhXMm/1V4byker23Z0gClN8ODT4Ky8UjB5yTerrfe0lyPF MTlCZNCb5sUmcO7bnjvRevKB4jBHKeqIH4VchwDGKEp4OH5NUfIap6NvCXzhKEmt2Iwt0e cOvWPOqgYbgfMR2TFAZM+2hQ2KCOKM/m/AnB63KmQD1XeO25Ey3XYTcd668WwaOcGPPzDJ WVio5Ivap2d9joP+y2xOyDyGw41RByszJnbSk1l9zBVexxwUtMrpUaU+CUZjCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718207465; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M5iQbyXcI/ur+4ygYGe6W0/oBTCCLvEyVLaNXvvWmB4=; b=t6T06iRpCNNYsheuGMj8wZzmZHthkFcjI7RTwwfaY6G3BFqxYJUniWoficsOWapJhleGwC 5OPOR2JnN/vxtHpO/0dsJcSfNuW+CIhmOPJcAE4SWJsav/BKN98eIUZENb+TZCiqvev7cT UTxGNu6ydUZCOYdjrEv7919Li0L7QDQRC2gF0R952vTwvMo4B4RLMJeQrnFgUceVH3XqBS GO/rnJQgWDYkWjxGDFNszx0JXUyXpuJXfVVO76qvN6WRj8vSuLDQrMAkpJbM4+o1G0VkUt 4SblF+3DCiQQmsqLzLVP5QXxL+GSsNXldzkTcyUy+jEakmkMHWVQKuA78CTjyQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzqlF59cCzyYf; Wed, 12 Jun 2024 15:51:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CFp5nG057576; Wed, 12 Jun 2024 15:51:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CFp5Ta057573; Wed, 12 Jun 2024 15:51:05 GMT (envelope-from git) Date: Wed, 12 Jun 2024 15:51:05 GMT Message-Id: <202406121551.45CFp5Ta057573@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: a30149b2a9c6 - main - arm64: Create a version of vfp_save_state for cpu_switch List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a30149b2a9c6ac5280523eea9570e5b5e5f1fdf8 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=a30149b2a9c6ac5280523eea9570e5b5e5f1fdf8 commit a30149b2a9c6ac5280523eea9570e5b5e5f1fdf8 Author: Andrew Turner AuthorDate: 2024-06-12 13:09:14 +0000 Commit: Andrew Turner CommitDate: 2024-06-12 13:09:14 +0000 arm64: Create a version of vfp_save_state for cpu_switch This will be used when we add SVE support to reduce the registers needed to be saved on context switch. Reviewed by: imp Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D43305 --- sys/arm64/arm64/swtch.S | 4 +--- sys/arm64/arm64/vfp.c | 8 ++++++++ sys/arm64/include/vfp.h | 1 + 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/sys/arm64/arm64/swtch.S b/sys/arm64/arm64/swtch.S index ca00d473fd47..6af70ca839a0 100644 --- a/sys/arm64/arm64/swtch.S +++ b/sys/arm64/arm64/swtch.S @@ -148,9 +148,7 @@ ENTRY(cpu_switch) mov x21, x2 #ifdef VFP - /* Load the pcb address */ - mov x1, x4 - bl vfp_save_state + bl vfp_save_state_switch mov x0, x20 #else mov x0, x1 diff --git a/sys/arm64/arm64/vfp.c b/sys/arm64/arm64/vfp.c index f35cd960702b..c65108a83399 100644 --- a/sys/arm64/arm64/vfp.c +++ b/sys/arm64/arm64/vfp.c @@ -216,6 +216,14 @@ vfp_save_state_savectx(struct pcb *pcb) vfp_save_state_common(curthread, pcb); } +void +vfp_save_state_switch(struct thread *td) +{ + KASSERT(td != NULL, ("NULL vfp thread")); + + vfp_save_state_common(td, td->td_pcb); +} + /* * Update the VFP state for a forked process or new thread. The PCB will * have been copied from the old thread. diff --git a/sys/arm64/include/vfp.h b/sys/arm64/include/vfp.h index 7f4c86e7737d..47d068d6050c 100644 --- a/sys/arm64/include/vfp.h +++ b/sys/arm64/include/vfp.h @@ -79,6 +79,7 @@ void vfp_reset_state(struct thread *, struct pcb *); void vfp_restore_state(void); void vfp_save_state(struct thread *, struct pcb *); void vfp_save_state_savectx(struct pcb *); +void vfp_save_state_switch(struct thread *); struct fpu_kern_ctx; From nobody Wed Jun 12 16:41:15 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vzrs73WrVz5N3Jr; Wed, 12 Jun 2024 16:41:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vzrs71CxJz4gcW; Wed, 12 Jun 2024 16:41:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210475; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tiU6thc7FYRMS6p4QZwZNGwUXDnrwDm/gViEKqet9yM=; b=TLNKojoEbHxm0mpJ0umkztHnZaZzZ8Fq/K/uB4RPZRMX2eeZ1x7pbDqMxlbu4BQWI7O2Bg uELq6TXo5DWmUPRM0ade5vLNrn6Mxglh0lyKxe4BqXYIM0ydzJLRgOifgly/iIk1/4kw5o FH9LnRpllrwWWenbo8F7Uim1xnN7mnErf1plQNf+/deHudS6+vOjPo0yeD+nL+Mgn5IOWL m2mSPXkCstJHKzv4m/x7/IcADbbvUceG9aFi7b1d8ziCxVUxBVNvQF9KnBXRLgVUhndMjU i/pUMaE97xpkxGkMx+Qys9uQQ8gLcDmi4SJlahJaSfOrfsAgKr5/VPOJ3bf0wA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718210475; a=rsa-sha256; cv=none; b=UXxSonWH+cdpgOhGsL+2Y7gGHkBgXVa1l98VAnvLYCWnhJvbXU8M0Q6DgPbLm/g1OQPWNW e0C2ERmGkP+XWJQ4cwLrKsLqdWeYKbKf01045mmqrxWoX9LWZySWATU90Z4oynaMaeqrV+ 91ZSC/y7k+AzHbrUcMAwc3VqNATkcum8Oe2xbhAXhxRABTbd8lMRv1Qao0JfLvCY6ZVbIk Bj4Po8ZB8CzpIH6d1vxIiSlYVLzJY8GUBFdjfNCmMcuLCCELJWjtKUMp9/XCgQ4ZCX232W DA8lnw7ILf+GtUysIuNtOMN8nOu4snjsANMsczjUgh55+uESbB5HwuOxGctoxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210475; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tiU6thc7FYRMS6p4QZwZNGwUXDnrwDm/gViEKqet9yM=; b=raEkPW2uAm+n3c0JjeleMIxhPyjMSGkdW3lRfO6wmp3Ll4w19OSRf2zRMw/SSdiXHgGRt2 AzMrCgHCBY6bXdvEDOEue7hGzka6T/WURHIlZHGxNLAObppyX/JVRnBgWPekEUVoydcauI QwiSTHAl9r5A3lEq/H1yY7p1xSCCdxOCCmWTRJAi9b3fFtHLGehl6qJvlHYTmamahgVBpT yHfJEDOEflzGM/6QBK7rT6+sm+iOQYLGkk5bIZvZ0WyNNinIZmpx+QHl4lP1ccCeGn3tJI kaTAW8BsIt4RSYh4P1XLqFa2H/bBPnQvnb6T22Q77gXSdrdEkn1R8dSIWkjsLQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vzrs70hmhz114T; Wed, 12 Jun 2024 16:41:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CGfFCh046355; Wed, 12 Jun 2024 16:41:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CGfFal046352; Wed, 12 Jun 2024 16:41:15 GMT (envelope-from git) Date: Wed, 12 Jun 2024 16:41:15 GMT Message-Id: <202406121641.45CGfFal046352@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 4ed728875b89 - stable/14 - fwget: update wireless IDs for rtw88/89, ath1xk, mt76 and add iwlwifi List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4ed728875b89bbb05885b5dd7a606f70acd1524d Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=4ed728875b89bbb05885b5dd7a606f70acd1524d commit 4ed728875b89bbb05885b5dd7a606f70acd1524d Author: Bjoern A. Zeeb AuthorDate: 2024-04-23 01:10:07 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 13:57:00 +0000 fwget: update wireless IDs for rtw88/89, ath1xk, mt76 and add iwlwifi Update and add (new) PCI IDs for Realtek rtw88/89, Mediatek 7996/7925, QCA ath1xk, and add Intel iwlwifi IDs. Rather than using a package per driver add fine(r) grained flavors even though it is a lot more likely to break in certain cases. For Intel we need a great level of detail to match PCI IDs so also pass the full pciconf -l line to into the pci_* files as "$2" to have access to these. This lines up with ports commit 80f50c9eb66d. Sponsored by: The FreeBSD Foundation Reviewed by: manu (earlier version) Differential Revision: https://reviews.freebsd.org/D44918 (cherry picked from commit d33f5a0afa54be7f18775f6506f015c7f79a6a5f) --- usr.sbin/fwget/pci/Makefile | 1 + usr.sbin/fwget/pci/pci | 2 +- usr.sbin/fwget/pci/pci_network_intel | 437 ++++++++++++++++++++++++++++++++ usr.sbin/fwget/pci/pci_network_mediatek | 53 ++-- usr.sbin/fwget/pci/pci_network_qca | 62 +++-- usr.sbin/fwget/pci/pci_network_realtek | 46 +++- 6 files changed, 539 insertions(+), 62 deletions(-) diff --git a/usr.sbin/fwget/pci/Makefile b/usr.sbin/fwget/pci/Makefile index 66b3901e4a91..6c500dae6df6 100644 --- a/usr.sbin/fwget/pci/Makefile +++ b/usr.sbin/fwget/pci/Makefile @@ -1,6 +1,7 @@ PACKAGE= fwget SCRIPTS=pci \ + pci_network_intel \ pci_network_mediatek \ pci_network_qca \ pci_network_realtek \ diff --git a/usr.sbin/fwget/pci/pci b/usr.sbin/fwget/pci/pci index 6a66049842e2..fbdfa0001c5c 100644 --- a/usr.sbin/fwget/pci/pci +++ b/usr.sbin/fwget/pci/pci @@ -107,7 +107,7 @@ pci_search_packages() fi . ${LIBEXEC_PATH}/pci_${class}_${vendor} - pci_${class}_${vendor} ${device} + pci_${class}_${vendor} ${device} "${fulldevice}" done IFS=${oldifs} } diff --git a/usr.sbin/fwget/pci/pci_network_intel b/usr.sbin/fwget/pci/pci_network_intel new file mode 100644 index 000000000000..cf8c52075db3 --- /dev/null +++ b/usr.sbin/fwget/pci/pci_network_intel @@ -0,0 +1,437 @@ +#- +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2024 The FreeBSD Foundation +# +# This software was developed by Björn Zeeb +# under sponsorship from the FreeBSD Foundation. +# + +# Some iwlwifi chipsets are detected by other means and we cannot replicate +# the full logic here. +# Currently we also filter out all those which do have a wildcard device ID +# as well as all for those which exists no firmware (yet). + +# iwlwifi (dynamic) +pci_network_intel_iwlwifi() +{ + + local idstr=$(echo $2 | sed 's,.*\ device=\(0x[0-9a-z]*\) subvendor=\(0x[0-9a-z]*\) subdevice=\(0x[0-9a-z]*\),\1/\2/\3,') + + case "${idstr}" in + + # The case pattern table below is generated by a script also helping + # to generate the flavor/firmware Makefile definitions for ports. + # { sys/contrib/dev/iwlwifi/zzz_fw_ports_fwget.sh } + ### >>> + + # 7000 + 0x08b1/*/0x4a6c) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4a6e) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4a70) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4c60) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4c70) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x402a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x406a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x446a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x486e) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4020) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4060) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4062) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4070) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4072) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4160) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4162) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4170) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4420) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4460) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4462) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4470) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4472) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4560) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4570) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4870) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x5070) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x5072) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x5170) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x5770) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc02a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc06a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc020) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc060) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc062) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc070) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc072) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc160) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc162) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc170) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc360) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc420) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc460) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc462) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc470) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc472) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc560) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc570) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc760) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc770) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xcc60) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xcc70) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0x426a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0x4220) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0x4260) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0x4262) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0x4270) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0x4272) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0x4360) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0x4370) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0xc26a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0xc220) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0xc260) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0xc262) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0xc270) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0xc272) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0xc370) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x0060) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x0062) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x0070) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x0072) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x0170) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x0172) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x0470) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x0472) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x1070) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x1170) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x8060) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x8062) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x8070) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x8072) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x8170) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x8172) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x8470) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x8570) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b4/*/0x0270) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b4/*/0x0272) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b4/*/0x0370) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b4/*/0x8270) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b4/*/0x8272) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b4/*/0x8370) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x24fb/*/0x0000) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x24fb/*/0x2010) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x24fb/*/0x2050) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x24fb/*/0x2110) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x24fb/*/0x2150) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5c10) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5f10) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x9e10) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x500a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x502a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x900a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x1010) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5000) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5002) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5010) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5012) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5020) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5090) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5100) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5102) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5110) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5190) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5400) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5410) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5412) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5420) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5490) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5510) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5590) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x9000) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x9010) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x9012) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x9110) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x9112) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x9400) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x9410) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x9510) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x520a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x5200) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x5202) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x5210) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x5212) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x5290) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x5302) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x5310) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x9200) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x9210) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x9310) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3165/*/0x4010) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3165/*/0x4012) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3165/*/0x4110) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3165/*/0x4410) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3165/*/0x4510) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3165/*/0x8010) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3165/*/0x8110) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3166/*/0x4210) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3166/*/0x4212) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3166/*/0x4310) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + + # 8000 + 0x24f3/*/0x0000) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x01f0) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0004) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x10b0) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0012) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0044) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0050) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0130) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0132) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0150) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0250) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0810) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0850) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0910) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0930) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0950) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x1010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x1012) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x1050) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x1110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x1130) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x1132) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x1150) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x4010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x8010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x8050) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x8110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x8130) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x8132) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x8150) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x9010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x9050) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x9110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x9130) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x9132) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x9150) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0xb0b0) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0xc010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0xc050) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0xc110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0xd0b0) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0xd010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0xd050) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f4/*/0x0030) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f4/*/0x1030) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f4/*/0x8030) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f4/*/0x9030) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f4/*/0xc030) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f4/*/0xd030) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f5/*/0x0010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f6/*/0x0030) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x3e01) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x3e02) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x10d0) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0012) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0014) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0050) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0130) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0150) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0810) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0850) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0910) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0930) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0950) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x1010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x1012) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x1014) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x1110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x1130) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x8010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x8050) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x8110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x8130) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x9010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x9074) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x9110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + + # 9000 + 0x9df0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-9000"; return 1 ;; + 0x30dc/*/*) addpkg "wifi-firmware-iwlwifi-kmod-9000"; return 1 ;; + 0x31dc/*/*) addpkg "wifi-firmware-iwlwifi-kmod-9000"; return 1 ;; + 0x271b/*/*) addpkg "wifi-firmware-iwlwifi-kmod-9000"; return 1 ;; + 0x271c/*/*) addpkg "wifi-firmware-iwlwifi-kmod-9000"; return 1 ;; + 0x2526/*/*) addpkg "wifi-firmware-iwlwifi-kmod-9000"; return 1 ;; + 0xa370/*/*) addpkg "wifi-firmware-iwlwifi-kmod-9000"; return 1 ;; + + # 22000 + 0x02f0/*/0x007c) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/0x0070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/0x0074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/0x0078) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/0x0310) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/0x1651) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/0x1652) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/0x2074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/0x4070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/0x6074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/0x007c) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/0x0070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/0x0074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/0x0078) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/0x0310) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/0x1651) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/0x1652) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/0x2074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/0x4070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x007c) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x0070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x0074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x0078) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x0310) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x1651) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x1652) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x2074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x4070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x6074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/0x007c) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/0x0070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/0x0074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/0x0078) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/0x0310) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/0x1651) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/0x1652) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/0x2074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/0x4070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/0x007c) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/0x0070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/0x0074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/0x0078) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/0x0310) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/0x1651) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/0x1652) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/0x2074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/0x4070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x43f0/*/0x007c) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x43f0/*/0x0070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x43f0/*/0x0074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x43f0/*/0x0078) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x43f0/*/0x1651) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x43f0/*/0x1652) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x43f0/*/0x2074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x43f0/*/0x4070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x43f0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x2723/*/0x1653) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x2723/*/0x1654) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x2723/*/*) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x0a10) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x007c) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x0070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x0074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x0078) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x1651) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x1652) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x2074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x4070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x6074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + + # ax210 + 0x7a70/*/0x0a10) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/0x00b0) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/0x0090) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/0x0098) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/0x0310) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/0x0510) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/0x1671) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/0x1672) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/0x1691) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/0x1692) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x0a10) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x00b0) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x0090) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x0098) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x0310) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x0510) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x1671) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x1672) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x1691) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x1692) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7e40/*/0x1671) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7e40/*/0x1672) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7e40/*/0x1691) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7e40/*/0x1692) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7e40/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7f70/*/0x1671) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7f70/*/0x1672) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7f70/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x51f0/*/0x1671) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x51f0/*/0x1672) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x51f0/*/0x1691) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x51f0/*/0x1692) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x51f0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x51f1/*/0x1671) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x51f1/*/0x1672) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x51f1/*/0x1692) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x51f1/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x54f0/*/0x1671) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x54f0/*/0x1672) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x54f0/*/0x1691) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x54f0/*/0x1692) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x54f0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x0a10) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x0020) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x0024) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x0090) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x0310) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x0510) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x1673) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x1674) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x2020) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x4020) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x6020) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x6024) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0xe020) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0xe024) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2726/*/0x1671) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2726/*/0x1672) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2729/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + + # bz + 0x272b/*/*) addpkg "wifi-firmware-iwlwifi-kmod-bz"; return 1 ;; + 0x272d/*/*) addpkg "wifi-firmware-iwlwifi-kmod-bz"; return 1 ;; + 0x2727/*/*) addpkg "wifi-firmware-iwlwifi-kmod-bz"; return 1 ;; + 0x7740/*/*) addpkg "wifi-firmware-iwlwifi-kmod-bz"; return 1 ;; + 0xa840/*/*) addpkg "wifi-firmware-iwlwifi-kmod-bz"; return 1 ;; + + # sc + 0x6e70/*/*) addpkg "wifi-firmware-iwlwifi-kmod-sc"; return 1 ;; + 0xd340/*/*) addpkg "wifi-firmware-iwlwifi-kmod-sc"; return 1 ;; + 0xe340/*/*) addpkg "wifi-firmware-iwlwifi-kmod-sc"; return 1 ;; + 0xe440/*/*) addpkg "wifi-firmware-iwlwifi-kmod-sc"; return 1 ;; + + ### <<< + + esac +} + +pci_network_intel() +{ + + for _drv in iwlwifi; do + pci_network_intel_${_drv} "$1" "$2" + case $? in + 1) break ;; + esac + done +} diff --git a/usr.sbin/fwget/pci/pci_network_mediatek b/usr.sbin/fwget/pci/pci_network_mediatek index 5e4d2af9eb26..3ed6c8b95b47 100644 --- a/usr.sbin/fwget/pci/pci_network_mediatek +++ b/usr.sbin/fwget/pci/pci_network_mediatek @@ -2,6 +2,10 @@ # SPDX-License-Identifier: BSD-2-Clause # # Copyright 2023 Bjoern A. Zeeb +# Copyright (c) 2024 The FreeBSD Foundation +# +# Portions of this software were developed by Björn Zeeb +# 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 @@ -25,45 +29,38 @@ # SUCH DAMAGE. # -# mt7915 -pci_network_mediatek_mt7915() +pci_network_mediatek_mt76() { - # awk 'BEGIN { x = 0; } { if (/mt7915_pci_device_table/) { x=1 }; if (/^\};/) { x=0 }; if (x==1 && /PCI_DEVICE\(PCI_VENDOR_ID_MEDIATEK,/) { gsub(").*", "", $3); printf "%s)\taddpkg \"wifi-firmware-mt76-kmod\"; return 1 ;;\n", tolower($3) } }' *.c - case "$1" in - 0x7915) addpkg "wifi-firmware-mt76-kmod"; return 1 ;; - 0x7906) addpkg "wifi-firmware-mt76-kmod"; return 1 ;; - esac -} + # The case pattern table below is generated by a script also helping + # to generate the flavor/firmware Makefile definitions for ports. + # { sys/contrib/dev/mediatek/mt76/zzz_fw_ports_fwget.sh } + ### >>> -# mt7921 -pci_network_mediatek_mt7921() -{ + 0x0608) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; + 0x0616) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; + 0x0717) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; + 0x7906) addpkg "wifi-firmware-mediatek-kmod-mt7915"; return 1 ;; + 0x790a) addpkg "wifi-firmware-mediatek-kmod-mt7915"; return 1 ;; + 0x7915) addpkg "wifi-firmware-mediatek-kmod-mt7915"; return 1 ;; + 0x7916) addpkg "wifi-firmware-mediatek-kmod-mt7915"; return 1 ;; + 0x7922) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; + 0x7925) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; + 0x7961) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; + 0x7990) addpkg "wifi-firmware-mediatek-kmod-mt7996"; return 1 ;; + 0x7991) addpkg "wifi-firmware-mediatek-kmod-mt7996"; return 1 ;; + 0x7992) addpkg "wifi-firmware-mediatek-kmod-mt7996"; return 1 ;; + 0x799a) addpkg "wifi-firmware-mediatek-kmod-mt7996"; return 1 ;; - # awk 'BEGIN { x = 0; } { if (/mt7921_pci_device_table/) { x=1 }; if (/^\};/) { x=0 }; if (x==1 && /PCI_DEVICE\(PCI_VENDOR_ID_MEDIATEK,/) { gsub(").*", "", $3); printf "%s)\taddpkg \"wifi-firmware-mt76-kmod\"; return 1 ;;\n", tolower($3) } }' *.c - case "$1" in - 0x7961) addpkg "wifi-firmware-mt76-kmod"; return 1 ;; - 0x7922) addpkg "wifi-firmware-mt76-kmod"; return 1 ;; - 0x0608) addpkg "wifi-firmware-mt76-kmod"; return 1 ;; - 0x0616) addpkg "wifi-firmware-mt76-kmod"; return 1 ;; - esac -} - -# mt7996 -pci_network_mediatek_mt7996() -{ - - # awk 'BEGIN { x = 0; } { if (/mt7996_pci_device_table/) { x=1 }; if (/^\};/) { x=0 }; if (x==1 && /PCI_DEVICE\(PCI_VENDOR_ID_MEDIATEK,/) { gsub(").*", "", $3); printf "%s)\taddpkg \"wifi-firmware-mt76-kmod\"; return 1 ;;\n", tolower($3) } }' *.c - case "$1" in - 0x7990) addpkg "wifi-firmware-mt76-kmod"; return 1 ;; + ### <<< esac } pci_network_mediatek() { - for _drv in mt7915 mt7921 mt7996; do + for _drv in mt76; do pci_network_mediatek_${_drv} "$1" case $? in 1) break ;; diff --git a/usr.sbin/fwget/pci/pci_network_qca b/usr.sbin/fwget/pci/pci_network_qca index cf33e0d87239..a97d29ef1135 100644 --- a/usr.sbin/fwget/pci/pci_network_qca +++ b/usr.sbin/fwget/pci/pci_network_qca @@ -29,18 +29,27 @@ pci_network_qca_ath10k() { - # awk '/DEVICE_ID[[:space:]]/ { gsub("[()]", "", $3); printf "%s)\taddpkg \"wifi-firmware-ath10k-kmod\"; return 1 ;;\n", tolower($3) }' hw.h - # We ignore the ubiquity entry for now. case "$1" in - 0x003c) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;; - 0x0041) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;; - 0x003e) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;; - 0x0042) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;; - 0x0040) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;; - 0x0056) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;; - 0x0046) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;; - 0x0042) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;; - 0x0050) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;; + + # The case pattern table below is generated by a script also helping + # to generate the flavor/firmware Makefile definitions for ports. + # { sys/contrib/dev/athk/ath10k/zzz_fw_ports_fwget.sh } + ### >>> + + 0x003c) addpkg "wifi-firmware-ath10k-kmod-qca988x_hw20"; return 1 ;; + 0x003e) addpkg "wifi-firmware-ath10k-kmod-qca6174_hw21" + addpkg "wifi-firmware-ath10k-kmod-qca6174_hw30" + return 1 ;; + 0x0040) addpkg "wifi-firmware-ath10k-kmod-qca99x0_hw20"; return 1 ;; + 0x0041) addpkg "wifi-firmware-ath10k-kmod-qca6174_hw21"; return 1 ;; + 0x0042) addpkg "wifi-firmware-ath10k-kmod-qca6174_hw30" + addpkg "wifi-firmware-ath10k-kmod-qca9377_hw10" + return 1 ;; + 0x0046) addpkg "wifi-firmware-ath10k-kmod-qca9984_hw10"; return 1 ;; + 0x0050) addpkg "wifi-firmware-ath10k-kmod-qca9887_hw10"; return 1 ;; + 0x0056) addpkg "wifi-firmware-ath10k-kmod-qca9888_hw20"; return 1 ;; + + ### <<< esac } @@ -48,31 +57,42 @@ pci_network_qca_ath10k() pci_network_qca_ath11k() { - # awk '/DEVICE_ID[[:space:]]/ { gsub("[()]", "", $3); printf "%s)\taddpkg \"wifi-firmware-ath11k-kmod\"; return 1 ;;\n", tolower($3) }' pci.c case "$1" in - 0x1101) addpkg "wifi-firmware-ath11k-kmod"; return 1 ;; - 0x1104) addpkg "wifi-firmware-ath11k-kmod"; return 1 ;; - 0x1103) addpkg "wifi-firmware-ath11k-kmod"; return 1 ;; + + # The case pattern table below is generated by a script also helping + # to generate the flavor/firmware Makefile definitions for ports. + # { sys/contrib/dev/athk/ath11k/zzz_fw_ports_fwget.sh } + ### >>> + + 0x1101) addpkg "wifi-firmware-ath11k-kmod-qca6390_hw20"; return 1 ;; + 0x1103) addpkg "wifi-firmware-ath11k-kmod-wcn6855_hw20"; return 1 ;; + 0x1104) addpkg "wifi-firmware-ath11k-kmod-qcn9074_hw10"; return 1 ;; + + ### <<< esac } # ath12k pci_network_qca_ath12k() { - # No ath12k firmware package yet - return 0 - # awk '/DEVICE_ID[[:space:]]/ { gsub("[()]", "", $3); printf "%s)\taddpkg \"wifi-firmware-ath12k-kmod\"; return 1 ;;\n", tolower($3) }' pci.c case "$1" in - 0x1109) addpkg "wifi-firmware-ath12k-kmod"; return 1 ;; - 0x1107) addpkg "wifi-firmware-ath12k-kmod"; return 1 ;; + + # The case pattern table below is generated by a script also helping + # to generate the flavor/firmware Makefile definitions for ports. + # { sys/contrib/dev/athk/ath12k/zzz_fw_ports_fwget.sh } + ### >>> + + 0x1107) addpkg "wifi-firmware-ath12k-kmod-wcn7850_hw20"; return 1 ;; + + ### <<< esac } pci_network_qca() { - for _drv in ath10k ath11k; do + for _drv in ath10k ath11k ath12k; do pci_network_qca_${_drv} "$1" case $? in 1) break ;; diff --git a/usr.sbin/fwget/pci/pci_network_realtek b/usr.sbin/fwget/pci/pci_network_realtek index 795d9d4a6e0a..d70470b65244 100644 --- a/usr.sbin/fwget/pci/pci_network_realtek +++ b/usr.sbin/fwget/pci/pci_network_realtek @@ -2,6 +2,10 @@ # SPDX-License-Identifier: BSD-2-Clause # # Copyright 2023 Bjoern A. Zeeb +# Copyright (c) 2024 The FreeBSD Foundation +# +# Portions of this software were developed by Björn Zeeb +# 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 @@ -29,14 +33,21 @@ pci_network_realtek_rtw88() { - # awk '/PCI_DEVICE\(PCI_VENDOR_ID_REALTEK,/ { gsub(").*", "", $2); printf "%s)\taddpkg \"wifi-firmware-rtw88-kmod\"; return 1 ;;\n", tolower($2) }' *.c case "$1" in - 0xd723) addpkg "wifi-firmware-rtw88-kmod"; return 1 ;; - 0xb821) addpkg "wifi-firmware-rtw88-kmod"; return 1 ;; - 0xc821) addpkg "wifi-firmware-rtw88-kmod"; return 1 ;; - 0xb822) addpkg "wifi-firmware-rtw88-kmod"; return 1 ;; - 0xc822) addpkg "wifi-firmware-rtw88-kmod"; return 1 ;; - 0xc82f) addpkg "wifi-firmware-rtw88-kmod"; return 1 ;; + + # The case pattern table below is generated by a script also helping + # to generate the flavor/firmware Makefile definitions for ports. + # { sys/contrib/dev/rtw88/zzz_fw_ports_fwget.sh } + ### >>> + + 0xd723) addpkg "wifi-firmware-rtw88-kmod-rtw8723d"; return 1 ;; + 0xb821) addpkg "wifi-firmware-rtw88-kmod-rtw8821c"; return 1 ;; + 0xc821) addpkg "wifi-firmware-rtw88-kmod-rtw8821c"; return 1 ;; + 0xb822) addpkg "wifi-firmware-rtw88-kmod-rtw8822b"; return 1 ;; + 0xc822) addpkg "wifi-firmware-rtw88-kmod-rtw8822c"; return 1 ;; + 0xc82f) addpkg "wifi-firmware-rtw88-kmod-rtw8822c"; return 1 ;; + + ### <<< esac } @@ -44,11 +55,22 @@ pci_network_realtek_rtw88() pci_network_realtek_rtw89() { - # awk '/PCI_DEVICE\(PCI_VENDOR_ID_REALTEK,/ { gsub(").*", "", $2); printf "%s)\taddpkg \"wifi-firmware-rtw89-kmod\"; return 1 ;;\n", tolower($2) }' *.c - case "$1" in - 0x8852) addpkg "wifi-firmware-rtw89-kmod"; return 1 ;; - 0xa85a) addpkg "wifi-firmware-rtw89-kmod"; return 1 ;; - 0xc852) addpkg "wifi-firmware-rtw89-kmod"; return 1 ;; + case "$1" in + + # The case pattern table below is generated by a script also helping + # to generate the flavor/firmware Makefile definitions for ports. + # { sys/contrib/dev/rtw89/zzz_fw_ports_fwget.sh } + ### >>> + + 0xb851) addpkg "wifi-firmware-rtw89-kmod-rtw8851b"; return 1 ;; + 0x8852) addpkg "wifi-firmware-rtw89-kmod-rtw8852a"; return 1 ;; + 0xa85a) addpkg "wifi-firmware-rtw89-kmod-rtw8852a"; return 1 ;; + 0xb852) addpkg "wifi-firmware-rtw89-kmod-rtw8852b"; return 1 ;; + 0xb85b) addpkg "wifi-firmware-rtw89-kmod-rtw8852b"; return 1 ;; + 0xc852) addpkg "wifi-firmware-rtw89-kmod-rtw8852c"; return 1 ;; + 0x8922) addpkg "wifi-firmware-rtw89-kmod-rtw8922a"; return 1 ;; + + ### <<< esac } From nobody Wed Jun 12 16:41:18 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzrsD4lq6z5N3B1; Wed, 12 Jun 2024 16:41:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzrsB48PZz4ghd; Wed, 12 Jun 2024 16:41:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210478; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GjKXSYCqRRrluJjXHjbZmerOdGBnpwm9Jxd5gIrq8GA=; b=RLDVMFjHl2F9Y+fwOdUPph7An0owGhsjSRp1p9IWoizkcfpXsvG18Rz+breR3Y3awqfxDp bEN90bk54YEooW3mPwclppH4AhdLcaAF/3qa8w4oXhIkqCMISexV3f/2UD76uQ4uyY1D3c h2yQPHHFJ6uY1ylfj9OEM/e9ZZDak1pvWVhMGOPbMB2A3g+KWwREFnRrtHpkot7xdcgBJf YqjXQdH7ywH67A1fqDuYB6bTGa47bsB0lQeXBzgnEnyJWTmDq+P2gFfaJ9pDQDI+YFt6Zr OkYzZoUtEwj+hkYseoI5jkkrQWWn5+kTBkLK8GZYDu6pA4ISnyuxYR6U5XTylw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718210478; a=rsa-sha256; cv=none; b=fbCCLBKQymg3vz0z2P16+ZPg3B6QxBRj1AIHykQXy/wzqZSd9kYhMz5wAy3fSEnxbaRvuK mZWgDCsEkEGAxcmn+Rj3qcV9c2rrmSqeXgLmGdVk+tyJ/iCGySO98o3UjBpZZDN5IqRPNl 9HMfq/QnqWsqAfVhsNaHrKs4PyUdP4wPwHFRfY7IfgKiUmzwUQzAbkJnJ5rY/vmj8RlAvN hih46yh/eIEo1HJx00Af08MihnNnmVBPKxFp74SYpxUF/HpoH+tDYIfsNkmm+8EZpoQRCf /qgU6htcqka6Anlxf5FN7ACQbSiJDJHk1oVq1Q/bhaNeKbG1VAQYjp19/c92CA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210478; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GjKXSYCqRRrluJjXHjbZmerOdGBnpwm9Jxd5gIrq8GA=; b=rOg31O5Y3sg1W84mTKCzC04/KgGbhpQoReQJi1Ihx1BuJypAN/a5NPVYmXYxxfp+piVydM QfkwPz36wdKcMZkexQqi5Z22kTBvtgZ3uToejX4CB8JS+U4x7E0KSnuxnatW6yMRArguGs PJLW6ia8MoNAQNBkS/tcX3MrQhVIyoX1h4zMPvMcWEXWh+jb4/mlD47DW373r4VRDaLpx8 StF9oPlcNKLivo/lkixmZXSG8+WnH3v0QMFKy87jWuKF0V/+enkW5E9ObwJtKF/Xd1zFB2 +EyBZuR0HiID49dk6Vntn8vBKxYZRbJdDHlMfmo31G/R1jzehf0OQ3ooajFvRg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzrsB3f7Mz10nV; Wed, 12 Jun 2024 16:41:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CGfI90046479; Wed, 12 Jun 2024 16:41:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CGfIf5046476; Wed, 12 Jun 2024 16:41:18 GMT (envelope-from git) Date: Wed, 12 Jun 2024 16:41:18 GMT Message-Id: <202406121641.45CGfIf5046476@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: c8cf6a7706a0 - stable/14 - LinuxKPI: add FIELD_PREP_CONST() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c8cf6a7706a090a821fdbc77d5b9b0a6474c8473 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=c8cf6a7706a090a821fdbc77d5b9b0a6474c8473 commit c8cf6a7706a090a821fdbc77d5b9b0a6474c8473 Author: Bjoern A. Zeeb AuthorDate: 2024-05-13 17:40:26 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 13:57:37 +0000 LinuxKPI: add FIELD_PREP_CONST() Add FIELD_PREP_CONST() like FIELD_PREP() without any extra checks likely expected on this version in Linux. This is called by an updated wireless driver. Sposnored by: The FreeBSD Foundation MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D45180 (cherry picked from commit bb025df257386c5d1087b652e8ed951bceb89862) --- sys/compat/linuxkpi/common/include/linux/bitfield.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/bitfield.h b/sys/compat/linuxkpi/common/include/linux/bitfield.h index a2020d247489..8a91b0663f37 100644 --- a/sys/compat/linuxkpi/common/include/linux/bitfield.h +++ b/sys/compat/linuxkpi/common/include/linux/bitfield.h @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2020 The FreeBSD Foundation + * Copyright (c) 2020-2024 The FreeBSD Foundation * * This software was developed by Björn Zeeb under sponsorship from * the FreeBSD Foundation. @@ -131,6 +131,10 @@ _uX_replace_bits(8) #define FIELD_PREP(_mask, _value) \ (((typeof(_mask))(_value) << __bf_shf(_mask)) & (_mask)) +/* Likely would need extra sanity checks compared to FIELD_PREP()? */ +#define FIELD_PREP_CONST(_mask, _value) \ + (((typeof(_mask))(_value) << __bf_shf(_mask)) & (_mask)) + #define FIELD_GET(_mask, _value) \ ((typeof(_mask))(((_value) & (_mask)) >> __bf_shf(_mask))) From nobody Wed Jun 12 16:41:16 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vzrs95CKFz5N3GN; Wed, 12 Jun 2024 16:41:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vzrs81xhpz4gl1; Wed, 12 Jun 2024 16:41:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210476; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SnY6O/XYFEr/gE6yDCSdYJ/53r6PmosyfX+J4C93QRE=; b=Wlkfv9XuPE3dYsyua71hw7c9QltbjNC5JVZo13QEvE7c+yIH0+5vf7PeCeuaD7Vmunb8P8 qOgCCLbI2ou/oUGYs5JQeuzEwf0EQaP1b0cBmyLgqh/o2Az5DyjRNSq3+EvtZ1RsX9rdAU vsjsZKDhPX5XRvwnf9qacSOw4Czk4YUWcO1Qqws+1+slvgXc9Fy7rdcJiHAbZn3W8F7nuu Rxrt2eJUMM4YsB1gLHZScujKktPsMx8/KMIDXIey97HOjxgZ5H/VpWfUHIFACWVInqoWyP P85B77H+m4FnxtteVY9nV553YHJLA2q2BcZOnJoQbn/fg0ffuEXdhhKYTBE+1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718210476; a=rsa-sha256; cv=none; b=g9YEAQaqD1dRsJa9DTFMMbuO4k0mt7dPdhydGBw9TK6HYsOyqMh4/jnhYff35LsFZIBvs9 kv+8NVZnsXtopMYCQJ8c7a8iUeeyh6QS436Q9Ne9dupPbokAFh+s0qAjnQjJYRnpuC/v/M GxnpQUlUB6KCCHc1+SKLRiPfoMxlI/czEKEXBkg35ZELWHu8LMZt9HCXzn0rQtcevnf9Ny bZpkJyoqwKfunmCBJycmXHAp7KgFCwTceE5PnYTMVR68563bEz3nSrB4BcJpEqe+j7v4/8 jMuTen1fipP79WmOrk1AJ0lAJEk5bS7j9Pl1M03lsY2sRAK48Ns8O+znqcISNg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210476; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SnY6O/XYFEr/gE6yDCSdYJ/53r6PmosyfX+J4C93QRE=; b=o5F9i5KXYxUIgkYwAnNPtQAWbvWzaxEUj5ANZnK94CUeGqfXzMFkj6ehwNq/lprUpVlCgM wFyNJ5uicCpzuHKO6Axjt6wthhclEYGcahVTyiwaMVhAaI4gDvkKjTbMUKIV5SIEsusY2A sJMJhzAeVB5wyh0yb1X9E1cOKBU5I27aVALA6qTcjI19s0XXdbYqxVDoVZWDMDft5eNKee 7b2pKe/HQpQhgzwT17HwN1AnjfyuE7bjkchTzhHi3Z0K3Z8Ni243cUDhF0z1tnviiwr95b 2T7rvlUkhz7oi8CAa87sXPFy4e/U0WKaabYjJ+EBBxqVINLXyexSTKiWCrGr2Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vzrs81NgGz10nR; Wed, 12 Jun 2024 16:41:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CGfG9W046394; Wed, 12 Jun 2024 16:41:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CGfG3C046391; Wed, 12 Jun 2024 16:41:16 GMT (envelope-from git) Date: Wed, 12 Jun 2024 16:41:16 GMT Message-Id: <202406121641.45CGfG3C046391@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 787b33636194 - stable/14 - net80211: fix IEEE80211_FHT_BITS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 787b33636194106e7908eded32f5d9b43b533dc2 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=787b33636194106e7908eded32f5d9b43b533dc2 commit 787b33636194106e7908eded32f5d9b43b533dc2 Author: Bjoern A. Zeeb AuthorDate: 2024-05-31 21:48:49 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 13:57:17 +0000 net80211: fix IEEE80211_FHT_BITS AMPDU_RX was added as a second AMPDU_TX, LDPC_TX and LDPC_RX missing; correct and add missing. Makes ddb output (and other debugging) look more correct. Sponsored by: The FreeBSD Foundation Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D45505 (cherry picked from commit 5bbf4b6291863452acfb5a7fc76f227848841cac) --- sys/net80211/ieee80211_var.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net80211/ieee80211_var.h b/sys/net80211/ieee80211_var.h index 4c9cdcbfccd9..d41fb1e6559c 100644 --- a/sys/net80211/ieee80211_var.h +++ b/sys/net80211/ieee80211_var.h @@ -722,7 +722,7 @@ MALLOC_DECLARE(M_80211_VAP); #define IEEE80211_FHT_BITS \ "\20\1NONHT_PR" \ - "\23GF\24HT\25AMPDU_TX\26AMPDU_TX" \ + "\21LDPC_TX\22LDPC_RX\23GF\24HT\25AMPDU_TX\26AMPDU_RX" \ "\27AMSDU_TX\30AMSDU_RX\31USEHT40\32PUREN\33SHORTGI20\34SHORTGI40" \ "\35HTCOMPAT\36RIFS\37STBC_TX\40STBC_RX" From nobody Wed Jun 12 16:41:17 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzrsB41SFz5N362; Wed, 12 Jun 2024 16:41:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vzrs93yDwz4gfr; Wed, 12 Jun 2024 16:41:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210477; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5FC1P5Re2ZAf2WUTVqwvzmVoZHRPOSh4NimPprvWNKE=; b=sumkLlHhs/cqcqYyAR2ldvfCTfSexsOLOmbmYjozbP5P89BNE24shKJ2i1u9dYTBOxC83L 6uGNk1se7bltELzWKz7E9/XZ1yq3mcokjmR+esHPQ6+EEbILHgOhaToNQrfvmaZTdPhMkE +b3Ek6meJKI+1Z4G6uGrriIRGmQjqTI4duMgO7cNDH9MY28xUQhDSNE9x2fP4G0meyRrVC LeH2YiEx9/sstJ/aFj2SH1sq+GqwjCUmO4l9t6q5TzZNE/6so9xlxl+mI5n6v6Q2qS5XdR 3l6CJtqhqmFo2LsF61DCvSJPOcYrhrJekcZl+DBWPxFAtP3Lw68jvAsL2b4x5Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718210477; a=rsa-sha256; cv=none; b=WE2YuKzLj3qJawhfy1gO4UdDIz9CP9Ej+WBDJ9tZERnZ29O6HLRTaFpzuLcBVwp3am8QsY Jea72ASnlPlEdwoMMOfU8b6bknmFZGCHGYxdZs3yzCv6AN8jacon2DY9t5ZM/touWlA8xn LnYnK8fK3kGMgmc5SpbP1ek94rDfbZy6c299F57s0D8aahgXWmwcEzQbsvr3hXr5oXa8AP d4qzZ8DTyKt8U5vDlbT3Fn1QM4oiY2jKWlQ7CGPZ779iirFcCw1lxJ16bpYVO5jMNankG7 x3rXnb/IarQ72S91ox5867FwnR+dTeoOomNDv2VQWPJlEvn/3oOd2fHKfXyPKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210477; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5FC1P5Re2ZAf2WUTVqwvzmVoZHRPOSh4NimPprvWNKE=; b=wd6dNnAVep/0B4tgS++ardALAAsjmfvtkJwRuY01DsRMF0P2KhBPhgT6z1QzcKQJoC/E+o 3qP4mtbCb55ljSxgXhd0ilaf+6oGtD4BaS3tTx0HI/8CFuAul500cry7U0kMr6UwXIK1v4 DuvjcC5Wjq+9tRvmYF1Vo4bQzTQ3g1sp/he2t0i7PCEWPB4+QUWu0ZoPC68MDZENvowqVl dMftu1cCPmU3+7EuEHngBQYYemDAqS1rcERGuIXNU/J9YacQfRbY0+ss7zGE8XIX0mxDac zo6biKY13BMXqAZaPeuusdWG28LMyu4Y88SJgcWzo5DQyXraimH4Sf7kCI08Tw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vzrs92gtcz112r; Wed, 12 Jun 2024 16:41:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CGfHmp046437; Wed, 12 Jun 2024 16:41:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CGfHDj046434; Wed, 12 Jun 2024 16:41:17 GMT (envelope-from git) Date: Wed, 12 Jun 2024 16:41:17 GMT Message-Id: <202406121641.45CGfHDj046434@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: a87e584f6c9d - stable/14 - LinuxKPI: add kvmemdup() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a87e584f6c9d1fbe6bb47e588628aae4331c9967 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=a87e584f6c9d1fbe6bb47e588628aae4331c9967 commit a87e584f6c9d1fbe6bb47e588628aae4331c9967 Author: Bjoern A. Zeeb AuthorDate: 2024-05-13 17:43:25 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 13:57:24 +0000 LinuxKPI: add kvmemdup() Add kvmemdup() as a variant of kmemdup(). While currently it could just call kmemdup() we duplicate the code and use kvmalloc() in case someone will change the implementation of kvmalloc/kvfree in slab.h. This is used by an updated wireless driver. Sponsored by: The FreeBSD Foundation Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D45181 (cherry picked from commit 8e4b8e9d807aa379d2a1c3aaac2537ba7d6bf0bf) --- sys/compat/linuxkpi/common/include/linux/string.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/string.h b/sys/compat/linuxkpi/common/include/linux/string.h index 06dcdbd97663..9302c95e8636 100644 --- a/sys/compat/linuxkpi/common/include/linux/string.h +++ b/sys/compat/linuxkpi/common/include/linux/string.h @@ -97,6 +97,18 @@ kmemdup(const void *src, size_t len, gfp_t gfp) return (dst); } +/* See slab.h for kvmalloc/kvfree(). */ +static inline void * +kvmemdup(const void *src, size_t len, gfp_t gfp) +{ + void *dst; + + dst = kvmalloc(len, gfp); + if (dst != NULL) + memcpy(dst, src, len); + return (dst); +} + static inline char * strndup_user(const char __user *ustr, long n) { From nobody Wed Jun 12 16:41:13 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vzrs63dFfz5N37N; Wed, 12 Jun 2024 16:41:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vzrs60S8xz4gZ8; Wed, 12 Jun 2024 16:41:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210474; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wq5yKIK3n4bGIep4MGA0xhfy2Kcj5IP/YlsMI/yZcB4=; b=FDQSuzbjWAil2ZKjy4e5EjzKE9QY8+VkkWPO2LliLnTdPpO6nJHQVRVJnOoVeu2rU3LxaO nxWxDEFKSGzY/s9dmGzTXqu5FlbUWQe2T/9a7ud+bF8J3VtKqgE+8tWpngqpEw8uLhazAH jKycUka0LR7Lc0kve0ksH3Egzw1w9nWwkIsssCgeWE7DqEpsDppOwXlSX2Q4ZO92g/QD03 Ic3L+EpW8ZZVVtjABNNC3jnStldKKFatuGG5BD4MfaUgQVeHDwBuXFR3vtFHG6vo4u/bks UcbVjGUnQWSLRI+wr73BDdY922jVmFxT+ncom9+18L36OBkhScltoJHpftIDiQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718210474; a=rsa-sha256; cv=none; b=U+NQFCbHCjHXeC6NeKUgSnKsG1OUSFZ7c3KsZKvalC/UogAEhHwBsrjzh6DHVJahkOF8BF 81wq4Q2t1+ES/t2iSWNp17jYZ4DKLlWb+kVpl3Qhz1qaIvAwMKWHGKxSbpvXQxmXbYNEJi LxVbYOHDPHjGiQyTabfzAcKR5DE88vywCIsrU5B1tmvlsRsS6diLHoSeC/ruOHgIz8/jdN GLSuSBCMwJ8lPWBGqq8aGhLo35ueAndErj9MmpVi7CGlppbr6rteSd8xJYz3vnw6r7frKi UH5O4YRMd7FqUVWhVIkfF3Fx+ZWsbvAkHSUY6il3KfQczWmnmUw3OeR8jtt4cg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210474; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wq5yKIK3n4bGIep4MGA0xhfy2Kcj5IP/YlsMI/yZcB4=; b=Xw6BMDcqDGxouuB66v3zLX+/peLnEPcQxivYAMcCIj0asDNt7axuAOlXYn8CgAEfjGjhnG 6jNln4PxnOOhxPcLWFM9al9lDBgzzc1hWiKUaaL8DH78jDgCmIQxclXYmD+I/fV6kE4D5U IZKe2cMI61b7CzJD27YRE3XgMROzX7ZYWB95jvKzRdmFDaoBicz9MB8oJ9xPSea9o62ed+ v9vA1k6W8sJPI1Iz6Yrm6A3UDsRSJfrRchF4HvK2LZRP6LjbLjKwdzcbQevs2X/tc9SPlc /Hnonuemh2beYncAX5rdWtQaLmFhWvqr2//BoNBTO2Dg+pPwTy92vgoyriyeCg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vzrs603tdz10nQ; Wed, 12 Jun 2024 16:41:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CGfDaF046285; Wed, 12 Jun 2024 16:41:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CGfDc1046282; Wed, 12 Jun 2024 16:41:13 GMT (envelope-from git) Date: Wed, 12 Jun 2024 16:41:13 GMT Message-Id: <202406121641.45CGfDc1046282@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 0c2b2e5bd99a - stable/14 - iwn(4): correct debug message: "not" to "no" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0c2b2e5bd99a993ff33ed148c6cd3c53d2c02216 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=0c2b2e5bd99a993ff33ed148c6cd3c53d2c02216 commit 0c2b2e5bd99a993ff33ed148c6cd3c53d2c02216 Author: Bjoern A. Zeeb AuthorDate: 2024-06-05 22:01:06 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 13:56:52 +0000 iwn(4): correct debug message: "not" to "no" Sponosred by: The FreeBSD Foundation (cherry picked from commit 9e012a9da5df131b64c2dfd7d9b6645af4ccef0f) --- sys/dev/iwn/if_iwn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/iwn/if_iwn.c b/sys/dev/iwn/if_iwn.c index 3b1d879914b6..d2d44d93f948 100644 --- a/sys/dev/iwn/if_iwn.c +++ b/sys/dev/iwn/if_iwn.c @@ -7532,7 +7532,7 @@ iwn_addba_request(struct ieee80211_node *ni, struct ieee80211_tx_ampdu *tap, break; } if (qid == sc->ntxqs) { - DPRINTF(sc, IWN_DEBUG_XMIT, "%s: not free aggregation queue\n", + DPRINTF(sc, IWN_DEBUG_XMIT, "%s: no free aggregation queue\n", __func__); return 0; } From nobody Wed Jun 12 16:41:26 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzrsM0kfRz5N37T; Wed, 12 Jun 2024 16:41:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzrsL3Zbpz4gg7; Wed, 12 Jun 2024 16:41:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210486; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Biqq2Q0dgqCF9Qvc2zpso6Kj4VyTZXgZoKB3e8XARP0=; b=hXc1IG76sjvT+GxuV4gIsHJ7a9fZZbu/iaWu2IjdV4sDpYa+oMqE+WfareQAAW/FFZjqof 42xUYDdi9A35A0zNEYcucZmemJhyTMxTCSxqeZ8QxEHLVjRhad80l7wmXuRxyXWWV5tY81 zJTN7oHrHqmPD7EukT+ONdlzSyASPXDflSBXwPbreFUQqtJgPfsisgwmbCSOWxiUdAJZfi 4qUnbpJ911jyIP7JNkNVCOO9JEQeUXY9T8vmSMtUG2M3FjjFzh6mpVQIHdzPyxhmhpUqYI PgqQoF8ywo7SIsNamADkjcWGVoDDK8ZVjUbNHqEQsBv71qT399cGReROAMxPfg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718210486; a=rsa-sha256; cv=none; b=cKPc0C+xKfY1Tqkmm/1rjtwJCY1dno1ZrEm7ymePuUJH5wE8+KBd/q7pBGEmExTvAFKxFc yI2Diz0vKErvK6Qj9/0XxpUUkgkfI8VRadpuNhlMutrPeejpbTXV7soQZzWjGoq4+AZ0r2 ZEshleGTsayibhW5sD9QmVLSbkXswc8gIkErTSY2QwmzF6eHWrxuacGH1gaF/m9GMlt1Xs w5UIkPOCAbXaCsm5fBbp39FziYmKqI3GZaJfwZazq117uFi+g+h2spcCRqW/PGgw+VcvA6 sThA1V5gjypM0ozSVcnTZONeLyT0tkt2cuX5u7sBSFWleyfVjjuS5F2zSH8AWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210486; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Biqq2Q0dgqCF9Qvc2zpso6Kj4VyTZXgZoKB3e8XARP0=; b=I35oYt7QWnibY3mCkd7TkPdJTindpEpiI68huTjdy7ddGR2bF4QGJsa9HlbwuLX2QXSXeD QN6Ab/XKINyLaqjVTWqmyjaBP65tCmfQMjbe5Y7cbkPmRxgvb24004v3ggtlMM8K6wQShj jQLDHvynwAzG4PmJYnOKUCbsBVYAqa38C7p1gCVB6PksYVke5/kKV97hrm0MjuxtsQRb/H y8yTqwocZO6rKT5QSRPgJwJY5MaO1ESIFz3GMlQG/6CVcgsOdnr+0Z16fOlsZcLa800Vqh OI9JjC3HiiuX3ol7aQaOlQQINg7QX7jMqRX6B6NHjrCHs910BiZcIaEWNZuITQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzrsL3BxCz10Fm; Wed, 12 Jun 2024 16:41:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CGfQ94046849; Wed, 12 Jun 2024 16:41:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CGfQBU046846; Wed, 12 Jun 2024 16:41:26 GMT (envelope-from git) Date: Wed, 12 Jun 2024 16:41:26 GMT Message-Id: <202406121641.45CGfQBU046846@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 29f9003cbbb3 - stable/14 - LinuxKPI: 802.11: initalize lsta to NULL in linuxkpi_ieee80211_rx() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 29f9003cbbb3874fdbb02b99069868d00bcdff5a Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=29f9003cbbb3874fdbb02b99069868d00bcdff5a commit 29f9003cbbb3874fdbb02b99069868d00bcdff5a Author: Bjoern A. Zeeb AuthorDate: 2024-06-05 22:35:00 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 13:59:11 +0000 LinuxKPI: 802.11: initalize lsta to NULL in linuxkpi_ieee80211_rx() The logic following this new assignment in some cases may not set lsta but the later tracing is checking for it to be != NULL. With lsta not initialized that check may not hold up and later we would dereference lsta->state and possibly panic. Sponsored by: The FreeBSD Foundation Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D45507 (cherry picked from commit 582469016aed4fac3a7ead24dc31000edbb7e823) --- sys/compat/linuxkpi/common/src/linux_80211.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index ecacb74f01f3..6c96f1541488 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -5055,6 +5055,7 @@ no_trace_beacons: goto err; } + lsta = NULL; if (sta != NULL) { lsta = STA_TO_LSTA(sta); ni = ieee80211_ref_node(lsta->ni); From nobody Wed Jun 12 16:41:27 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzrsN0682z5N3Df; Wed, 12 Jun 2024 16:41:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzrsM4Ktbz4gnb; Wed, 12 Jun 2024 16:41:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210487; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ivJDjp6q+2MwTrhNEKmNtYxI1T1WtCZUR4xDteFKKfE=; b=GeUgNJvO+YYRKxQ4aqTp7MM0z71vU4g9Jcyk6Wmvs3ZpXm3aAj/lMJD6RPna5GIzHBUzcu xLacZXaSKzAltx5a1Vhiq2l3S5N+nliDZvJVNXQH+5IZDvyJXTgu9FJmbhI5pmkS/j3kI7 HJeHa7XYUqhMyQxxWtnNbKArjVaMNh6y7p31r6QENoVbCtgJGVXmt+/rg45yXIikdsvSMM ICHONiqJZFbzYlC46UFFu304uTlIWRmGOCneMlHbFwmC2RU22ZjySSwBWyeAAJ3lNpefiJ OS1vb2Q0e4WQD/5gfWt8H5MTBsdnrldkDiTl1zRUDr3FKmDksgvuwNvNqOmPRg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718210487; a=rsa-sha256; cv=none; b=AM0m6h5GWZIGGu5jCQojznjQW5xS0cnCBp54IbB542MYMsu8fJ/R+4MLX6CvnVE18ji6SR ZKqIgNepheeHBqz4BGlknJOeraAluVNsKTnx5cIvZLkcRUyrM0sF+7Z12ThsQb1ZwrVmzw LpZ2+sHiFCJvs+UsZbzH8yPzg0zpD8DHXT3jkraItS1rzXF/KnbfZo3X/ynlBvXnbM6uv+ //t6NGCrFK0gi2hesG3pMDWYQvaMwbN0UtzAVD7MCJjnu6uUDDKT2JDeNGUf/Yc65CregR RpFYJmMEKou5p16GmI7QWHxWAuLfJAKsaliO0A86ioZSH7b4l19CPBZinMe1Hg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210487; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ivJDjp6q+2MwTrhNEKmNtYxI1T1WtCZUR4xDteFKKfE=; b=LiHHoh2p1OQ2jCXEmNsHEGB+CvtP0u1qLjAJvi6C662cEpOjam+j5pK86Wc3bq+re8hSWC n52g5yfrGnv262LFKAwGPz3epyVOmIRDfke1nFeR6Swm9qbzPiaz2frVsn1F9jWLeCnjaw NuXc5YcVWSED71yNyPF2lysS3riSxa0djewZ324ZpKGzRZRbJQwgwch9rAfqKCpn8fIusD aberB9UyGLHYaVxYLQSSOh+0ErA8RLuDYnfF3C4bClgercoxO4A+8wBamUZiNNhG6ubasH F61JDl0iLfx0PwLIqvOB481WENhB9A4JK8HYuQ/7pKaChlJh2Bigwnd/y++1Jw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzrsM3wXPz11QD; Wed, 12 Jun 2024 16:41:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CGfRJ6046897; Wed, 12 Jun 2024 16:41:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CGfRbh046894; Wed, 12 Jun 2024 16:41:27 GMT (envelope-from git) Date: Wed, 12 Jun 2024 16:41:27 GMT Message-Id: <202406121641.45CGfRbh046894@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: e0ac61759dea - stable/14 - LinuxKPI: 802.11: Fix definition of IEEE80211_HT_CAP_RX_STBC List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e0ac61759dea2d572a078ab018ca5d3ead912f0b Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=e0ac61759dea2d572a078ab018ca5d3ead912f0b commit e0ac61759dea2d572a078ab018ca5d3ead912f0b Author: Bjoern A. Zeeb AuthorDate: 2024-06-05 21:57:45 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 13:59:20 +0000 LinuxKPI: 802.11: Fix definition of IEEE80211_HT_CAP_RX_STBC IEEE80211_HT_CAP_RX_STBC was set to 0x100 instead of 0x300. Correct to get the expected behavior. Sponsored by: The FreeBSD Foundation Fixes: b0f73768220e9 LinuxKPI: 802.11 header updates Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D45506 (cherry picked from commit 3e0915b7b6857afdbd283f2d448906e6a032ee07) --- sys/compat/linuxkpi/common/include/linux/ieee80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/ieee80211.h b/sys/compat/linuxkpi/common/include/linux/ieee80211.h index 2000e7480ff8..0fd90e921c77 100644 --- a/sys/compat/linuxkpi/common/include/linux/ieee80211.h +++ b/sys/compat/linuxkpi/common/include/linux/ieee80211.h @@ -263,7 +263,7 @@ enum ieee80211_ac_numbers { #define IEEE80211_HT_CAP_SGI_20 0x0020 /* IEEE80211_HTCAP_SHORTGI20 */ #define IEEE80211_HT_CAP_SGI_40 0x0040 /* IEEE80211_HTCAP_SHORTGI40 */ #define IEEE80211_HT_CAP_TX_STBC 0x0080 /* IEEE80211_HTCAP_TXSTBC */ -#define IEEE80211_HT_CAP_RX_STBC 0x0100 /* IEEE80211_HTCAP_RXSTBC */ +#define IEEE80211_HT_CAP_RX_STBC 0x0300 /* IEEE80211_HTCAP_RXSTBC */ #define IEEE80211_HT_CAP_RX_STBC_SHIFT 8 /* IEEE80211_HTCAP_RXSTBC_S */ #define IEEE80211_HT_CAP_MAX_AMSDU 0x0800 /* IEEE80211_HTCAP_MAXAMSDU */ #define IEEE80211_HT_CAP_DSSSCCK40 0x1000 /* IEEE80211_HTCAP_DSSSCCK40 */ From nobody Wed Jun 12 16:41:29 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzrsQ4ZGGz5N37w; Wed, 12 Jun 2024 16:41:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzrsP6Hyzz4gXC; Wed, 12 Jun 2024 16:41:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210489; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xhwqn3i9cOMm/t3jloFgazq2HNgfPdFsHV+4IH5CyBo=; b=gjOBZcJUtmBBjpyGSdNeWirLf+wH1qOOgVUPV4LVPHkBu4ydMg/Ty2R0yJ/tUfZ1c90zQM a7LT44R/DpWjKBWYN9JwvCoe54h9RvmQuqGYMU/OX+q43tlMvuOxiJAyrEo3j+fzCOGvA/ iSxWDuBTK2vOo2YulVDL46TkU6oD4HqdxV6GBv1p+5u8d9xxvjKnqEMUwJUHHlXd4veOTv h4QeO2nwP3nG0XF1Sr+jke2oJgQXhOSIFPE/9Eklh0T5pFc2qMcVVIGDLBXmw01eOeYQMQ P/t8zO4ww4ZUS6iH4VCyw3j3EGb6DBvVJZKpCjT1XemLBk4ZzTytDMg4nIZyVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718210489; a=rsa-sha256; cv=none; b=kxA9DZpczXTtLK2ffYPmlBdXoJMsEYX4UGKV7/2sWvHj3trdI+Mn9wTz4b+aptgoQ4iIzS BIYnJTWk0+Qn0HbBNUyI+KjfS4FM3TpHZhPj9RPjUGPKK4kjlUxZdixbSfaVD5696qIDlh 9+tcjT1+N6Me49Im2X5I6sKDqYu7iUHQw1+SVCktpAtu6/wvt53X9k1TkOAV7Mes4tXMRL o5hLpiY48V0I1jMZthhavbweeCxU/sWkjZ9JBIwCAw+Op0Y2RVoA5uZFotxRY9bb1TTbp6 By9tx14vXz2PloNbjgfbIZhWLRlDhCsgjj1VHUwzrNQ91Fqf/3zlK5XA2c/Wsw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210489; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xhwqn3i9cOMm/t3jloFgazq2HNgfPdFsHV+4IH5CyBo=; b=SW6V0H39jx4kdnMn5pH8STUGAkW9RFASeIM4T6l5giz5C9AQ7nPXlKJoHITXfU/NMTwOln S7bBWYWshJUP3MB440vLdDNSi9kjHsdJoUAxbDZtrK8HCSgafgvIauacdtQLhEjU2a4sqJ rq8yrky/TiTcDZYA6DPoUjJCb4xmMNklCxQvQCZpOYdED5t38SKE8FjKGrSTuGWyUmgvEr QXmQkIG3Of1l78AxJ3v07EGdY1976GOBfH0Lh4FQ8KotZlIqnJUgm6KcnLNM7LfFHmqc7i qa5n5hc5yIOo3Ec1JOWJotcj3oeP8Qz6XAlwwX7lNbamjhalhUtRKwcKnQJRMg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzrsP5wCsz114W; Wed, 12 Jun 2024 16:41:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CGfTXN046996; Wed, 12 Jun 2024 16:41:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CGfTcf046993; Wed, 12 Jun 2024 16:41:29 GMT (envelope-from git) Date: Wed, 12 Jun 2024 16:41:29 GMT Message-Id: <202406121641.45CGfTcf046993@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 9e36362f6a87 - stable/14 - LinuxKPI: 802.11: close race lkpi_sta_scan_to_auth()/(*iv_update_bss)() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9e36362f6a871215c269edb43b87daba55b495e5 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=9e36362f6a871215c269edb43b87daba55b495e5 commit 9e36362f6a871215c269edb43b87daba55b495e5 Author: Bjoern A. Zeeb AuthorDate: 2024-02-18 20:57:51 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 13:59:32 +0000 LinuxKPI: 802.11: close race lkpi_sta_scan_to_auth()/(*iv_update_bss)() We have to unlock the net80211 ic lock in order to be able to call sleepable downcalls to the driver/firmware; a 2nd thread may go through net80211::join1() and (*iv_update_bss)() after we checked and unlocked. Re-check status at the end of the function under the ic lock so that we do not accidentally set lvif_bss_synched to true again despite it no longer being true. This should fix a race where we lost the (*iv_update_bss)() state during startup where one SCAN->AUTH is followed by a (then) AUTH->AUTH and lkpi_sta_a_to_a() did the wrong thing. Once we re-consider net80211 state and allowing a second join on a different node or iv_bss update without previously tearing down the older node we can likely undo a lot of these extra checks and workarounds. Sponsored by: The FreeBSD Foundation (updated version) Tested by: emaste (on and off) Reviewd by: cc Differential Revision: https://reviews.freebsd.org/D43967 (cherry picked from commit 105b9df26ee0286f3a5a7d191075e068dee1c4a2) --- sys/compat/linuxkpi/common/src/linux_80211.c | 66 +++++++++++++++++++--------- 1 file changed, 46 insertions(+), 20 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 6c96f1541488..728103778e4e 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -1276,25 +1276,6 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int lsta = ni->ni_drv_data; LKPI_80211_LVIF_LOCK(lvif); - /* Re-check given (*iv_update_bss) could have happened. */ - /* XXX-BZ KASSERT later? or deal as error? */ - if (lvif->lvif_bss_synched || lvif->lvif_bss != NULL) - ic_printf(vap->iv_ic, "%s:%d: lvif %p vap %p iv_bss %p lvif_bss %p " - "lvif_bss->ni %p synched %d, ni %p lsta %p\n", __func__, __LINE__, - lvif, vap, vap->iv_bss, lvif->lvif_bss, - (lvif->lvif_bss != NULL) ? lvif->lvif_bss->ni : NULL, - lvif->lvif_bss_synched, ni, lsta); - - /* - * Reference the ni for this cache of lsta/ni on lvif->lvif_bss - * essentially out lsta version of the iv_bss. - * Do NOT use iv_bss here anymore as that may have diverged from our - * function local ni already and would lead to inconsistencies. - */ - ieee80211_ref_node(ni); - lvif->lvif_bss = lsta; - lvif->lvif_bss_synched = true; - /* Insert the [l]sta into the list of known stations. */ TAILQ_INSERT_TAIL(&lvif->lsta_head, lsta, lsta_entry); LKPI_80211_LVIF_UNLOCK(lvif); @@ -1343,11 +1324,56 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int * (ideally we'd do that on a callback for something else ...) */ + LKPI_80211_LHW_UNLOCK(lhw); + IEEE80211_LOCK(vap->iv_ic); + + LKPI_80211_LVIF_LOCK(lvif); + /* Re-check given (*iv_update_bss) could have happened while we were unlocked. */ + if (lvif->lvif_bss_synched || lvif->lvif_bss != NULL || + lsta->ni != vap->iv_bss) + ic_printf(vap->iv_ic, "%s:%d: lvif %p vap %p iv_bss %p lvif_bss %p " + "lvif_bss->ni %p synched %d, ni %p lsta %p\n", __func__, __LINE__, + lvif, vap, vap->iv_bss, lvif->lvif_bss, + (lvif->lvif_bss != NULL) ? lvif->lvif_bss->ni : NULL, + lvif->lvif_bss_synched, ni, lsta); + + /* + * Reference the "ni" for caching the lsta/ni in lvif->lvif_bss. + * Given we cache lsta we use lsta->ni instead of ni here (even though + * lsta->ni == ni) to be distinct from the rest of the code where we do + * assume that ni == vap->iv_bss which it may or may not be. + * So do NOT use iv_bss here anymore as that may have diverged from our + * function local ni already while ic was unlocked and would lead to + * inconsistencies. Go and see if we lost a race and do not update + * lvif_bss_synched in that case. + */ + ieee80211_ref_node(lsta->ni); + lvif->lvif_bss = lsta; + if (lsta->ni == vap->iv_bss) { + lvif->lvif_bss_synched = true; + } else { + /* Set to un-synched no matter what. */ + lvif->lvif_bss_synched = false; + /* + * We do not error as someone has to take us down. + * If we are followed by a 2nd, new net80211::join1() going to + * AUTH lkpi_sta_a_to_a() will error, lkpi_sta_auth_to_{scan,init}() + * will take the lvif->lvif_bss node down eventually. + * What happens with the vap->iv_bss node will entirely be up + * to net80211 as we never used the node beyond alloc()/free() + * and we do not hold an extra reference for that anymore given + * ni : lsta == 1:1. + */ + } + LKPI_80211_LVIF_UNLOCK(lvif); + goto out_relocked; + out: LKPI_80211_LHW_UNLOCK(lhw); IEEE80211_LOCK(vap->iv_ic); +out_relocked: /* - * Release the reference that keop the ni stable locally + * Release the reference that kept the ni stable locally * during the work of this function. */ if (ni != NULL) From nobody Wed Jun 12 16:41:24 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzrsJ3ztpz5N3DZ; Wed, 12 Jun 2024 16:41:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzrsJ1kH1z4gnT; Wed, 12 Jun 2024 16:41:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210484; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=//CxYJ+XTPuyS/cxI0Z+etDm1LGvbYPAAPTbC15Ge3c=; b=rDSVFIJjFJXCD9aHBp7PQ7ETZA4wTOgOdO/4exi8VwKynvYts4bWCo4LJ/i7HstcKMbQwt yK6wCXc7CNkroEt+8n4d9ubRxrTdfRPawRY2aUOIR9mxKhqWrV05iOQnsSbes3aNtwmjDj dggUIocuhqvlCBlDI1OZIxXNDFvR21yJ0rOThF1vCk75ckmMRKNQJCbqhlZwlqK3Q+azPB HUDxK7IjTy0KgL0t6gDAjKb/D281Vw2xVwrl/v2iXxMVmguYprE+z78BXxOvolPAQ+bnAd U+z4S7LSxJmxuPfsw0pqNqJ+2cZvFSZb6XQvIPGGUQ9nFvpCOv2MPiNOfLwqNQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718210484; a=rsa-sha256; cv=none; b=VIvYDO2eShbmaBUkc5eLOAPqxvKZgHv8i0uEfwMkPx4nhIeJ55R+cF3oH2YGasXC6zm1I7 t2P3n8Al9PQN0qRCs0ovck+q15M6Gxhyb8779F8wl55oP5hkkao7uAKEVZB9phteeUahsG oD5hFLBkBy+tPpwz9yHyGaq/KkxFejNv250KDdbjAIeitc664rgSamf/mSOQW6zN9ET14k wKqoXwl7PmBNohuempOpbC37FilMFEDI1pnU/KJwDUX6xj5dnq53hGVa8lvjPchEiuqx6t /wLjLmrolk5vl4DIMFRmoNl4zdI9su4wObcHsr7s3irBl2PeM78YNv68zdMSsA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210484; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=//CxYJ+XTPuyS/cxI0Z+etDm1LGvbYPAAPTbC15Ge3c=; b=mnzTI7a7UPnHlWGcfy+JJedMxia36rDF3aH7H+FAByO+y9mOErV+Hf+7U3CM6w/L9G2Pt5 GwBrTovUDvRvUiDyipAAnyyGDNWRPsYVjb64WsFR/4RuEn0Yftol5eHjz7tfi2xH1ZBUmh Nj+ezh2LCeAdKCVTkmdHhxhV21o88I6+2h+ue6EOaVHbEWr5R/V6qwDdBQWfQkVUOErNGq 0Cpaf1N6QhmDzQLLeOrn/9pehBd7sjM0rb4bsgU6hE1RgO5eRWOH+Ktil83Ed+NIjrdzMY EX31h4CCdKo6pPtxTH+oxBMWWK0ir6fhcgwOPcz7Oc4VFFuNP/JBUZI1Oi+qSw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzrsJ1Lb0z11QC; Wed, 12 Jun 2024 16:41:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CGfOu4046746; Wed, 12 Jun 2024 16:41:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CGfOh9046743; Wed, 12 Jun 2024 16:41:24 GMT (envelope-from git) Date: Wed, 12 Jun 2024 16:41:24 GMT Message-Id: <202406121641.45CGfOh9046743@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 323db2cbbb99 - stable/14 - LinuxKPI: 802.11: rename chanctx_conf for consistency List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 323db2cbbb99d0ad0175d4187aaec1d966761d94 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=323db2cbbb99d0ad0175d4187aaec1d966761d94 commit 323db2cbbb99d0ad0175d4187aaec1d966761d94 Author: Bjoern A. Zeeb AuthorDate: 2024-05-13 21:03:31 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 13:58:56 +0000 LinuxKPI: 802.11: rename chanctx_conf for consistency We used to call the struct ieee80211_chanctx_conf variable "conf" in some places but that becomes confusing with bss_conf and other "conf" bits. On the vif it is already called chanctx_conf thus also rename it on the internal struct lkpi_chanctx and for our variables in the implementation. This should not have any external visibility. No functional changes intended. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45185 (cherry picked from commit d1af434d99941d32a09c48fb3ef77ef83e203d29) --- sys/compat/linuxkpi/common/src/linux_80211.c | 88 ++++++++++++++-------------- sys/compat/linuxkpi/common/src/linux_80211.h | 6 +- 2 files changed, 47 insertions(+), 47 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 32b0287db65c..1943c6efd4d8 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -1079,7 +1079,7 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int { struct linuxkpi_ieee80211_channel *chan; struct lkpi_chanctx *lchanctx; - struct ieee80211_chanctx_conf *conf; + struct ieee80211_chanctx_conf *chanctx_conf; struct lkpi_hw *lhw; struct ieee80211_hw *hw; struct lkpi_vif *lvif; @@ -1145,54 +1145,54 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int /* Add chanctx (or if exists, change it). */ if (vif->chanctx_conf != NULL) { - conf = vif->chanctx_conf; - lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + chanctx_conf = vif->chanctx_conf; + lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); IMPROVE("diff changes for changed, working on live copy, rcu"); } else { /* Keep separate alloc as in Linux this is rcu managed? */ lchanctx = malloc(sizeof(*lchanctx) + hw->chanctx_data_size, M_LKPI80211, M_WAITOK | M_ZERO); - conf = &lchanctx->conf; + chanctx_conf = &lchanctx->chanctx_conf; } - conf->rx_chains_dynamic = 1; - conf->rx_chains_static = 1; - conf->radar_enabled = + chanctx_conf->rx_chains_dynamic = 1; + chanctx_conf->rx_chains_static = 1; + chanctx_conf->radar_enabled = (chan->flags & IEEE80211_CHAN_RADAR) ? true : false; - conf->def.chan = chan; - conf->def.width = NL80211_CHAN_WIDTH_20_NOHT; - conf->def.center_freq1 = chan->center_freq; - conf->def.center_freq2 = 0; + chanctx_conf->def.chan = chan; + chanctx_conf->def.width = NL80211_CHAN_WIDTH_20_NOHT; + chanctx_conf->def.center_freq1 = chan->center_freq; + chanctx_conf->def.center_freq2 = 0; IMPROVE("Check vht_cap from band not just chan?"); KASSERT(ni->ni_chan != NULL && ni->ni_chan != IEEE80211_CHAN_ANYC, ("%s:%d: ni %p ni_chan %p\n", __func__, __LINE__, ni, ni->ni_chan)); #ifdef LKPI_80211_HT if (IEEE80211_IS_CHAN_HT(ni->ni_chan)) { if (IEEE80211_IS_CHAN_HT40(ni->ni_chan)) { - conf->def.width = NL80211_CHAN_WIDTH_40; + chanctx_conf->def.width = NL80211_CHAN_WIDTH_40; } else - conf->def.width = NL80211_CHAN_WIDTH_20; + chanctx_conf->def.width = NL80211_CHAN_WIDTH_20; } #endif #ifdef LKPI_80211_VHT if (IEEE80211_IS_CHAN_VHT(ni->ni_chan)) { #ifdef __notyet__ if (IEEE80211_IS_CHAN_VHT80P80(ni->ni_chan)) { - conf->def.width = NL80211_CHAN_WIDTH_80P80; - conf->def.center_freq2 = 0; /* XXX */ + chanctx_conf->def.width = NL80211_CHAN_WIDTH_80P80; + chanctx_conf->def.center_freq2 = 0; /* XXX */ } else #endif if (IEEE80211_IS_CHAN_VHT160(ni->ni_chan)) - conf->def.width = NL80211_CHAN_WIDTH_160; + chanctx_conf->def.width = NL80211_CHAN_WIDTH_160; else if (IEEE80211_IS_CHAN_VHT80(ni->ni_chan)) - conf->def.width = NL80211_CHAN_WIDTH_80; + chanctx_conf->def.width = NL80211_CHAN_WIDTH_80; } #endif /* Responder ... */ - conf->min_def.chan = chan; - conf->min_def.width = NL80211_CHAN_WIDTH_20_NOHT; - conf->min_def.center_freq1 = chan->center_freq; - conf->min_def.center_freq2 = 0; + chanctx_conf->min_def.chan = chan; + chanctx_conf->min_def.width = NL80211_CHAN_WIDTH_20_NOHT; + chanctx_conf->min_def.center_freq1 = chan->center_freq; + chanctx_conf->min_def.center_freq2 = 0; IMPROVE("currently 20_NOHT min_def only"); /* Set bss info (bss_info_changed). */ @@ -1218,14 +1218,14 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int changed |= IEEE80211_CHANCTX_CHANGE_RADAR; changed |= IEEE80211_CHANCTX_CHANGE_RX_CHAINS; changed |= IEEE80211_CHANCTX_CHANGE_WIDTH; - lkpi_80211_mo_change_chanctx(hw, conf, changed); + lkpi_80211_mo_change_chanctx(hw, chanctx_conf, changed); } else { - error = lkpi_80211_mo_add_chanctx(hw, conf); + error = lkpi_80211_mo_add_chanctx(hw, chanctx_conf); if (error == 0 || error == EOPNOTSUPP) { - vif->bss_conf.chandef.chan = conf->def.chan; - vif->bss_conf.chandef.width = conf->def.width; + vif->bss_conf.chandef.chan = chanctx_conf->def.chan; + vif->bss_conf.chandef.width = chanctx_conf->def.width; vif->bss_conf.chandef.center_freq1 = - conf->def.center_freq1; + chanctx_conf->def.center_freq1; #ifdef LKPI_80211_HT if (vif->bss_conf.chandef.width == NL80211_CHAN_WIDTH_40) { /* Note: it is 10 not 20. */ @@ -1236,26 +1236,26 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int } #endif vif->bss_conf.chandef.center_freq2 = - conf->def.center_freq2; + chanctx_conf->def.center_freq2; } else { ic_printf(vap->iv_ic, "%s:%d: mo_add_chanctx " "failed: %d\n", __func__, __LINE__, error); goto out; } - vif->bss_conf.chanctx_conf = conf; + vif->bss_conf.chanctx_conf = chanctx_conf; /* Assign vif chanctx. */ if (error == 0) error = lkpi_80211_mo_assign_vif_chanctx(hw, vif, - &vif->bss_conf, conf); + &vif->bss_conf, chanctx_conf); if (error == EOPNOTSUPP) error = 0; if (error != 0) { ic_printf(vap->iv_ic, "%s:%d: mo_assign_vif_chanctx " "failed: %d\n", __func__, __LINE__, error); - lkpi_80211_mo_remove_chanctx(hw, conf); - lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + lkpi_80211_mo_remove_chanctx(hw, chanctx_conf); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); free(lchanctx, M_LKPI80211); goto out; } @@ -1457,9 +1457,9 @@ lkpi_sta_auth_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int /* Take the chan ctx down. */ if (vif->chanctx_conf != NULL) { struct lkpi_chanctx *lchanctx; - struct ieee80211_chanctx_conf *conf; + struct ieee80211_chanctx_conf *chanctx_conf; - conf = vif->chanctx_conf; + chanctx_conf = vif->chanctx_conf; /* Remove vif context. */ lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); /* NB: vif->chanctx_conf is NULL now. */ @@ -1467,8 +1467,8 @@ lkpi_sta_auth_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_hw_conf_idle(hw, true); /* Remove chan ctx. */ - lkpi_80211_mo_remove_chanctx(hw, conf); - lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + lkpi_80211_mo_remove_chanctx(hw, chanctx_conf); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); free(lchanctx, M_LKPI80211); } @@ -1795,9 +1795,9 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i /* Take the chan ctx down. */ if (vif->chanctx_conf != NULL) { struct lkpi_chanctx *lchanctx; - struct ieee80211_chanctx_conf *conf; + struct ieee80211_chanctx_conf *chanctx_conf; - conf = vif->chanctx_conf; + chanctx_conf = vif->chanctx_conf; /* Remove vif context. */ lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); /* NB: vif->chanctx_conf is NULL now. */ @@ -1805,8 +1805,8 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i lkpi_hw_conf_idle(hw, true); /* Remove chan ctx. */ - lkpi_80211_mo_remove_chanctx(hw, conf); - lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + lkpi_80211_mo_remove_chanctx(hw, chanctx_conf); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); free(lchanctx, M_LKPI80211); } @@ -2364,9 +2364,9 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int /* Take the chan ctx down. */ if (vif->chanctx_conf != NULL) { struct lkpi_chanctx *lchanctx; - struct ieee80211_chanctx_conf *conf; + struct ieee80211_chanctx_conf *chanctx_conf; - conf = vif->chanctx_conf; + chanctx_conf = vif->chanctx_conf; /* Remove vif context. */ lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); /* NB: vif->chanctx_conf is NULL now. */ @@ -2374,8 +2374,8 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_hw_conf_idle(hw, true); /* Remove chan ctx. */ - lkpi_80211_mo_remove_chanctx(hw, conf); - lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + lkpi_80211_mo_remove_chanctx(hw, chanctx_conf); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); free(lchanctx, M_LKPI80211); } @@ -4771,7 +4771,7 @@ linuxkpi_ieee80211_iterate_chan_contexts(struct ieee80211_hw *hw, if (!lchanctx->added_to_drv) continue; - iterfunc(hw, &lchanctx->conf, arg); + iterfunc(hw, &lchanctx->chanctx_conf, arg); } LKPI_80211_LHW_LVIF_UNLOCK(lhw); } diff --git a/sys/compat/linuxkpi/common/src/linux_80211.h b/sys/compat/linuxkpi/common/src/linux_80211.h index b0156a5ade3f..a48cf719c693 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.h +++ b/sys/compat/linuxkpi/common/src/linux_80211.h @@ -267,12 +267,12 @@ struct lkpi_hw { /* name it mac80211_sc? */ struct lkpi_chanctx { bool added_to_drv; /* Managed by MO */ - struct ieee80211_chanctx_conf conf __aligned(CACHE_LINE_SIZE); + struct ieee80211_chanctx_conf chanctx_conf __aligned(CACHE_LINE_SIZE); }; #define LCHANCTX_TO_CHANCTX_CONF(_lchanctx) \ - (&(_lchanctx)->conf) + (&(_lchanctx)->chanctx_conf) #define CHANCTX_CONF_TO_LCHANCTX(_conf) \ - container_of(_conf, struct lkpi_chanctx, conf) + container_of(_conf, struct lkpi_chanctx, chanctx_conf) struct lkpi_wiphy { const struct cfg80211_ops *ops; From nobody Wed Jun 12 16:41:22 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzrsH3wTVz5N3Jv; Wed, 12 Jun 2024 16:41:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzrsH0yrKz4gnR; Wed, 12 Jun 2024 16:41:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pT8C+W0CCsHJKriZ8oIznI8vyeMNDdT9ZzSuBU1TmEg=; b=hhIPt2H02Ef+uy42SFShl81o9RzxNflL8VOUiZX3ui4xGhNGDTqVvF+Sl/Bt2DIrIBSxOE 6mdfPBvUEmotYhqIfCVBIL5q4MU7yKICZo9dYV3hZZq7pGuxtNtlqCu/NPmTVGNBmLt/7S IFmCOrvFvaDI8fDYee8r/yKo66AMeG2ueRKPDQTcl/FedA1UosS1hlgcufKg658jtMSWXg TLeW1JfFuDlYEquVk8ezuclF4hxaxDKZ/T1uN8okraUED/H6drI9sHdL80ehcei2CiQX8R TUHAG5gPXVnQurWvADWvWZ3eE0Dc74mHWE0FbC+iZW5MVESG1jFWHtLOHanPyg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718210483; a=rsa-sha256; cv=none; b=kkrOFfAsh18MxMhENgp4aXrqh9QG1a73jpWUnIHk7ngl1hwigxrl4IRUqjxZOQQPkw8I62 Ee7VPLxP3gPutSET2WFxjFFlu2tP6z1h822rRzcDVKdSX1T+5dap1A1k5l3y26/gDbW5Zw St4zzfbrUsT9JllbRxIYzeMQpdS0TKWof4EUNjf8/1PT+LgFcL+2b+WDmap97E5MAMsSYy 6ym0fPEjcQBpqc1E2eNbw4j/1wRoBWDT23hZhPnxu2UmirpARWdO5HH7T6H4aGIjlrfSvy WuL4wS0DTnDWPua/d6nag3+L/f5JxYoP7T/Qv9fmp0QFWEzek+NiNDaQhoNaLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pT8C+W0CCsHJKriZ8oIznI8vyeMNDdT9ZzSuBU1TmEg=; b=dFC4a3WEdJjK1nwfre3+naRKBFiraQSWtGpIHAoj8cN+oK+eUdF8t8sl7Fp7r3bRKVaQV7 nkxI6BjgOvTU6HfUsXQaO0kSsViGLvkLnWNkPRdX9/8vsEDHiCIgYhuNBylTUefmqbZrAa 78GsqvxDidhnZCTOHM/1tzsM8YJfN6FjaENncPhnT3M9RbL9KwFmQYK/b5yydRm2ASzeAZ sRXHh4c92mdTcfCqa4DigSzyrnb8OMVosDYF1Kf8YGdBCDbscXBMRiELaJb7P15ZBiU1c/ 67GOIjKAgmZFTqmGTzq20S93fwX8jgJk9WiLLnsKwcCS801HhY0Q1DngoblzwA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzrsH0bf0z11Hj; Wed, 12 Jun 2024 16:41:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CGfMvK046681; Wed, 12 Jun 2024 16:41:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CGfMMA046677; Wed, 12 Jun 2024 16:41:22 GMT (envelope-from git) Date: Wed, 12 Jun 2024 16:41:22 GMT Message-Id: <202406121641.45CGfMMA046677@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 7ad7453748e2 - stable/14 - LinuxKPI: 802.11: change teardown order to avoid iwlwifi firmware crashes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7ad7453748e2adafa1e1a3e44b02fc852d4c5301 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=7ad7453748e2adafa1e1a3e44b02fc852d4c5301 commit 7ad7453748e2adafa1e1a3e44b02fc852d4c5301 Author: Bjoern A. Zeeb AuthorDate: 2024-05-22 02:24:51 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 13:58:36 +0000 LinuxKPI: 802.11: change teardown order to avoid iwlwifi firmware crashes While the previous order worked well for iwlwifi 22000 and later chipsets (AXxxx, BE200), earlier chipsets had trouble and ran into firmware crashes. Change the teardown order to avoid these problems. The inline comments in lkpi_sta_run_to_init() (and lkpi_disassoc()) try to document the new order and also the old problems we were seeing (too early sta removal or silent non-removal) leading to follow-up problems. There is a possible further problem still lingering but a lot harder to trigger (see comment in review) and likely related to some other doings so we'll track it separately. Sponsored by: The FreeBSD Foundation PR: 275255 Tested with: AX210, 8265 (bz); 9260 (Bakul Shah) Differential Revision: https://reviews.freebsd.org/D45293 (cherry picked from commit 5a4d24610fc6143ac1d570fe2b5160e8ae893c2c) --- sys/compat/linuxkpi/common/src/linux_80211.c | 84 ++++++++++++++++++---------- 1 file changed, 55 insertions(+), 29 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 758db287d613..32b0287db65c 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -994,33 +994,37 @@ lkpi_hw_conf_idle(struct ieee80211_hw *hw, bool new) } } -static void +static enum ieee80211_bss_changed lkpi_disassoc(struct ieee80211_sta *sta, struct ieee80211_vif *vif, struct lkpi_hw *lhw) { + enum ieee80211_bss_changed changed; + + changed = 0; sta->aid = 0; if (vif->cfg.assoc) { - struct ieee80211_hw *hw; - enum ieee80211_bss_changed changed; lhw->update_mc = true; lkpi_update_mcast_filter(lhw->ic, true); - changed = 0; vif->cfg.assoc = false; vif->cfg.aid = 0; changed |= BSS_CHANGED_ASSOC; - /* - * This will remove the sta from firmware for iwlwifi. - * So confusing that they use state and flags and ... ^%$%#%$^. - */ IMPROVE(); - hw = LHW_TO_HW(lhw); - lkpi_80211_mo_bss_info_changed(hw, vif, &vif->bss_conf, - changed); - lkpi_hw_conf_idle(hw, true); + /* + * Executing the bss_info_changed(BSS_CHANGED_ASSOC) with + * assoc = false right away here will remove the sta from + * firmware for iwlwifi. + * We no longer do this but only return the BSS_CHNAGED value. + * The caller is responsible for removing the sta gong to + * IEEE80211_STA_NOTEXIST and then executing the + * bss_info_changed() update. + * See lkpi_sta_run_to_init() for more detailed comment. + */ } + + return (changed); } static void @@ -1460,6 +1464,8 @@ lkpi_sta_auth_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); /* NB: vif->chanctx_conf is NULL now. */ + lkpi_hw_conf_idle(hw, true); + /* Remove chan ctx. */ lkpi_80211_mo_remove_chanctx(hw, conf); lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); @@ -1743,16 +1749,11 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i goto out; } - lkpi_lsta_dump(lsta, ni, __func__, __LINE__); + /* See comment in lkpi_sta_run_to_init(). */ + bss_changed = 0; + bss_changed |= lkpi_disassoc(sta, vif, lhw); - /* Update bss info (bss_info_changed) (assoc, aid, ..). */ - /* - * We need to do this now, before sta changes to IEEE80211_STA_NOTEXIST - * as otherwise drivers (iwlwifi at least) will silently not remove - * the sta from the firmware and when we will add a new one trigger - * a fw assert. - */ - lkpi_disassoc(sta, vif, lhw); + lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* Adjust sta and change state (from NONE) to NOTEXIST. */ KASSERT(lsta != NULL, ("%s: ni %p lsta is NULL\n", __func__, ni)); @@ -1769,7 +1770,6 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* sta no longer save to use. */ IMPROVE("Any bss_info changes to announce?"); - bss_changed = 0; vif->bss_conf.qos = 0; bss_changed |= BSS_CHANGED_QOS; vif->cfg.ssid_len = 0; @@ -1802,6 +1802,8 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); /* NB: vif->chanctx_conf is NULL now. */ + lkpi_hw_conf_idle(hw, true); + /* Remove chan ctx. */ lkpi_80211_mo_remove_chanctx(hw, conf); lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); @@ -2290,14 +2292,33 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int goto out; } - lkpi_lsta_dump(lsta, ni, __func__, __LINE__); - - /* Update bss info (bss_info_changed) (assoc, aid, ..). */ + bss_changed = 0; /* + * Start updating bss info (bss_info_changed) (assoc, aid, ..). + * * One would expect this to happen when going off AUTHORIZED. - * See comment there; removes the sta from fw. + * See comment there; removes the sta from fw if not careful + * (bss_info_changed() change is executed right away). + * + * We need to do this now, before sta changes to IEEE80211_STA_NOTEXIST + * as otherwise drivers (iwlwifi at least) will silently not remove + * the sta from the firmware and when we will add a new one trigger + * a fw assert. + * + * The order which works best so far avoiding early removal or silent + * non-removal seems to be (for iwlwifi::mld-mac80211.c cases; + * the iwlwifi:mac80211.c case still to be tested): + * 1) lkpi_disassoc(): set vif->cfg.assoc = false (aid=0 side effect here) + * 2) call the last sta_state update -> IEEE80211_STA_NOTEXIST + * (removes the sta given assoc is false) + * 3) add the remaining BSS_CHANGED changes and call bss_info_changed() + * 4) call unassign_vif_chanctx + * 5) call lkpi_hw_conf_idle + * 6) call remove_chanctx */ - lkpi_disassoc(sta, vif, lhw); + bss_changed |= lkpi_disassoc(sta, vif, lhw); + + lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* Adjust sta and change state (from NONE) to NOTEXIST. */ KASSERT(lsta != NULL, ("%s: ni %p lsta is NULL\n", __func__, ni)); @@ -2311,15 +2332,19 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int goto out; } + lkpi_lsta_remove(lsta, lvif); + lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* sta no longer save to use. */ IMPROVE("Any bss_info changes to announce?"); - bss_changed = 0; vif->bss_conf.qos = 0; bss_changed |= BSS_CHANGED_QOS; vif->cfg.ssid_len = 0; memset(vif->cfg.ssid, '\0', sizeof(vif->cfg.ssid)); bss_changed |= BSS_CHANGED_BSSID; + vif->bss_conf.use_short_preamble = false; + vif->bss_conf.qos = false; + /* XXX BSS_CHANGED_???? */ lkpi_80211_mo_bss_info_changed(hw, vif, &vif->bss_conf, bss_changed); LKPI_80211_LVIF_LOCK(lvif); @@ -2327,7 +2352,6 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int lvif->lvif_bss = NULL; lvif->lvif_bss_synched = false; LKPI_80211_LVIF_UNLOCK(lvif); - lkpi_lsta_remove(lsta, lvif); /* * The very last release the reference on the ni for the ni/lsta on * lvif->lvif_bss. Upon return from this both ni and lsta are invalid @@ -2347,6 +2371,8 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); /* NB: vif->chanctx_conf is NULL now. */ + lkpi_hw_conf_idle(hw, true); + /* Remove chan ctx. */ lkpi_80211_mo_remove_chanctx(hw, conf); lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); From nobody Wed Jun 12 16:41:20 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzrsF12Yxz5N3B2; Wed, 12 Jun 2024 16:41:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzrsD650qz4ghf; Wed, 12 Jun 2024 16:41:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210480; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J4efHithKnGao3p3rkW9BJhuANO2HPdUCB1rFd38sM0=; b=dqrgVauZlYsgZXTzluyO35Xh9Y8GFHBqAlZe4PEVAKCw2BtasCY9ESZh2Ni93/NUTkazdr a7ghfLAipsvp64IrO5LUEDoS7BD4oqtxX15EVSVKeKfDGmDib3gL3MrdB2xJCWm6IF23Ok HZ9v3KHrc7EyFv/Esn6Iuu0nVIUTYKar1swIifBFYwIZK6UV5vr+G8V89pkZKVhFNc/Y79 tIHofoQHfXLteCSy3xKxYPY47EZsUY7+AMsV9yK1omMP1FPft4R6kHEr6pt/ni9K5CSSvi EtAGO7SdjZ/QVj7SExgAy633A90EFV1XGOxBFm7nrK5vETXfZyPCrc83DHVJuQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718210480; a=rsa-sha256; cv=none; b=KerGEcQiFTfTrknT7BFoiBlk99O/htVLS8vzqzVRR402qN1mL++bE3P/qigvJG+m/PgfJp LlGCeQeihWYBmHWR3JA8PiUrGjHr3R4g93/JwpFBA36OURvj1SgHukTsG4JQvTYv+rNox3 F+el5fsqQsG/R4xvdq6XVSOZsQ/qTcWmrmdpvE7Lw3qnbuX80LWAk1hMKI617Ee7UtdqCn gqW1dx8tholf7b4EdneoVySHp7LtbKawfycJSFhEIyg1RwgXQxFCElGEKcjRE4CY1xonTB 3NUpre8tzZNxiNjiahAiWMR8RjDUi2GGNw9Q8znS2ee1DLvYLOsAUyGjsgA2/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210480; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J4efHithKnGao3p3rkW9BJhuANO2HPdUCB1rFd38sM0=; b=sl2EsuHpt0e4tvvqq4LtXtjTw5Op+L2oNYNyAWx4vBNNIWURG4LZwEOxotxEv/WJOPArSn 8sXvTNY2b4jFybjwyc5bBHOlaeBGoi3gPOSX5PWAXIEvjpPMgy0BGtbEoIxCA3yB9NdQZu 8i/QdvJ4JiGF5MP9ebIFiSSydVRoTM1hL9csPIsos83d+B1OTDxvUvlCgfDzAxAECgJ7V8 tTMIk3cd+LehheY/+qSGsrSW2uUD9ufgSt+zD4azni3LmsAnXJgv8i8p3ska7LV4tMMGH2 uK9c5ttsI4wfnEXO8Bxs33VKkV1H1dzrXi0XrnJAcARIQ5er8OpdwmHOcZhD3Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzrsD5jQbz10Fk; Wed, 12 Jun 2024 16:41:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CGfKHN046576; Wed, 12 Jun 2024 16:41:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CGfKl1046573; Wed, 12 Jun 2024 16:41:20 GMT (envelope-from git) Date: Wed, 12 Jun 2024 16:41:20 GMT Message-Id: <202406121641.45CGfKl1046573@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 04131cf0765d - stable/14 - LinuxKPI: remove extern from function declarations List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 04131cf0765de5d3c3ae2f4bd1b49bb7db230c06 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=04131cf0765de5d3c3ae2f4bd1b49bb7db230c06 commit 04131cf0765de5d3c3ae2f4bd1b49bb7db230c06 Author: Bjoern A. Zeeb AuthorDate: 2024-05-27 19:49:45 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 13:57:51 +0000 LinuxKPI: remove extern from function declarations Sponsored by: The FreeBSD Foundation Reviewed by: emaste (earlier version, found another two) Differential Revision: https://reviews.freebsd.org/D45386 (cherry picked from commit ecd1d1f1dac49c7ecbf1e7c5ffc64356c2851efd) --- sys/compat/linuxkpi/common/include/linux/gfp.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/gfp.h b/sys/compat/linuxkpi/common/include/linux/gfp.h index 2fcc0dc05f29..e5dd2e44b0fa 100644 --- a/sys/compat/linuxkpi/common/include/linux/gfp.h +++ b/sys/compat/linuxkpi/common/include/linux/gfp.h @@ -90,15 +90,15 @@ struct page_frag_cache { * * NOTE: This function only works for pages allocated by the kernel. */ -extern void *linux_page_address(struct page *); +void *linux_page_address(struct page *); #define page_address(page) linux_page_address(page) /* * Page management for unmapped pages: */ -extern struct page *linux_alloc_pages(gfp_t flags, unsigned int order); -extern void linux_free_pages(struct page *page, unsigned int order); +struct page *linux_alloc_pages(gfp_t flags, unsigned int order); +void linux_free_pages(struct page *page, unsigned int order); void *linuxkpi_page_frag_alloc(struct page_frag_cache *, size_t, gfp_t); void linuxkpi_page_frag_free(void *); void linuxkpi__page_frag_cache_drain(struct page *, size_t); @@ -147,8 +147,8 @@ dev_alloc_pages(unsigned int order) /* * Page management for mapped pages: */ -extern vm_offset_t linux_alloc_kmem(gfp_t flags, unsigned int order); -extern void linux_free_kmem(vm_offset_t, unsigned int order); +vm_offset_t linux_alloc_kmem(gfp_t flags, unsigned int order); +void linux_free_kmem(vm_offset_t, unsigned int order); static inline vm_offset_t get_zeroed_page(gfp_t flags) From nobody Wed Jun 12 16:41:25 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzrsK40h2z5N3Db; Wed, 12 Jun 2024 16:41:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzrsK2cjlz4gqq; Wed, 12 Jun 2024 16:41:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210485; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EfzOPFDLtvkXYJEEo1lb1zronH4rEt4+YrJq2ICUpcg=; b=DLz7Kgu6OuEP5qOjOBj189jcs1BfJy2uFDaEOy6jWw9fFOCE3JF1XZyZ0yneYVQqCcUpEu mdMeg2HglabGWNeQCbaMdu8XNNh55gIPxEDKmuJv9bDOU1tLA+sj110/x5Gik71R6ENFCH KkDv0kl2X3MRtwsDz1s+TrvPcYHiZYPgPCUVLzWO4KVg4G5R6qtJ+2M4d36cTXXTnYWKz6 vnaQ1FEJtc/GpOoravaYLb5ebkmSMFEpp61Ld1OUTR6DobnCA3EWgStuAyRGHzpmJyQGN9 /ZDY51oDLP6jhZzkYAOD3+7SDQP2siXelt+RDwXCJTNNckfhXQshUgal8QE8/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718210485; a=rsa-sha256; cv=none; b=SkN/VbSvHl4kGbX2qoryhMzZVKyfzZJu2jjgltrRX5Mhce/nV8Lc/pHOwWV9G+6OS3/b0u gDIJEoD3hyvGoQgVQVQVe1k5UMxzUA35lsey9W6MoGovNusqyHNZWuO0U8F0On7IStvT3O sdO6MSe80UpiepD9KQHQ8G6dP0XmsWgVxww5HReGl7FThMruKe9DbVs148JfNNP88uawyu X3j8OKuZK9mzMGprON/45uCKvgcJuNxhmEiGKjZygcRV6FQWGIjrfZ8LncIL9zOKsESjpK +RwJYrl4qH0Hjyr0o5pXZmBFm3bqmdXnRlOLV0QIbqTD5vUL6jOOZMSOjxbsgA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210485; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EfzOPFDLtvkXYJEEo1lb1zronH4rEt4+YrJq2ICUpcg=; b=te8UPZoJVKkmdth3O2ykl9jslKTDUMa0V1G1J9rZRF+O4m35LbEhlZsrfeWexH/BAJv5Sa taZLyESuuN8HxgdijlzP3H7f+KPWqznWEI5NomWhHeZUlZYFC7G0ReZHiTSqZwnXabY9FF Fzz0urqUko2/fqH/wnuGCu/VXh/IMo3iZJX/4uG9qoSg2HZstsK8lFjW9iXYlnFootw5hl FNjXGDyNKpepVCRfpSkp7DqBI+kNpiyy4GOVQ7s+mQkcoHybkJetxFiPuiZqbn7ExXLEvi EhAEv09eshHFdHj77b+hD/ew5RRGu7KYJdS5Eb9fVc5+UrWVjWX4KgDoylfR5g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzrsK2Dg3z10nY; Wed, 12 Jun 2024 16:41:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CGfPxu046794; Wed, 12 Jun 2024 16:41:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CGfPqw046791; Wed, 12 Jun 2024 16:41:25 GMT (envelope-from git) Date: Wed, 12 Jun 2024 16:41:25 GMT Message-Id: <202406121641.45CGfPqw046791@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 49f29c4183d9 - stable/14 - LinuxKPI: 802.11: lock MO tx/wake_tx_queue() downcalls List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 49f29c4183d93afd2724509362daaf41b16eca5d Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=49f29c4183d93afd2724509362daaf41b16eca5d commit 49f29c4183d93afd2724509362daaf41b16eca5d Author: Bjoern A. Zeeb AuthorDate: 2024-02-18 21:07:08 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 13:59:04 +0000 LinuxKPI: 802.11: lock MO tx/wake_tx_queue() downcalls Lock the two TX MO downcalls into driver/firmware in lkpi_80211_txq_tx_one() to make sure they cannot happen in the middle of other (net80211 triggered) updates calling down into the driver/firmware. Sponsored by: The FreeBSD Foundation (commit) Reviewed by: cc Differential Revision: https://reviews.freebsd.org/D43966 (cherry picked from commit 45bce6fa306fc3a211949f63c9bbb7932fe5a3bd) --- sys/compat/linuxkpi/common/src/linux_80211.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 1943c6efd4d8..ecacb74f01f3 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -3770,7 +3770,9 @@ lkpi_80211_txq_tx_one(struct lkpi_sta *lsta, struct mbuf *m) ltxq->txq.tid, ac, skb->priority, skb->qmap); #endif LKPI_80211_LTXQ_UNLOCK(ltxq); + LKPI_80211_LHW_LOCK(lhw); lkpi_80211_mo_wake_tx_queue(hw, <xq->txq); + LKPI_80211_LHW_UNLOCK(lhw); return; ops_tx: @@ -3783,7 +3785,9 @@ ops_tx: #endif memset(&control, 0, sizeof(control)); control.sta = sta; + LKPI_80211_LHW_LOCK(lhw); lkpi_80211_mo_tx(hw, &control, skb); + LKPI_80211_LHW_UNLOCK(lhw); } static void From nobody Wed Jun 12 16:41:28 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzrsN72hxz5N3Dg; Wed, 12 Jun 2024 16:41:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzrsN5fhMz4gcy; Wed, 12 Jun 2024 16:41:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2gP4gKuORWlIfT4Isr/YWygbpKzIlNxSSIV/PwQtGZg=; b=UNbeTqLoSSHoENCfW8rrxXZ0/mqf4kbb5GXeBtIiZXPpD7USVXyJUCYsNzatZGwo9m3YNB 6FNp8pZKZtG6Bn1aIiPQvOvLX/7MREPXOzEQZz2Ai3r7d7bS4U+Z42KcB4Dr5TbQlwzqFp HVNoVju9oHCdMFHbxuRfl12OHvkLLrSIxAhoQgOoIPsoqWpkax8RakT0ZjwiIsGAm33sS6 FzQWedO1H3Xu4gLyFz6Oj7wpbjMLLCv6wJV7gaQVWXbZs2r5tXFUlLSebb6cCs2ALq1VyT FR0HOTZSyXhsPGF3r9l4HqZNVNhAzimbg99sPkh+jxA6XAYuz+f/QVnPp3Xy3A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718210488; a=rsa-sha256; cv=none; b=EvQ5UQyvqtW8zrZDj/sVWH34Scj9/p5gDUAE7sXcncoVyWdSsRLEeqe2pAXpj0Y6yk5EZs 0K3x5g4O+/1e77rxuX3JCDLKNigdiLfDiVKnMfDS7FyyCU4CBnlZ4mM0QwZFKjbeIGvLJy RyNIrXBJqcHc4zPUwYdfPQn9TSyzWkzN6Clr3TrnuK+0yLJDnCIpHxOPsldDz55JQurIWy 79K/7feB0YmbCJFu7r+IYlA8wMkswYdvGZndU1XyDMu+6UHVLfGYifE+Fl18bhqx49DneF lEqW9AABNLeMTmKg1EV6Zqy/4GrPc6Chc/XAdeSv1LSrGl8usfHSFsD/CWtvNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2gP4gKuORWlIfT4Isr/YWygbpKzIlNxSSIV/PwQtGZg=; b=CR5vwVnSaayWpfwBccQki57cnoMJuXa9exeH7jJodh3HQACbqnOOkHy5Oh9J3bIM/1gP9M GVmCnyfJe5K5HWfkrhpnNYC9S+7oTjQgLOAHFJsp/B2Fs//8WdbjtgL+AuKpnjpY9P8NMM OHw2vdKN+RIcqB25HV2cboQXAVBLNwlPx3M9y5V5517SgGf6mrcFZKNC8KYvVGOCmtdrSr E2/yNao0h8NI2cG/f9xuXlpGXvflueWoO+FRNwC7d0dkmSU4CqnqBGWs056zmcPHQjVkhe Mbx4coaoJLJPwLExuazhag8pID/xpMMm++H/C87VJ/VNep2a7F/0/ojxjwJViQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzrsN5Gdcz10sC; Wed, 12 Jun 2024 16:41:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CGfSZU046947; Wed, 12 Jun 2024 16:41:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CGfSee046944; Wed, 12 Jun 2024 16:41:28 GMT (envelope-from git) Date: Wed, 12 Jun 2024 16:41:28 GMT Message-Id: <202406121641.45CGfSee046944@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 537b2e7d48ca - stable/14 - LinuxKPI: 802.11: use net80211 IEEE80211_HTCAP_* definitions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 537b2e7d48cab6a5eb8dcb0d1474ecee72e95b93 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=537b2e7d48cab6a5eb8dcb0d1474ecee72e95b93 commit 537b2e7d48cab6a5eb8dcb0d1474ecee72e95b93 Author: Bjoern A. Zeeb AuthorDate: 2024-06-07 23:57:04 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 13:59:28 +0000 LinuxKPI: 802.11: use net80211 IEEE80211_HTCAP_* definitions Rather than using the values and leaving net80211 names in a comment define the LinuxKPI IEEE80211_HT_CAP_* to the net80211 IEEE80211_HTCAP_* names. That way errors like the one fixed in 3e0915b7b685 are less likely to happen. Sponsored by: The FreeBSD Foundation (cherry picked from commit 63a327b954a38ecd46934a2911321f3ea3d500b3) --- .../linuxkpi/common/include/linux/ieee80211.h | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/ieee80211.h b/sys/compat/linuxkpi/common/include/linux/ieee80211.h index 0fd90e921c77..aa1a0a4f3c5f 100644 --- a/sys/compat/linuxkpi/common/include/linux/ieee80211.h +++ b/sys/compat/linuxkpi/common/include/linux/ieee80211.h @@ -254,20 +254,20 @@ enum ieee80211_ac_numbers { #define IEEE80211_WMM_IE_STA_QOSINFO_SP_ALL 0xf -/* XXX net80211 calls these IEEE80211_HTCAP_* */ -#define IEEE80211_HT_CAP_LDPC_CODING 0x0001 /* IEEE80211_HTCAP_LDPC */ -#define IEEE80211_HT_CAP_SUP_WIDTH_20_40 0x0002 /* IEEE80211_HTCAP_CHWIDTH40 */ -#define IEEE80211_HT_CAP_SM_PS 0x000c /* IEEE80211_HTCAP_SMPS */ +/* Define the LinuxKPI names directly to the net80211 ones. */ +#define IEEE80211_HT_CAP_LDPC_CODING IEEE80211_HTCAP_LDPC +#define IEEE80211_HT_CAP_SUP_WIDTH_20_40 IEEE80211_HTCAP_CHWIDTH40 +#define IEEE80211_HT_CAP_SM_PS IEEE80211_HTCAP_SMPS #define IEEE80211_HT_CAP_SM_PS_SHIFT 2 -#define IEEE80211_HT_CAP_GRN_FLD 0x0010 /* IEEE80211_HTCAP_GREENFIELD */ -#define IEEE80211_HT_CAP_SGI_20 0x0020 /* IEEE80211_HTCAP_SHORTGI20 */ -#define IEEE80211_HT_CAP_SGI_40 0x0040 /* IEEE80211_HTCAP_SHORTGI40 */ -#define IEEE80211_HT_CAP_TX_STBC 0x0080 /* IEEE80211_HTCAP_TXSTBC */ -#define IEEE80211_HT_CAP_RX_STBC 0x0300 /* IEEE80211_HTCAP_RXSTBC */ -#define IEEE80211_HT_CAP_RX_STBC_SHIFT 8 /* IEEE80211_HTCAP_RXSTBC_S */ -#define IEEE80211_HT_CAP_MAX_AMSDU 0x0800 /* IEEE80211_HTCAP_MAXAMSDU */ -#define IEEE80211_HT_CAP_DSSSCCK40 0x1000 /* IEEE80211_HTCAP_DSSSCCK40 */ -#define IEEE80211_HT_CAP_LSIG_TXOP_PROT 0x8000 /* IEEE80211_HTCAP_LSIGTXOPPROT */ +#define IEEE80211_HT_CAP_GRN_FLD IEEE80211_HTCAP_GREENFIELD +#define IEEE80211_HT_CAP_SGI_20 IEEE80211_HTCAP_SHORTGI20 +#define IEEE80211_HT_CAP_SGI_40 IEEE80211_HTCAP_SHORTGI40 +#define IEEE80211_HT_CAP_TX_STBC IEEE80211_HTCAP_TXSTBC +#define IEEE80211_HT_CAP_RX_STBC IEEE80211_HTCAP_RXSTBC +#define IEEE80211_HT_CAP_RX_STBC_SHIFT IEEE80211_HTCAP_RXSTBC_S +#define IEEE80211_HT_CAP_MAX_AMSDU IEEE80211_HTCAP_MAXAMSDU +#define IEEE80211_HT_CAP_DSSSCCK40 IEEE80211_HTCAP_DSSSCCK40 +#define IEEE80211_HT_CAP_LSIG_TXOP_PROT IEEE80211_HTCAP_LSIGTXOPPROT #define IEEE80211_HT_MCS_TX_DEFINED 0x0001 #define IEEE80211_HT_MCS_TX_RX_DIFF 0x0002 From nobody Wed Jun 12 16:41:19 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzrsD57KLz5N3Jt; Wed, 12 Jun 2024 16:41:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzrsC6J0Rz4gnP; Wed, 12 Jun 2024 16:41:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210479; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GAt68nZivDQUKxIuljbaHvSPkN7o02/6+1VsJl35Mgc=; b=BDtqIbV1645jUOfGpyfc+6Ay1wmCSXB3p1Z+s7lZBq9UksvF7c4ZzG6rKwc41p/1nISCUY wq5cz15+7AxCq1SzpdiDgBK5mRr/9BofEWEafZ3CW+IL/24lKAOr5ZinXm6KFhJ9/EXLgz arTsB+mRC7dSBOfektJDtzcTEqH0dXO1lsLKQuQKLee2/Cadhh5L7uElyS3ZV2NuI1AJMM GFzkMbty/XkNXlhI2wTHWkC0vXYEjtBJxB8K77AkyS7V2tmLbA7pdrJf6X3FAtq40wWsq1 uQf6IOTTUGz14drYeYA6lsVGPfCaREX8mTDB35coPdaCt33TNRfAIrW40JpUqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718210479; a=rsa-sha256; cv=none; b=S7praf9tImQvjvhMnoGdwqzi5hQJPAJrmZjl5Pk38WWxQZK9yXy7oclKjawZau1iZMJtYE kQw1zhc2RdMJsxzP3qszygjWFOie5nmx5OXgPnLCfMTjrGovBCk8ft7MOgH5Zgv9DcBjE4 G2ui5SvnA3MHR0NpWnRVmNws2dlcE4kIrZdrCUvkatC+eXW/htCX9kHI8H8GZ/pTSFP05/ zlOBfvbDiNDzKDsHX6fd6CQtQFgzlp9gZq1XDd2eZX5exraEszx6DoqGigiEX6alNsfEVA faOid3Di1JiBVJNZA75nCaeTpN9VU6XrGZW6j9uenJphMV0rx5Oi4j/2dAJYgg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210479; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GAt68nZivDQUKxIuljbaHvSPkN7o02/6+1VsJl35Mgc=; b=i+pBkSyZSwL7iUQhFPJX+wXGNCCCI/tbB8aOlPE77GvXvk0yNGqs8u1lZKy/nxLWh8Uh+d bOI0UfmrOqS8lj06rFlzbHr1Qd5ztz2j7wJBZGzlfYxiXLe2JbQwuORHzNnlfYwen2NlqR D8U19k+MJ7APonUQXukUfLrAjCw/OqPg4zq/WUUejMS2zHs4suOaI8QdcDaSSNG7GnsKF6 rohxpwPgG2Vvl12hzjD0UBrljuOVFb2lwm3/jud8n/0PHdfZAQmG9hg82gSHmvXAkzCM1N Ln6FGdREyEgJlkFQp0Ct96YCmj8YuaPv8dztdAC2Umla2aT5KgQEzHzVAmmIxQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzrsC4M0Xz11QB; Wed, 12 Jun 2024 16:41:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CGfJh6046528; Wed, 12 Jun 2024 16:41:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CGfJWS046525; Wed, 12 Jun 2024 16:41:19 GMT (envelope-from git) Date: Wed, 12 Jun 2024 16:41:19 GMT Message-Id: <202406121641.45CGfJWS046525@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 31c476da2d94 - stable/14 - LinuxKPI: pm: add SET_SYSTEM_SLEEP_PM_OPS() and device_can_wakeup() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 31c476da2d944c3776186e73f8db56c57ba89b8d Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=31c476da2d944c3776186e73f8db56c57ba89b8d commit 31c476da2d944c3776186e73f8db56c57ba89b8d Author: Bjoern A. Zeeb AuthorDate: 2024-04-06 21:15:16 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 13:57:44 +0000 LinuxKPI: pm: add SET_SYSTEM_SLEEP_PM_OPS() and device_can_wakeup() Add the SET_SYSTEM_SLEEP_PM_OPS() by factoring some other macro code out in order to set the suspend/resume functions when the struct is already given. Such is the case in iwlwifi d3. Also add an initial implementation of device_can_wakeup(). Though this is likely all we need we have no way of setting the flag for it yet so leave a pr_debug() and a comment there as well. Until we want to support WoWLAN this is likely not needed for wireless. Doing it the proper way checking a bool in 'struct dev_pm_info' would change 'struct device' and with that 'struct pci_dev' and break the KBI. In favour of mergeability this version does not implement the full functionality yet. Both help to make an updated iwlwifi d3 compile. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45358 (cherry picked from commit 3753988c5d22393fbdefb6aa16b5a5a699d05642) --- sys/compat/linuxkpi/common/include/linux/pm.h | 30 +++++++++++++++------------ sys/compat/linuxkpi/common/src/linux_compat.c | 18 ++++++++++++++++ 2 files changed, 35 insertions(+), 13 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/pm.h b/sys/compat/linuxkpi/common/include/linux/pm.h index 871c7b587864..c8d943027909 100644 --- a/sys/compat/linuxkpi/common/include/linux/pm.h +++ b/sys/compat/linuxkpi/common/include/linux/pm.h @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2020 The FreeBSD Foundation + * Copyright (c) 2020-2024 The FreeBSD Foundation * * This software was developed by Björn Zeeb under sponsorship from * the FreeBSD Foundation. @@ -58,25 +58,26 @@ struct dev_pm_info { IS_ENABLED(CONFIG_PM_SLEEP) ? (_p) : NULL #ifdef CONFIG_PM_SLEEP +#define __SET_PM_OPS(_suspendfunc, _resumefunc) \ + .suspend = _suspendfunc, \ + .resume = _resumefunc, \ + .freeze = _suspendfunc, \ + .thaw = _resumefunc, \ + .poweroff = _suspendfunc, \ + .restore = _resumefunc, \ + #define SIMPLE_DEV_PM_OPS(_name, _suspendfunc, _resumefunc) \ const struct dev_pm_ops _name = { \ - .suspend = _suspendfunc, \ - .resume = _resumefunc, \ - .freeze = _suspendfunc, \ - .thaw = _resumefunc, \ - .poweroff = _suspendfunc, \ - .restore = _resumefunc, \ + __SET_PM_OPS(_suspendfunc, _resumefunc) \ } #define DEFINE_SIMPLE_DEV_PM_OPS(_name, _suspendfunc, _resumefunc) \ const struct dev_pm_ops _name = { \ - .suspend = _suspendfunc, \ - .resume = _resumefunc, \ - .freeze = _suspendfunc, \ - .thaw = _resumefunc, \ - .poweroff = _suspendfunc, \ - .restore = _resumefunc, \ + __SET_PM_OPS(_suspendfunc, _resumefunc) \ } + +#define SET_SYSTEM_SLEEP_PM_OPS(_suspendfunc, _resumefunc) \ + __SET_PM_OPS(_suspendfunc, _resumefunc) #else #define SIMPLE_DEV_PM_OPS(_name, _suspendfunc, _resumefunc) \ const struct dev_pm_ops _name = { \ @@ -86,6 +87,9 @@ const struct dev_pm_ops _name = { \ } #endif +bool linuxkpi_device_can_wakeup(struct device *); +#define device_can_wakeup(_dev) linuxkpi_device_can_wakeup(_dev) + static inline void pm_wakeup_event(struct device *dev __unused, unsigned int x __unused) { diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c index b0691eb0f79a..894e233042e3 100644 --- a/sys/compat/linuxkpi/common/src/linux_compat.c +++ b/sys/compat/linuxkpi/common/src/linux_compat.c @@ -2592,6 +2592,24 @@ io_mapping_create_wc(resource_size_t base, unsigned long size) return (io_mapping_init_wc(mapping, base, size)); } +/* We likely want a linuxkpi_device.c at some point. */ +bool +device_can_wakeup(struct device *dev) +{ + + if (dev == NULL) + return (false); + /* + * XXX-BZ iwlwifi queries it as part of enabling WoWLAN. + * Normally this would be based on a bool in dev->power.XXX. + * Check such as PCI PCIM_PCAP_*PME. We have no way to enable this yet. + * We may get away by directly calling into bsddev for as long as + * we can assume PCI only avoiding changing struct device breaking KBI. + */ + pr_debug("%s:%d: not enabled; see comment.\n", __func__, __LINE__); + return (false); +} + #if defined(__i386__) || defined(__amd64__) bool linux_cpu_has_clflush; struct cpuinfo_x86 boot_cpu_data; From nobody Wed Jun 12 16:41:21 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzrsG3BCFz5N3GR; Wed, 12 Jun 2024 16:41:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzrsF71wbz4gfy; Wed, 12 Jun 2024 16:41:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+3u/RBonjeTYuGDbwfSTQK5xmnvBQySalsw6tUvw6Xw=; b=RSUhH8LjW9Xrm9EyWYokXQmbM+5OicBHok+bjPlKwRX8Xxj2AVIEaj5eZiRsisTlopFr0t 4WGI2/KyChrougOt0lWd+mw2GDkFyyMM7IZc6XUPJIpJBNiCeq+h9lVopjIuZCGCMxaFww HFudEL/wGvMJu8hM/tgB9MsVdpdbdKszHLg0SfafbFL4nslXJcyIq9uroxnyDqYHvhSa9L mMopyvKK1QOKus/vLr91tWj61PEfD5xlloC1x6yRIegkFf1aJCkdhiFa6wHO+F+xrVXkZK XBRtI5QmwIGbYz1Yk67AxiGZ7HWMpn2rKGz5e4atg1ovF26K0cVVoHTb9GbxIg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718210482; a=rsa-sha256; cv=none; b=meI/vF+jH6AEzV4vGVVJCq/2A7K8O1noSpteRZBCeher3YmSgVpg8a4qtsm5u49CAKFXCb 1r3DLLZO3daXbmG7T4htGrh4bG2ADPlYK9js51nO+Pt2u6kj0hmX6pOJvn3F+pgtp7nKK9 WfvPPCi7s3zb34Sw6ZrgM2z9dBSdzTbJFttQ/nqfJQNm8fea/GoUKZ46utPnzswhciD1G4 l/SCDAUWQlo9huyUVR+TfHsJ3S1uKlj6igT7fxLmL8qM5adYos3767otHWhhrNXvVKjz4f O6QwXTFXAFw1OUXKp4XFi+Rf9uI5iZJQ3CirS2pW5R6Bsyigt8ZUgM3uFt1O8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+3u/RBonjeTYuGDbwfSTQK5xmnvBQySalsw6tUvw6Xw=; b=qZJtVB5ZMhaFxaGlv3ouMgCVuWOmKmpmZYKaHoIwa63zhrxpmstoPoCFJXZxBvjvYMrWs9 5Ppjo095AzceIFxDHaL999+qhgGM0ppU/qjQZxcOmE0W4OlJngRISWDQuYxmq9qDuXYJOa hel9hrfLbzgYv5+b7/SGqF3zXyvyGxTdlxIEFCxMTx7I2ZOcNCWewRPnlDbwd6VI3Tx+ru TRjNuy+B6FlF0IRDfSGxT9+gqfakrXJNtj1xci33CSbHPTjSXN9ZNjOWnt9rfHENtIKoun 0jpBL9VLZvt2PrlsjbFLZm39UQNpK5A2cr0AYC+VMBZkfMauvFkkLvR5mddaXg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzrsF6f9Kz11Hh; Wed, 12 Jun 2024 16:41:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CGfLD2046619; Wed, 12 Jun 2024 16:41:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CGfLKN046616; Wed, 12 Jun 2024 16:41:21 GMT (envelope-from git) Date: Wed, 12 Jun 2024 16:41:21 GMT Message-Id: <202406121641.45CGfLKN046616@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: eef52bbe9cb4 - stable/14 - LinuxKPI: 802.11: fix for_each_sta_active_link() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: eef52bbe9cb44616116fab65f9bbf16d1e2d43ef Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=eef52bbe9cb44616116fab65f9bbf16d1e2d43ef commit eef52bbe9cb44616116fab65f9bbf16d1e2d43ef Author: Bjoern A. Zeeb AuthorDate: 2024-05-21 21:58:47 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 13:58:30 +0000 LinuxKPI: 802.11: fix for_each_sta_active_link() Likely a c&p error from for_each_vif_active_link() to for_each_sta_active_link(). We are checking the nitems on the vif instead of the sta in this macro. Function wise there is no difference as the arrays are the same size but for correctness fix this. Sponsored by: The FreeBSD Foundation (cherry picked from commit 69b6c4a6ec6654978628ccd48edce46f00ac3e96) --- sys/compat/linuxkpi/common/include/net/mac80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h index fc9d7829dae3..6a477ae5c32a 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -1253,7 +1253,7 @@ ieee80211_hw_restart_disconnect(struct ieee80211_vif *vif) (_link = rcu_dereference((_vif)->link_conf[_linkid])) ) #define for_each_sta_active_link(_vif, _sta, _linksta, _linkid) \ - for (_linkid = 0; _linkid < nitems((_vif)->link_conf); _linkid++) \ + for (_linkid = 0; _linkid < nitems((_sta)->link); _linkid++) \ if ( ((_vif)->active_links == 0 /* no MLO */ || \ ((_vif)->active_links & BIT(_linkid)) != 0) && \ (_linksta = link_sta_dereference_protected((_sta), (_linkid))) ) From nobody Wed Jun 12 16:41:30 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzrsR2yvjz5N3Gh; Wed, 12 Jun 2024 16:41:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzrsR0Q2Wz4glW; Wed, 12 Jun 2024 16:41:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210491; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v4Et0HF/jYB/yNPoWFfwjixclw/ZtbpxXTQ34jcyDfA=; b=t9VJ5dQCd7zWwl7z6vUBX/3Xt1BomAy6vwScSsAYr1h5MS/3jfjElhcKV4gQhOJdTb5DWm 6q8Y3IKQbaslrjZQ0pdMciHsyt+DDJVYopTOewA4cuizwjHs4KFCZdxaBqzzf7M4IGRR9I 0rY/V6/r+tGlMUjcYPEikzTZ0LX3vvTqLRw8v5HzzovbLWd0u/J4ySQOntfF1V/AKqoJaF R+WV0dzc2/4Y1NT26Tpr4u/Wab903GdK/nx2DSWyDRvaCpNWPVyP02tKJP//vqoWyT7ED0 21tzlA5TiZrjpLpRvCin6EC5fIEO7vND1QxfeBEqYKyanT1RdZUYOzDWl125Mw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718210491; a=rsa-sha256; cv=none; b=jIjCq/p9FFNzAr6DLB5W8ywZipOHjdBsxus0y7yT7YGt0jL1/8W7nE3JNyreOUCXLV/r0L sWcXCTkt9x/MwSjQpMai5A6ZfrQBiaezY0AqqwGiI8Vuil67z3ICNsjF2Yat+V0CgLK1km TvEv1IYeejFDZwXFcAC8km98tnmNZXwVO4rbyJNtBLXjaVki4P2z3B0VonUH7W1ikHqMKb NXzVKLEPdRLl8zSVmk5hnvhOM9mxCOSK2WwqySEN9OMDSFj0GjcD14iyoU2gKdgTGdRIK+ SS16uVt7fC1YJTGcg1F6263PLDL8/JyTLrVLVKzWyk0dKjF6lftxyFNTGzJBiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210491; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v4Et0HF/jYB/yNPoWFfwjixclw/ZtbpxXTQ34jcyDfA=; b=hQ82RV2ArZqZcyu794MJDsFDCvojw7mdTcGSoaRrWrW2Lo0aWvE9JEedEvLttlRyfRqU2b XdvWqYg2f4Yy3iRXakr0nuFdLnPHVEcnxrNxek7b2js2jzqPWzmnV49hFXc7bBiECdAmzJ vgO8ptLfRDw6M7F9+vXsv/tm/SzTuDym91bWI7eEroS7UskxbEmwepOFIkSAQ301z3YGA2 2kYNngRlZ4UWDlQdVub1Laocz1X/UKhE6IzyzQrnxmMdjOWAfArqqljW9poTRCiQcVMwGX kXCORApovo4N2k4mBDh+QqR7K8IzdqFebKJ0stY02DrGLopLr0CcBCE2BRq3Mw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzrsQ70smz10nc; Wed, 12 Jun 2024 16:41:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CGfUdw047068; Wed, 12 Jun 2024 16:41:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CGfUr3047065; Wed, 12 Jun 2024 16:41:30 GMT (envelope-from git) Date: Wed, 12 Jun 2024 16:41:30 GMT Message-Id: <202406121641.45CGfUr3047065@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 2ab1b827d49f - stable/14 - LinuxKPI: 802.11: make sure we can send DISASSOC or DEAUTH frames List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2ab1b827d49f473e30a91382d2ce03e268af45c5 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=2ab1b827d49f473e30a91382d2ce03e268af45c5 commit 2ab1b827d49f473e30a91382d2ce03e268af45c5 Author: Bjoern A. Zeeb AuthorDate: 2024-06-05 22:54:36 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 13:59:46 +0000 LinuxKPI: 802.11: make sure we can send DISASSOC or DEAUTH frames The "Invalid TXQ" error from iwlwifi seems to be triggered by a frame being sent for a sta which is no longer known to the driver/fw. While we make sure to trigger the sending of the frame in net80211 early enough (by calling (*iv_newstate)() early on rather than at the end), TX in LinuxKPI is run in a deferred task. When we drop the net80211 ic lock again and re-acquire the LHW lock the packet may not yet have made it to the driver. Work around this between the (ic and lhw) locks by making sure (a) no new packets get queued after we return from (*iv_newstate)(), and (b) the TX task has run or gets cancelled and we manually push any remaining packets out (or let lsta_free() clean them up). The disabled packet queuing now also needs to be re-enabled in scan_to_auth() in case an lsta is staying in service or gets re-used. Also make sure that any following lkpi_wake_tx_queues() calls no longer ignore queues which have not seen a prior dequeue. This former workaround "feature" (ltxq->seen_dequeue) should be fully garbage collected in a later change on its own. Sponsored by: The FreeBSD Foundation PR: 274382 Tested by: emaste, lwhsu, thj, rkoberman at gmail.com Accepted by: adrian Differential Revision: https://reviews.freebsd.org/D45508 (cherry picked from commit 886653492945f7e945eb9bdaf5bc2ae26df96236) --- sys/compat/linuxkpi/common/src/linux_80211.c | 95 +++++++++++++++++++++++++--- 1 file changed, 86 insertions(+), 9 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 728103778e4e..ca8db481347e 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -146,6 +146,7 @@ const struct cfg80211_ops linuxkpi_mac80211cfgops = { static struct lkpi_sta *lkpi_find_lsta_by_ni(struct lkpi_vif *, struct ieee80211_node *); #endif +static void lkpi_80211_txq_tx_one(struct lkpi_sta *, struct mbuf *); static void lkpi_80211_txq_task(void *, int); static void lkpi_80211_lhw_rxq_task(void *, int); static void lkpi_ieee80211_free_skb_mbuf(void *); @@ -1062,6 +1063,51 @@ lkpi_wake_tx_queues(struct ieee80211_hw *hw, struct ieee80211_sta *sta, } } +/* + * On the way down from RUN -> ASSOC -> AUTH we may send a DISASSOC or DEAUTH + * packet. The problem is that the state machine functions tend to hold the + * LHW lock which will prevent lkpi_80211_txq_tx_one() from sending the packet. + * We call this after dropping the ic lock and before acquiring the LHW lock. + * we make sure no further packets are queued and if they are queued the task + * will finish or be cancelled. At the end if a packet is left we manually + * send it. scan_to_auth() would re-enable sending if the lsta would be + * re-used. + */ +static void +lkpi_80211_flush_tx(struct lkpi_hw *lhw, struct lkpi_sta *lsta) +{ + struct mbufq mq; + struct mbuf *m; + int len; + + LKPI_80211_LHW_UNLOCK_ASSERT(lhw); + + /* Do not accept any new packets until scan_to_auth or lsta_free(). */ + LKPI_80211_LSTA_TXQ_LOCK(lsta); + lsta->txq_ready = false; + LKPI_80211_LSTA_TXQ_UNLOCK(lsta); + + while (taskqueue_cancel(taskqueue_thread, &lsta->txq_task, NULL) != 0) + taskqueue_drain(taskqueue_thread, &lsta->txq_task); + + LKPI_80211_LSTA_TXQ_LOCK(lsta); + len = mbufq_len(&lsta->txq); + if (len <= 0) { + LKPI_80211_LSTA_TXQ_UNLOCK(lsta); + return; + } + + mbufq_init(&mq, IFQ_MAXLEN); + mbufq_concat(&mq, &lsta->txq); + LKPI_80211_LSTA_TXQ_UNLOCK(lsta); + + m = mbufq_dequeue(&mq); + while (m != NULL) { + lkpi_80211_txq_tx_one(lsta, m); + m = mbufq_dequeue(&mq); + } +} + /* -------------------------------------------------------------------------- */ static int @@ -1275,6 +1321,14 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int __func__, ni, ni->ni_drv_data)); lsta = ni->ni_drv_data; + /* + * Make sure in case the sta did not change and we re-add it, + * that we can tx again. + */ + LKPI_80211_LSTA_TXQ_LOCK(lsta); + lsta->txq_ready = true; + LKPI_80211_LSTA_TXQ_UNLOCK(lsta); + LKPI_80211_LVIF_LOCK(lvif); /* Insert the [l]sta into the list of known stations. */ TAILQ_INSERT_TAIL(&lvif->lsta_head, lsta, lsta_entry); @@ -1427,7 +1481,7 @@ lkpi_sta_auth_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_80211_mo_flush(hw, vif, nitems(sta->txq), true); /* Wake tx queues to get packet(s) out. */ - lkpi_wake_tx_queues(hw, sta, true, true); + lkpi_wake_tx_queues(hw, sta, false, true); /* flush, no drop */ lkpi_80211_mo_flush(hw, vif, nitems(sta->txq), false); @@ -1585,7 +1639,7 @@ lkpi_sta_auth_to_assoc(struct ieee80211vap *vap, enum ieee80211_state nstate, in } /* Wake tx queue to get packet out. */ - lkpi_wake_tx_queues(hw, LSTA_TO_STA(lsta), true, true); + lkpi_wake_tx_queues(hw, LSTA_TO_STA(lsta), false, true); /* * .. we end up in "assoc_to_run" @@ -1729,7 +1783,7 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i LKPI_80211_LHW_UNLOCK(lhw); IEEE80211_LOCK(vap->iv_ic); - /* Call iv_newstate first so we get potential DISASSOC packet out. */ + /* Call iv_newstate first so we get potential DEAUTH packet out. */ error = lvif->iv_newstate(vap, nstate, arg); if (error != 0) { ic_printf(vap->iv_ic, "%s:%d: iv_newstate(%p, %d, %d) " @@ -1738,12 +1792,16 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i } IEEE80211_UNLOCK(vap->iv_ic); + + /* Ensure the packets get out. */ + lkpi_80211_flush_tx(lhw, lsta); + LKPI_80211_LHW_LOCK(lhw); lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* Wake tx queues to get packet(s) out. */ - lkpi_wake_tx_queues(hw, sta, true, true); + lkpi_wake_tx_queues(hw, sta, false, true); /* flush, no drop */ lkpi_80211_mo_flush(hw, vif, nitems(sta->txq), false); @@ -2121,12 +2179,16 @@ lkpi_sta_run_to_assoc(struct ieee80211vap *vap, enum ieee80211_state nstate, int } IEEE80211_UNLOCK(vap->iv_ic); + + /* Ensure the packets get out. */ + lkpi_80211_flush_tx(lhw, lsta); + LKPI_80211_LHW_LOCK(lhw); lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* Wake tx queues to get packet(s) out. */ - lkpi_wake_tx_queues(hw, sta, true, true); + lkpi_wake_tx_queues(hw, sta, false, true); /* flush, no drop */ lkpi_80211_mo_flush(hw, vif, nitems(sta->txq), false); @@ -2255,12 +2317,16 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int } IEEE80211_UNLOCK(vap->iv_ic); + + /* Ensure the packets get out. */ + lkpi_80211_flush_tx(lhw, lsta); + LKPI_80211_LHW_LOCK(lhw); lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* Wake tx queues to get packet(s) out. */ - lkpi_wake_tx_queues(hw, sta, true, true); + lkpi_wake_tx_queues(hw, sta, false, true); /* flush, no drop */ lkpi_80211_mo_flush(hw, vif, nitems(sta->txq), false); @@ -3596,7 +3662,7 @@ lkpi_ic_raw_xmit(struct ieee80211_node *ni, struct mbuf *m, lsta = ni->ni_drv_data; LKPI_80211_LSTA_TXQ_LOCK(lsta); - if (!lsta->txq_ready) { + if (!lsta->added_to_drv || !lsta->txq_ready) { LKPI_80211_LSTA_TXQ_UNLOCK(lsta); /* * Free the mbuf (do NOT release ni ref for the m_pkthdr.rcvif! @@ -3822,6 +3888,7 @@ lkpi_80211_txq_task(void *ctx, int pending) struct lkpi_sta *lsta; struct mbufq mq; struct mbuf *m; + bool shall_tx; lsta = ctx; @@ -3837,9 +3904,19 @@ lkpi_80211_txq_task(void *ctx, int pending) LKPI_80211_LSTA_TXQ_LOCK(lsta); /* * Do not re-check lsta->txq_ready here; we may have a pending - * disassoc frame still. + * disassoc/deauth frame still. On the contrary if txq_ready is + * false we do not have a valid sta anymore in the firmware so no + * point to try to TX. + * We also use txq_ready as a semaphore and will drain the txq manually + * if needed on our way towards SCAN/INIT in the state machine. + */ + shall_tx = lsta->added_to_drv && lsta->txq_ready; + if (__predict_true(shall_tx)) + mbufq_concat(&mq, &lsta->txq); + /* + * else a state change will push the packets out manually or + * lkpi_lsta_free() will drain the lsta->txq and free the mbufs. */ - mbufq_concat(&mq, &lsta->txq); LKPI_80211_LSTA_TXQ_UNLOCK(lsta); m = mbufq_dequeue(&mq); From nobody Wed Jun 12 18:11:51 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vztsg5q0tz5N9vg; Wed, 12 Jun 2024 18:11:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vztsg5B1pz4y7L; Wed, 12 Jun 2024 18:11:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718215911; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vRApA9KRTMxSSfVExWHkNhd6j5y0u5UuChn3JBrLenE=; b=HvNCDJB5r03dtEs5GO1sf8+ExhJpEoDnAGkfH6Fc1AxXnaSJCQWye1Ld//6HyJVV4c4Cct Vu02OoMeVkxBq2xt3gMu5nIa60kjWvj9RbLsr4hmMM/EbSaVz3iAs7L/rDg/Zd9Wny4gu0 JcQteT8mhuyaOlA9lXr7W1N64Nf0owONbNZfzcjp/fo0B3wCrh8dt0arRVQ98WdCNZIszZ 5YflI1Dr+vMuzxa/fazqqIn3B5YICbKHii/HcO8uhmmzunjcE0/r6m2jc5pNe46VIWNXDk VGr3SrJHhiwXUQtJq9O/ElWjBH7vwi/4uxSdLvimIXqvgzHseMdLnrvJkyJKdQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718215911; a=rsa-sha256; cv=none; b=AzU8KHEs2MIXpBK7lN5i1ABlvzRykycBjINbrCg9nnqOKERGjN5yDJ54mKGsCbXZ7a6U1B vP/CKzPdz/acDiYxMUmP9zZ0J3ZMRdN7//qXm2Eblt9zLYqUcSmFzHyMRvve34nNEjtavb kINhN+xU7xJssCeXWu1/URKdgTA4e6c8dKHgFv/6Oqk/sjncVReUbTluyQdhGvng2lxkEa zxz+87TUnj/+RcedhDRHWT8jaSxAzEsNiZ7oULnFYSY7dWCJ5zAqLQqeVELah5bLretTQW OkWJvhqM5yVqdJi+hB2sNugP1MZee7qdsNCSP3bVwnPh6/K89ezDyAI0URnZgQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718215911; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vRApA9KRTMxSSfVExWHkNhd6j5y0u5UuChn3JBrLenE=; b=jdvKNv6EfVq+xFxaeaxSOrIUboxr4Y5VixIeqYKRaqKvYEAoNNTh0pgVRV1coaT6dBFJot 5rkM6uTHSzn41y7W65HoOtzqMjp6Qwkcleu4+kdtNcbqF7hAjDJPhdV01LBYM/lVxVfUnL GEgpdf7ofpN9zXU3dPdNZ81EFAU8oP9y0zdsu2X1YWXqb/+4Vt2QPjY1aysLAhpKbs5BOU 8foSc9kRc1e7vJ5gBYj5xkr9Qbc7xbcaoYH0SioaXQN8CblSUPTzkMUoZ3ZdGGZd1IfO0g gaGa3myOygmWEno6PELB60ceS8502FhIqWJnptK9nJTy/lhFcMpcprvJ2Rc2nw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vztsg4nQ4z13lW; Wed, 12 Jun 2024 18:11:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CIBp7L097993; Wed, 12 Jun 2024 18:11:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CIBpmf097990; Wed, 12 Jun 2024 18:11:51 GMT (envelope-from git) Date: Wed, 12 Jun 2024 18:11:51 GMT Message-Id: <202406121811.45CIBpmf097990@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Gmelin Subject: git: 8a9f0fa42b1c - main - ifconfig: Fix default netmask calculation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: grembo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8a9f0fa42b1c6cffd45459bb552e138083b00369 Auto-Submitted: auto-generated The branch main has been updated by grembo: URL: https://cgit.FreeBSD.org/src/commit/?id=8a9f0fa42b1c6cffd45459bb552e138083b00369 commit 8a9f0fa42b1c6cffd45459bb552e138083b00369 Author: Michael Gmelin AuthorDate: 2024-06-12 16:11:52 +0000 Commit: Michael Gmelin CommitDate: 2024-06-12 18:10:13 +0000 ifconfig: Fix default netmask calculation Reported by: phk Reviewed by: emaste, kp MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D45570 --- sbin/ifconfig/af_inet.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sbin/ifconfig/af_inet.c b/sbin/ifconfig/af_inet.c index 5e3084165b33..e21956cfc4fd 100644 --- a/sbin/ifconfig/af_inet.c +++ b/sbin/ifconfig/af_inet.c @@ -440,7 +440,7 @@ in_exec_nl(if_ctx *ctx, unsigned long action, void *data) static void in_setdefaultmask_nl(void) { - struct in_px *px = sintab_nl[ADDR]; + struct in_px *px = sintab_nl[ADDR]; in_addr_t i = ntohl(px->addr.s_addr); @@ -451,11 +451,11 @@ in_setdefaultmask_nl(void) * we should return an error rather than warning. */ if (IN_CLASSA(i)) - px->plen = IN_CLASSA_NSHIFT; + px->plen = 32 - IN_CLASSA_NSHIFT; else if (IN_CLASSB(i)) - px->plen = IN_CLASSB_NSHIFT; + px->plen = 32 - IN_CLASSB_NSHIFT; else - px->plen = IN_CLASSC_NSHIFT; + px->plen = 32 - IN_CLASSC_NSHIFT; px->maskset = true; } #endif From nobody Wed Jun 12 19:16:32 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJJ5JtYz5NHbG; Wed, 12 Jun 2024 19:16:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJJ4pjpz56Q1; Wed, 12 Jun 2024 19:16:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219792; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j0UbzKXJXKYWmBDzo0hbXSaiO5yRgoxPTvW8dMCWpkU=; b=CU2y1qr1fL8SY3XEpCH4ps75ezdKJ7k6o+Y2S4xiBwzOy+XlQ7UTK+kCFnVzrV4IG19VLN bKNmqbebTJWADsBODkrA2H74Da9vUmeeC6e9EI1yJmEV58o3O3hgQoJskGFqW2dyN3DwoR OABe3SOFUM7WBFvT47pXY7nC16InJoa6nnycmXK+BS4TZBzQGwC4qkBwKjpiXcJNAWIITW wdzSh3T5yO29CMSKu0OI73BcoV62jO+xuOw2AHCUa8k6ZlrG4IPn4rHVV+OnOO45zIbU6X rUPeMMMiH0RJ125ZNw1ZHiH9pvl1RXp0zyEBiOHWOcblvYxoZmTMXkqdxbwA+w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219792; a=rsa-sha256; cv=none; b=Fh5wOa0WMgB4dxTAtIJ0l2UhEHFhK9EfNWy+88qJAM6ONiOxTIZhgdSAHrStkKdjAB2Pom OYNR/tPa31l4jpRxzVc1Rrg3XtBB090hR99E6+nVdGoQVU3I60Er1WqG6PRCizjdWa2X34 PVR35eQfGjMAZTxtvBnlfDPFSSx9g3U71UPaYq+aOZyktFBPMXfUP3vIq2tH4nFSu3Uuiy HBCLlllX4/HwFfK6qzMsxopROHhscgKE53RQMdZfW7KS03oSdNsy+HtHvghDw7KkapFjzA Fi/fZ88AuVhKQNNUXsZ8Lc0+fyIlacYONmGabLLIjeHbjsl4HrVpNrpshkYMiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219792; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j0UbzKXJXKYWmBDzo0hbXSaiO5yRgoxPTvW8dMCWpkU=; b=PJw10lu1Nt8QyrM4TQ2KZhxUm6JMcLPhM8N4EbulS7yptbzAnuO7GOmSL9TOvKO/qaig2L mdADB2I5DFqPUggTxLXic1FAbnz0xstgU7XIdfekUUJPdke0jbXY4UoiJum9j+Dj8d5HVN gupZrzvIns+ilzWwHyfi7/MGd+UBojMD03Wc6+uf0WRBGkbvQxRWnZ40Fk+IiIfcNHP3OL m/cIqsAFjmAPHovL6GYvVycyxrsLLRDOEjPObuh6n9O1d7VlJ0xtss5xyKrziTOeZWZqZS rzXqqFJP8Y5ia41CBbR3hIy+aQlmjA7lFnooHM4CX9xgIMDc9e6CxHBHfu/d8g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJJ4Hgzz15Dj; Wed, 12 Jun 2024 19:16:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGWur003395; Wed, 12 Jun 2024 19:16:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGWC6003392; Wed, 12 Jun 2024 19:16:32 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:32 GMT Message-Id: <202406121916.45CJGWC6003392@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 4cb9d580269b - stable/13 - bsdinstall: update comment related to pkg List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4cb9d580269b866a6fbf69826efcd156be538826 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=4cb9d580269b866a6fbf69826efcd156be538826 commit 4cb9d580269b866a6fbf69826efcd156be538826 Author: Bjoern A. Zeeb AuthorDate: 2024-04-25 14:47:30 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:56:20 +0000 bsdinstall: update comment related to pkg pkg_add has been gone since 2013(?). Refer to pkg(8) instead. Sponsored by: The FreeBSD Foundation Reviewed by: jrtc27 Differential Revision: https://reviews.freebsd.org/D44946 (cherry picked from commit ad31d4764255c0848f1f0fa10760d16b5a2922aa) --- usr.sbin/bsdinstall/scripts/docsinstall | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/scripts/docsinstall b/usr.sbin/bsdinstall/scripts/docsinstall index 92d1743b5ddc..77d311c9ca16 100755 --- a/usr.sbin/bsdinstall/scripts/docsinstall +++ b/usr.sbin/bsdinstall/scripts/docsinstall @@ -148,7 +148,7 @@ f_mustberoot_init dialog_menu_main || f_die f_dialog_menutag_fetch selected -# Let pkg_add be able to use name servers +# Let pkg(8) be able to use name servers f_quietly cp -f $BSDINSTALL_TMPETC/resolv.conf $BSDINSTALL_CHROOT/etc/ # From nobody Wed Jun 12 19:16:33 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJK6TWZz5NHMY; Wed, 12 Jun 2024 19:16:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJK5KMnz56MX; Wed, 12 Jun 2024 19:16:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219793; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aDQ/u6siWNHc9mTFmO1gKxC+4Rq7b1joBfRMnhKlSws=; b=bZtlQl53uNc4Qwv72EHpJYGaODY85k5NKGvjhaMhcV4H5BoAukHfxYWNdIOzc2RID2v+ol jGRp2YxeZBh+R1PMwz0i7JLnJ3r1D8LLUo1sPTwMA49qGb07QLX+/k4YvASpphMk9YxMtT 8A8GecPCLV9fQ+yib4jhZP6Fducz5jgL8YJcVRwOEpYF5LGHX+0eSlVdObyxrXcH+6BL8+ gYQnwuJIMQrLnPF/7CT4TcJqNnC6DiN8KvOfsjapEHkk1jwu1dOLUE7XRjSJm5ddw8VfFd qVgqflWzS4dBDaNMOOsuALc3lwlWN/ac8y5P6v8Rviweu74rR3IrSHGE9ZaVYQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219793; a=rsa-sha256; cv=none; b=geS28mokQWyidogEGkZRAxOv0zdCnXzda6uURbmSySgIY0gSubfukp96W528Z/NgPThtzo 0gyBwRrER8Rbu0lqMr2iar8UW1ZoihNm0J54Q+bXJsPyel5OZ8HZ/HdSixoJFNcThhtiQw y2UWe0fkeiW55WBJ+1tjZi3bQWLxF3tlqa8lJaMMeU/sAHAHxmR5GKZ8DTLo/LxNUJU5dx PRPUPm4q2o/kl1RalcfIkejEexWG6h31muWdClHbEu2B1Lub4LmmcGeREWYjeb/xMKUQ6k 3IjLkNFcAZ7Ecpd7s4BmbOTK8uGZ6nTyMDWBgJrpdT0BD2gHe38mJBwoE/lTxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219793; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aDQ/u6siWNHc9mTFmO1gKxC+4Rq7b1joBfRMnhKlSws=; b=v/E8Vrb30EX5cnCdMB1o9OgH+IH08pl2nt5R2MWG4Dm8dQKoaoEJ40cF7gAVhExqoT+xan Gbjx8U1i4C9nurMNNx0Tz4jdL9ZYA3dLHXzMtEiLcvwom2mBYYT3AMFeU31g57pbutKyyJ m8Acdg5qA7V0ZBPLxcMUF/XoHuorrWWdrg8WpdlAWy7jWmh9U361JqR+wiTcW4oNsvftVJ xn30UpPhgkFzOK6f6jOibc5Q6L1PxLBmR29LuLveGmAhBdaJmupyecGk25byGSn+WhQCPI gE7UrBmOCQnSe8PMKOV14PlC+LTxr8LL0PaYUuyU0Y1WotsRNeATJhn5KLRRvA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJK4x4cz14Tm; Wed, 12 Jun 2024 19:16:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGX38003450; Wed, 12 Jun 2024 19:16:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGX4T003447; Wed, 12 Jun 2024 19:16:33 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:33 GMT Message-Id: <202406121916.45CJGX4T003447@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 8e64a7ec0b5d - stable/13 - net80211: amrr_init: change order of commands List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8e64a7ec0b5d8a9b788ec36e9a17d896f7ebcd59 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=8e64a7ec0b5d8a9b788ec36e9a17d896f7ebcd59 commit 8e64a7ec0b5d8a9b788ec36e9a17d896f7ebcd59 Author: Bjoern A. Zeeb AuthorDate: 2024-02-05 14:48:08 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:56:26 +0000 net80211: amrr_init: change order of commands First run the KASSERT before trying to do the free operation. Better for reporting and debugging. Add a guard setting the value to NULL afterwards. NULL pointers are a lot easier to test for. Reviewed by: cc Differential Revision: https://reviews.freebsd.org/D43751 (cherry picked from commit cd9fee3d2c370e81109505c2abfd381af952e9b3) --- sys/net80211/ieee80211_amrr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/net80211/ieee80211_amrr.c b/sys/net80211/ieee80211_amrr.c index 7248af0edccf..461554d75ea1 100644 --- a/sys/net80211/ieee80211_amrr.c +++ b/sys/net80211/ieee80211_amrr.c @@ -132,8 +132,9 @@ amrr_init(struct ieee80211vap *vap) static void amrr_deinit(struct ieee80211vap *vap) { - IEEE80211_FREE(vap->iv_rs, M_80211_RATECTL); KASSERT(nrefs > 0, ("imbalanced attach/detach")); + IEEE80211_FREE(vap->iv_rs, M_80211_RATECTL); + vap->iv_rs = NULL; /* guard */ nrefs--; /* XXX locking */ } From nobody Wed Jun 12 19:16:34 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJM0g79z5NHbH; Wed, 12 Jun 2024 19:16:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJL5yHpz567F; Wed, 12 Jun 2024 19:16:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219794; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K1d/XabHf7PY9iurRAsRQUqQksFjs/CL6O7nEVPiZRw=; b=CNXEdfhePHaj3/KIEdSIbhum8AdNDKfNBxEPYYYRCJCo9yko1Z04x4sJvGiIJGQe52b1R9 Pv03CzWvR5dpNDqoLiVvev+REDGx2Oo5BrI22unyyA2fDxH8k9jQCDRDuj52zukN79PblK Nxo2C2bOu6HSZSO9IQWrvMyt1lU0JgKPMuLpDnaL7VlxZY1ENEDMuiyCpjFJ+VOysmF8Tu 7SrvXkc2tl1E1jr8jbmQioavnz3TfMGp989+RDDJb+c0byFNi7FRzs4e7buk/doRbsyM3v MMDpczrJTsC+/LB9lC2AsAOWGyybbH58oYTpsjTDtZS77IsL4ysUCJ5WSDCR+Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219794; a=rsa-sha256; cv=none; b=kjHoLSnw9Y95Yy74ut95nVXbuLZnhMM2eWGz44CZ1DWxxk6aQgWcH6fOn+RQf/hOrt+8G/ LfR52P645x32VD0QKh2SrcrlSICHFors1AzSum+fIAqXIHtdeNYMXTaNyiQIO5Q/X1l29F 1iq7rac9Lwa8lhUcizPb6cImxo8/CvrRNDUd4CWY6iphDV6BMX+sanbm7AvAJr7LwtCoPL FEHCCznmK8s9R3rew7Du+HtUJ6tkLYYHFJMRJ1dyPXtEQkXmpigoMikzFj5Rg8T0PHEkei xyVuqWkfiPmQjoTbDIScwJjt8UNGGirkDhSmWFhKVuKxkKy1L1MiLHgthWFtRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219794; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K1d/XabHf7PY9iurRAsRQUqQksFjs/CL6O7nEVPiZRw=; b=PGC73/TCPBdf6dh15QcLE2o1DE/8uZLacPUaus9/QcC1B5To97xAOeytlaCz/jZSTwWuHh tBP+AM/O8ObVlzOd1eF0StOiFsAEnI3N8WmShGObvhnzgFyxWOeBmsxUV+XxnL5t7t8dz9 h5Th9+QkK7+GAuNtn99h6bMgPaBeYVpdCr0KnYWwaV3ETHGBzOxsbQ3VWm2doUR28PWsel uT3cdSFi4tPx7bhT51df1qvuMHLqXsaANBEMni4NAO58eqPkGwJuZfLu53NiPvL+kFT6px tIY+7/PbylYpab9sU7gyqlwqFJC53tRXogJyQ98do7aDK8dWfL5u4zimBnJzLA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJL5ZlPz14Tn; Wed, 12 Jun 2024 19:16:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGYIr003490; Wed, 12 Jun 2024 19:16:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGYox003486; Wed, 12 Jun 2024 19:16:34 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:34 GMT Message-Id: <202406121916.45CJGYox003486@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 7ced40667656 - stable/13 - net80211: fix IEEE80211_FHT_BITS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7ced406676562da38b5c2ae1f5cd5ba90fc5e012 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=7ced406676562da38b5c2ae1f5cd5ba90fc5e012 commit 7ced406676562da38b5c2ae1f5cd5ba90fc5e012 Author: Bjoern A. Zeeb AuthorDate: 2024-05-31 21:48:49 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:56:36 +0000 net80211: fix IEEE80211_FHT_BITS AMPDU_RX was added as a second AMPDU_TX, LDPC_TX and LDPC_RX missing; correct and add missing. Makes ddb output (and other debugging) look more correct. Sponsored by: The FreeBSD Foundation Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D45505 (cherry picked from commit 5bbf4b6291863452acfb5a7fc76f227848841cac) --- sys/net80211/ieee80211_var.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net80211/ieee80211_var.h b/sys/net80211/ieee80211_var.h index aa99ccefd248..393c703c29df 100644 --- a/sys/net80211/ieee80211_var.h +++ b/sys/net80211/ieee80211_var.h @@ -722,7 +722,7 @@ MALLOC_DECLARE(M_80211_VAP); #define IEEE80211_FHT_BITS \ "\20\1NONHT_PR" \ - "\23GF\24HT\25AMPDU_TX\26AMPDU_TX" \ + "\21LDPC_TX\22LDPC_RX\23GF\24HT\25AMPDU_TX\26AMPDU_RX" \ "\27AMSDU_TX\30AMSDU_RX\31USEHT40\32PUREN\33SHORTGI20\34SHORTGI40" \ "\35HTCOMPAT\36RIFS\37STBC_TX\40STBC_RX" From nobody Wed Jun 12 19:16:35 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJN2scXz5NHJq; Wed, 12 Jun 2024 19:16:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJM710Mz567f; Wed, 12 Jun 2024 19:16:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219796; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=80wgffg2vkfVU2vqcQQ045O4mNaydAf92ZIp/PuPTzs=; b=T+ZlA3H/WCi691OtHm9hGxyCUZu0YfvkcXc+QXm8DAZqlABWdLm4MsadJ3Fpv+CMHs2UUe csfVItX2tFIX4/b3vDBeoQtt3DEIJoUHd4rTaF156HlgiD7cM0ZA4hbwo7prWFXtgxSLrg XIBPqUQoT0h/Itc+rSPmiDVcYkTXBGZtQU9lX1VG1r5uitQ2OAqlNESZsmWtEt6REsmbhk j8eJzm4ekCtjRWG1AgzSJnWPYFRR7ZuByg4FW9vgxAnzw8rJsjmaQOV+chJrzk0At4YmtR s+GMDrdl93eqt9G03YRhpuPVq3JibhsZw0N4Wa1PFmi8p4iK3Rqwp74XgONL8w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219796; a=rsa-sha256; cv=none; b=LAsMgpJe5fMUWYd+tr4V1enOJdpNYDtkxjXGEIkzAQh2N8L1j9ODS2zvrQyg4hlKIsUDNG BeSx0AMvlwGCympr7UmwNUj6/3Gaq70HSZnDAn5O4UPVsereCq95+EFti/MpAheQXHUmzE 78wIrw9YUSE4kc2f788lwy1lO0U/dIVvZHmq7c8UfQVWEFBc7BAuok56TinIridE2PCTI3 awvjPxY1wsWqDi+tr7hKCD02LajsCK/y6JqUDit/rZ11I3VDKrxdSbk3jgrvadiWVkXfoa bBSymkzDrFb66iGj4s8DwCPN8F1VtoX6zcmiD+TeuzXtua48eWECmSaMoOE8jw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219796; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=80wgffg2vkfVU2vqcQQ045O4mNaydAf92ZIp/PuPTzs=; b=O3zYVoYI0I9gFYzpEQtrLxwyxRfkWWKYpx2garY/arRCG2QkgPnXmQBtE431dj08tZ/swJ VnEZJX3BeLxdUi+1IV8lUtrPhpVxRyxBL5o3+i1Z4M04wPFw+CyKIHA+SAHMftYNAKT7lM qkiHwpWt3Wdki+j9H0hvjrtOqrPWGfqTroqLvrctPxJfpuE1nTjfY4zsUS+jRw5waP1BaW EQAUKcpvHWvgMzm/GXa3SUqZmZzbdgn4UkkRLG6nwew1deWaGD/7Ckz7cBvwr07x5xL4Do nOOxhYuMZt/Xz/r83q5qg+P40P+8gtg61uhNr4A3wMYEVNA1Ohg3OEnQNwmTJA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJM6bryz14Tp; Wed, 12 Jun 2024 19:16:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGZUG003551; Wed, 12 Jun 2024 19:16:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGZvw003549; Wed, 12 Jun 2024 19:16:35 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:35 GMT Message-Id: <202406121916.45CJGZvw003549@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 999d1558b1d8 - stable/13 - iwn(4): correct debug message: "not" to "no" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 999d1558b1d831038b257de49a1f77178c962086 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=999d1558b1d831038b257de49a1f77178c962086 commit 999d1558b1d831038b257de49a1f77178c962086 Author: Bjoern A. Zeeb AuthorDate: 2024-06-05 22:01:06 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:56:43 +0000 iwn(4): correct debug message: "not" to "no" Sponosred by: The FreeBSD Foundation (cherry picked from commit 9e012a9da5df131b64c2dfd7d9b6645af4ccef0f) --- sys/dev/iwn/if_iwn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/iwn/if_iwn.c b/sys/dev/iwn/if_iwn.c index 2cbde90782be..4091bf135ae1 100644 --- a/sys/dev/iwn/if_iwn.c +++ b/sys/dev/iwn/if_iwn.c @@ -7520,7 +7520,7 @@ iwn_addba_request(struct ieee80211_node *ni, struct ieee80211_tx_ampdu *tap, break; } if (qid == sc->ntxqs) { - DPRINTF(sc, IWN_DEBUG_XMIT, "%s: not free aggregation queue\n", + DPRINTF(sc, IWN_DEBUG_XMIT, "%s: no free aggregation queue\n", __func__); return 0; } From nobody Wed Jun 12 19:16:36 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJP21Xqz5NHpF; Wed, 12 Jun 2024 19:16:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJP0sp4z56Ql; Wed, 12 Jun 2024 19:16:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6k8BzpgY1gFe+MdrEKdJml4fMp048oN8rhOdSGmpCeM=; b=UThkeYDULyMwHUxf5vuLvxTeZ5GIU1Exn2UHVbDTRkI1Q4yl5xlgMwm03mBZDz0+RfcRc0 OogNBLGIaX32reURASQA0p19KFo0pI1Krw4EUfsSGoZTMyuaPIE0eS4nXrAV4FQZLRLnC7 8KJvrRMUCasTTQFBnXz9OdJPSR7iUD2PBco13jLLVNrSEWAzYKqhdPopNiUNawYrkWUYVj Qzqn91w5C7hcRiPPglr8GEhg0JGhdtn4t0XhPMyrFRSDagguFKxx3+2WKRVATLoRc5SX6v j4BEsBAhIDNnhPiohZX2EMHZd4usMvXb9JAfAzsprwnX/CNOivDZpUDxFuCGLA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219797; a=rsa-sha256; cv=none; b=L2QHNAb2Si6UeZ72saSM0ak4+zei0XgPbH/BfeQdwwYU120MoQ0hv3FPKfULai35m+Srmr sUnGIr+QFQsC0yyc+A3YOQFjY9hW/NBEOWczQebxQq7BNwWMEnOLLODLtrs6hkvmnkrsBR VVEzEHvMsKQQujBZpUYnoHRWZwCabG69XdOviSpOMcVgOLWPCUOZaRPThtSs28FhJx9KfN 1g+gNkkLE4tDf+jtOFIvpjfmX2uLEkh5IkiD+5qEjREQnhHOBqPfwl5B+jpsG/F4ttcqhT q+Ax7UAicwpBX3uMc0yW7t0VUhNPtVpf2NcfQ11yidpfj/qsdBch8CtWJ+aNZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6k8BzpgY1gFe+MdrEKdJml4fMp048oN8rhOdSGmpCeM=; b=pLyLmWPPwJIMWyfQDemUJM0uCvhol3YfT2xWJokNVyrgGYFZakhnAdowKJ3RpvxuCUqp+a WCBm2njZnOkznPDL6ggEEnjtNBED9wkKeGOd0Isr3GjOE4fAyrgX2GmKLgfgMmqTVhVlV9 mfyPpi1SHC0ZM/RGd5snxPFrDsncBaRNrOHX9iZo+ifYphrXGahCxXcYNifJWOnFjlogd8 mjQPkI2ofBO6/Ojf1waZ0QMxRc0jRT2WjxutUwItoX94b68CW7Iq1NFIW7jNvZbsac0Y6U 4jKqFvJbe2qagdh1eGmqTJN1yW3IFEUtuQwjcg5iMKI52JyP1nOU73vco1airg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJP0TByz15BD; Wed, 12 Jun 2024 19:16:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGah7003590; Wed, 12 Jun 2024 19:16:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGaRb003587; Wed, 12 Jun 2024 19:16:36 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:36 GMT Message-Id: <202406121916.45CJGaRb003587@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 98cf07160021 - stable/13 - LinuxKPI: add PCI_VENDOR_ID_ITTIM List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 98cf071600217600d33a033063e71f41553dc6e2 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=98cf071600217600d33a033063e71f41553dc6e2 commit 98cf071600217600d33a033063e71f41553dc6e2 Author: Bjoern A. Zeeb AuthorDate: 2024-04-02 09:40:42 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:56:48 +0000 LinuxKPI: add PCI_VENDOR_ID_ITTIM Add PCI_VENDOR_ID_ITTIM as needed by mt76. Sponsored by: The FreeBSD Foundation (cherry picked from commit ce707e674f7941c0743e72193c433fcf554a82b5) --- sys/compat/linuxkpi/common/include/linux/pci_ids.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linuxkpi/common/include/linux/pci_ids.h b/sys/compat/linuxkpi/common/include/linux/pci_ids.h index f23cd7d6a124..b52ecc525db6 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci_ids.h +++ b/sys/compat/linuxkpi/common/include/linux/pci_ids.h @@ -51,6 +51,7 @@ #define PCI_VENDOR_ID_HP 0x103c #define PCI_VENDOR_ID_IBM 0x1014 #define PCI_VENDOR_ID_INTEL 0x8086 +#define PCI_VENDOR_ID_ITTIM 0x0b48 #define PCI_VENDOR_ID_MEDIATEK 0x14c3 #define PCI_VENDOR_ID_MELLANOX 0x15b3 #define PCI_VENDOR_ID_QCOM 0x17cb From nobody Wed Jun 12 19:16:38 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJQ5Fkrz5NHbQ; Wed, 12 Jun 2024 19:16:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJQ1sMcz56HX; Wed, 12 Jun 2024 19:16:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219798; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CYnMV0Pap9TSfWNXc6mmwWaXY4XprPFj3QrJegs6ENo=; b=aALlUNtVL/P3GHaPVv3l9/+qYKjw0MykhphNety1zErrO1XKtSIbinR+tNOVyIQmK0Byu6 6MSF5x2dkuD36UX3OS/3GZJiZKHwpl8PMDUv1aJPADrYoCTUPxoZTcaSIuzPTlvpaZDj4Y +c6Bn3yPtvTv1xUC5cSDzmQAZH8tReMrgDyATyOokmGrPK1TcGQ9hIhMSswEpWW7/tCm7/ 8OvzeL1pk4in1I418GDSibP5mFhQhIusHonNM4xmjeM5RbRjdBl7UL2CykP1Yg+hgXmL0o PAaVmA88Zh7YbJBQeT3uGwNRcF4rtThPdIfkntOoMpYxmyfCvAeA4/Z70tLjIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219798; a=rsa-sha256; cv=none; b=NE5Z7T1VWHJTi5npQLz3zcan8JxLz+Yz5XQr/WAOduolz/8ARXpPUWRbAEzumRJMiRzrhB RD558Zjt3Mryt2DCmjWg/a0xRvudYElzKt1t7APPRn/wfn7WGDJr+nVWumGnXyiuyi+hrB ldSZN9gdXyJhRKixuC2QmfWBXiimC5Als/FAU97Ac1tR+6otAE4CL0/bzzQFbqnSqBWSWM sFaqaFkl/3TpzaSATwFjFpg5RDKclLm3oFcYDBYTPZhGD6lkf5Afj4lxYLtlFFYuhUM4aE 8OJ6EE5Td1ecTDFjBY+9VxSrsuEClc85jYxMxWhBACAF6fOw3Xp0C19IJKirJQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219798; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CYnMV0Pap9TSfWNXc6mmwWaXY4XprPFj3QrJegs6ENo=; b=EG5iML7C28hxbFngwCXXxs4i1P01hXQN0cN1mux4fsndQsQulJDloNDfXsxqxB1Fbdaj+P /wAHXZjayFVGn7rtpfkB0GOfLaYB9K/GHxR+51yRO54VF3f0QbcLwNq9T8qTgv++FzgDnh +wkCtmdyaL2cKf6UpG9bAT7XpFIamEGzc9sxWJye1U02Y3ZocFSw8dELLCwYwh8JriGZ0v SJBFDprt2uNGb/MJWS6YaF9a8eEfQ4qCIdlDUt31CdxDKspSvEwqq2edm85lmwai6X8By9 7DZsVb66L9dcAVtmX4xUKoAK8Hywip55d/oED0xpfCnfQqOZFPiCY+7kexh34A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJQ1T2fz15Dk; Wed, 12 Jun 2024 19:16:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGcXA003638; Wed, 12 Jun 2024 19:16:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGcuf003635; Wed, 12 Jun 2024 19:16:38 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:38 GMT Message-Id: <202406121916.45CJGcuf003635@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: f1146027f1d9 - stable/13 - LinuxKPI: add further constants to pci.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f1146027f1d9c476e53e1ef9afb0e5f9d3bf41c0 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=f1146027f1d9c476e53e1ef9afb0e5f9d3bf41c0 commit f1146027f1d9c476e53e1ef9afb0e5f9d3bf41c0 Author: Bjoern A. Zeeb AuthorDate: 2024-03-31 17:26:29 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:56:53 +0000 LinuxKPI: add further constants to pci.h Updated wireless drivers require more knowledge about PCI (BAR) bits. Sponsored by: The FreeBSD Foundation Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D44573 (cherry picked from commit a1cdddcf1596d258ce0b01b156dfd9921bd60e08) --- sys/compat/linuxkpi/common/include/linux/pci.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index d8ab851435f5..5e859e1a65c5 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -107,6 +107,8 @@ MODULE_PNP_INFO("U32:vendor;U32:device;V32:subvendor;V32:subdevice", \ #define to_pci_dev(n) container_of(n, struct pci_dev, dev) #define PCI_STD_NUM_BARS 6 +#define PCI_BASE_ADDRESS_0 PCIR_BARS +#define PCI_BASE_ADDRESS_MEM_TYPE_64 PCIM_BAR_MEM_64 #define PCI_VENDOR_ID PCIR_VENDOR #define PCI_DEVICE_ID PCIR_DEVICE #define PCI_COMMAND PCIR_COMMAND From nobody Wed Jun 12 19:16:39 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJR4hGBz5NHdp; Wed, 12 Jun 2024 19:16:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJR2yCQz56J2; Wed, 12 Jun 2024 19:16:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219799; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3km4zg+HDVWdqomKnjU9cp93AACkolhQSO6vzICJgvo=; b=xSC/Ia+XNpBXKuTwHkboI1tEU2ZFfs8syZbE/hcSpUzgECy8bS4XLJAwpwq4XqrjhwQgJY gQVthLRfQL7jdKCHBqBcKUuDGkcvHLZz9RBGioewXlIS3bYRxK5ipXHA0yXnax9C8Cb3cC EGVFK/LpHMNvJreuJJDynX/u0KK6wXQs498mTFdHaSNs9tghyr1oxQjBFN68FhDr6pNpY3 hO9uvu0NExlmlgV8IwjSMhG1WRO+G8dFObdJI7g9wXQZxlVNAzXu6KqqC+Dc6X/mP0U5WF WMhSGsHM0Ne4UsUCHvGGaHghjcv5aowDFmqasrWtuONIPMAQ3Z86n0d1tVc8wg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219799; a=rsa-sha256; cv=none; b=LNjxFMxaC7T76CNeOe8zmZ8IHekfywaX8Le04nNREkSA5aCO3utxjUPlWOhJIZEQpKS41g h0AJktSQ/Pwl+BQT9w5oS3Fo3B7+s7ntYUi1KpClFqt6tvWv1oNs4T1xCbOrEkgHyAZtsZ eK5s2wJiD3vFOvQ87cXpPAPjSZoE+Sc7ARnnutYfqCjwoHy5AEp3uboZ2Bpp+LqmPL0kOB AkrxRnU681OxLWiblkMCO0TaYxMc+yZuXujSpEQBR/ASAspv0KX5V18s/9be+Nvi62E7Jq xMD1oC/2HE5XKs9S/9fLKClZidi3q2Wzo6iotWsKT0MaeanaVe3OWBQIYIgTsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219799; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3km4zg+HDVWdqomKnjU9cp93AACkolhQSO6vzICJgvo=; b=d7CbzPQAZTGDg7C3JPD0PALWZ82ynnpegyKhY5553A0mCQEJXqpIPOhWfuHVoq9gMlHxJ6 vqWHKUo68iLxaB8mwOUOpWaebel3B9P968gdXM37M4uM9L6Ixobl+WNLtteN73QLTkb9vz ZFFsPxOA3KH+GmPHBJDEc+kAaSLlL2vkroYfCVsFaeX+s57KqR7Q2tHcjNdcwucxA9E8aR qpBGXqAAyDsszL5IMtEuuAhS3ypZvnDxjBPcLr/ioEWqSfF8ABC0RGu4W49mjnmXl7j0O5 2xNSWzbro2AWcs3FDPzbvoxfMmlCaPWC6tp8qeu6TCWeFO/d4gwzjVaEMld8mA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJR2XC9z1584; Wed, 12 Jun 2024 19:16:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGdTJ003677; Wed, 12 Jun 2024 19:16:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGdnN003674; Wed, 12 Jun 2024 19:16:39 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:39 GMT Message-Id: <202406121916.45CJGdnN003674@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 25878310adcb - stable/13 - LinuxKPI: implement memzero_explicit() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 25878310adcbb361b31bc89b34f744c0c5a29bb1 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=25878310adcbb361b31bc89b34f744c0c5a29bb1 commit 25878310adcbb361b31bc89b34f744c0c5a29bb1 Author: Bjoern A. Zeeb AuthorDate: 2024-04-02 09:30:49 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:57:01 +0000 LinuxKPI: implement memzero_explicit() Sponsored by: The FreeBSD Foundation Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D44586 (cherry picked from commit 218b2ccf8cc90698487515c681f3e3453b0dcead) --- sys/compat/linuxkpi/common/include/linux/string.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/string.h b/sys/compat/linuxkpi/common/include/linux/string.h index f745c2f6d343..06dcdbd97663 100644 --- a/sys/compat/linuxkpi/common/include/linux/string.h +++ b/sys/compat/linuxkpi/common/include/linux/string.h @@ -273,4 +273,11 @@ memcpy_and_pad(void *dst, size_t dstlen, const void *src, size_t len, int ch) memset(_ptr + _o, _c, sizeof(*(ptr)) - _o); \ }) +static inline void +memzero_explicit(void *p, size_t s) +{ + memset(p, 0, s); + __asm__ __volatile__("": :"r"(p) :"memory"); +} + #endif /* _LINUXKPI_LINUX_STRING_H_ */ From nobody Wed Jun 12 19:16:40 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJS69Kqz5NHmW; Wed, 12 Jun 2024 19:16:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJS3nKNz56Vy; Wed, 12 Jun 2024 19:16:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219800; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x/9XIfpA1UOMCnEz81o5gcXGOgwn78nVqOXKXMovpBA=; b=yl7kC8TT6OQf+wyfL1JyL1FxZJ3Smv9bcnkCK83RltTkNYEO2M69URg9qZ7ZqWydAlPF41 jImwncwl1b+cutP2CCNtR1EW7Adxo1WC/2HuFM9Z23D5mbIaGW0M9ykAioiKpH98Bw+E6e tP8fyQ9AA2G+MEFC0BLDnd+qijgAY3eSHwCFxwSj63QxPqElND8Cz4dYwMDNrG4BCegOZB mPOBhbHZizvy7539IFlVxYzzW17ul40mlZ0fdfN7Ee5qkE9ZL85g6P/uMF5pYICqU0UA+G 8u0KujEEN79tXgo7zGZZLygoRDUDz2Eh8gt04SXlRg/tb2g2Hz059tzHNymuZw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219800; a=rsa-sha256; cv=none; b=oJ4rSZ69kktMFVT1bIrOAeWE8rCm7zsyhg0RIkwIi7UOzbFsNdScr94FlL13a5iwnquGPQ HncCwV/nRNLYrcyZnVHhLAVJtj0uZg3e0v4aVG3NeKbQKSNTaa5r2Oj0gekdagOgpaNv9u dWJ6tADuyDUDa7nvZT565+TS7sHZXwDp57pevCbDte4gIxemkH4zawvd5RSELSRVi7+pCJ e07bgQAT19vkcG8JX6htg+WqLBSasQDDbnG82bUJ31Q1eI5SsDqQ9j+61inrR46/t/T8E9 2ZVl9oukoae2rTofDeR4WXy7bTYGunGwhG41BkslqW9ZwzKjuDBk9pNIipxZ1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219800; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x/9XIfpA1UOMCnEz81o5gcXGOgwn78nVqOXKXMovpBA=; b=Ci0yMCsdl8DL19HjUQQ2OLMxrOhcKL0UF11UWZKWYqYu7/bPRy7ODMQzOQvxkoOqjPTwMq 71CsKS9I/oWtW/CAlJZ7aiMKqUOBK+dhvGFXvAnQ3zKamLcAo1yZTFZjxA1UgNxgNeMsSG pvs2maiBS1/a5qhcG7udOPOdxmnvJQZdumMHQ1SHEYv/6uUPkSke3g1MV+45janqaPuqH3 2QVPzB/1wu/Z6kal/+sjuOsredPEk83zOXJ6619/IPik5HPIA/O5E7LJ4jVDZ0iTcL77+q 66Oq08rbBDIMjlYGVqqa0C3MUhvZ2XzvuhTGD1mFmSeoClGXJshs8SPbLmqjXg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJS3N9Xz14mQ; Wed, 12 Jun 2024 19:16:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGehM003716; Wed, 12 Jun 2024 19:16:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGexJ003713; Wed, 12 Jun 2024 19:16:40 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:40 GMT Message-Id: <202406121916.45CJGexJ003713@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 8d796198774d - stable/13 - LinuxKPI: add BITS_TO_BYTES() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8d796198774d0908f7a1328fa7257b37ed665a35 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=8d796198774d0908f7a1328fa7257b37ed665a35 commit 8d796198774d0908f7a1328fa7257b37ed665a35 Author: Bjoern A. Zeeb AuthorDate: 2024-04-02 23:48:05 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:57:06 +0000 LinuxKPI: add BITS_TO_BYTES() Just like BITS_TO_LONG() ... used in rtw89. Sponsored by: The FreeBSD Foundation Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D44603 (cherry picked from commit f674f016c03d49e14f1c651ed088a6f2d01a62ee) --- sys/compat/linuxkpi/common/include/linux/bitops.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linuxkpi/common/include/linux/bitops.h b/sys/compat/linuxkpi/common/include/linux/bitops.h index 58677631b604..1415d5224084 100644 --- a/sys/compat/linuxkpi/common/include/linux/bitops.h +++ b/sys/compat/linuxkpi/common/include/linux/bitops.h @@ -54,6 +54,7 @@ #define GENMASK_ULL(h, l) (((~0ULL) >> (BITS_PER_LONG_LONG - (h) - 1)) & ((~0ULL) << (l))) #define BITS_PER_BYTE 8 #define BITS_PER_TYPE(t) (sizeof(t) * BITS_PER_BYTE) +#define BITS_TO_BYTES(n) howmany((n), BITS_PER_BYTE) #define hweight8(x) bitcount((uint8_t)(x)) #define hweight16(x) bitcount16(x) From nobody Wed Jun 12 19:16:42 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJV6pfbz5NHbX; Wed, 12 Jun 2024 19:16:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJV60Tpz56fB; Wed, 12 Jun 2024 19:16:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219802; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8qdN0vd3jK+K6P5THeUQb20temiOOqC4pN5P75sK3OQ=; b=vYTq2JN/qDVpQfN2CbBU2Emk/v8F1vDKEIrWL/3+L9RcvBSfMAoL7JkNMFSuavFQuz+qCW ouE9rdBdOE7e/CiFRueNhHLyz5dXNdWr8f763PnbV4KrgguGQMBR2hsJvyrR7I4JJMH2Xi P+Mvpbu9Gm1dG4j1M2pBadiZR/MhVjAf2H4t+syiKKZmshvCURbqh4yG/jVDj7q3bzHo0p 6/EYOUr0d6JPtHyVLwyBkgxMRwt3QCnfTi0d0bATWtK5dUy3WsHLITQ9aITrB2UknzJPAf 15REUOd5V+j5YqV6hGJNJKTaDlYHyj8ix05nqCj+GOk4vHMGBYEngym5MOHyTw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219802; a=rsa-sha256; cv=none; b=lHjkcsOyiIHkUhM9cUvjo/aC6YIyfaV8WU1zXXcWMpScF7Uf3pw29SJhNiKRxgHzUWEQ28 Kij+CMX3WcMqxT7NyazKYL3L5vmwdq+5FihV5E9BPE+CYAi/cs1/KQlgtGuRodgoZ9RXu7 /CFK3XIsuYPUjCQH6rW26vE4EdqQ7gVmMBkyHhI4wPgHpglDSWqugznPbnEYcRbys1wQfX 1XXKodMRK/fZkVcwRmL/NMxgaI8saBYVoKURUsD9fWBgp6UKM9uTto3hA5FPP+v8i35vu0 j4r3l7H4oey2I/PKTGTfSm68ZeLbA7G8Ms3eQW1Y33s0y8GG5QGOB4KM7TF1YA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219802; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8qdN0vd3jK+K6P5THeUQb20temiOOqC4pN5P75sK3OQ=; b=Ndwb08PaqHrZ1KnK3/oYVZn0ePGZK50xKv9OAyVBNHOS9mSZst19j9kXtigb8iyy3oRLPz r+9btfyqhfW1zWSWnzkHpknahb+T2l+fNEE3CF1mZxurTnMvXoSB3X+Df2vy5f7TuOYmlL 5JbZG9F4MetbIuyLmCf5VzzXWjZ5+1N3USg3fhuI8/tLzaJ9VpNtw7rLScuE/XzB0Prv/S d/JJeNu1WSNX79OXtMv+HvGNRzCFUgbiVLTfFpg3QUysBt29FupfGrQNDWq4FOQh2TZczs 3lCyeNc9q9BM+/y2PHBdLSos3YPuwhrNmgcUyWD3wdhxOxnHaQm1PTzaFjjGmg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJV5WyLz15BF; Wed, 12 Jun 2024 19:16:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGg2h003803; Wed, 12 Jun 2024 19:16:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGgaZ003800; Wed, 12 Jun 2024 19:16:42 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:42 GMT Message-Id: <202406121916.45CJGgaZ003800@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 425edb6fc2d5 - stable/13 - LinuxKPI: sk_buff: implement skb_queue_splice_tail_init() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 425edb6fc2d5e1fcc38e8e194639980d1115b511 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=425edb6fc2d5e1fcc38e8e194639980d1115b511 commit 425edb6fc2d5e1fcc38e8e194639980d1115b511 Author: Bjoern A. Zeeb AuthorDate: 2024-04-02 09:17:31 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:57:25 +0000 LinuxKPI: sk_buff: implement skb_queue_splice_tail_init() Implement skb_queue_splice_tail_init() and SKB_DATA_ALIGN() as needed by the mt76 wireless driver. Sponsord by: The FreeBD Foundation Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D44590 (cherry picked from commit 3d3ec17825a124f0119d76c4d2523d73012fa226) --- sys/compat/linuxkpi/common/include/linux/skbuff.h | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/skbuff.h b/sys/compat/linuxkpi/common/include/linux/skbuff.h index 02190a29e241..ee3f427aa6e9 100644 --- a/sys/compat/linuxkpi/common/include/linux/skbuff.h +++ b/sys/compat/linuxkpi/common/include/linux/skbuff.h @@ -89,6 +89,7 @@ struct skb_shared_hwtstamps { }; #define NET_SKB_PAD max(CACHE_LINE_SIZE, 32) +#define SKB_DATA_ALIGN(_x) roundup2(_x, CACHE_LINE_SIZE) struct sk_buff_head { /* XXX TODO */ @@ -824,7 +825,7 @@ skb_mark_not_on_list(struct sk_buff *skb) } static inline void -___skb_queue_splice_init(const struct sk_buff_head *from, +___skb_queue_splice(const struct sk_buff_head *from, struct sk_buff *p, struct sk_buff *n) { struct sk_buff *b, *e; @@ -847,7 +848,21 @@ skb_queue_splice_init(struct sk_buff_head *from, struct sk_buff_head *to) if (skb_queue_empty(from)) return; - ___skb_queue_splice_init(from, (struct sk_buff *)to, to->next); + ___skb_queue_splice(from, (struct sk_buff *)to, to->next); + to->qlen += from->qlen; + __skb_queue_head_init(from); +} + +static inline void +skb_queue_splice_tail_init(struct sk_buff_head *from, struct sk_buff_head *to) +{ + + SKB_TRACE2(from, to); + + if (skb_queue_empty(from)) + return; + + ___skb_queue_splice(from, to->prev, (struct sk_buff *)to); to->qlen += from->qlen; __skb_queue_head_init(from); } From nobody Wed Jun 12 19:16:41 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJV1K8Mz5NHmX; Wed, 12 Jun 2024 19:16:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJT4nkpz56bX; Wed, 12 Jun 2024 19:16:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219801; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lL4ktS6yAerSScC7RlwcpU/06gJAEnKcjds9H42plLE=; b=FGLK/XLmlGtS8OLIqLTdc0VZVzKoBZHWC5uenGHSN9igxEHioYlQqfLCKbuIXSILQDBpR2 Ro9WGjeCXk5aNVf0h9hT5tP2Q5UUka7V2hmF9n8C2WHfSTvgiqMVfyuOtJnAZXDLkQfKKw CxDfbguZnDAKjqfLbGVey4q5UiHxP+kuRhS2fQLKeAZ2uO+VQpwCL+PhL59lA2V1lqn9dR YWU4nAqStXCQ8DcsyVHRpfH7Ii95BajozmpC2FZzibfuE0htA7vRQPscWfMGpcQn0Atu4+ f1Uu+XeGOjnoKMHgnNcIrFjbjK4ipyCEem09/QbBKVV8nIqysk/QY/FZc4U3VQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219801; a=rsa-sha256; cv=none; b=Uh3gxlhuVO4VnjRyM9ikM/A6qjEFLQaEYeCxjdT/X4cMinADN1uex3vs78+BpCPN2hzogB p38W5Ojx4nMcABteGRQBjKrrMf4Q6AhV855qDVMhUzMpTipw4a+2ygH7fX1UHE37sXzVuF rOFxO3LbVmcWY9JW3nX43zcvcaGHjJSMdNDDXE4YXX/JaEkGvWY3aKxAyYgDRM+koeSOHv DtjSis7wzJ+N5OpC8Qdk99qupswurIejGvmPrRe0+H3EqE29rZj4U4yeR/esSbUxedPLVb QepyNlM7Yx9wkczAcWaY9FrpOIdSmT4C8X9pfLNmO7sTRPtvTO2EjOtW+A+6Rg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219801; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lL4ktS6yAerSScC7RlwcpU/06gJAEnKcjds9H42plLE=; b=cBaJ8fl96bquHNtotegR2NVZ1tTuH6b4LQCmTDXQgOYs3e/djBoeU1XqmSMzJ0KujFkfs9 JmsYh1NOqGLP3fPqvuap9FpMCNKiCY2fIVqi7bDHU1CNGOIuli3+NWS35SFo05viu+I5PV PSDaghPp9y6Jo9GNqmjUqDOSdr1lQ/ycZLAwjtkYVjLQdArX/0o5dVfEC9Vaxct6S7ExQ7 zNdCswWbdVQ5htmol2+Zl80hzpwO8P94ngnfba1F5kOBjnKfWfiFutEvZqzP1vRxn/BXOL uDnFIvERELkoWgNn4eoQgzCPFgPUBixDaG8uBCDNwCpo1NnUTfhXh3eZzCAIww== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJT4PsQz15Dl; Wed, 12 Jun 2024 19:16:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGfOO003761; Wed, 12 Jun 2024 19:16:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGfXE003758; Wed, 12 Jun 2024 19:16:41 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:41 GMT Message-Id: <202406121916.45CJGfXE003758@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: d5edaf3cf216 - stable/13 - LinuxKPI: add dev_alloc_pages() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d5edaf3cf216c5e682a8664e5abb4fc5a01e3fdf Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=d5edaf3cf216c5e682a8664e5abb4fc5a01e3fdf commit d5edaf3cf216c5e682a8664e5abb4fc5a01e3fdf Author: Bjoern A. Zeeb AuthorDate: 2024-04-02 09:44:29 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:57:13 +0000 LinuxKPI: add dev_alloc_pages() Add dev_alloc_pages() though it seems a weird KPI, not passing a dev despite its name. Used by updated wireless driver. Sponsored by: The FreeBSD Foundation Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D44588 (cherry picked from commit 738c02ba24c66391870067602f1c9c030d5c5e5d) --- sys/compat/linuxkpi/common/include/linux/gfp.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/gfp.h b/sys/compat/linuxkpi/common/include/linux/gfp.h index c5de09e896de..2fcc0dc05f29 100644 --- a/sys/compat/linuxkpi/common/include/linux/gfp.h +++ b/sys/compat/linuxkpi/common/include/linux/gfp.h @@ -138,6 +138,12 @@ __free_page(struct page *page) linux_free_pages(page, 0); } +static inline struct page * +dev_alloc_pages(unsigned int order) +{ + return (linux_alloc_pages(GFP_ATOMIC, order)); +} + /* * Page management for mapped pages: */ From nobody Wed Jun 12 19:16:43 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJX1GSVz5NHbY; Wed, 12 Jun 2024 19:16:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJW6qC3z56c9; Wed, 12 Jun 2024 19:16:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219804; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bgXisdiLrz8/MJSdl5/f2alnmx1vxk7BalmPdQpwcag=; b=cz/auIlqS2RIuwcTnRU92YjmZPhK4CLYSZny0dgO2M/rpGzYMNYHwk8CGVVXzFj1oTgQb2 9HPW4neXKn4+rm81PVdQmNh/V3+JBjZXFvmRWIpIyiheaqDxDYNRHRrcPM1eaj1vjw4xfm w1IQUHwN4Z+XAr3S2IRae7TUKn/3Nc+knkqLY20MCVMD2py0FthMrrreqj8SMK8oaQeq7t BNAeYKq6e+ktbNghs4ttwVxtVX65wtXRwhAYhw6g7drPvjmjZ5LkY32QbtCkT9MHCFVrcY vEegl6K4lArjqsFlpecGmSGy0Zao2hj1887BWOVREHtlHYfrZqQBzVs8ZE6PuQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219804; a=rsa-sha256; cv=none; b=XsYDBX/NT79sgLUsSvKD2I2fmIyX1OyPUkb5xpB9a0vLPXaFVIkGVx+Z7RQARoLLpwEdaL rxZtyk26JlP8FZvju7m9bmwefLm/USrhsssGFGIto4BlVWfI7GVCK0fMDMfka8WOsDFuze 5xCqmtcUJ+L7UfixGY2QuJo5e9kJWmWQyjQGTEw7v/AUuXMPTiybtttMqGRJNKZ0gubkK9 hUza7fmhaThcLnczkNHH+FjI1NkmhqBr7tYq6uKzjJl4YaCD+qVAMnvGpAsRPXXWiiOsFb jxYb7T62or5d9mGRo2JBxROWIAOatOITV1WI62vMWoaIfL3pPDDcO7gwh5UeRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219804; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bgXisdiLrz8/MJSdl5/f2alnmx1vxk7BalmPdQpwcag=; b=BfLfIwwrlEmbgw1BHxM7y7wqRcW9/FS419M0xKhaAGrCKP++FN9uOSIYa4nkd7sg4HVU/N cxsM1VVVsVCelELWdWir18pBNac9V3Q2M9MWedFbDyKLfTdMZRrc+3O5G7dMzQpvHBosDU xFGs6l66+2NzYFA75psH9t8DmSpfJ5RNgIAQPzHqdw1RiN4+IAmBXaNaDUWPNrbxddk1vn ut0VKeJHF5RZ/C+Yc6QTu2eklaEOy96qpcq1Mjj4PtP9kWW8EYoSOTCDOGwYST4SxXQtMU NDdANJK/hNYUivZB2DYPYV7aSmXt29gm+VGboLvRy/ZjK8vXcDv4VdgCSUpNBA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJW6QtCz14xG; Wed, 12 Jun 2024 19:16:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGhUr003854; Wed, 12 Jun 2024 19:16:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGhZj003851; Wed, 12 Jun 2024 19:16:43 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:43 GMT Message-Id: <202406121916.45CJGhZj003851@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 4d9e8a65d031 - stable/13 - LinuxKPI: napi_schedule() requires return value, implement napi_is_scheduled() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4d9e8a65d0318efbd3bc6b427c1580cd3c8200a4 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=4d9e8a65d0318efbd3bc6b427c1580cd3c8200a4 commit 4d9e8a65d0318efbd3bc6b427c1580cd3c8200a4 Author: Bjoern A. Zeeb AuthorDate: 2024-03-31 17:27:45 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:57:33 +0000 LinuxKPI: napi_schedule() requires return value, implement napi_is_scheduled() A newer version of iwlwifi requires a return value from napi_schedule(); unclear if the function always should have been bool. Add the bool to test based on the napi_schedule_prep() result. Also add napi_is_scheduled() for rtw89. Sponsored by: The FreeBSD Foundation Reviewed by: emaste (previous version) Differential Revision: https://reviews.freebsd.org/D44591 (cherry picked from commit 21761f2ede4ebad13e78112b9409c1f20f946781) --- sys/compat/linuxkpi/common/include/linux/netdevice.h | 9 ++++++++- sys/compat/linuxkpi/common/src/linux_netdev.c | 8 ++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/netdevice.h b/sys/compat/linuxkpi/common/include/linux/netdevice.h index 02734585bf63..12ff307b3ce4 100644 --- a/sys/compat/linuxkpi/common/include/linux/netdevice.h +++ b/sys/compat/linuxkpi/common/include/linux/netdevice.h @@ -233,7 +233,7 @@ void linuxkpi_netif_napi_add(struct net_device *, struct napi_struct *, void linuxkpi_netif_napi_del(struct napi_struct *); bool linuxkpi_napi_schedule_prep(struct napi_struct *); void linuxkpi___napi_schedule(struct napi_struct *); -void linuxkpi_napi_schedule(struct napi_struct *); +bool linuxkpi_napi_schedule(struct napi_struct *); void linuxkpi_napi_reschedule(struct napi_struct *); bool linuxkpi_napi_complete_done(struct napi_struct *, int); bool linuxkpi_napi_complete(struct napi_struct *); @@ -275,6 +275,13 @@ netif_napi_add_tx(struct net_device *dev, struct napi_struct *napi, netif_napi_add(dev, napi, napi_poll); } +static inline bool +napi_is_scheduled(struct napi_struct *napi) +{ + + return (test_bit(LKPI_NAPI_FLAG_IS_SCHEDULED, &napi->state)); +} + /* -------------------------------------------------------------------------- */ static inline void diff --git a/sys/compat/linuxkpi/common/src/linux_netdev.c b/sys/compat/linuxkpi/common/src/linux_netdev.c index 61ebcdbf7a39..61342395f03c 100644 --- a/sys/compat/linuxkpi/common/src/linux_netdev.c +++ b/sys/compat/linuxkpi/common/src/linux_netdev.c @@ -185,7 +185,7 @@ linuxkpi___napi_schedule(struct napi_struct *napi) } } -void +bool linuxkpi_napi_schedule(struct napi_struct *napi) { @@ -195,8 +195,12 @@ linuxkpi_napi_schedule(struct napi_struct *napi) * iwlwifi calls this sequence instead of napi_schedule() * to be able to test the prep result. */ - if (napi_schedule_prep(napi)) + if (napi_schedule_prep(napi)) { __napi_schedule(napi); + return (true); + } + + return (false); } void From nobody Wed Jun 12 19:16:45 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJY3tFnz5NHdt; Wed, 12 Jun 2024 19:16:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJY19qJz56X7; Wed, 12 Jun 2024 19:16:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219805; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Jbsv0DnGi+NFRChhOkK9Vkx9R1oT3GBPkwWDZXEjovg=; b=U15yasldaN/+MI7Una3dLOOewnGVzeJ9Rlyyaa4UxhT/BapLI6cU1R3NWWprBEo2n8iJvW eXr2tCwOWmLAKPSLOv7VNKi0ztKLuCi9oRo9t+GYEbHepHPNiuqpjQsHbdKWi6bfEBmurP 46WBJ3zMrNK7BUKCMXPN4guh49TQZNCYTcgTNy+/kC4L/PgpsdDWW6X8OOW+rB145q66Ue euCpZadMCpcWLNQeuGsKlHN5Vptg79S46pLxDxXIeUQUzKGpXrisUJsdGGxUCozJc1oI0p pFoCXxKgSaJZUqVvQOcHiqiZfxoxRxoYaEr/ghb9QzCbDiHzggFgCa9s3Irgiw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219805; a=rsa-sha256; cv=none; b=dCDTE+G/8tZ10ZSx1VWsFNexUVAvROu6QewBCO/QySaWJ9dUV/mAsoSdyrZ+uwgX7wdNr0 1sw2U3nmC18F7KKivf9cJfY9w/9olmP1/yRnUxT8OjB2+QjzCIOgV0nMEL9uj24baLA0+7 X1hvuiQ6WeAYQx+VpLq/vtiUVzf3Oc2ZL8pUDowPXmfDObDq5YFE6yEDMTXBC9Ihln6jKl uNqt+uMjp6MK+LXnvdXvEnd0MoNtzIl3Jr4xMGpJqhHBhN+ApwcS4gb07wZupnZmycsBLz eycE0WDA7PBiRqATvtMN0PXZGCTmN3Iop6WZuA2hNTEqK4jtrMUrr2gWNpGGQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219805; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Jbsv0DnGi+NFRChhOkK9Vkx9R1oT3GBPkwWDZXEjovg=; b=MvC57WIWKUfjg9/2bogRqoHlYa8i51Ia7aDlQOMr/s0WV8Oz3GJHn6CO3WYSlRAcZp6gEO KmbDoMIHSyTAUvKaE0hDlykjA6u3fFKhwaoMTCfNE1NjB7XA4cxFtk5cnGDnzyzMts4Vsi mSz1vkmq5nQTtoenKt5RCEjtMmFpjyfCjDLhqHnHPDPjoTkoaUKfYuBpRFcXaATVVt4Fqp LKxrpYSVKy1IrHO4xPjRgBsJeiaIZogvxTu5K+UM1TIFo1pa/3jyyTX8s2hyrhqWStvh7+ 3rKNDNPsgiNzt1RKlpRhN3IwRJ9TFhYbhxCwB2E4tA3Z/wRz3euDeTUVL97F0A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJY0p30z14xH; Wed, 12 Jun 2024 19:16:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGjQa003893; Wed, 12 Jun 2024 19:16:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGjbj003890; Wed, 12 Jun 2024 19:16:45 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:45 GMT Message-Id: <202406121916.45CJGjbj003890@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: e262be127d20 - stable/13 - LinuxKPI: add devm_kfree() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e262be127d20b193701b1bd127e2f157ace9d2ab Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=e262be127d20b193701b1bd127e2f157ace9d2ab commit e262be127d20b193701b1bd127e2f157ace9d2ab Author: Bjoern A. Zeeb AuthorDate: 2024-04-02 09:45:43 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:57:40 +0000 LinuxKPI: add devm_kfree() mt76 calls devm_kfree() directly, so alias it to our lkpi_devm_kmalloc_release() function. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D44589 (cherry picked from commit 170c2e0e2bb1b2d9a7661ba729f8264381c9d9d7) --- sys/compat/linuxkpi/common/include/linux/device.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linuxkpi/common/include/linux/device.h b/sys/compat/linuxkpi/common/include/linux/device.h index 7742750339d9..c20afda0d209 100644 --- a/sys/compat/linuxkpi/common/include/linux/device.h +++ b/sys/compat/linuxkpi/common/include/linux/device.h @@ -257,6 +257,7 @@ int lkpi_devres_destroy(struct device *, void(*release)(struct device *, void *) void lkpi_devres_release_free_list(struct device *); void lkpi_devres_unlink(struct device *, void *); void lkpi_devm_kmalloc_release(struct device *, void *); +#define devm_kfree(_d, _p) lkpi_devm_kmalloc_release(_d, _p) static inline const char * dev_driver_string(const struct device *dev) From nobody Wed Jun 12 19:16:46 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJZ3WbRz5NHph; Wed, 12 Jun 2024 19:16:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJZ2RHVz56lh; Wed, 12 Jun 2024 19:16:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219806; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a8/PceXyILzw4gwp94Bzr/dTJwjmreZ7TImLTIj8PyY=; b=CCZVwvI2u0GQEHhBJNgeL8+MU0rM+iyqSPCmOvP4OGClDq1jzuHmkipCWcLgIQaCt1sB0u 2iVoGRNffIieGms04wF57691yfNMEtDd1cl1fIooh0eeXFdm9kbCeEc5Jqvv61VNG/N28H tlai9sBOuX085rnbi7h/8MLenBZ2MbzoxkoWz9P35ZSk9PmC2Gv8Q65SbRQe3RB4vmsJmv LAvWawcqEwgxVaOhGw5yG0/OQ+IeYcIVbi2C6ePEPHaKnPNIXQ5/VODcP/I9l3iCmcPBhG 2A2ivhwfwCvsj6i5zKTIlUdCl/ESydhioyExqqI0ki/D1zEz94Q5h/BYFOsIAg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219806; a=rsa-sha256; cv=none; b=vlu6O7RfWZFH9ig/t24BGBwmzgmsQhnWQ5q/XyI3SdwE337lrCDUTySFRE35mgQVnzXB1O mGzVSNVov8EaJ8FDNzuTyor73oXwl+LEPmaEm8u6ZsgKDqyvwk2a/n57FFiMi4UKGIe+EH 58kGyTa1DEL5U3K9S8VpXYnHjV3AsCfsWk4zT8xonBSF0sFD4VNOcLCvVVJ825PtJIY9hW o5BCfQRCARaUNowZHtsKzYqW6pg0ZiNmG8OSCO3EGhQ66GPoxOunmSfIYArKWLsIqhwe9/ mAZEUHcZ12YdJU9CTBIoZ5otjy4ubtg0rFC56E+1ZMzMkcbrKA0oZKhAjZO5tA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219806; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a8/PceXyILzw4gwp94Bzr/dTJwjmreZ7TImLTIj8PyY=; b=Qk4bAy6NXXT7JGhO9qWR5EcFpKlsPc1aMDSk+x3OfOuN5QNp1Xj/mq6xwU/4x+X26BodvL G3U7alCpQirZT1Btim9FBxICrHBUHjPuR7qFR2BA1St1wmyai7IWS0jqkEsq6BUDMDPqE2 Rxubcc4tQbi+ABeerdz9mqdiKIsYpsVIicRyWeWDI+tj/WopJfYAOq2fg7qLxld2ouhh9T 8mRDZQQOHgJEOUQwEWIKUwjLt5pYe7wVRqQSudrfmfHbT/ZW4mTAymB4Dwbz2HLxON8dq5 DI7F4aYCceVMs9JOPtqjZNO/WMwn4F0nQAo7zrieLYrdw9+1j0x4unTL9YQ8lA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJZ23h1z1585; Wed, 12 Jun 2024 19:16:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGkin003938; Wed, 12 Jun 2024 19:16:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGksL003935; Wed, 12 Jun 2024 19:16:46 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:46 GMT Message-Id: <202406121916.45CJGksL003935@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 0f87cc98f926 - stable/13 - LinuxKPI: add __counted_by() and __nonstring List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0f87cc98f92691957a253b78a5b6fba5f1824ea9 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=0f87cc98f92691957a253b78a5b6fba5f1824ea9 commit 0f87cc98f92691957a253b78a5b6fba5f1824ea9 Author: Bjoern A. Zeeb AuthorDate: 2024-04-02 09:41:54 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:57:46 +0000 LinuxKPI: add __counted_by() and __nonstring Add checks for __counted_by(_x) and __nonstring as and depending on compiler support enable the attribute/feature. This is needed to make mtk76 and ath1xk drivers compile. Sposnored by: The FreeBSD Foundation Reviewed by: emaste, dim Differential Revision: https://reviews.freebsd.org/D44587 (cherry picked from commit 2a8c50592f7fce8bceedf004f674a5a9eae0fd46) --- sys/compat/linuxkpi/common/include/linux/compiler.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/compiler.h b/sys/compat/linuxkpi/common/include/linux/compiler.h index 22300e73652d..94595b2e8c50 100644 --- a/sys/compat/linuxkpi/common/include/linux/compiler.h +++ b/sys/compat/linuxkpi/common/include/linux/compiler.h @@ -66,6 +66,17 @@ #define ____cacheline_aligned_in_smp __aligned(CACHE_LINE_SIZE) #define fallthrough /* FALLTHROUGH */ do { } while(0) +#if __has_attribute(__nonstring__) +#define __nonstring __attribute__((__nonstring__)) +#else +#define __nonstring +#endif +#if __has_attribute(__counted_by__) +#define __counted_by(_x) __attribute__((__counted_by__(_x))) +#else +#define __counted_by(_x) +#endif + #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #define typeof(x) __typeof(x) From nobody Wed Jun 12 19:16:48 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJc5NCPz5NHhg; Wed, 12 Jun 2024 19:16:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJc4VNsz56gZ; Wed, 12 Jun 2024 19:16:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219808; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tUAy4bc5fDl5vUXmhMFDnbW9ZWpjOeMCmVyYi1Ee5wI=; b=wb6mmkaFJ/tqENur3GFCUqZN0bG0/QrLBHcgW5zCmlIrBf/lEFlbOmzQnQtLnCIgrovjrP yrNA7wtAxmLGJoWPqTsHEN4UOrv5tCD6dWVC1LdwMQjI3E6O8GBcJ/IKz6NZonycsgkTiK M51gUXimD+geTuObKOu2wJ1wuIrKSgpT0QoKqpZXIA0PeCaJVLYFYZ0I015jAcyRkZYz1f celFdKz6cHwRnOQphel9UWQse8lfNC7II/UiiCgZ6KQE+TWdLB2M/QTc1C4HA19JL8XWcJ A8P/6wInIgxXQMGMqwCGQ+sCvzKPBsawTqLy6iFwn2Bvd7p26KKD0r0Zt70Ksw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219808; a=rsa-sha256; cv=none; b=JcQHNDxuUCkHePDrjx1WIbWkdUMqmTahuWCbKfpsU3sZ25iCTK3ObvfKzB8Ml2o6kvH0c+ KumSn3blSXLll3JIbxNGxunCGsOVUqutaBzzbQeL6pRVMRELE9lsYagx1kT5QK9Usr71mw 0RWuIjBrUnqJsPn1M01mCUnRS6uAFiRZFHV8oVOtCuxKVrj3hitbgL7COvhdzLdKqqKPWQ pWt4a0gnJIjTqRskmFO9GBuXwC8FjNiZrJ/9EM8emQAd2LLUiDZJo1rGyhKfSAS8RYaG65 BNHu+E5ylIZQSZFEyO1d/KG6wMQLsWBsxUKm2w8CRZ3tbUshGJQJmJ6nCHLjCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219808; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tUAy4bc5fDl5vUXmhMFDnbW9ZWpjOeMCmVyYi1Ee5wI=; b=aR2FXBoTjfY0SBZvHkJXujXvCx0gaFl+QvatsCItpAed34Vo0nxKWXtpzsS2MupQ4vGg+C uaiUnGBhYnrI1bk331B8egg2WBDpNNIyqbZAe7GKwDCBopUp54CdAt6rS6Ml8/SV045Q1N zIcZ/fN1e9m/8cfX1zbVdw56C8Lq6xa1mfjddSd/KSR3jw68TJ7X0G93wzCUl5fE8NPZsP f9fmardGmH4WW9hE6FJIEEBR8tPrWPwJ40+k/yi8mgHi7KIdqJiLpAQWC+yx+NO8qzJdcr tX98j7+uixATJ85+1FBejsAHvOjc4e4JdMypgG5UHj5ONnNIeqi/tkQqWSyxjw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJc458pz14Tq; Wed, 12 Jun 2024 19:16:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGmYK004028; Wed, 12 Jun 2024 19:16:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGmwx004025; Wed, 12 Jun 2024 19:16:48 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:48 GMT Message-Id: <202406121916.45CJGmwx004025@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 395833f4ea8f - stable/13 - LinuxKPI: add kvmemdup() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 395833f4ea8f4852f47ca1473baf99239331379e Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=395833f4ea8f4852f47ca1473baf99239331379e commit 395833f4ea8f4852f47ca1473baf99239331379e Author: Bjoern A. Zeeb AuthorDate: 2024-05-13 17:43:25 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:57:56 +0000 LinuxKPI: add kvmemdup() Add kvmemdup() as a variant of kmemdup(). While currently it could just call kmemdup() we duplicate the code and use kvmalloc() in case someone will change the implementation of kvmalloc/kvfree in slab.h. This is used by an updated wireless driver. Sponsored by: The FreeBSD Foundation Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D45181 (cherry picked from commit 8e4b8e9d807aa379d2a1c3aaac2537ba7d6bf0bf) --- sys/compat/linuxkpi/common/include/linux/string.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/string.h b/sys/compat/linuxkpi/common/include/linux/string.h index 06dcdbd97663..9302c95e8636 100644 --- a/sys/compat/linuxkpi/common/include/linux/string.h +++ b/sys/compat/linuxkpi/common/include/linux/string.h @@ -97,6 +97,18 @@ kmemdup(const void *src, size_t len, gfp_t gfp) return (dst); } +/* See slab.h for kvmalloc/kvfree(). */ +static inline void * +kvmemdup(const void *src, size_t len, gfp_t gfp) +{ + void *dst; + + dst = kvmalloc(len, gfp); + if (dst != NULL) + memcpy(dst, src, len); + return (dst); +} + static inline char * strndup_user(const char __user *ustr, long n) { From nobody Wed Jun 12 19:16:47 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJb6R5vz5NHpr; Wed, 12 Jun 2024 19:16:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJb3nf5z56rM; Wed, 12 Jun 2024 19:16:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219807; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k3nILbUfAUuWw71hIkxgsVICusdVKJM5AzsR59zHYO4=; b=H4ioFi36FeV82BXxYnMz4ToMfaCVLeRS6VQT9aKyNGy+M9cKHWZ/GYqTY6DHEwpLgJViwr aNMxqiXECz/r+gou6hfZZjvdza0414pAaWWLrXpeGIqyNmcAkSOb9uOBMQBEg4OVgqMZcm iQtrfSDbkYlUPieoDzRE8NCtyrdckJ6OEfTeQnYHYMkMnmi7VT1EvrYmjkfSznbj3MyvDL tKQAnoudSL29w/BNsTew1Cj6wLaK3H8OLrbZTL6Pvrovsm3ZtMR0sW2R7J3oudO/qhNKvc pYXgzpKCp7RKNtvFY3ZjIwBoDNO0u7UTn9XimSL10c5vjfe0Lp/p6LHBVXE17Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219807; a=rsa-sha256; cv=none; b=fXS3Daq07MhI8l9zqAPK7l4/JquYOeZiKd9evUN7GDtb/hmnlu+7VCvsRgaTjXmtbL1ZFa aAhnJAfs498fGTrP1shnJ/qL81Drmd8SoMB3SuQjJ1f+BWmNPTYiInLHCHgXBWLezzkN1s 6W2oHiGAkJlYvnSLsEpyfKlhYIdUrNhJZc3fqgUHkd71ySdCSo9IaJTqSa9n8vcviN4+Ah KknJxcjOHUViYzVygCiV3pB+8JcmuLs7KktTKJIox1Y+XHUR/sxlrs0rPNAPfjNSJjEILU KDsvKcicMYarvJ3uvAej+ow1FhOGDGaVCOrfY9A08VLpsjDF59GP1f51XHQ8kA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219807; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k3nILbUfAUuWw71hIkxgsVICusdVKJM5AzsR59zHYO4=; b=iZ6+pkzPpjG1jgvlgh4wqS9K0cEz21+Zu9bC9D6Cmcw9n47cPUkYHszoY3rZLzzhqmQ6dd RM3UpxhuN3T4kebNf2UVpMrlUF2WJJhJVcO523ZWWSKohdgx9ZYkyq4GQr6AzOfT5csamZ 4Yo48yIm0mGQloRBNZDo0JQ+tnwvhaEtVM+Np1A1DwlcgyRrcd4T1WH4RaoOd054WyUSrp SBIsEizveAm24JxZxj4c1RXkYOG6o+vUG84Ko96KnE8phZ1rKGoJGlQEF7KlWbzgfX4l8P z9UMpYGPbblfC6usFGoLwO1QE1dl71oJdjINYm/GQkwys8uimcY5Pff/s2vCwQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJb3Lswz14xJ; Wed, 12 Jun 2024 19:16:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGl7f003989; Wed, 12 Jun 2024 19:16:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGl7s003986; Wed, 12 Jun 2024 19:16:47 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:47 GMT Message-Id: <202406121916.45CJGl7s003986@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: c503386b189f - stable/13 - LinuxKPI: utsname.h add missing SPDX-License-Identifier List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c503386b189f2335bf1f4ee1597b6d7af1a87375 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=c503386b189f2335bf1f4ee1597b6d7af1a87375 commit c503386b189f2335bf1f4ee1597b6d7af1a87375 Author: Bjoern A. Zeeb AuthorDate: 2024-04-19 18:23:12 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:57:51 +0000 LinuxKPI: utsname.h add missing SPDX-License-Identifier Reported by: markj (2023-05-24; sorry took me a while) (cherry picked from commit 563c72e2137cb8cb9eb0eabf78319e8fe9c8aedd) --- sys/compat/linuxkpi/common/include/linux/utsname.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/utsname.h b/sys/compat/linuxkpi/common/include/linux/utsname.h index e6c52f8a5020..3239801ca17b 100644 --- a/sys/compat/linuxkpi/common/include/linux/utsname.h +++ b/sys/compat/linuxkpi/common/include/linux/utsname.h @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause + * * Copyright (c) 2023 Bjoern A. Zeeb * * Redistribution and use in source and binary forms, with or without From nobody Wed Jun 12 19:16:49 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJd6W8Cz5NHml; Wed, 12 Jun 2024 19:16:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJd5VC1z56dS; Wed, 12 Jun 2024 19:16:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l1DGpO7LZjZinw4EWv2q6PEryVzJVWKjk2OKXkqzkHs=; b=XDBHlwZARTByt1kRMGA8YXUA9X68/ezi9MSvchbCZPh9HKDsYR2q7kOuNEKEhQiB/HRFLJ L5zYj4nqTzJVsFB0oqh9HEmKWn1Ho1Hr/NDqftXoQjhCW+p6BDv1FXwd70arnAkgOKXuKK OJ9taxs4B+2J1ZblfoMjo0N8eXzAm8d6GbP2ElytYRbe3Gvgfc4Z8sourq1mtX5IUT/cnu RExY0DlEsLGtQ6S9omQNgNbDO0pP+1EzP4Y5BTQj8s9oFltel3rqJF77XweYSAgoILwzLX ZRK8QcvNBNQuelie+QB+alJ4UONV+dQ894gIjdIxxiXPvWbyjWVDTWJtVDlX1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219809; a=rsa-sha256; cv=none; b=jepdgqHpTpkF5Shvusmb4iWFDOaa+JUBl6Ej8q5BPDGSUL7GvfdtkhDSN0dMXt/9vP2mOq yXD3iaArK20Es97GIFLVxfcf746T2nlrCTIPiLkc8PQqND3vBrK69oQhziqtc4x3iCnZaO GIO+W27wkBOmcme2V8RiFjFDf9ZUtoGptt+3fz1781cAYOZKg1LElbRkKG4hqhYEWnrp/7 uGSo2Me41kFsVAAIvG67H54/oPkBqQIBiEr91oawPtSa/KBxgveXJya3UvnNIsCxHfAXCr y8LnlfuZzb3GQWlNX5oFLT0R3d5BbcCqE6yk5YCiTgP34TKxFWTpJgLCbjDrEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l1DGpO7LZjZinw4EWv2q6PEryVzJVWKjk2OKXkqzkHs=; b=vBSOmGBr+LMjrYdwWReN+1ydIq1DVmVRCQ66jZLdsek3y/Rk5qOAqQ/JSCuZd6UngckEAj rTjL6S4AQvsfdJin8YUkmWYWh4Cs0UTf5GsWwY3ME0JI7kRjLWvjtnYYN62ZTY0kHkRZrJ YbnM1Z+XhJ0Bv54ionmqRffA4Nd4U6ycCeZd7jZ3aE4bSUu7mTLZlOmMNsa6PsqLOzkOAQ Yoq8RLG/RHEbUnZr00v+5vLoo2IY6S35JylMp7UpN/c9IY08xzDAt9JANPwLfF9S+0Yfcv IaqnisFyXwQOXsq7CQsY15onZTSqNpXvBZ9YVLfSHImiBMe68Q3PKZ/R+OuEEQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJd56k2z1587; Wed, 12 Jun 2024 19:16:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGnZD004067; Wed, 12 Jun 2024 19:16:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGned004064; Wed, 12 Jun 2024 19:16:49 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:49 GMT Message-Id: <202406121916.45CJGned004064@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 33929383594a - stable/13 - LinuxKPI: add FIELD_PREP_CONST() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 33929383594abc079f8269e2837b49f265260909 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=33929383594abc079f8269e2837b49f265260909 commit 33929383594abc079f8269e2837b49f265260909 Author: Bjoern A. Zeeb AuthorDate: 2024-05-13 17:40:26 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:58:01 +0000 LinuxKPI: add FIELD_PREP_CONST() Add FIELD_PREP_CONST() like FIELD_PREP() without any extra checks likely expected on this version in Linux. This is called by an updated wireless driver. Sposnored by: The FreeBSD Foundation Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D45180 (cherry picked from commit bb025df257386c5d1087b652e8ed951bceb89862) --- sys/compat/linuxkpi/common/include/linux/bitfield.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/bitfield.h b/sys/compat/linuxkpi/common/include/linux/bitfield.h index a2020d247489..8a91b0663f37 100644 --- a/sys/compat/linuxkpi/common/include/linux/bitfield.h +++ b/sys/compat/linuxkpi/common/include/linux/bitfield.h @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2020 The FreeBSD Foundation + * Copyright (c) 2020-2024 The FreeBSD Foundation * * This software was developed by Björn Zeeb under sponsorship from * the FreeBSD Foundation. @@ -131,6 +131,10 @@ _uX_replace_bits(8) #define FIELD_PREP(_mask, _value) \ (((typeof(_mask))(_value) << __bf_shf(_mask)) & (_mask)) +/* Likely would need extra sanity checks compared to FIELD_PREP()? */ +#define FIELD_PREP_CONST(_mask, _value) \ + (((typeof(_mask))(_value) << __bf_shf(_mask)) & (_mask)) + #define FIELD_GET(_mask, _value) \ ((typeof(_mask))(((_value) & (_mask)) >> __bf_shf(_mask))) From nobody Wed Jun 12 19:16:50 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJg0CHvz5NHf9; Wed, 12 Jun 2024 19:16:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJf6TQmz575D; Wed, 12 Jun 2024 19:16:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219810; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rEGHpHBBWfNITX1bxW9uBbn5vG+Oo/Q1aVC1XCTBxmg=; b=VgXpG2Fu1SeAJurIfoTSMTNjSJxdHjA687twYnXG+fVhFv1vGEMOooWHSP79nEjkayloL5 t5nZQRrjEIHfyuseJdHSNMGYRzFPUzAzvwcI7G7OLgkWp3h/WkxRmevOL4jsdSBhiQ5rKE HiWfh+aBaY9q/sAZp6vCy1xdKnDjhSvbRdf+n3pPVldOlefTLK5xUFssAUdPQx3mLL4ULw 1oaK6cVdGhZ+2oH0EUTMcUkXtUFBeqAORCnnf8UM7NX2kBImjdu6NrK4VeAYKHhfMm++0v v60heb9yO4ueE50QsntoQkj6zSyYTo6L/zDtxKvXBsdmJAsLEv4RoRhRv2vnxg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219810; a=rsa-sha256; cv=none; b=gldDqzCFL6Skm5gs0LzXsHFhn2Y0/TE6FwZNzTivCQM13xeu28gB/WdAs+HNo3NS2HwcDl ojX1gTL82WhoA+mk4B2VReR8C/1M0XV56FFbF5tWSKH3KsTo0BB3CNlr9xsa1j5kJTTEM8 mpInrRr0lFu10Kxx02s68jJWHA9CctHBwwFL9hgi9il4ZdOK6hKMPnjwGZreeSknhrmcdA HRcJHOZmtSnM7yGfC8yUvWHwhP9G01HiTZ3Icvggm54BNvPoM376pgINjHd2/Izy2r27zO lp+ZFBTGBfcrTR2xG89LQcUOTp2kWlBI2ZAWbYN2Ln97r9U7aa9iDc44Gif1TA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219810; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rEGHpHBBWfNITX1bxW9uBbn5vG+Oo/Q1aVC1XCTBxmg=; b=umFUqXVuSNMouPSxKofk5J6CQeMBOoCP1YE3xTs7ZjFY+LPpeD9Q9mXaRxAsUQ81bP2b+Q a7t1TinAtbmkTVMfg9e/TVU+yfI598NE2xwpNoiPYZ6FzIlE9JkvS6SSSrji/UpArWYKgQ Hn6/L9oDuxTJWMXn8+/i8O4ykhqOpxh/dTMMMcKi3i641ExQB7ngAaiCH7uSV2P9Kij1R7 AT2FTtm6tl9H7Jd8KSevN8n/Dk24xpFmGRVdJP631JR4lbUBUZAZqrKnyN2JH5f2G5TYyN YwVRnZwlSI5mkpL3OTirSrngQKUrsYTtzAmdOqQbr0XpBhGhkBHRtKZdgzjDjw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJf63SQz15Dm; Wed, 12 Jun 2024 19:16:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGocH004118; Wed, 12 Jun 2024 19:16:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGoiM004115; Wed, 12 Jun 2024 19:16:50 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:50 GMT Message-Id: <202406121916.45CJGoiM004115@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 323d4a20bd20 - stable/13 - LinuxKPI: remove extern from function declarations List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 323d4a20bd202463b2da29b7d7d1957671c66619 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=323d4a20bd202463b2da29b7d7d1957671c66619 commit 323d4a20bd202463b2da29b7d7d1957671c66619 Author: Bjoern A. Zeeb AuthorDate: 2024-05-27 19:49:45 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:58:06 +0000 LinuxKPI: remove extern from function declarations Sponsored by: The FreeBSD Foundation Reviewed by: emaste (earlier version, found another two) Differential Revision: https://reviews.freebsd.org/D45386 (cherry picked from commit ecd1d1f1dac49c7ecbf1e7c5ffc64356c2851efd) --- sys/compat/linuxkpi/common/include/linux/gfp.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/gfp.h b/sys/compat/linuxkpi/common/include/linux/gfp.h index 2fcc0dc05f29..e5dd2e44b0fa 100644 --- a/sys/compat/linuxkpi/common/include/linux/gfp.h +++ b/sys/compat/linuxkpi/common/include/linux/gfp.h @@ -90,15 +90,15 @@ struct page_frag_cache { * * NOTE: This function only works for pages allocated by the kernel. */ -extern void *linux_page_address(struct page *); +void *linux_page_address(struct page *); #define page_address(page) linux_page_address(page) /* * Page management for unmapped pages: */ -extern struct page *linux_alloc_pages(gfp_t flags, unsigned int order); -extern void linux_free_pages(struct page *page, unsigned int order); +struct page *linux_alloc_pages(gfp_t flags, unsigned int order); +void linux_free_pages(struct page *page, unsigned int order); void *linuxkpi_page_frag_alloc(struct page_frag_cache *, size_t, gfp_t); void linuxkpi_page_frag_free(void *); void linuxkpi__page_frag_cache_drain(struct page *, size_t); @@ -147,8 +147,8 @@ dev_alloc_pages(unsigned int order) /* * Page management for mapped pages: */ -extern vm_offset_t linux_alloc_kmem(gfp_t flags, unsigned int order); -extern void linux_free_kmem(vm_offset_t, unsigned int order); +vm_offset_t linux_alloc_kmem(gfp_t flags, unsigned int order); +void linux_free_kmem(vm_offset_t, unsigned int order); static inline vm_offset_t get_zeroed_page(gfp_t flags) From nobody Wed Jun 12 19:16:51 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJh1xSQz5NHkF; Wed, 12 Jun 2024 19:16:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJh0wJ4z56vh; Wed, 12 Jun 2024 19:16:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219812; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NgMbcaHN6TnYbNfMb3XlNI3GxFjCgWsQeZIK67yGH6I=; b=MTJ6RvyN7byGPyA8U7olsU3CSGvxJTfk0zZ2BslUSNZ6XiJMaX/UrOqT/oJJcifByMUxvj 2S+J57S5ExPrkDJ8hIIYThTyiFND2BNCmaSsPC/+UAyMuk2jFkmeYBmaTIeNI/oY8UrNqS WSuRnPUPxmQAVBNEvJH093DCDyHin1py/k78v+xmDdP9YOcdy1qOUI9hwp8F4d8CVs8n8O DIqTFkwEzo2g1jr+zbCT0GMDb75yEbnBuNeIrHFNE6pxZJOzDdZuU5BMV7sujiWPbIovuT 0pjDnAobx/GToXjVMsfGgkIBDXTX8ODeh14p+ziFd1TTm78A0JMbpr9Xe1KnbA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219812; a=rsa-sha256; cv=none; b=d5Fkoyno9CJNja+cpY6DjqTPYhdTDyKEUDZ+YeBRMwHOFUypCE7UD5RenFvC22z6lgDZkp eE7EL6tVaFNEtK4is3QnCtjNx+ev8YZV1HuBs7z+En6XpimBEpES0VCw35lKKxNjExJ9vt bWAZm5py0vvi6dHAVGrwLecbQTMR62UU6Sr083NFdei7+ZwbgJjbOf7LgE4JuKkgACyeLc DRi9SC9avanJedJ4Mm2f9aprbLXSPVuifo/Uv6aQopfOljMQk7hkCBMpkif+ZNgtiCHNzN TRZZ0lGU7mwL0ZfY6nPSwcr2brVuLq7kd+F9Go/nYoHfSg3bhR4ki+rzd9Jk1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219812; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NgMbcaHN6TnYbNfMb3XlNI3GxFjCgWsQeZIK67yGH6I=; b=rb+DcPWfPQ+iFmtV+COIRV79qdYr3bpAGajuTIyjlCO6QEi3s5v7ND+U78qy3a4IVmdc4h bAhGrqC3AtGGPeBTDCqRb9hEXemAkRNOFuhqHbFSq3B1cUBG/JrfhePdYrcNOfPKswACvh cQxKUUxv8Dhn5iqd5s9Ptsx/L1JODv2vd2uURUgEXxAb0eAUeWeq9+0o1Od0AzWRb4MhB+ Lk/Eo/4vwirREJ08z5Kzxo3HYmHpZN6HKp2L68w2X1eccrabKWxVs9Ljr6EZR2ZgMVfVHH 3gpGp6+FBhZwWB6yZKNV5F9Vp/AwJUq2PvTfjgzhwCtB7ppbjgER0QVxs4KzOQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJh0Wf0z14jH; Wed, 12 Jun 2024 19:16:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGp84004167; Wed, 12 Jun 2024 19:16:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGpYx004164; Wed, 12 Jun 2024 19:16:51 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:51 GMT Message-Id: <202406121916.45CJGpYx004164@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 947dfe1e01f3 - stable/13 - LinuxKPI: pm: add SET_SYSTEM_SLEEP_PM_OPS() and device_can_wakeup() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 947dfe1e01f31819b2a37c1400731ac367bacebe Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=947dfe1e01f31819b2a37c1400731ac367bacebe commit 947dfe1e01f31819b2a37c1400731ac367bacebe Author: Bjoern A. Zeeb AuthorDate: 2024-04-06 21:15:16 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:58:11 +0000 LinuxKPI: pm: add SET_SYSTEM_SLEEP_PM_OPS() and device_can_wakeup() Add the SET_SYSTEM_SLEEP_PM_OPS() by factoring some other macro code out in order to set the suspend/resume functions when the struct is already given. Such is the case in iwlwifi d3. Also add an initial implementation of device_can_wakeup(). Though this is likely all we need we have no way of setting the flag for it yet so leave a pr_debug() and a comment there as well. Until we want to support WoWLAN this is likely not needed for wireless. Doing it the proper way checking a bool in 'struct dev_pm_info' would change 'struct device' and with that 'struct pci_dev' and break the KBI. In favour of mergeability this version does not implement the full functionality yet. Both help to make an updated iwlwifi d3 compile. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45358 (cherry picked from commit 3753988c5d22393fbdefb6aa16b5a5a699d05642) --- sys/compat/linuxkpi/common/include/linux/pm.h | 30 +++++++++++++++------------ sys/compat/linuxkpi/common/src/linux_compat.c | 18 ++++++++++++++++ 2 files changed, 35 insertions(+), 13 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/pm.h b/sys/compat/linuxkpi/common/include/linux/pm.h index 53be7399579d..79e1ed8ba1c6 100644 --- a/sys/compat/linuxkpi/common/include/linux/pm.h +++ b/sys/compat/linuxkpi/common/include/linux/pm.h @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2020 The FreeBSD Foundation + * Copyright (c) 2020-2024 The FreeBSD Foundation * * This software was developed by Björn Zeeb under sponsorship from * the FreeBSD Foundation. @@ -54,25 +54,26 @@ struct dev_pm_domain { IS_ENABLED(CONFIG_PM_SLEEP) ? (_p) : NULL #ifdef CONFIG_PM_SLEEP +#define __SET_PM_OPS(_suspendfunc, _resumefunc) \ + .suspend = _suspendfunc, \ + .resume = _resumefunc, \ + .freeze = _suspendfunc, \ + .thaw = _resumefunc, \ + .poweroff = _suspendfunc, \ + .restore = _resumefunc, \ + #define SIMPLE_DEV_PM_OPS(_name, _suspendfunc, _resumefunc) \ const struct dev_pm_ops _name = { \ - .suspend = _suspendfunc, \ - .resume = _resumefunc, \ - .freeze = _suspendfunc, \ - .thaw = _resumefunc, \ - .poweroff = _suspendfunc, \ - .restore = _resumefunc, \ + __SET_PM_OPS(_suspendfunc, _resumefunc) \ } #define DEFINE_SIMPLE_DEV_PM_OPS(_name, _suspendfunc, _resumefunc) \ const struct dev_pm_ops _name = { \ - .suspend = _suspendfunc, \ - .resume = _resumefunc, \ - .freeze = _suspendfunc, \ - .thaw = _resumefunc, \ - .poweroff = _suspendfunc, \ - .restore = _resumefunc, \ + __SET_PM_OPS(_suspendfunc, _resumefunc) \ } + +#define SET_SYSTEM_SLEEP_PM_OPS(_suspendfunc, _resumefunc) \ + __SET_PM_OPS(_suspendfunc, _resumefunc) #else #define SIMPLE_DEV_PM_OPS(_name, _suspendfunc, _resumefunc) \ const struct dev_pm_ops _name = { \ @@ -82,6 +83,9 @@ const struct dev_pm_ops _name = { \ } #endif +bool linuxkpi_device_can_wakeup(struct device *); +#define device_can_wakeup(_dev) linuxkpi_device_can_wakeup(_dev) + static inline void pm_wakeup_event(struct device *dev __unused, unsigned int x __unused) { diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c index d3804e9ecf05..81127bf364f9 100644 --- a/sys/compat/linuxkpi/common/src/linux_compat.c +++ b/sys/compat/linuxkpi/common/src/linux_compat.c @@ -2773,6 +2773,24 @@ io_mapping_create_wc(resource_size_t base, unsigned long size) return (io_mapping_init_wc(mapping, base, size)); } +/* We likely want a linuxkpi_device.c at some point. */ +bool +device_can_wakeup(struct device *dev) +{ + + if (dev == NULL) + return (false); + /* + * XXX-BZ iwlwifi queries it as part of enabling WoWLAN. + * Normally this would be based on a bool in dev->power.XXX. + * Check such as PCI PCIM_PCAP_*PME. We have no way to enable this yet. + * We may get away by directly calling into bsddev for as long as + * we can assume PCI only avoiding changing struct device breaking KBI. + */ + pr_debug("%s:%d: not enabled; see comment.\n", __func__, __LINE__); + return (false); +} + #if defined(__i386__) || defined(__amd64__) bool linux_cpu_has_clflush; struct cpuinfo_x86 boot_cpu_data; From nobody Wed Jun 12 19:16:53 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJj4gt3z5NHhm; Wed, 12 Jun 2024 19:16:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJj1xxmz5713; Wed, 12 Jun 2024 19:16:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219813; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cie1NNB94d06DDKcK1SqXg0Asyuy/xSgMA7bI0xmCkY=; b=sdyRaW8rNYRiVOx12NSNtGKCD5JmsOPD5GEZ7TDe9Jk2MP7i8DZFRu4sH2VQZDzquf6JCq wP43178og5NGvcvHy/+o31nHvZ8ASTDUlHynYtIgB/8thQOnq/d+lW9G+GbAWejJL4pzbP xqh9B2DJBpM3qjIa1L9Q6hQyZ/dlKEKLc6qpxF7Ag62C3OP4gaWNI/Q7UQILIWrq3Izl3P 1vMHo+8YGA9GlTpHsdIe2iD0cK/+J6AmEdlQCtqipVZbhg73VW4IfM98RqYK+HPmi7UwKI YkAnHDs6AvA0XqXY3r/DtIr070tpsvTuM0YJhUFyvu7bZOIvlbLpsdcE+iguiA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219813; a=rsa-sha256; cv=none; b=fFMMUIb7rdw+Jghid9viiAi75DkJ0ZUdoV/Shf9ELstpUUBL5C46wOpjA9Fnfl9h7MmbMu 2ud43+nMk7iVNZAal8WhefXIC/A+QVXY4H6sMODS9EEa3i6/66stH/YLzPVYys/uDDCl7i sRG2X3QTU14SvorGUJlPRJ1NqAvFFraV/AZRw/2nS2yNn7sH9iCYRlhdgVyQpDC7Fa3c+b Eq70aaYKxJQElNSwHA1X1ZX2s2qDbQ0lAEocoDBDtCwwzkeRTzHguTLIigMuehuyZJBiPx 4HEw/sSSGrYfUkSrJ5dHDLQmZnajr40z2lqIlSvme2RKeDAS+UPQMHJJilf+9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219813; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cie1NNB94d06DDKcK1SqXg0Asyuy/xSgMA7bI0xmCkY=; b=fO+615iBIyKbHKumGpjRpc9KwE1vL0+Y3KRxIyivC1IYHnO82xf39k3nY332PetFytR9Co xDIMgwTD/biLI+BfPr3ZtLaCXlpYdWEUCJHW+w9hgZcJvqKDzMq5bjRjKCYF1M5EYu/yod NV3VpjUSdbypSmyx1KNJ1GUXoIbF+KRSUE6EutJUoZVwJXyMXJt5id/o+OhcIfZHUUIBUY guHppYVKjQOphyTG4sKHz9O0sXy7Om26VJeRNh9Wfj7YhzyC4lLh0H7ENjuw8VAM24XuM4 m0As6j7j7SREqSLoiUiV+gyTgnmodrZarbig+Twy7IErJNHsNm2FY5nsIaJL4A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJj1WVMz14Dh; Wed, 12 Jun 2024 19:16:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGrw2004224; Wed, 12 Jun 2024 19:16:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGrHZ004221; Wed, 12 Jun 2024 19:16:53 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:53 GMT Message-Id: <202406121916.45CJGrHZ004221@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 7cda20918644 - stable/13 - LinuxKPI: 802.11: return proper value for IEEE80211_CRYPTO_AES_CCM List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7cda20918644f283590a5bb348066bdc2bef18b8 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=7cda20918644f283590a5bb348066bdc2bef18b8 commit 7cda20918644f283590a5bb348066bdc2bef18b8 Author: Bjoern A. Zeeb AuthorDate: 2024-03-04 23:03:58 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:59:35 +0000 LinuxKPI: 802.11: return proper value for IEEE80211_CRYPTO_AES_CCM In case of LKPI_80211_HW_CRYPTO we convert from LinuxKPI cipher_suites to net80211 ic_cryptocaps fields. For WLAN_CIPHER_SUITE_CCMP we accidentally returned the bit number instead of the shifted value which leads to ieee80211_crypto_newkey() setting IEEE80211_KEY_SWCRYPT, which in turned lead to us trying to decode the frame again despite HW had already done it. This was found out of a discussion in D43634. Reviewed by: cc, adrian Differential Revision: https://reviews.freebsd.org/D44208 (cherry picked from commit 906521f8176b13533556d742db4ab28e847b85c0) --- sys/compat/linuxkpi/common/src/linux_80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 876ff3693bd0..e5fcb81dce6a 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -546,7 +546,7 @@ lkpi_l80211_to_net80211_cyphers(uint32_t wlan_cipher_suite) case WLAN_CIPHER_SUITE_TKIP: return (IEEE80211_CRYPTO_TKIP); case WLAN_CIPHER_SUITE_CCMP: - return (IEEE80211_CIPHER_AES_CCM); + return (IEEE80211_CRYPTO_AES_CCM); case WLAN_CIPHER_SUITE_WEP104: return (IEEE80211_CRYPTO_WEP); case WLAN_CIPHER_SUITE_AES_CMAC: From nobody Wed Jun 12 19:16:54 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJk4sTkz5NHhp; Wed, 12 Jun 2024 19:16:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJk3GxHz56sy; Wed, 12 Jun 2024 19:16:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YedWzx5J//eJb31ChTuUrkK4/aQAkpsx6vr7v7aLbCY=; b=DEkibcF8A2Tcg1KJpaUoaIIigMiiD6qu9+4T2r0KWGBp561mLcQGt/saAaNBSRJrb8BGl7 zWMPU2j+8NkAqNjz8ZpgU3Hef2c7WN7BS8paQ1jm2gH+SpmEqQ1yPiDtTezyZnt3TT4cRK q+gLaxQn93FbJk/leUbFJhd+A1Nv6G+QQyNSSfn806ttaqeqBGYUaSfqEqswpJya6r8BJ/ I4QkbP8GdF7iLEQatFzHPgIk05erKKNYJLnny5gsR5ru71N2+/0wHJGIcY5Hdbfl/aBd3a 7clW4Mu0DKznQQQJL2XfCONYk6CrvRjHI3RaPm5e5YNQjZ7TQM2DsDMEYZh3CA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219814; a=rsa-sha256; cv=none; b=ML2JKolUXu+isHfIB8COJIw7HIg7b7rJrWCPJS6dXKH/eFW6/HCA3tCmRqO60SnJzLiqJa awe9Ur2Yt5s4+spgn0pV2YgfWCWa+XM/keTRjNLvzJAvSJFdvvA5A/Mv+SYzQm5AhV48dT kFQJYYn1ZrPbTGWVmvn9oXj0UulB7tskJtDt1CyiDbS8cLQbV4JMUnH7PrsfMafSlOayOb yNHj26V/mHlhuxrHikaoCneBBF+3EdnETpLeK+4hcsOjUOVb7xqzxYQ/hDlNxqnCyML1OH ocvLxS06bJMPjgiOL3aweQUSMYrBgCbOXjGJelELEPT9Ae3Kvl3BnpQugr1niA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YedWzx5J//eJb31ChTuUrkK4/aQAkpsx6vr7v7aLbCY=; b=hFEA6KDKyLnjv+UUiGQhOWtsI+3cW8RB0MykyCGsHbQ4mhvLRDiZIQFuTNt4zfaDVPqybs PvE9eac00L71RAi2Uidjm1Z0O4kjGmXdnQPppZNcj3OtHNWCEfVgnsS7LsEi7wGaNMlhNk 1lv3MMgPRZitVHIJWAALbHvZc2ZfcKMbbvqRBNYQTk5YHuk9nMDWGrZZlRjYYnEPknutoa ahSsLgfZKvifSxtCg3Lms5L00sflrwTnRMpwAc9O94W0gpApaB7aFfsCZfiFemddkyXI8L tpFUvaXvCQSoE00yQXgpfVvj8nURQBz3ZGJwJ2QXmHFavgc0Ghj3mbK9p2FWXQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJk2qj6z14jJ; Wed, 12 Jun 2024 19:16:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGsa6004272; Wed, 12 Jun 2024 19:16:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGsBH004269; Wed, 12 Jun 2024 19:16:54 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:54 GMT Message-Id: <202406121916.45CJGsBH004269@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: c91ba48865a6 - stable/13 - net8011: radiotap: add more EHT constants List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c91ba48865a61a84f521085fd59ed797655e8816 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=c91ba48865a61a84f521085fd59ed797655e8816 commit c91ba48865a61a84f521085fd59ed797655e8816 Author: Bjoern A. Zeeb AuthorDate: 2024-04-02 23:34:22 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 17:00:10 +0000 net8011: radiotap: add more EHT constants (cherry picked from commit ab95bca9988ab15a2502efd03db43068a0a2b18b) --- sys/net80211/ieee80211_radiotap.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/net80211/ieee80211_radiotap.h b/sys/net80211/ieee80211_radiotap.h index dba454a8fa42..d44f81b68b8c 100644 --- a/sys/net80211/ieee80211_radiotap.h +++ b/sys/net80211/ieee80211_radiotap.h @@ -540,6 +540,11 @@ struct ieee80211_radiotap_eht_usig { #define IEEE80211_RADIOTAP_EHT_USIG_COMMON_VALIDATE_BITS_OK 0x00000080 #define IEEE80211_RADIOTAP_EHT_USIG_COMMON_PHY_VER 0x00007000 #define IEEE80211_RADIOTAP_EHT_USIG_COMMON_BW 0x00038000 +#define IEEE80211_RADIOTAP_EHT_USIG_COMMON_BW_20MHZ 0x0 +#define IEEE80211_RADIOTAP_EHT_USIG_COMMON_BW_40MHZ 0x1 +#define IEEE80211_RADIOTAP_EHT_USIG_COMMON_BW_80MHZ 0x2 +#define IEEE80211_RADIOTAP_EHT_USIG_COMMON_BW_160MHZ 0x3 +#define IEEE80211_RADIOTAP_EHT_USIG_COMMON_BW_320MHZ_1 0x4 #define IEEE80211_RADIOTAP_EHT_USIG_COMMON_UL_DL 0x00040000 #define IEEE80211_RADIOTAP_EHT_USIG_COMMON_BSS_COLOR 0x01f80000 #define IEEE80211_RADIOTAP_EHT_USIG_COMMON_TXOP 0xfe000000 From nobody Wed Jun 12 19:16:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJl6D3fz5NHfG; Wed, 12 Jun 2024 19:16:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJl4Nr9z576B; Wed, 12 Jun 2024 19:16:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219815; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yZJpUdd3CVsMEb3R3z+pY5xD7fxu2fgPsas+0NpGOrs=; b=aTi66ABwVCkFZqKd6s+4uitsbadr6LcCLNuQ25bGIQ6TzzezGWc61kaHZ3wkIwZbA8rHHc PFP3R9gJjFfoQrxQV14tO5QGpsdFttWkkSNYc+jq0OtR1Z6OczDJ+gdwMgcgL4zb/qCZoj 8I6neCE9bH5qJgN/PDIajaIELmC5XGsYOe5TuNng0B0XspUje7J6sZW4BNjalCWzZTnXMK lLq81CaYguzbpY/UEZ3qM4Mx38p8kGWbhrtJ2pNK677PLHxOp6oatuu0XUfDanEVs+/oIx 5a1Lwr1JtTcipnHTU2YgeO79HuF/OOwccjmPcKvfu4neZZwKHtCy9SbZZWvyIA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219815; a=rsa-sha256; cv=none; b=SJL4Aba3MtkjkOOS2q+6JMIbc/E45y0FZXcNcCBgn5Qa1l/3bR2nTM7sSjskk+eOYmMIS7 fZcZ3SocyCE89laqIgLHAEVGyTGYIl8qVdQQZmS9rV9m/PP1HIEK27tnquFBnrNXytV25X D3YmIqWgg+KRcI+WULAQWP9LB1HWXvXSUWdOoCmimGE6TrgRPDwW6CL4nmog1jpnqswUPy Cu6kTSuC1KyinGRkEDLz8wLIN4YuU+ERtqSeiI2td/uppQZegjsrNlmbMe33qAF1ysxmWC DFHSLJS32Ow3fsVvhypjZzR+v2a8tgcr1moHMBRTBG+dXkXRA5HajIWk3IuzaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219815; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yZJpUdd3CVsMEb3R3z+pY5xD7fxu2fgPsas+0NpGOrs=; b=ClBTzNWP+iBppBM5/axoFvDfHVyqd5d8oiMsHjDlBAWkj7bf4JuH4d9ufERK40g1jlEnEc 5QZbMbWyPzfgwoVtD3Xs4rwiMJ2BqmXbT2yEpitJca+oWu/Z//VRQyy/gOHkq9rqx8mUh1 r+NO/eEL1zxoyqe63NAqLlRW3NdWAAG4/OU3IMLpp/kg8v25IeaiJ6ctpiJR+1zdke0O/F fzO6KzCdi32ezSYq3AQaPpK+3mGPKZGxWITZfdNM9yFJ2kxkk4lBJtguFmKR9n87wjQsS9 z/NPI2Fa+0+s0F+WDUu0zRVLaWnyRqszhh6Fli57BOroTrlg5QF65tka+KkQFg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJl3ydfz14xK; Wed, 12 Jun 2024 19:16:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGtI3004314; Wed, 12 Jun 2024 19:16:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGti7004311; Wed, 12 Jun 2024 19:16:55 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:55 GMT Message-Id: <202406121916.45CJGti7004311@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 1c17a175c4c1 - stable/13 - LinuxKPI: 802.11: fix for_each_sta_active_link() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1c17a175c4c1b9f0cd995d77e3015698e3e174a9 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=1c17a175c4c1b9f0cd995d77e3015698e3e174a9 commit 1c17a175c4c1b9f0cd995d77e3015698e3e174a9 Author: Bjoern A. Zeeb AuthorDate: 2024-05-21 21:58:47 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 17:00:49 +0000 LinuxKPI: 802.11: fix for_each_sta_active_link() Likely a c&p error from for_each_vif_active_link() to for_each_sta_active_link(). We are checking the nitems on the vif instead of the sta in this macro. Function wise there is no difference as the arrays are the same size but for correctness fix this. Sponsored by: The FreeBSD Foundation (cherry picked from commit 69b6c4a6ec6654978628ccd48edce46f00ac3e96) --- sys/compat/linuxkpi/common/include/net/mac80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h index fc9d7829dae3..6a477ae5c32a 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -1253,7 +1253,7 @@ ieee80211_hw_restart_disconnect(struct ieee80211_vif *vif) (_link = rcu_dereference((_vif)->link_conf[_linkid])) ) #define for_each_sta_active_link(_vif, _sta, _linksta, _linkid) \ - for (_linkid = 0; _linkid < nitems((_vif)->link_conf); _linkid++) \ + for (_linkid = 0; _linkid < nitems((_sta)->link); _linkid++) \ if ( ((_vif)->active_links == 0 /* no MLO */ || \ ((_vif)->active_links & BIT(_linkid)) != 0) && \ (_linksta = link_sta_dereference_protected((_sta), (_linkid))) ) From nobody Wed Jun 12 19:16:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJn1FqSz5NHq6; Wed, 12 Jun 2024 19:16:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJm5Wm1z57F3; Wed, 12 Jun 2024 19:16:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219816; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gZIJ7MPfO4dMuLvXdPMukRqbKvB2vC1DG18hXI2fH44=; b=mY0YtUki21bqz1FE6xzH4YwogEVz8o6lK7JcRcg2wKGgjogMmMdfL5FHfJuUDm5j2M186S w21W0kUM7UBQwn7D3L3FAfImOvzB50b8OwNefSn+38E7HsenVHstt4qkMiF679b/SMvMhZ 4uBLlY1N5/ouYCGcCeG0sqBk9Mdk5BK0rvFM5mWFhzUTEPRC/j9nSBCKgBLIkRIlddUb1p 1/Q765PQS1Mf0l6MBJfwyN9lFnVRXUF7XqF/Z3C9nFGQqoyAZiI2L59Eu4yMcNtAu888Qy gR1lq+2A795ey7ZWqpGfNkWF2DAsS8zbYqbZ6GvPb9RRmXYUhtbxdYUiWUvCDA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219816; a=rsa-sha256; cv=none; b=Qp5vdwHzIEVXpq40zKkUSUJ+PwS0GyWJt4xX+v/hsB7CKHIqt59z5tUctLf+8FQbDh7Q8V b8wypzDBcL5OM++Q1hS3Ho+yjCEujKdmOwSFVuR4gnjYfI+j5no/DYCm+J1o4uUbG4cPr8 Mhv2f4bO6sw7F+z1ZFr8mGOr9+CGEJmiADNgzbuK5xw2lWYhiL9x9SD7KFsIBSbmQW8hVr uM4A919LbC6flqWpd3J2XRCQaemVpYjRkCOrX4HZSogX21hALfUiLm1MR+M3uEtWTC4ZiZ LN6m+srdCA1skFShYqIZjl4sFc0hFuKGQR4GkqaCmkIY5xHCCW81AJsbyToTAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219816; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gZIJ7MPfO4dMuLvXdPMukRqbKvB2vC1DG18hXI2fH44=; b=HhHmJt1hWGeRoIh5uANWHgJ5trOA9WcjHqCAssR3iocHVk8jhi0TdGKBLQfYUSS/ivr2BD +XGp2mwqHH1P8S+mDgX5ynXP53XE1gC7ycEB0zVAapeS8AYIObzveNbNEiE9aEJzON/s8G uA75ZHDcsbxHGSMRzNIETvQXUjvxdhyTjOk4DgwJthmD+qY2G7vllBjU453okSBNCrXjO6 toW5FkHu+Oer9gsT2y8v1QHLWrf8ASiQzujdqZz7oNbc7pZh3X4EUuuTn0I0/jpnDsSjAO fI48dtX/jgv/IcHDu+ksOf3oeDnP5H6mSl0eEVICPcyNzSSgc40zxHocd2OdWg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJm58JGz158D; Wed, 12 Jun 2024 19:16:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGuXY004373; Wed, 12 Jun 2024 19:16:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGuCF004370; Wed, 12 Jun 2024 19:16:56 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:56 GMT Message-Id: <202406121916.45CJGuCF004370@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: ba0e9f526481 - stable/13 - LinuxKPI: 802.11: initalize lsta to NULL in linuxkpi_ieee80211_rx() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ba0e9f526481d087bb9b3dfeb341134a5d56a7c5 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=ba0e9f526481d087bb9b3dfeb341134a5d56a7c5 commit ba0e9f526481d087bb9b3dfeb341134a5d56a7c5 Author: Bjoern A. Zeeb AuthorDate: 2024-06-05 22:35:00 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 17:02:05 +0000 LinuxKPI: 802.11: initalize lsta to NULL in linuxkpi_ieee80211_rx() The logic following this new assignment in some cases may not set lsta but the later tracing is checking for it to be != NULL. With lsta not initialized that check may not hold up and later we would dereference lsta->state and possibly panic. Sponsored by: The FreeBSD Foundation Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D45507 (cherry picked from commit 582469016aed4fac3a7ead24dc31000edbb7e823) --- sys/compat/linuxkpi/common/src/linux_80211.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index e5fcb81dce6a..b48f64fb1b0f 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -4926,6 +4926,7 @@ no_trace_beacons: goto err; } + lsta = NULL; if (sta != NULL) { lsta = STA_TO_LSTA(sta); ni = ieee80211_ref_node(lsta->ni); From nobody Wed Jun 12 19:16:57 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJp1fGcz5NHhq; Wed, 12 Jun 2024 19:16:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJn63SSz576t; Wed, 12 Jun 2024 19:16:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219817; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TwaM42kImBv3Z69Lvuj2uxf+fAnlEX32FI4p5lxcqHI=; b=y286BU4TL11c1S+Di3yn25DDEgKjyqdwwUQ2OPfc3jYLpJGG+jLTrjOB4EF14QS5lQKQbC b4vW1kc6DIxRzToaOxRdqQxL3mR1394G3V2G4h+VHUWgnjNoUoRcIg0BMv4LGAQsVKeiui iOnktiRxZdzJwmlp69O4+oydUbMoiL39T3wjNiNPFki7xnP5m6lAMcWFvF7TJF2m/zRm7V QO6QHYYn0eo49ODpHjQHhGu7lKQfA3LW65W5zPt4P256cNlP80Uhxxn3Qv0F0frwnUUHW5 e7UArpTmBkqGsCn3kjInTIkNMisLNWcqpcxia1343pQmoCXWoFXK7g27ztekNQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219817; a=rsa-sha256; cv=none; b=enwe0N7VqXeT36RM52n2U9SUE3X3+bTdxUW974S82CUqDIWj+wx3LCeiz+sOBftk+aL9uH tYTrEQ4C/zF4fO/nbeCPenmqSUUZVmEwYYn78tfqGBygHEjH/rbJXaW+LCPim8SkZAvacK 28EHowz4Hy/ez24OgU1lPTN8LWFIYKOlopEapucPbdko4s2ndXHozYNUaB0zBZyS++KaKw 9B+dTSEG8jXHjEIDrGYqMSdrQzZ9uShVfdALkh6W7tQnP7dbCSjCbYfk6Kplqnd9Mlwv5O /g6YianrKLajsePRTFImCcExBGS6abw41Dz5mhnoexqg+Ymu7FQ3Z4czpL5C1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219817; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TwaM42kImBv3Z69Lvuj2uxf+fAnlEX32FI4p5lxcqHI=; b=cn2/oNxUTWxaL4URRxfPAdICv+943BqocU5pvPqszrKDHc3jGQMqGW9G4p14ODyxliXFRv RckK3vBUPFf8q8pfKPu4rO6FFpgdJlP3CL/QGgeBnyXOwWTzZVSezcfGkQ+94nzc/Uf0AB GwnD4jU/KE/ffPBDO9HuLcFnYIYpCnI4K9VO50ZJn3NCm0134KUDAMvVPiABPNHMGRhqVU x2J8DkIs0ml0SSmBJGlcFMb1xZI4W8BuoLZ/e1eCcwCyrRaD8lKGLVfRjny54SQgR/JJ2P JEwAB6m+nC7hV4PgRU8oCBScuVN8RJi63M9CO/90achcTtwRQ0U+GwwhEd20Ow== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJn5fwgz15BH; Wed, 12 Jun 2024 19:16:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGvhS004421; Wed, 12 Jun 2024 19:16:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGvVc004418; Wed, 12 Jun 2024 19:16:57 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:57 GMT Message-Id: <202406121916.45CJGvVc004418@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 88de7a318d13 - stable/13 - LinuxKPI: 802.11: Fix definition of IEEE80211_HT_CAP_RX_STBC List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 88de7a318d1381acc8c654c50ed7ea185f9abbbe Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=88de7a318d1381acc8c654c50ed7ea185f9abbbe commit 88de7a318d1381acc8c654c50ed7ea185f9abbbe Author: Bjoern A. Zeeb AuthorDate: 2024-06-05 21:57:45 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 17:02:40 +0000 LinuxKPI: 802.11: Fix definition of IEEE80211_HT_CAP_RX_STBC IEEE80211_HT_CAP_RX_STBC was set to 0x100 instead of 0x300. Correct to get the expected behavior. Sponsored by: The FreeBSD Foundation Fixes: b0f73768220e9 LinuxKPI: 802.11 header updates Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D45506 (cherry picked from commit 3e0915b7b6857afdbd283f2d448906e6a032ee07) --- sys/compat/linuxkpi/common/include/linux/ieee80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/ieee80211.h b/sys/compat/linuxkpi/common/include/linux/ieee80211.h index 2000e7480ff8..0fd90e921c77 100644 --- a/sys/compat/linuxkpi/common/include/linux/ieee80211.h +++ b/sys/compat/linuxkpi/common/include/linux/ieee80211.h @@ -263,7 +263,7 @@ enum ieee80211_ac_numbers { #define IEEE80211_HT_CAP_SGI_20 0x0020 /* IEEE80211_HTCAP_SHORTGI20 */ #define IEEE80211_HT_CAP_SGI_40 0x0040 /* IEEE80211_HTCAP_SHORTGI40 */ #define IEEE80211_HT_CAP_TX_STBC 0x0080 /* IEEE80211_HTCAP_TXSTBC */ -#define IEEE80211_HT_CAP_RX_STBC 0x0100 /* IEEE80211_HTCAP_RXSTBC */ +#define IEEE80211_HT_CAP_RX_STBC 0x0300 /* IEEE80211_HTCAP_RXSTBC */ #define IEEE80211_HT_CAP_RX_STBC_SHIFT 8 /* IEEE80211_HTCAP_RXSTBC_S */ #define IEEE80211_HT_CAP_MAX_AMSDU 0x0800 /* IEEE80211_HTCAP_MAXAMSDU */ #define IEEE80211_HT_CAP_DSSSCCK40 0x1000 /* IEEE80211_HTCAP_DSSSCCK40 */ From nobody Wed Jun 12 19:16:58 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJq2K56z5NHxr; Wed, 12 Jun 2024 19:16:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJq0fFQz57JB; Wed, 12 Jun 2024 19:16:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219819; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9F08clXp8hSJ/PAXz+ffY3MJcGTpb+12AYAlHlRKk9c=; b=lQ9hENFza77Olx4RsIPdGPwe3vwZ6mrpk0+z7Gs2OpK6vfu3zLUOXWtWSfITDU6huucaeb Sw4/vAzhP00BFouRZ0CAmC7merRO05t0xi+l9+3rk60461p8vOo8sxVe/JwGXVSs5bj4EW Y6nml64mB50ofWln3xUeWqLpi2Y/tvNtQRGnnQYWKbh7fO53fj/ap3+FF/GMjDnWWshaCY A0pQDeSICwKLZ0T/du8TaGMZGvBQ5ye/aMslxUfSTJ/KRU5s5flvngPMEIS5WN/PsFhsQ0 ZPyTi86myJ1KiUTiTLFWPzwte3JP89eOrAXq0jSNCitJQAiDRqivV7Q75Ic/ig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219819; a=rsa-sha256; cv=none; b=yXr4d+ZqgZqaAiJ2kvK3AL+AGRmvWHgdDVquX5/xHkSaEWIbFz4Kxa1lNGuUvgAYeKEjfF LvMAgTYSN5heZdt7OZkyW4sLWYhIaSlV907iBfrPir4Rz1ONB1Q1YTAIXhrQo1vJKyQ3Ux HOEfgtVc/zPQgG1JyVqDFaPc4QEmADMUZAJGZS8OhPi52OyGSwbmvn8MpH06NYGQMW9g1K JF3taFaxvT720CxTgEwByd2+IpFwsYBNqcrlpKIHm8Rlm68ZbX0yZ4M043gDeQNYnKTWMy OiPlJCOh7WUVY7XKiGIK+/PRU0JlO1ezv+3eyPu0Hzo/gF6O6Oayo4Ol6hj3fw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219819; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9F08clXp8hSJ/PAXz+ffY3MJcGTpb+12AYAlHlRKk9c=; b=As/F368egAHEJi7qmIPzwpMQUcjz3cYSdIz33MlkmyiGWCgDOL54i/rXUv8FURH+tjW1FC xydSt6spPzT6kfPrjM7zhjOLRbgpc3My384/Q00hlAWrUOmw0tzNNK65a8rkCnS9hJBiw8 Itkbbp2izuN8YMBO6epSVs4/0O7ZIItwurCwOV4LLRX0rFYFjYVxtV8+KqcnujJF5pQXdR EhNElOfCphkMXyNoaEhvuH2pODdHiSnFJLuxCoLJtPCyBaFLVa7HNxnKRg54K4O5z2zCDC IYSQ+aimE8eLNPzgJOeBufJZ/+XBY6AsFZYWABy28x1PA+J4NWyjrnBb5TtWng== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJp73YKz158F; Wed, 12 Jun 2024 19:16:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGwGr004476; Wed, 12 Jun 2024 19:16:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGwUx004473; Wed, 12 Jun 2024 19:16:58 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:58 GMT Message-Id: <202406121916.45CJGwUx004473@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 2f5608c9af3b - stable/13 - LinuxKPI: 802.11: use net80211 IEEE80211_HTCAP_* definitions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2f5608c9af3b4f5c8900ee8bf0291f92fda817b0 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=2f5608c9af3b4f5c8900ee8bf0291f92fda817b0 commit 2f5608c9af3b4f5c8900ee8bf0291f92fda817b0 Author: Bjoern A. Zeeb AuthorDate: 2024-06-07 23:57:04 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 17:02:46 +0000 LinuxKPI: 802.11: use net80211 IEEE80211_HTCAP_* definitions Rather than using the values and leaving net80211 names in a comment define the LinuxKPI IEEE80211_HT_CAP_* to the net80211 IEEE80211_HTCAP_* names. That way errors like the one fixed in 3e0915b7b685 are less likely to happen. Sponsored by: The FreeBSD Foundation (cherry picked from commit 63a327b954a38ecd46934a2911321f3ea3d500b3) --- .../linuxkpi/common/include/linux/ieee80211.h | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/ieee80211.h b/sys/compat/linuxkpi/common/include/linux/ieee80211.h index 0fd90e921c77..aa1a0a4f3c5f 100644 --- a/sys/compat/linuxkpi/common/include/linux/ieee80211.h +++ b/sys/compat/linuxkpi/common/include/linux/ieee80211.h @@ -254,20 +254,20 @@ enum ieee80211_ac_numbers { #define IEEE80211_WMM_IE_STA_QOSINFO_SP_ALL 0xf -/* XXX net80211 calls these IEEE80211_HTCAP_* */ -#define IEEE80211_HT_CAP_LDPC_CODING 0x0001 /* IEEE80211_HTCAP_LDPC */ -#define IEEE80211_HT_CAP_SUP_WIDTH_20_40 0x0002 /* IEEE80211_HTCAP_CHWIDTH40 */ -#define IEEE80211_HT_CAP_SM_PS 0x000c /* IEEE80211_HTCAP_SMPS */ +/* Define the LinuxKPI names directly to the net80211 ones. */ +#define IEEE80211_HT_CAP_LDPC_CODING IEEE80211_HTCAP_LDPC +#define IEEE80211_HT_CAP_SUP_WIDTH_20_40 IEEE80211_HTCAP_CHWIDTH40 +#define IEEE80211_HT_CAP_SM_PS IEEE80211_HTCAP_SMPS #define IEEE80211_HT_CAP_SM_PS_SHIFT 2 -#define IEEE80211_HT_CAP_GRN_FLD 0x0010 /* IEEE80211_HTCAP_GREENFIELD */ -#define IEEE80211_HT_CAP_SGI_20 0x0020 /* IEEE80211_HTCAP_SHORTGI20 */ -#define IEEE80211_HT_CAP_SGI_40 0x0040 /* IEEE80211_HTCAP_SHORTGI40 */ -#define IEEE80211_HT_CAP_TX_STBC 0x0080 /* IEEE80211_HTCAP_TXSTBC */ -#define IEEE80211_HT_CAP_RX_STBC 0x0300 /* IEEE80211_HTCAP_RXSTBC */ -#define IEEE80211_HT_CAP_RX_STBC_SHIFT 8 /* IEEE80211_HTCAP_RXSTBC_S */ -#define IEEE80211_HT_CAP_MAX_AMSDU 0x0800 /* IEEE80211_HTCAP_MAXAMSDU */ -#define IEEE80211_HT_CAP_DSSSCCK40 0x1000 /* IEEE80211_HTCAP_DSSSCCK40 */ -#define IEEE80211_HT_CAP_LSIG_TXOP_PROT 0x8000 /* IEEE80211_HTCAP_LSIGTXOPPROT */ +#define IEEE80211_HT_CAP_GRN_FLD IEEE80211_HTCAP_GREENFIELD +#define IEEE80211_HT_CAP_SGI_20 IEEE80211_HTCAP_SHORTGI20 +#define IEEE80211_HT_CAP_SGI_40 IEEE80211_HTCAP_SHORTGI40 +#define IEEE80211_HT_CAP_TX_STBC IEEE80211_HTCAP_TXSTBC +#define IEEE80211_HT_CAP_RX_STBC IEEE80211_HTCAP_RXSTBC +#define IEEE80211_HT_CAP_RX_STBC_SHIFT IEEE80211_HTCAP_RXSTBC_S +#define IEEE80211_HT_CAP_MAX_AMSDU IEEE80211_HTCAP_MAXAMSDU +#define IEEE80211_HT_CAP_DSSSCCK40 IEEE80211_HTCAP_DSSSCCK40 +#define IEEE80211_HT_CAP_LSIG_TXOP_PROT IEEE80211_HTCAP_LSIGTXOPPROT #define IEEE80211_HT_MCS_TX_DEFINED 0x0001 #define IEEE80211_HT_MCS_TX_RX_DIFF 0x0002 From nobody Wed Jun 12 21:33:43 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzzLb39xLz5NTr0; Wed, 12 Jun 2024 21:33:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzzLb2fCvz4L4l; Wed, 12 Jun 2024 21:33:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718228023; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fke0ydwoRpnNgIkCFYykOxf2ywKRSGXfpJ2+Dxv6cKU=; b=Lm4ZlPhHONV7BeN0s22VYKHaYw8Wwojurvb6Ik+r8IvG7w7NCXS+qjouKHMqXVxZ+ysi1T 7rWodLTuh1d6NJo2Ii6oMJDAInUAFTchmewrD+0UhafmGkdzdg9M6dVy7RaYqGDarsA3Bq l2i2XzvTjDHljCGUG/CyMRXWBDDWAkMkTwqmJZaFN5jcgvKYQbyZf6SloUdTCfY0oHka1u a/jWRyf0nII1fpbtBvPodt8FkN0eWzcJhGMU+CO1XXhlcbbkeL2XC8xxEf+dBG+pO9JSUT vZQlMcbesnHLjSZDUBnn1eeGRuj1CGg80iPN0tmyR6YjVvtFSQl3Orxh+rXYrg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718228023; a=rsa-sha256; cv=none; b=pALV1EyZvRH0g4DsnrX7et4RUlw7gJQS3r9jbgCSAcUDA20Wt+2zytmmb/mON4VHyfkzXc w6doKuyuqbyDNbSBhzztsIxZQj2jhCukjqLhI/JXlHeJgHmpnqE0QulpAjq0lWD64xJYIG tqixybQ+I0BiyB2Ed00EBoeQAZW6kj5P+pX5sNwGuS7ZFZHpyQueKTBilLVUIJy4XQTmvo Ku5zM89wczcks13keSlJOfVJLOC3WAg5qB28pHB4d1vIHwY/IbaotNF6QR6TOk3Gtmb9KW 2uyXjUueat31lN8RRRlpDX/tmkOeYgHLwgKqP5AXd3mPAb8ItSGHpNxGLR7mfQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718228023; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fke0ydwoRpnNgIkCFYykOxf2ywKRSGXfpJ2+Dxv6cKU=; b=g62XOrUYxP3M8ag0prJ1aGc1uh53dUM+YxazZ7rH0pjPk6INCw45VYHqMNAGpTNHV5xJyC doRhZvU8Xk7YhM206JlBl4RkpZHJCGfhUx6aN1vyW1fRzB4WFJ9dITzsIKalLNueK4AesP gB2pcDDuPxqpXMKWsk7Glm/i4HG4l5LhUWi83hSEkG3P6sDBaPrm6KeEYY1BbrwwzM+Q6q nad/dM6fMjBaxW5TN50VThqd3PofP+a723SPe7WlvH5hzoZ72+W2UxhUhzz0PQ28uhaAKc 1XpHWmbOZ8pyQpikcLjBwICj/l4aYp8SvFa0qZi+nYPWVicjLLQywLlUJVlqdw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzzLb2FwDz18dT; Wed, 12 Jun 2024 21:33:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CLXh7l040868; Wed, 12 Jun 2024 21:33:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CLXhgi040865; Wed, 12 Jun 2024 21:33:43 GMT (envelope-from git) Date: Wed, 12 Jun 2024 21:33:43 GMT Message-Id: <202406122133.45CLXhgi040865@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 20a2fe68faac - main - pf: correctly reset max_win if the SYN-ACK lacks a wscale option. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 20a2fe68faacb98b3c87ce7ea46a16b0d6c2462b Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=20a2fe68faacb98b3c87ce7ea46a16b0d6c2462b commit 20a2fe68faacb98b3c87ce7ea46a16b0d6c2462b Author: Kristof Provost AuthorDate: 2024-06-12 18:01:58 +0000 Commit: Kristof Provost CommitDate: 2024-06-12 21:33:11 +0000 pf: correctly reset max_win if the SYN-ACK lacks a wscale option. pf was setting max_win to 0 and discarded retransmitted SYN-ACK segments without wscale if the original SYN contained a wscale option. with gerhard@, ok henning@ Obtained From: OpenBSD Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 8c97d1bf200d..c635251c3490 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -5315,8 +5315,9 @@ pf_tcp_track_full(struct pf_kstate **state, struct pfi_kkif *kif, dws = dst->wscale & PF_WSCALE_MASK; } else { /* fixup other window */ - dst->max_win <<= dst->wscale & - PF_WSCALE_MASK; + dst->max_win = MIN(TCP_MAXWIN, + (u_int32_t)dst->max_win << + (dst->wscale & PF_WSCALE_MASK)); /* in case of a retrans SYN|ACK */ dst->wscale = 0; } From nobody Wed Jun 12 21:33:44 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzzLc4HZBz5NTr2; Wed, 12 Jun 2024 21:33:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzzLc3mR0z4Kvt; Wed, 12 Jun 2024 21:33:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718228024; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+olA5DU8Lo9+5Ma1mCdaKbwt820TrNVc4//bKtVdrOI=; b=oqPcxIjLYseYbWHzYwD/K4JH1I3tgNtoQyNXKKNxdM0i9TBALX+Olbur3RV/BPmT9HwbHP 9E/HpG/CZrt799ikPxxfdTrWqSVEAZBSbCvumS5swPSmpu4eOCQKinb/8iPe69Kiz8VG0Z tg68WnP/jxBgE5gYB2p6dblyz7JlnehhlpuzsMNKhky1xwEQds/Cwbh8iJnk5iKcdgYoLU g/RFdcIcOYpUnPhBy3oH3dsrJb1tMjU7SXfLGzBH0mxT+GfnRpg7zPhMC9fXndB5V8XxBu BZUKrE2P37NehZxK8HcJTmndKzw11H4dAXFxKSOhTFnzVORhiwW8MH0/g8Bp9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718228024; a=rsa-sha256; cv=none; b=BSl9ImnHpg90/jfgdV+rHLmLzzYIvo/Er5DN99TxYp5n4/3yneTahZsV+T36OXFKeUsj+O g1Vje9Z1E3uoP3GSlSaAPzJRVI3+ybH/Eu7IHD73KySoDzgE/vRjwoqPSZJ36BP5FZjlva 6VAXPGtGiOFZvthiFY5Dw4NEllq6hgR/TjsHkdze1eBGmCsPe4dCmQB2YkTvd8FxjBJk4M C+XNpx/uR1oSbPAyKwwHkcfOP+Q7y+e/V78tw70CaRWT56323w7FtnjaAiyuZXoRFi7ug0 GP+G9GeP/i/RlKtYW139d7lwWCEbu+0qXAFnHZ2ci4Qjov5zE+t1kxfzMk5CFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718228024; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+olA5DU8Lo9+5Ma1mCdaKbwt820TrNVc4//bKtVdrOI=; b=UpJ/sAPprqA7PRIwqhn5p2hD9FWZitL4Vcly99xINHcvabNmfdLV8KI25lhZIBs5bwhn+t v98ALgIXrzJtY+bvG1PCuVNzzWHrx2xROyKp18fIv1//QULaZjDAZE5JXTarU095VPLIgA wjnhSg7SrHW5dVINGXccAzk4517fQl+H+JzRxFy9MabAId8cOzUj3Zc1sp+W8CUeFsVmcp o6EmR6+saW7yj4TAjHPHeN4yeDk7S5ykcbdnzn0g7HoQ9LVVyao4OLxfhJiayiFiEs6SN0 zbjfWg1+sTLpTflTNH8FoYWjH2uUxFwfjJjzdtDkFS9RyytNEKpBLKyMvKmYbw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzzLc3MXCz18dV; Wed, 12 Jun 2024 21:33:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CLXirH040937; Wed, 12 Jun 2024 21:33:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CLXicU040934; Wed, 12 Jun 2024 21:33:44 GMT (envelope-from git) Date: Wed, 12 Jun 2024 21:33:44 GMT Message-Id: <202406122133.45CLXicU040934@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 07ed2396985f - main - pf: make TCP sequence number tracking less strict by one octet for FIN packets List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 07ed2396985f211a1f9c2f84da99f955650df696 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=07ed2396985f211a1f9c2f84da99f955650df696 commit 07ed2396985f211a1f9c2f84da99f955650df696 Author: Kristof Provost AuthorDate: 2024-06-12 18:05:22 +0000 Commit: Kristof Provost CommitDate: 2024-06-12 21:33:11 +0000 pf: make TCP sequence number tracking less strict by one octet for FIN packets The data of a TCP packet must fit into the announced window, but this is not required for the sequence number of the FIN. A packet with the FIN bit set and containing data that fits exactly into the announced window was blocked. Our stack generates such packets when the receive buffer size is set to 1024. Now pf uses only the data lenght for window comparison. OK henning@ Obtained From: OpenBSD Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index c635251c3490..edb95d7ef0ec 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -5246,7 +5246,7 @@ pf_tcp_track_full(struct pf_kstate **state, struct pfi_kkif *kif, struct tcphdr *th = &pd->hdr.tcp; struct pf_state_peer *src, *dst; u_int16_t win = ntohs(th->th_win); - u_int32_t ack, end, seq, orig_seq; + u_int32_t ack, end, data_end, seq, orig_seq; u_int8_t sws, dws, psrc, pdst; int ackskew; @@ -5323,6 +5323,7 @@ pf_tcp_track_full(struct pf_kstate **state, struct pfi_kkif *kif, } } } + data_end = end; if (th->th_flags & TH_FIN) end++; @@ -5353,6 +5354,7 @@ pf_tcp_track_full(struct pf_kstate **state, struct pfi_kkif *kif, end = seq + pd->p_len; if (th->th_flags & TH_SYN) end++; + data_end = end; if (th->th_flags & TH_FIN) end++; } @@ -5374,7 +5376,7 @@ pf_tcp_track_full(struct pf_kstate **state, struct pfi_kkif *kif, if (seq == end) { /* Ease sequencing restrictions on no data packets */ seq = src->seqlo; - end = seq; + data_end = end = seq; } ackskew = dst->seqlo - ack; @@ -5397,7 +5399,7 @@ pf_tcp_track_full(struct pf_kstate **state, struct pfi_kkif *kif, } #define MAXACKWINDOW (0xffff + 1500) /* 1500 is an arbitrary fudge factor */ - if (SEQ_GEQ(src->seqhi, end) && + if (SEQ_GEQ(src->seqhi, data_end) && /* Last octet inside other's window space */ SEQ_GEQ(seq, src->seqlo - (dst->max_win << dws)) && /* Retrans: not more than one window back */ @@ -5471,7 +5473,7 @@ pf_tcp_track_full(struct pf_kstate **state, struct pfi_kkif *kif, } else if ((dst->state < TCPS_SYN_SENT || dst->state >= TCPS_FIN_WAIT_2 || src->state >= TCPS_FIN_WAIT_2) && - SEQ_GEQ(src->seqhi + MAXACKWINDOW, end) && + SEQ_GEQ(src->seqhi + MAXACKWINDOW, data_end) && /* Within a window forward of the originating packet */ SEQ_GEQ(seq, src->seqlo - MAXACKWINDOW)) { /* Within a window backward of the originating packet */ @@ -5564,12 +5566,12 @@ pf_tcp_track_full(struct pf_kstate **state, struct pfi_kkif *kif, pd->dir == PF_IN ? "in" : "out", pd->dir == (*state)->direction ? "fwd" : "rev"); printf("pf: State failure on: %c %c %c %c | %c %c\n", - SEQ_GEQ(src->seqhi, end) ? ' ' : '1', + SEQ_GEQ(src->seqhi, data_end) ? ' ' : '1', SEQ_GEQ(seq, src->seqlo - (dst->max_win << dws)) ? ' ': '2', (ackskew >= -MAXACKWINDOW) ? ' ' : '3', (ackskew <= (MAXACKWINDOW << sws)) ? ' ' : '4', - SEQ_GEQ(src->seqhi + MAXACKWINDOW, end) ?' ' :'5', + SEQ_GEQ(src->seqhi + MAXACKWINDOW, data_end) ?' ' :'5', SEQ_GEQ(seq, src->seqlo - MAXACKWINDOW) ?' ' :'6'); } REASON_SET(reason, PFRES_BADSTATE); From nobody Wed Jun 12 21:34:19 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzzMH610wz5NVNt; Wed, 12 Jun 2024 21:34:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzzMH5TL5z4LhS; Wed, 12 Jun 2024 21:34:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718228059; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NwWUAQvCZm/QXZ6K6Z+pOWAcSfH1jkHqAdA1y/nS6wU=; b=kxNkI5s4Ao0RXbKSyAqcSdT4rmpHrnhPsY9MF6kIK0RaLi8Sysl4SyCGUKcL1xR/MCuzPY Q9xbJ0uM0ZtpOY0CDu3VsNh2+DhCw3vrLzbrAxxleGqYpnnRdfvtchQM9/8DoluOWm4GGb TltRL0SyLQZ5SWuv8Y75mJqm3hp5bFOLCc0aSmAv7XT++I/wLpaK3K5gHgq6xVFPKpFI4g r5tTI95DnytCQD+OV6DHkQuOwiSbOXRMdVahHdXiLIfoclI23/uq4mVGvI0oJ5XnORbHLF y1bHq7sL9zEob2mOuIiobFYtNIYkM5Zo1ZRGOG+gpYKMjYNW72cUnJZcLlOeJw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718228059; a=rsa-sha256; cv=none; b=jiY60+McuX510FksmpTmG7LDm4D+Vu9z0nQJZ5K02KeAjhQ4XVEWQXu0M2RXZcDnlhQXOq kcj8Af/hV+hvBhgaJzfMDmp98H4OLHzwtwyPDh+G8FJMRYoitdI8/FY9nP/pBl7V3xU3Ax /Z/Ew94bdQht/QwknuwZdYe0QHVJgRgi4RoMoSEHW4dtuJp1pNaiSEQMu4j16lnl8FfJzz kh8KcEVlpoN3j101agBBuNSYnxiwFbBTxBLmxvU7Tm6jh5HOaI1OddRwX4sv/3HYcAgNgF eex0B/ICk388jDgBIe+zPPgI3zNea/BLPhRm8o/QOm1rnE/07L3fdC0ZKw719Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718228059; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NwWUAQvCZm/QXZ6K6Z+pOWAcSfH1jkHqAdA1y/nS6wU=; b=aUUyhEm6xT18V1k8DiYxXySU9UvgFT/rokTqh6qBNnyAf1LH7lgRoXeoy7z32+1CIxKduZ jY0NSvrib6UTOoLdYokj4PeMUfIiyJcX9Hc44v1vOePIev8Uv+ew1Oz1bwpHMI31oSPDkk YYB9IRHkxxcUKhagATHz0rrXfIE7NewWDeydYF/2Y5uI2Zr0v66RtrRbs5ZFsHoyh5AVkv uSts6jr+TMNlQ+8HGhv74jCvQjtLhMFpFMEuN7CdDNiSQNzXEq9iAQAoVprbsvoA+XpcKa 0Ckrgtb4h2KMGk4Ax2aoax8x+7NC0ePoULlkCCH8pudJxePSqM/gBEMVxwuU8Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzzMH551pz182f; Wed, 12 Jun 2024 21:34:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CLYJdv041166; Wed, 12 Jun 2024 21:34:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CLYJRt041163; Wed, 12 Jun 2024 21:34:19 GMT (envelope-from git) Date: Wed, 12 Jun 2024 21:34:19 GMT Message-Id: <202406122134.45CLYJRt041163@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 83549ee250c0 - stable/13 - u3g: Add support for SIM7600G List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 83549ee250c041bc46971d66b7a2f55bc11b41a5 Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=83549ee250c041bc46971d66b7a2f55bc11b41a5 commit 83549ee250c041bc46971d66b7a2f55bc11b41a5 Author: Maxime Thiebaut AuthorDate: 2024-06-06 10:43:46 +0000 Commit: Kristof Provost CommitDate: 2024-06-12 19:34:29 +0000 u3g: Add support for SIM7600G Signed-off-by: Maxime Thiebaut Reviewed by: kp (cherry picked from commit b5b90ff9844d1cb780ff777fc42ad393e4683563) --- sys/dev/usb/serial/u3g.c | 1 + sys/dev/usb/usbdevs | 1 + 2 files changed, 2 insertions(+) diff --git a/sys/dev/usb/serial/u3g.c b/sys/dev/usb/serial/u3g.c index cbe7ecc5bf74..986e243c60d3 100644 --- a/sys/dev/usb/serial/u3g.c +++ b/sys/dev/usb/serial/u3g.c @@ -207,6 +207,7 @@ static const STRUCT_USB_HOST_ID u3g_devs[] = { U3G_DEV(ALINK, 3GU, 0), U3G_DEV(ALINK, DWM652U5, 0), U3G_DEV(ALINK, SIM7600E, 0), + U3G_DEV(ALINK, SIM7600G, 0), U3G_DEV(AMOI, H01, 0), U3G_DEV(AMOI, H01A, 0), U3G_DEV(AMOI, H02, 0), diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index 602420b44ce7..a32a53d49735 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -1064,6 +1064,7 @@ product ALCOR AU6390 0x6390 AU6390 USB-IDE converter product ALINK DWM652U5 0xce16 DWM-652 product ALINK 3G 0x9000 3G modem product ALINK SIM7600E 0x9001 LTE modem +product ALINK SIM7600G 0x9011 LTE modem product ALINK 3GU 0x9200 3G modem /* Altec Lansing products */ From nobody Wed Jun 12 21:34:20 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzzMJ3rZWz5NV6Z; Wed, 12 Jun 2024 21:34:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzzMJ2DKpz4Ly0; Wed, 12 Jun 2024 21:34:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718228060; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ik5w5UcAEB0l/8I47UEapii6UiNKYgBvYGAZOAHdWN4=; b=EkGTomrCLmQpkgjJ8GvfZLKn+p9ue4fpFyZxms6g+S0cI2QsvjT3PfArewoEPzq8301Gdh TnOsUsoCO0BJ/ryl25biVti+X9Ugt3OSdGNG17GXtoO9RkCBrayGdLY159iH1t+w2fNVK0 GLVH6BF0h91nwIvLPABOjOSF7zNaNPPwtxruvwR81IsfXKb+yY08AneoCHC+ywXt4x7SL2 oYEiEH+TF+x1U5EfFTQpxYUIi7Bm6mWc829QiV+a0GZmQrJosv2s8qvCBGH5fYTa+HJzCe SrFS/kcQJP4KeDYdQA0vGVJSc1rIhqxi8dRdDdMrIFtjd43OX89gticZFpbvyQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718228060; a=rsa-sha256; cv=none; b=ryVn5S9Y+hsrG3tITm1I4O+n5WY4M3mPoAZAlSRPG3m/PCosmz+T7oKxsoTHOF/XWBhPI1 my80NjcwVvRBBCfjWFeZhuOlJ95lUSRfL+ZPOdhyhTElBOzVpIvP0rQA/W2s9BKkATydtV BvgSRQVfFBJyVF0w2oaddbGiZe63tF5QODOpHhq8ntj+11PR2s6dLksRfOYwAjIXzXjYwR L0z0dFGyrnMpS+/XCcTJHRxxQvAlhlrEyVbMyUxxf8N3uIr7wUxwUrMmFNA2BL5UF/wPfU zS5iSd/935zgr61dVrPVVaMgTLzcym18CXPHMi1js44KIdw71FFzHL7dMJNh9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718228060; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ik5w5UcAEB0l/8I47UEapii6UiNKYgBvYGAZOAHdWN4=; b=IZKm5F7X6SPkHeQ/YZ4N4+uj2MdL4ldEay8c0cvkbOyX8swi098c5t46ExYEY5hgA3KuTH mfMXAHH5cwFC/MC7ZORcPYVx8kbH4d76hJbyM+Pwiktfwo4UORatpVk+gMuWNTTQsIsG/m /7nd78oWAt7xxtvL2YOS0AxH+A1mIttz9fDwfoZZ1vA4Qu0T8ufiZhLqFuleLXsd+CTor2 KFFSC581IPLMmLUVN7tTFidRKDMmlfm6bMbAywQgi3T6aOEu67rt4N5b1tDGoANCW/vOgV AlEWZrGSGbg1C/izKyLWAAR6B1VnwurrPgEwb9cJdSBeyjMkZ9c5M/zjoJ54SQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzzMJ1rP0z18CS; Wed, 12 Jun 2024 21:34:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CLYKOu041270; Wed, 12 Jun 2024 21:34:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CLYKQl041267; Wed, 12 Jun 2024 21:34:20 GMT (envelope-from git) Date: Wed, 12 Jun 2024 21:34:20 GMT Message-Id: <202406122134.45CLYKQl041267@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 1296443295ab - stable/14 - u3g: Add support for SIM7600G List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1296443295aba0dd3e10a3a84013b9e60aef6196 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=1296443295aba0dd3e10a3a84013b9e60aef6196 commit 1296443295aba0dd3e10a3a84013b9e60aef6196 Author: Maxime Thiebaut AuthorDate: 2024-06-06 10:43:46 +0000 Commit: Kristof Provost CommitDate: 2024-06-12 19:34:25 +0000 u3g: Add support for SIM7600G Signed-off-by: Maxime Thiebaut Reviewed by: kp (cherry picked from commit b5b90ff9844d1cb780ff777fc42ad393e4683563) --- sys/dev/usb/serial/u3g.c | 1 + sys/dev/usb/usbdevs | 1 + 2 files changed, 2 insertions(+) diff --git a/sys/dev/usb/serial/u3g.c b/sys/dev/usb/serial/u3g.c index e0a1ff29b0a4..88f94ddaecc6 100644 --- a/sys/dev/usb/serial/u3g.c +++ b/sys/dev/usb/serial/u3g.c @@ -205,6 +205,7 @@ static const STRUCT_USB_HOST_ID u3g_devs[] = { U3G_DEV(ALINK, 3GU, 0), U3G_DEV(ALINK, DWM652U5, 0), U3G_DEV(ALINK, SIM7600E, 0), + U3G_DEV(ALINK, SIM7600G, 0), U3G_DEV(AMOI, H01, 0), U3G_DEV(AMOI, H01A, 0), U3G_DEV(AMOI, H02, 0), diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index 65dcb06c2f3f..2a217b1eaf17 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -1064,6 +1064,7 @@ product ALCOR AU6390 0x6390 AU6390 USB-IDE converter product ALINK DWM652U5 0xce16 DWM-652 product ALINK 3G 0x9000 3G modem product ALINK SIM7600E 0x9001 LTE modem +product ALINK SIM7600G 0x9011 LTE modem product ALINK 3GU 0x9200 3G modem /* Altec Lansing products */ From nobody Wed Jun 12 21:55:24 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vzzqc3QF0z5NXSp; Wed, 12 Jun 2024 21:55:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vzzqc1TLpz4Plc; Wed, 12 Jun 2024 21:55:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718229324; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N0G7VPCvdrN5dOy6IPmc6kHRsAwNnhtNAwasxsiaXGk=; b=av4KQSfMZJPeA8mc06YKc7ypf57QQhI6Dkg8HsqK21tXwod4bSWTxMf5B8aXBTcvs/fGCB vUoS23U34d2DmhhZ4bJLBEOwmHG9Sll8xpRKC6Pc543YE11Xrja7P/oE5ShdhzddCmNLVn wNliuX4iY53oD41n56ahVH+DZmIlEc2YY1gSXNhwkGLu/c2tZBEdZYuJyrbXPwXthdusyi w5wSLLfGTuojA4XpaB7KgOvHGUahBNWDYHMb84PcVcC9mGAAffCjNJbJrVJvzWiu8WiUe8 9it4ZXlQsmIkrttzwTCUaJ/byHx/h+bZtGFSIKnbI9NGAZotbNC4cj47z8iRkQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718229324; a=rsa-sha256; cv=none; b=f39iI2DvbNWzNTsNR9ebDGfvkBuSblVcgmZLSpTOLWlSfoOqwrq1pcx1xEwagJFtth4ZB8 u9ecMqI3rKqU3Qhb1DxCWJ+jf2f+ZJnCGuLkViRTj+/3psiLyVSkDLXFqi3RcNcU7y060p sa5gDoe+UcFw4UUP0KXj0QdLnaWiZHOWDDKxyxpZVABtZHWI92B1L4TfahEkLxREEBZVLB OO6/ZvwOJLGCjPxj4pY8HEnv+GAnPbQF6zwAoQi4IveJzWUz8q/Soc5MCdsZApMXJEaM4j +g0ltzMqYR3cTTlrm+TKX2lJE8iMgdZH6StL6iSla+TdDNWAcd/tjqW0O6htbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718229324; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N0G7VPCvdrN5dOy6IPmc6kHRsAwNnhtNAwasxsiaXGk=; b=eJVmM04hXXeqDUgxnRKDMaI1cDCyO18M7DKcdXbd7h2B986XJqhO7mbV2RS/vWU8r8aDas y76hg3TRm65e506U9hR8T/YBzDT+UxyEhKrghld9uAczSSvwM/n8ybA5kKgg634zdedIDC bHO/ZWJG36Mt5WEPVz4QJyIKt7S6w4afsy9LUxAXMeSzQTwK3Gac5IiLAmNjXxzykCOh7l 49rw+NVPBAIQvDMGl7MFDXRNq/a7VVc0SzDQgMD49hbR+ggw6w0SxVHuXxNCtGGKimpTdz rRuAaLm4aVR8BOPA97/DzZcMAPDkm+DmrwaWjHSClNhlIuuBHhqMW6xpWBs4xQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vzzqc11Kxz18gC; Wed, 12 Jun 2024 21:55:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CLtODj075450; Wed, 12 Jun 2024 21:55:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CLtOPN075447; Wed, 12 Jun 2024 21:55:24 GMT (envelope-from git) Date: Wed, 12 Jun 2024 21:55:24 GMT Message-Id: <202406122155.45CLtOPN075447@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 7f7389e66816 - stable/14 - man bluetooth/fwdownloaders: alignment nits, SPDX List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7f7389e6681639fdbdeef9f5987d593e13b508b3 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=7f7389e6681639fdbdeef9f5987d593e13b508b3 commit 7f7389e6681639fdbdeef9f5987d593e13b508b3 Author: Alexander Ziaee AuthorDate: 2024-05-31 19:27:58 +0000 Commit: Warner Losh CommitDate: 2024-06-12 21:46:24 +0000 man bluetooth/fwdownloaders: alignment nits, SPDX MFC after: 3 days Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1267 (cherry picked from commit 9c0d6df100eda06697ad4ca86c97c554ee9d727c) --- usr.sbin/bluetooth/ath3kfw/ath3kfw.8 | 10 +++++++--- usr.sbin/bluetooth/bcmfw/bcmfw.8 | 7 +++++-- usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 | 14 +++++++++----- 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/usr.sbin/bluetooth/ath3kfw/ath3kfw.8 b/usr.sbin/bluetooth/ath3kfw/ath3kfw.8 index 340871d31df8..ed015bbf229d 100644 --- a/usr.sbin/bluetooth/ath3kfw/ath3kfw.8 +++ b/usr.sbin/bluetooth/ath3kfw/ath3kfw.8 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2010 Maksim Yevmenkin .\" Copyright (c) 2013, 2016 Adrian Chadd .\" All rights reserved. @@ -31,6 +34,7 @@ .Nd firmware download utility for Atheros AR3011/AR3012 chip based Bluetooth USB devices .Sh SYNOPSIS .Nm +.Op Fl DI .Fl d Ar device_name .Fl f Ar firmware_path .Nm @@ -58,19 +62,19 @@ utility will query the device to determine which firmware image and board configuration to load in at runtime. .Pp The options are as follows: -.Bl -tag -width indent +.Bl -tag -width "-f firmware_path" .It Fl D Enable verbose debugging. .It Fl d Ar device_name Specify .Xr ugen 4 device name. -.It I -Enable informational debugging. .It Fl f Ar firmware_path Specify the directory containing the firmware files to search and upload. .It Fl h Display usage message and exit. +.It Fl I +Enable informational debugging. .El .Sh EXIT STATUS .Ex -std diff --git a/usr.sbin/bluetooth/bcmfw/bcmfw.8 b/usr.sbin/bluetooth/bcmfw/bcmfw.8 index 22d793641759..b9fa72706d2d 100644 --- a/usr.sbin/bluetooth/bcmfw/bcmfw.8 +++ b/usr.sbin/bluetooth/bcmfw/bcmfw.8 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2003 Maksim Yevmenkin .\" All rights reserved. .\" @@ -64,7 +67,7 @@ I am using the following files from the bluez-firmware-1.0 package: .Dl "MD5 (BCM2033-FW.bin) = b4e142b3272cfe5a84b32fda6b4b032f" .Pp The options are as follows: -.Bl -tag -width indent +.Bl -tag -width "-m mini-driver_file_name" .It Fl f Ar firmware_file_name Specify firmware file name for download. .It Fl h @@ -75,7 +78,7 @@ Specify mini-driver file name for download. Specify device name. .El .Sh FILES -.Bl -tag -width ".Pa /dev/ubtbcmfw Ns Ar N Ns Pa \&. Ns Ar EE" -compact +.Bl -tag -width "-m mini-driver_file_name" -compact .It Pa BCM2033-MD.hex Mini-driver image. .It Pa BCM2033-FW.bin diff --git a/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 b/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 index 368a3865a0eb..66517badd0fc 100644 --- a/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 +++ b/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2013, 2016 Adrian Chadd .\" Copyright (c) 2019 Vladimir Kondratyev .\" Copyright (c) 2021 Philippe Michaud-Boudreault @@ -32,6 +35,7 @@ USB devices .Sh SYNOPSIS .Nm +.Op Fl DI .Fl d Ar device_name .Fl f Ar firmware_path .Nm @@ -45,8 +49,8 @@ device. .Pp This utility will .Em only -work with Intel Wireless 7260/8260/8265 chip based Bluetooth USB devices and some of -their successors. +work with Intel Wireless 7260/8260/8265 chip based Bluetooth USB devices +and some of their successors. The identification is currently based on USB vendor ID/product ID pair. The vendor ID should be 0x8087 .Pq Dv USB_VENDOR_INTEL2 @@ -62,19 +66,19 @@ utility will query the device to determine which firmware image and board configuration to load in at runtime. .Pp The options are as follows: -.Bl -tag -width indent +.Bl -tag -width "-f firmware_path" .It Fl D Enable verbose debugging. .It Fl d Ar device_name Specify .Xr ugen 4 device name. -.It Fl I -Enable informational debugging. .It Fl f Ar firmware_path Specify the directory containing the firmware files to search and upload. .It Fl h Display usage message and exit. +.It Fl I +Enable informational debugging. .El .Sh EXIT STATUS .Ex -std From nobody Wed Jun 12 21:55:22 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vzzqb2Dkmz5NXSS; Wed, 12 Jun 2024 21:55:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vzzqb0PTRz4Q0j; Wed, 12 Jun 2024 21:55:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718229323; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P4m+/GAfadgXjNvhqq7S2lpAMnul8meoufl/ogIm5SI=; b=bgM4EyoT94ji2Iq4DX0epxjnYeN0Kf3OBlmFigC6V7RXeJQwMlV6u7G6AvaUqJQ1IJBLBa T0eKkGlJz5g4FoElb+4pcrmlOoLxfM8E2Yrv1IVaLKrDNI1w594IwPOltYBcQJQ1+BDKa0 k6MFGPg5zMAv+bpDk7fe2Hr10jGQ+S9Fx2DpORiqcBN2kHKsUn28Pr+QKVqjsVPP3mUEj/ VQdcUm9hp339cXE39GPmShtdPKnKWDJJ9OsdssxyCotKK0MYohhZWELYAXAt9VjnR7GZwy hT1jZ7i9V+/O3ScpyUQkuy14pCSls6AreUb6JJFu1do+wqA6/t6uO8he0kRUdQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718229323; a=rsa-sha256; cv=none; b=WjaYaRQS1zdrEl45i9U001O4/ZQVwIjSbyUPLAk8tNXdu99pz43wkwLglz4aLwOPSOgtTi 15+/3wkav2JU8FosJbxyuhWtYhFf1o2KfNotIlh8e0rD/8r6ECw4Etd0b5Ooipqlp4E6GF gyFgoSF98eRtsBDiwvt58NEj6J3iIwpsGzYCCe0CjLwfnK40EY5xHz5Nfyqn1gKGAf+c/D to9YCWiADQecKlx3BuoGdWhI04oqrnI3Qym3QeW99kRux85e13L3an9bi52ZN85Lx4BNTu 5Lq1TVWiyavDyADL3PONrbXJyekUpXD4/2pq/2PVZeAXQnKBv2nGZqJnX++uBA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718229323; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P4m+/GAfadgXjNvhqq7S2lpAMnul8meoufl/ogIm5SI=; b=bE/acnY62tWShTgmfQMe1YGC1udoJBQMwz1r/q6NxinNlL1U6vz0hdSxOpRNPKMjEMVAtd Y0YP+LZp/6JqeY1BpZYB/6Dxs0eXM3p+hioOolsjesAYXNRtTHsjK163EHcg4C1zipnGzr fUCmcqEOmvY63p2j8a7I+rpsfyJNPmkq6DyKRHgusQkMNsF0xwE7GJO/CjjN/tu7+K6/5E AxbLoHcZGlgqcL/AXC6kYjZ7PRDSyc9HPvVqdvxRIMlwyIAUpVJ1en3zEQ7bgDl4tlYHqI sLaPibMOyg6s4iGF5j/FN8y0naia9YvWpn4fsCrggK9KQu8UkwKKNZpGo4CLlA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vzzqb01hMz199n; Wed, 12 Jun 2024 21:55:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CLtMV6075407; Wed, 12 Jun 2024 21:55:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CLtMjV075404; Wed, 12 Jun 2024 21:55:22 GMT (envelope-from git) Date: Wed, 12 Jun 2024 21:55:22 GMT Message-Id: <202406122155.45CLtMjV075404@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 484c2ce9752f - stable/14 - netlink: Fix C++ compile errors List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 484c2ce9752f610ab082a002341a290d683b8343 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=484c2ce9752f610ab082a002341a290d683b8343 commit 484c2ce9752f610ab082a002341a290d683b8343 Author: cnbatch AuthorDate: 2024-05-17 13:09:44 +0000 Commit: Warner Losh CommitDate: 2024-06-12 21:46:24 +0000 netlink: Fix C++ compile errors Allow these files to be included in C++ programs with careful casting to the proper type, like C++ wants (and in a way that also works for C). MFC After: 1 week Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1245 (cherry picked from commit ff92493a4f6504c49a6c84ec65053f493ff5d708) --- sys/netlink/netlink_snl.h | 33 +++++++++++++++++---------------- sys/netlink/netlink_snl_route.h | 2 +- sys/netlink/netlink_snl_route_parsers.h | 10 +++++----- 3 files changed, 23 insertions(+), 22 deletions(-) diff --git a/sys/netlink/netlink_snl.h b/sys/netlink/netlink_snl.h index f8387132f78a..03f2b7dc5c38 100644 --- a/sys/netlink/netlink_snl.h +++ b/sys/netlink/netlink_snl.h @@ -63,7 +63,7 @@ #define _NLA_END(_start, _len) ((char *)(_start) + (_len)) #define NLA_FOREACH(_attr, _start, _len) \ - for (_attr = (_start); \ + for (_attr = (struct nlattr *)(_start); \ ((char *)_attr < _NLA_END(_start, _len)) && \ ((char *)NLA_NEXT(_attr) <= _NLA_END(_start, _len)); \ _attr = NLA_NEXT(_attr)) @@ -80,7 +80,7 @@ struct linear_buffer { static inline struct linear_buffer * lb_init(uint32_t size) { - struct linear_buffer *lb = calloc(1, size); + struct linear_buffer *lb = (struct linear_buffer *)calloc(1, size); if (lb != NULL) { lb->base = (char *)(lb + 1); @@ -102,7 +102,7 @@ lb_allocz(struct linear_buffer *lb, int len) len = roundup2(len, alignof(__max_align_t)); if (lb->offset + len > lb->size) return (NULL); - void *data = (void *)(lb->base + lb->offset); + char *data = (lb->base + lb->offset); lb->offset += len; return (data); } @@ -275,7 +275,7 @@ snl_init(struct snl_state *ss, int netlink_family) } ss->bufsize = rcvbuf; - ss->buf = malloc(ss->bufsize); + ss->buf = (char *)malloc(ss->bufsize); if (ss->buf == NULL) { snl_free(ss); return (false); @@ -495,7 +495,8 @@ snl_parse_header(struct snl_state *ss, void *hdr, int len, struct nlattr *nla_head; /* Extract fields first (if any) */ - snl_parse_fields(ss, hdr, parser->in_hdr_size, parser->fp, parser->fp_size, target); + snl_parse_fields(ss, (struct nlmsghdr *)hdr, parser->in_hdr_size, + parser->fp, parser->fp_size, target); nla_head = (struct nlattr *)(void *)((char *)hdr + parser->in_hdr_size); bool result = snl_parse_attrs_raw(ss, nla_head, len - parser->in_hdr_size, @@ -616,7 +617,7 @@ snl_attr_get_stringn(struct snl_state *ss, struct nlattr *nla, { int maxlen = NLA_DATA_LEN(nla); - char *buf = snl_allocz(ss, maxlen + 1); + char *buf = (char *)snl_allocz(ss, maxlen + 1); if (buf == NULL) return (false); buf[maxlen] = '\0'; @@ -633,7 +634,7 @@ snl_attr_copy_string(struct snl_state *ss, struct nlattr *nla, char *tmp; if (snl_attr_get_string(ss, nla, NULL, &tmp)) { - strlcpy(target, tmp, (size_t)arg); + strlcpy((char *)target, tmp, (size_t)arg); return (true); } return (false); @@ -646,7 +647,7 @@ snl_attr_dup_string(struct snl_state *ss __unused, struct nlattr *nla, size_t maxlen = NLA_DATA_LEN(nla); if (strnlen((char *)NLA_DATA(nla), maxlen) < maxlen) { - char *buf = snl_allocz(ss, maxlen); + char *buf = (char *)snl_allocz(ss, maxlen); if (buf == NULL) return (false); memcpy(buf, NLA_DATA(nla), maxlen); @@ -675,14 +676,14 @@ snl_attr_get_parray_sz(struct snl_state *ss, struct nlattr *container_nla, uint32_t start_size, const void *arg, void *target) { const struct snl_hdr_parser *p = (const struct snl_hdr_parser *)arg; - struct snl_parray *array = target; + struct snl_parray *array = (struct snl_parray *)target; struct nlattr *nla; uint32_t count = 0, size = start_size; if (p->out_size == 0) return (false); - array->items = snl_allocz(ss, size * sizeof(void *)); + array->items = (void **)snl_allocz(ss, size * sizeof(void *)); if (array->items == NULL) return (false); @@ -712,7 +713,7 @@ snl_attr_get_parray_sz(struct snl_state *ss, struct nlattr *container_nla, if (count == size) { uint32_t new_size = size * 2; - void **new_array = snl_allocz(ss, new_size *sizeof(void *)); + void **new_array = (void **)snl_allocz(ss, new_size *sizeof(void *)); memcpy(new_array, array->items, size * sizeof(void *)); array->items = new_array; @@ -825,7 +826,7 @@ static const struct snl_attr_parser _nla_p_bitset[] = { static inline bool _cb_p_bitset(struct snl_state *ss __unused, void *_target) { - struct snl_attr_bitset *target = _target; + struct snl_attr_bitset *target = (struct snl_attr_bitset *)_target; uint32_t sz_bytes = _roundup2(target->nla_bitset_size, 32) / 8; @@ -861,7 +862,7 @@ snl_attr_get_bitset_c(struct snl_state *ss, struct nlattr *nla, const void *arg __unused, void *_target) { const struct snl_hdr_parser *p = &_nla_bitset_parser; - struct snl_attr_bitset *target = _target; + struct snl_attr_bitset *target = (struct snl_attr_bitset *)_target; /* Assumes target points to the beginning of the structure */ if (!snl_parse_header(ss, NLA_DATA(nla), NLA_DATA_LEN(nla), p, _target)) @@ -981,7 +982,7 @@ parse_cmsg(struct snl_state *ss, const struct msghdr *msg, struct snl_msg_info * int len = cmsg->cmsg_len - ((char *)data - (char *)cmsg); const struct snl_hdr_parser *ps = &snl_msg_info_parser; - return (snl_parse_attrs_raw(ss, data, len, ps->np, ps->np_size, attrs)); + return (snl_parse_attrs_raw(ss, (struct nlattr *)data, len, ps->np, ps->np_size, attrs)); } return (false); @@ -1023,7 +1024,7 @@ static inline void snl_init_writer(struct snl_state *ss, struct snl_writer *nw) { nw->size = SNL_WRITER_BUFFER_SIZE; - nw->base = snl_allocz(ss, nw->size); + nw->base = (char *)snl_allocz(ss, nw->size); if (nw->base == NULL) { nw->error = true; nw->size = 0; @@ -1061,7 +1062,7 @@ snl_realloc_msg_buffer(struct snl_writer *nw, size_t sz) nw->hdr = (struct nlmsghdr *) (void *)((char *)new_base + hdr_off); } - nw->base = new_base; + nw->base = (char *)new_base; } return (true); diff --git a/sys/netlink/netlink_snl_route.h b/sys/netlink/netlink_snl_route.h index 619e769b1496..62055b2db417 100644 --- a/sys/netlink/netlink_snl_route.h +++ b/sys/netlink/netlink_snl_route.h @@ -100,7 +100,7 @@ snl_attr_get_ip(struct snl_state *ss, struct nlattr *nla, static inline struct sockaddr * parse_rta_via(struct snl_state *ss, struct rtattr *rta, int *perror) { - struct rtvia *via = NL_RTA_DATA(rta); + struct rtvia *via = (struct rtvia *)NL_RTA_DATA(rta); switch (via->rtvia_family) { case AF_INET: diff --git a/sys/netlink/netlink_snl_route_parsers.h b/sys/netlink/netlink_snl_route_parsers.h index 7e4bcad4010b..256edfec297d 100644 --- a/sys/netlink/netlink_snl_route_parsers.h +++ b/sys/netlink/netlink_snl_route_parsers.h @@ -78,7 +78,7 @@ static const struct snl_field_parser _fp_p_mp_nh[] = { static inline bool _cb_p_mp_nh(struct snl_state *ss __unused, void *_target) { - struct rta_mpath_nh *target = _target; + struct rta_mpath_nh *target = (struct rta_mpath_nh *)_target; finalize_sockaddr(target->gw, target->ifindex); return (true); @@ -158,7 +158,7 @@ static const struct snl_field_parser _fp_p_route[] = { static inline bool _cb_p_route(struct snl_state *ss __unused, void *_target) { - struct snl_parsed_route *target = _target; + struct snl_parsed_route *target = (struct snl_parsed_route *)_target; finalize_sockaddr(target->rta_dst, target->rta_oif); finalize_sockaddr(target->rta_gw, target->rta_oif); @@ -277,7 +277,7 @@ static struct snl_field_parser _fp_p_neigh_s[] = { static inline bool _cb_p_neigh(struct snl_state *ss __unused, void *_target) { - struct snl_parsed_neigh *target = _target; + struct snl_parsed_neigh *target = (struct snl_parsed_neigh *)_target; finalize_sockaddr(target->nda_dst, target->nda_ifindex); return (true); @@ -326,7 +326,7 @@ static const struct snl_field_parser _fp_p_addr_s[] = { static inline bool _cb_p_addr(struct snl_state *ss __unused, void *_target) { - struct snl_parsed_addr *target = _target; + struct snl_parsed_addr *target = (struct snl_parsed_addr *)_target; finalize_sockaddr(target->ifa_address, target->ifa_index); finalize_sockaddr(target->ifa_local, target->ifa_index); @@ -379,7 +379,7 @@ static const struct snl_attr_parser _nla_p_nh[] = { static inline bool _cb_p_nh(struct snl_state *ss __unused, void *_target) { - struct snl_parsed_nhop *target = _target; + struct snl_parsed_nhop *target = (struct snl_parsed_nhop *)_target; finalize_sockaddr(target->nha_gw, target->nha_oif); return (true); From nobody Wed Jun 12 21:55:25 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vzzqd6mhkz5NX1T; Wed, 12 Jun 2024 21:55:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vzzqd2H2Wz4Q2y; Wed, 12 Jun 2024 21:55:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718229325; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6+clVvk0nFYp7cvxewj9RR67prUvhIOODZyb8IfOcJ8=; b=dhyQs7o3pmNKOGwW2IBloew0UIM0sasNr+Y39dFPZZKC01h83vnq6sCh2Q3Brzt6RQkWSe YCP3lHlVesa6GC5uwaO5aahPZ4TicVaoRJoOmKOlk31noeye4fVxThF66LTPebzcjThjuA hdYI+UBlQgj7QwYVYOUG9D4KqLYcxWBByQUlpXgQErZsjRXYEzF1Evd9MD0Osxz+rVYtIN yi9AUggquW7D30XASxtcmbDulIQHhhJING3IEWrbq9FNNelPd55nQKLJo3208AuIkJymi/ 4vG5C0b5M7+WP+VgJQvSrtT9GzDK4KdBn7QkyaeuGIsvwdF9xw49hmiM4cwjKA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718229325; a=rsa-sha256; cv=none; b=AvmajXMA5qXZaNBBwo2MnZM99yBgCm+xCApK1l5Lb1iMKj8UD5Qt1u9OmZ8vQwQQbFr9xS TbHrqkW5Y+DJwPXAzXQkBse/+n115Xb3qXL+de86krffT3fzne0o20Ziw5kfB9Dpj9kQ+s XMNDTlsUk8Yp3K3UpVvESiNzPuWtWwGIdJdVC+UGqnshyHXivR8+MwNqZx7kdfhDvhLM+R QSU9/xgcWGAoQjaGLRSOc6JPYRlB1qKaC2m6035C0o/y3j3H/ye4O+K+SgC3VEL+HjJczj 6GvdRGqQC4cvHLslvSi7DbCEs8YNcX2pGiDDLxCI61MwUXQnrbXng3w0j10N5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718229325; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6+clVvk0nFYp7cvxewj9RR67prUvhIOODZyb8IfOcJ8=; b=s0E1u8vD/HGGlwAqfKQ7YQzPtLdbJCSZKkSIwCmX+mu1SWR6Ip7gqp7CzepcI9CpCVLEtH H8jMMzT9Pc0b3BOfG4ydVR7qCvn6Vgs6PZw9iTQytJql9uWIdOSzzoth2yg3MNvmatJjmd xxo5Mw9xP9y/gENHSyrB01sstUeo/NQthkhvq0E7TZG9m8rO27q3ORxPhUitR/6VXv30p4 vWdNz1DzZuq/oRMAvAF06Ek6/vIwNeHn8rvV1FrX63YWjJKpOFQA3VpdgAnupo0t4W3rGc J1126E7As6KERmLKBKavpsrq5VVdh1q1lWAypkeRVRXfNH7PCNPsEQVbRUu+vQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vzzqd1d1Fz18lD; Wed, 12 Jun 2024 21:55:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CLtPan075489; Wed, 12 Jun 2024 21:55:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CLtPXJ075486; Wed, 12 Jun 2024 21:55:25 GMT (envelope-from git) Date: Wed, 12 Jun 2024 21:55:25 GMT Message-Id: <202406122155.45CLtPXJ075486@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: e366cf07bc64 - stable/14 - smbfs manuals: describe consistently List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e366cf07bc647948b3ae7861d24c0a1cc0570264 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=e366cf07bc647948b3ae7861d24c0a1cc0570264 commit e366cf07bc647948b3ae7861d24c0a1cc0570264 Author: Alexander Ziaee AuthorDate: 2024-05-30 21:37:15 +0000 Commit: Warner Losh CommitDate: 2024-06-12 21:46:25 +0000 smbfs manuals: describe consistently MFC after: 3 days Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/ (cherry picked from commit dddf29712f38ba1d804c02bcfd02d24098ae48b0) --- contrib/smbfs/mount_smbfs/mount_smbfs.8 | 3 +-- contrib/smbfs/smbutil/smbutil.1 | 2 +- share/man/man5/nsmb.conf.5 | 7 ++++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/contrib/smbfs/mount_smbfs/mount_smbfs.8 b/contrib/smbfs/mount_smbfs/mount_smbfs.8 index 4b4c205dc7da..604b1b414243 100644 --- a/contrib/smbfs/mount_smbfs/mount_smbfs.8 +++ b/contrib/smbfs/mount_smbfs/mount_smbfs.8 @@ -1,11 +1,10 @@ .\" $Id: mount_smbfs.8,v 1.10 2002/04/16 02:47:41 bp Exp $ -.\" $FreeBSD$ .Dd November 1, 2018 .Dt MOUNT_SMBFS 8 .Os .Sh NAME .Nm mount_smbfs -.Nd "mount a shared resource from an SMB file server" +.Nd mount a server message block (SMB1/CIFS) file system .Sh SYNOPSIS .Nm .Op Fl E Ar cs1 Ns Cm \&: Ns Ar cs2 diff --git a/contrib/smbfs/smbutil/smbutil.1 b/contrib/smbfs/smbutil/smbutil.1 index cf133bad309a..c82ba91ea99e 100644 --- a/contrib/smbfs/smbutil/smbutil.1 +++ b/contrib/smbfs/smbutil/smbutil.1 @@ -4,7 +4,7 @@ .Os .Sh NAME .Nm smbutil -.Nd "interface to the SMB requester" +.Nd interface to the server message block (SMB1/CIFS) requester .Sh SYNOPSIS .Nm .Op Fl hv diff --git a/share/man/man5/nsmb.conf.5 b/share/man/man5/nsmb.conf.5 index 1a09743874e5..0da10343ed77 100644 --- a/share/man/man5/nsmb.conf.5 +++ b/share/man/man5/nsmb.conf.5 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2003 .\" Originally written by Sergey A. Osokin .\" Rewritten by Tom Rhodes @@ -28,9 +31,7 @@ .Os .Sh NAME .Nm nsmb.conf -.Nd configuration file for -.Tn SMB -requests +.Nd configuration file for server message block (SMB1/CIFS) requests .Sh DESCRIPTION The .Nm From nobody Wed Jun 12 21:55:26 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vzzqg0Cf9z5NXbm; Wed, 12 Jun 2024 21:55:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vzzqf30HBz4Phd; Wed, 12 Jun 2024 21:55:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718229326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qKhUsliUMUb6K0M4iO+Vw4lJ9g2jlwnDW8xgbqFDXPw=; b=hF9C9wqIrZAOPhUmrxU+a1RZQ5w2UNlihsrdT2tydCZFU9pAtr1ibxUyQ4NQpRMDHHziqI jeZoHlpLnPkadtBnsbI6b65+9iH52F/5iRjv5juF09Qq6SmoqaFHI4GenOXWFnT7CI/z/6 gFiz9zleCKXEWlfyuiXc5iGJQgIoyO7P05+S/UiWykJNJ2Bul2vZyebFUOHqKqfrVguuYT wprMltaV5Ktn0SosEmkUybatK3pUBbYERJ/kYmQZClVzsMNVwEIhEn4o/vXVQdd5Tt1Yqh aAHv+UdAvtAgQU3onc8ngAtLQOre4xshlJZaeq0DRsx5XNzYAKS6j3IoqEjK+Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718229326; a=rsa-sha256; cv=none; b=yNcKUY9mL7yx5AOp+0u1Xp1M4AYVpvmZRAOtAoEqMstl+x1MXWxhrp68R0FLDn6vIgJSqW Zjm6dcBux0iqyRncGTAuUoYnohH4KLg5Mm02PJBGs/jGOKrfFSvdH7BVSBm3VLSeRDuzte T9CoP5c8MaLatIGpmoJ8OrZgHIakR12SnEIYogTlYu9dkUTa1w4AXaazmwqwCCmRltxrKL VGftpQ+PnI1/0aAYEwFberWEkaX2S4GC6obv/M57B6/EISwdYzMfPIi+1RRmUqNUm9w0Fl fx7OG5k4x2ymrOi+UaTI61ZCqr3BWpi5hsRiUHbZuVTIZGZYpxIbghy9O3NihQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718229326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qKhUsliUMUb6K0M4iO+Vw4lJ9g2jlwnDW8xgbqFDXPw=; b=mzsYb2hud+rDMGD94Rp/FHpTbpew3RANL5Zyp88WWpA3VCu6RwGtRIPkyPCxolsr9asJez kjWa3foFBQtJ6i1x6mJ3u3GVBzDjXrv7B9CYFRR4tFqddz7mLY7+2d6iM2CbbxpBN6IEA2 lYiW97XmoeNxm9fqg5SYxrpIQXXtX4ODTB8oSzYnJLcIEisuAJygEOE/CASHBJTOPiSNCx kslvGIlzQYYmvkxhDcQJbBZeZoblbFTkGoZsuX3LrqEfsMMv6TnMP+lUtXVB8QIBffIPiI 9GmvEmQa2jBf4fH5foojp3x/4F4IEcpDq8XRTMhlHZ0GRiT+oYkwSUYgxLilyQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vzzqf2Yjxz18gD; Wed, 12 Jun 2024 21:55:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CLtQKM075528; Wed, 12 Jun 2024 21:55:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CLtQDd075525; Wed, 12 Jun 2024 21:55:26 GMT (envelope-from git) Date: Wed, 12 Jun 2024 21:55:26 GMT Message-Id: <202406122155.45CLtQDd075525@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 657a482888d4 - stable/14 - man bluetooth/fwdownloaders: terse descriptions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 657a482888d4465bfa6d2e90925406418e94bbc0 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=657a482888d4465bfa6d2e90925406418e94bbc0 commit 657a482888d4465bfa6d2e90925406418e94bbc0 Author: Alexander Ziaee AuthorDate: 2024-05-31 12:13:54 +0000 Commit: Warner Losh CommitDate: 2024-06-12 21:46:25 +0000 man bluetooth/fwdownloaders: terse descriptions + descriptions no longer wrap on a standard console, no keywords removed + more consistent language with other firmware tooling manuals MFC after: 3 days Reviewed by: imp (bumped date for Nd changes) Pull Request: https://github.com/freebsd/freebsd-src/pull/1266 (cherry picked from commit 2c901189bb65ea0bae03aa83459570a0f0ea0aa8) --- usr.sbin/bluetooth/ath3kfw/ath3kfw.8 | 4 ++-- usr.sbin/bluetooth/bcmfw/bcmfw.8 | 6 ++---- usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 | 5 ++--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/usr.sbin/bluetooth/ath3kfw/ath3kfw.8 b/usr.sbin/bluetooth/ath3kfw/ath3kfw.8 index ed015bbf229d..beb1b102b194 100644 --- a/usr.sbin/bluetooth/ath3kfw/ath3kfw.8 +++ b/usr.sbin/bluetooth/ath3kfw/ath3kfw.8 @@ -26,12 +26,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 4, 2016 +.Dd May 31, 2024 .Dt ATH3KFW 8 .Os .Sh NAME .Nm ath3kfw -.Nd firmware download utility for Atheros AR3011/AR3012 chip based Bluetooth USB devices +.Nd download firmware for Atheros AR3011/AR3012 Bluetooth USB devices .Sh SYNOPSIS .Nm .Op Fl DI diff --git a/usr.sbin/bluetooth/bcmfw/bcmfw.8 b/usr.sbin/bluetooth/bcmfw/bcmfw.8 index b9fa72706d2d..50e9739340ee 100644 --- a/usr.sbin/bluetooth/bcmfw/bcmfw.8 +++ b/usr.sbin/bluetooth/bcmfw/bcmfw.8 @@ -25,14 +25,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: bcmfw.8,v 1.7 2003/05/21 00:33:40 max Exp $ -.\" -.Dd March 31, 2003 +.Dd May 31, 2024 .Dt BCMFW 8 .Os .Sh NAME .Nm bcmfw -.Nd firmware download utility for Broadcom BCM2033 chip based Bluetooth USB devices +.Nd download firmware for Broadcom BCM2033 Bluetooth USB devices .Sh SYNOPSIS .Nm .Op Fl h diff --git a/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 b/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 index 66517badd0fc..1924c5f3ce74 100644 --- a/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 +++ b/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 @@ -26,13 +26,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 3, 2021 +.Dd May 31, 2024 .Dt IWMBTFW 8 .Os .Sh NAME .Nm iwmbtfw -.Nd firmware download utility for Intel Wireless 7260/8260/8265 chip based Bluetooth -USB devices +.Nd download firmware for Intel Wireless AC Bluetooth USB devices .Sh SYNOPSIS .Nm .Op Fl DI From nobody Wed Jun 12 21:55:27 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vzzqh0xkBz5NXR5; Wed, 12 Jun 2024 21:55:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vzzqg3gv8z4Q70; Wed, 12 Jun 2024 21:55:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718229327; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gNcg8w9EUlTAnZQQzETqKmSbicWWjw7shPvkx88B7mc=; b=cX4yYPrW0cE+oDlWqhgA64WU1jGjbBKJvvn1mCILXMzUb6Lizuc9KKfpC8QweH/WdvHRHp 1ChVb6iOWE64fM2odg2n69MOl9Tpk2Rrvqe4yi+/n9P7pD2Pe7EJv6VHRa6v0Fd/R5m50N nnHYE90pZ2suDvuAfzO5e+zc9/0E9Sq/cH/+8d1zzlWUb7aW1wrQXGFYz01VeL9Ux043E3 otjMupN2ZV3HBETvQWwgxABH3v1tmpG0gZ+mUZ8sVC2ZQ9/hVgnc/sXDu6y0SfUpUS4NP/ w5ppMnpg9U/fnwbxym/I4qcp9JQe1fxyctqbcp0mM09IVMl0XcObBYTLfGW7Gw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718229327; a=rsa-sha256; cv=none; b=B1GtlARgfAxrryBHvoJCFVwKkwaj9SzMjjp77eaOXMbX9s83knifWZEt/NNbiFYUHEHMMD u9vzXalcC31+VKzMRnSUJJFwZ9EJzNmUpiTkNNzULZoCGj1HC1BfjR6FwIRbkhIFbR6a4S w36IuIcjQ7K9wFhMmsXh1yb5/gjdimq0YCVM7CWoY+8nxfcjOn6xVSscQJhO1o9Jak2HI5 dDLxen2JU8261YYqb2beFtdV0UYyg6QFgiZmMNdh+LDgduGAybkwysd6IDLp8JO4MrKHwq k7HjCcxiwT8RPLTyskEAX760DbPaiU2U7CjHfJZIKuH9ZuoKRe3NNs2+HQWm+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718229327; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gNcg8w9EUlTAnZQQzETqKmSbicWWjw7shPvkx88B7mc=; b=a+9iWMxSHUXTAhALtOm0MEH85OpUXrEk16fIyg1sxQ7N2pSjT1Kv5ntlN7hMcJZLotDK7I nG4QVKZPseccxj+PPTSxjTuC/gyvavKM68ejt/M1Ati/HSXGOO5A8mSkNWwDBGZ/120mLS 1UiJ+/wW/EnfKtfTirhsBjL1I+KHp9BdYZQ9TjP9QwkvnCxMkBfbuXBt2uhXgwl1ILM5j6 ZaeAJE88XJmjtl+H4uHMnvHiniHm6QCA9Kleurjl1kH6fM0ocK3lpTZYA2F1ejFpLwme7Q 8Nzo6/IqduTAO5gIX/pRmrtskqYsj6/WzLPH8VKds2GfpP5s259ipjjE6M1+mA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vzzqg3HjJz197D; Wed, 12 Jun 2024 21:55:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CLtRMS075576; Wed, 12 Jun 2024 21:55:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CLtRhs075573; Wed, 12 Jun 2024 21:55:27 GMT (envelope-from git) Date: Wed, 12 Jun 2024 21:55:27 GMT Message-Id: <202406122155.45CLtRhs075573@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: aeaff9c5deac - stable/14 - smbus manuals: include term SMBus in description List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: aeaff9c5deacd552eb0dbdfcd6731487e1e14b51 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=aeaff9c5deacd552eb0dbdfcd6731487e1e14b51 commit aeaff9c5deacd552eb0dbdfcd6731487e1e14b51 Author: Alexander Ziaee AuthorDate: 2024-05-30 21:58:20 +0000 Commit: Warner Losh CommitDate: 2024-06-12 21:53:22 +0000 smbus manuals: include term SMBus in description Fixes: 5ad3b09f2fe9 (smb: distinguishable descriptions) MFC after: 3 days Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/ (cherry picked from commit 8ccdf86ee57575b04983bc7be68c357fb83668f8) --- share/man/man4/iicsmb.4 | 8 +++++--- share/man/man4/smb.4 | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/share/man/man4/iicsmb.4 b/share/man/man4/iicsmb.4 index b6f5e39ce5cc..ffa38000659f 100644 --- a/share/man/man4/iicsmb.4 +++ b/share/man/man4/iicsmb.4 @@ -1,5 +1,7 @@ -.\" Copyright (c) 1998, Nicolas Souchu -.\" All rights reserved. +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 1998, Nicolas Souchu. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -27,7 +29,7 @@ .Os .Sh NAME .Nm iicsmb -.Nd I2C to SMB bridge +.Nd I2C to SMBus bridge .Sh SYNOPSIS .Cd "device iicsmb" .Pp diff --git a/share/man/man4/smb.4 b/share/man/man4/smb.4 index d2a1c3b9a618..bec89d8cb05f 100644 --- a/share/man/man4/smb.4 +++ b/share/man/man4/smb.4 @@ -29,7 +29,7 @@ .Os .Sh NAME .Nm smb -.Nd SMB generic I/O device driver +.Nd System Management Bus (SMBus) generic I/O device driver .Sh SYNOPSIS .Cd "device smb" .Sh DESCRIPTION From nobody Wed Jun 12 21:55:28 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vzzqh729dz5NXR7; Wed, 12 Jun 2024 21:55:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vzzqh51z8z4Q3B; Wed, 12 Jun 2024 21:55:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718229328; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3zBWgrXciGEQQntZxZkB63ZLVZabMmxor30K9QM+92g=; b=mkZOo1+34JaDDU46wSONqsrLGyjmD5XLnHQZrkqrbAcLoDRljf63yVzuoJhrR/jqoC5/aM 5Pm8MTANE1HnxAde9Kb93wKIohto5M3XYqF9YbXQGIPm3mQDVqMoNRHSCiFpJ7ZoBN7YBs vvLGN8C25AyDwrH42uyL/DOZFRF/jJEtYD4RFUVok9yaIjR5tAO9wGRYIOGwNobNUjUxUi E3fxpzfwlJdX6T3K5iq+qwl0ruurRor0+SnhhqF52PC2Ob5k4X7++wHhjFBFYSgajmomRu TnZMR9HrCgJ1ccRsLmr8/rSneC3k1fGN+Ej71a33lK7YjnL9P9Rm6a+6EcuuGA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718229328; a=rsa-sha256; cv=none; b=r5y5v+8Y9TDgQU/Ut16tzl/0vTWgwYRot9bYOTuHrH/oNcE9hdFKJ0O98/VluZT59+0xeu AZtSegw68zNWFxZhW+JMQ6P8RVzvFGXPTQ57hHME43CPV3v9QmQjh5T5c+NEY4rx4+Ie5c 1GjQpQGrViV3gB/87aQeQCCXV3ArtWWAhUqAsTdRz9wKyprJ7GuNwog0j4NjE79WHB8RJ4 Ijjm1sq0Eoh71WYiknk5RmZnohgPz/MHgkZD03poOKsq9HQlfQ7iKhEn5dXmc3jB2YZIDf IMi9MAz31ypIk+7XTL5KHev/Y93Bl8F9amHsUcjOE+mzOnB7xADXIrhHSvCmmg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718229328; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3zBWgrXciGEQQntZxZkB63ZLVZabMmxor30K9QM+92g=; b=dPpzWwKIiF1miQpSukfTLG0X3FB/vToemuhef6JtlcBPWFoo+NfHw7R2UQVS1OlnWQEgH/ VobLox8GZBCj/RPp0xzuB2jzP7NKHtot+GNqnmvCuctCNcHw4QfEC7rrgu/Xumatn4AhMB MV2W1GPnFsRktKcznL8Mfa1ScONVUHJHWb9/MMFZAVWRNE2sFkLojbQ9CnRNTJ42q1GtZW I353zrf1B4XBYiRCrx/7XJVvoMQwyHc5WmhY6M55iOYHM9NphsdtBPucNCp/N3ezeQi6sZ WF9m81Uu08hY9T4XLa8+R2gtkeLIcSEquR1t+pbwCg1H3KXbuLd87WaI4pEC6g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vzzqh4d37z19D1; Wed, 12 Jun 2024 21:55:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CLtSCc075627; Wed, 12 Jun 2024 21:55:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CLtSrA075624; Wed, 12 Jun 2024 21:55:28 GMT (envelope-from git) Date: Wed, 12 Jun 2024 21:55:28 GMT Message-Id: <202406122155.45CLtSrA075624@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 170a7f2ec185 - stable/14 - ifconfig(8): wordsmith -G and -g descriptions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 170a7f2ec18570e11b6b8530ce746d33119d9a6a Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=170a7f2ec18570e11b6b8530ce746d33119d9a6a commit 170a7f2ec18570e11b6b8530ce746d33119d9a6a Author: Pau Amma AuthorDate: 2024-06-06 21:12:53 +0000 Commit: Warner Losh CommitDate: 2024-06-12 21:53:56 +0000 ifconfig(8): wordsmith -G and -g descriptions Remove spurious ".Ar groupname". Add missing full stops. While there, tweak word order for better grammar. MFC after: 3 days Reviewed by: Alexander Ziaee, Mina Galić, allanjude, imp Differential Revision: https://reviews.freebsd.org/D45092 (cherry picked from commit 21faf821a3046f2522dc8d49797f1c1ec74c6b0f) --- sbin/ifconfig/ifconfig.8 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8 index fa463ad8af5d..259be41bf94b 100644 --- a/sbin/ifconfig/ifconfig.8 +++ b/sbin/ifconfig/ifconfig.8 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-3-Clause +.\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" @@ -25,9 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 -.\" -.Dd May 12, 2024 +.Dd June 6, 2024 .Dt IFCONFIG 8 .Os .Sh NAME @@ -216,11 +217,10 @@ Shortcut notation for Exclude members of the specified .Ar groupname from the output. -.Ar groupname . .Pp -Only one option +Only one .Fl G -should be specified as later override previous ones +option should be specified as later ones override earlier ones. .Ar groupname may contain shell patterns in which case it should be quoted. .Pp @@ -246,9 +246,9 @@ lists names of interfaces belonging to .Ar groupname . Any other flags and arguments are ignored in this case. .Pp -Only one option +Only one .Fl g -should be specified as later override previous ones +option should be specified as later ones override earlier ones. .Ar groupname may contain shell patterns in which case it should be quoted. .Pp From nobody Wed Jun 12 22:19:05 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W00Ly1Dn4z5NYxS; Wed, 12 Jun 2024 22:19:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W00Ly0hfVz4TJn; Wed, 12 Jun 2024 22:19:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718230746; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kfnUq+pAVF1R8ryEaIZNntI136d/dS5wVd/qnR6gtHY=; b=A5s2GvLfmyJMMsRx67LN295/OcxoTYLR2pPYQINfCAPntV2zyhf4EI1pWMGcQGfeNIUpvh L257uX5Y8r8XCbsMEb3dHnzxoBYoYkcP2Ek+axM8yEDU50X3MvArdIMkJxRJps4emL8BPV 3opYVczSflo36amhmyfPMjPjznsuL+xdeY8UsNNbB6oGcUx38j9qK5VrlDggqWIFmZIUl9 WsSU3AQq2DSykidPqFYmPWngagcdqun+zQHdwSvmQRyGKop00ZTS4HC5Sxb7B4IOdMLwVw 2lt0BDiJqXpchEbQfZethhq0d5ZRNxRtl2e0vqNWkhBavXWaGmOcQwczKPaFSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718230746; a=rsa-sha256; cv=none; b=Qkz/CQV/uYATotHUPOnqROL3oRoHlvw4tLdNk8+9UAzQZX/fjErkZVyPDLLHF1dQQnNapL Z0sdqY8dcRdOQogUPlfby9qjcdLaLJnJ0D2BXBBPgNQwXK6UsEos9kgUNbTfwLrU+aQo8s F6QFEqr85RwkLqvGxRvDhuJ3klzEEIrSA+MZiQxuJD3bPsm1LiLml4AjEd3J1ldhtIkh96 IElV46IYPJR7YkGdNUG8VEK/QCs/Ep8Ci673hFYPwvsd3/bpb9rjb8bIzsEdddVOcfaE+J YWHNOaunFKsz2jnli9mNcy5uUwNwJC/r/Ve2ZF1fyUSu7IKkG7KImQTXmacGPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718230746; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kfnUq+pAVF1R8ryEaIZNntI136d/dS5wVd/qnR6gtHY=; b=nD6QUHs4BV5pideTEBkkvMndCbSqz5TYFYqa4AP9rIQEqPQhHVBpYlsM7aDQsafLulbFND q5vPQoCTVbqpZLDoiuif4BBmBm2dqlZAQO7vusJ6p4KQl3NrLtwd4GB1ZYYrRmXIu3+Jnt N7X54GbxAllwKB22NLvxk0+dl7y/l3UBc4LtoX6UzrLiFNtvl8wE+rJuyWFOjCPzQp1TbQ wpIu6k72bzChTbAgbuMPTITKl/34XPToWGMsMjmgEHtvVQtg83pqOvdQwLIP8wX6NbNZp1 wlx3Ce6aFM5VS4TtZwVEsMw/focrF81XJM9/9rv2HDQqaFCrb6nh17fIAUf2Gg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W00Ly08pdz19ZY; Wed, 12 Jun 2024 22:19:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CMJ5gQ010485; Wed, 12 Jun 2024 22:19:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CMJ57g010482; Wed, 12 Jun 2024 22:19:05 GMT (envelope-from git) Date: Wed, 12 Jun 2024 22:19:05 GMT Message-Id: <202406122219.45CMJ57g010482@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: f9ac06af3b2d - stable/13 - net80211: move net_epoch into net80211 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f9ac06af3b2dec6ac75f5639cb1396f9d943fc06 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=f9ac06af3b2dec6ac75f5639cb1396f9d943fc06 commit f9ac06af3b2dec6ac75f5639cb1396f9d943fc06 Author: Bjoern A. Zeeb AuthorDate: 2023-10-29 14:25:23 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 22:18:50 +0000 net80211: move net_epoch into net80211 Move the net_epoch into net80211 around the if_input calls and out of the driver (in this first case LinuxKPI). This reduces coverage but also allows us to alloc in calls like (*ampdu_rx_start) which do not actually pass data up the stack. The follow-up commits (squashed) reverts: b65f813c1ab99448278961c5ca80dc422b1eae29 Revert "Widen EPOCH(9) usage in PCI WLAN drivers.", 21c4082de9e2cf9a0fd81a9a981ab06022956847 Revert "Widen EPOCH(9) usage in USB WLAN drivers.", 17c328b6aebfa03cd1c2cbfbbc617e3b341bf1e4 Revert "Enter the network epoch in USB WiFi drivers when processing input", af2441fbc7fa9e522e7f8697e5a181bdd4ff9e00 Revert "[ath] Attempt to fix epoch handling.", and 6c3e93cb5a4aa4b8a2d8d4d326f2a7c34d3a4458 for if_ath.c only ath: Revert "Use NET_TASK_INIT() and NET_GROUPTASK_INIT() for drivers that process". Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42427 (cherry picked from commit de607e3c230be88f6232b9c9fd6c37199648dc8c) (cherry picked from commit 1c6dd33d26eb02c6145383a49150965eeca61120) (cherry picked from commit 39b702797994fbd62a21dd3af6d4cd7045fded23) (cherry picked from commit 75f298492a12d53df97c26963ec9f2dc0b052878) (cherry picked from commit eb3821e6d92fa45ece7ec08efde45e35be1bdc95) (cherry picked from commit 82506f26c03aa312b91e01a797f31e061749a76d) --- sys/compat/linuxkpi/common/src/linux_80211.c | 3 --- sys/dev/ath/if_ath_rx.c | 11 +---------- sys/dev/ath/if_ath_rx_edma.c | 4 ---- sys/dev/bwi/if_bwi.c | 3 --- sys/dev/bwn/if_bwn.c | 3 --- sys/dev/ipw/if_ipw.c | 3 --- sys/dev/iwi/if_iwi.c | 3 --- sys/dev/iwm/if_iwm.c | 5 ----- sys/dev/iwn/if_iwn.c | 3 --- sys/dev/malo/if_malo.c | 3 --- sys/dev/mwl/if_mwl.c | 4 ---- sys/dev/otus/if_otus.c | 3 --- sys/dev/ral/rt2560.c | 4 +--- sys/dev/ral/rt2661.c | 3 --- sys/dev/ral/rt2860.c | 3 --- sys/dev/rtwn/pci/rtwn_pci_rx.c | 5 ----- sys/dev/rtwn/usb/rtwn_usb_rx.c | 3 --- sys/dev/usb/wlan/if_rsu.c | 3 --- sys/dev/usb/wlan/if_rum.c | 3 --- sys/dev/usb/wlan/if_run.c | 3 --- sys/dev/usb/wlan/if_uath.c | 3 --- sys/dev/usb/wlan/if_upgt.c | 3 --- sys/dev/usb/wlan/if_ural.c | 3 --- sys/dev/usb/wlan/if_urtw.c | 3 --- sys/dev/usb/wlan/if_zyd.c | 3 --- sys/dev/wpi/if_wpi.c | 3 --- sys/dev/wtap/if_wtap.c | 5 +---- sys/net80211/ieee80211_hostap.c | 4 ++++ sys/net80211/ieee80211_input.c | 3 +++ 29 files changed, 10 insertions(+), 95 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index b48f64fb1b0f..df72495e68b6 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -4802,7 +4802,6 @@ linuxkpi_ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb, struct ieee80211_sta *sta, struct napi_struct *napi __unused, struct list_head *list __unused) { - struct epoch_tracker et; struct lkpi_hw *lhw; struct ieee80211com *ic; struct mbuf *m; @@ -5021,7 +5020,6 @@ skip_device_ts: } #endif - NET_EPOCH_ENTER(et); if (ni != NULL) { ok = ieee80211_input_mimo(ni, m); ieee80211_free_node(ni); @@ -5031,7 +5029,6 @@ skip_device_ts: ok = ieee80211_input_mimo_all(ic, m); /* mbuf got consumed. */ } - NET_EPOCH_EXIT(et); #ifdef LINUXKPI_DEBUG_80211 if (linuxkpi_debug_80211 & D80211_TRACE_RX) diff --git a/sys/dev/ath/if_ath_rx.c b/sys/dev/ath/if_ath_rx.c index 44edc75a5f09..586a56d8120e 100644 --- a/sys/dev/ath/if_ath_rx.c +++ b/sys/dev/ath/if_ath_rx.c @@ -666,8 +666,6 @@ ath_rx_pkt(struct ath_softc *sc, struct ath_rx_status *rs, HAL_STATUS status, int is_good = 0; struct ath_rx_edma *re = &sc->sc_rxedma[qtype]; - NET_EPOCH_ASSERT(); - /* * Calculate the correct 64 bit TSF given * the TSF64 register value and rs_tstamp. @@ -1089,8 +1087,6 @@ ath_rx_proc(struct ath_softc *sc, int resched) int kickpcu = 0; int ret; - NET_EPOCH_ASSERT(); - /* XXX we must not hold the ATH_LOCK here */ ATH_UNLOCK_ASSERT(sc); ATH_PCU_UNLOCK_ASSERT(sc); @@ -1310,7 +1306,6 @@ static void ath_legacy_rx_tasklet(void *arg, int npending) { struct ath_softc *sc = arg; - struct epoch_tracker et; ATH_KTR(sc, ATH_KTR_RXPROC, 1, "ath_rx_proc: pending=%d", npending); DPRINTF(sc, ATH_DEBUG_RX_PROC, "%s: pending %u\n", __func__, npending); @@ -1323,18 +1318,14 @@ ath_legacy_rx_tasklet(void *arg, int npending) } ATH_PCU_UNLOCK(sc); - NET_EPOCH_ENTER(et); ath_rx_proc(sc, 1); - NET_EPOCH_EXIT(et); } static void ath_legacy_flushrecv(struct ath_softc *sc) { - struct epoch_tracker et; - NET_EPOCH_ENTER(et); + ath_rx_proc(sc, 0); - NET_EPOCH_EXIT(et); } static void diff --git a/sys/dev/ath/if_ath_rx_edma.c b/sys/dev/ath/if_ath_rx_edma.c index 6c722ca8275f..fb25fb77b062 100644 --- a/sys/dev/ath/if_ath_rx_edma.c +++ b/sys/dev/ath/if_ath_rx_edma.c @@ -555,7 +555,6 @@ ath_edma_recv_proc_deferred_queue(struct ath_softc *sc, HAL_RX_QUEUE qtype, int16_t nf; ath_bufhead rxlist; struct mbuf *m; - struct epoch_tracker et; TAILQ_INIT(&rxlist); @@ -572,8 +571,6 @@ ath_edma_recv_proc_deferred_queue(struct ath_softc *sc, HAL_RX_QUEUE qtype, TAILQ_CONCAT(&rxlist, &sc->sc_rx_rxlist[qtype], bf_list); ATH_RX_UNLOCK(sc); - NET_EPOCH_ENTER(et); - /* Handle the completed descriptors */ /* * XXX is this SAFE call needed? The ath_buf entries @@ -597,7 +594,6 @@ ath_edma_recv_proc_deferred_queue(struct ath_softc *sc, HAL_RX_QUEUE qtype, if (ngood) { sc->sc_lastrx = tsf; } - NET_EPOCH_EXIT(et); ATH_KTR(sc, ATH_KTR_INTERRUPTS, 1, "ath edma rx deferred proc: ngood=%d\n", diff --git a/sys/dev/bwi/if_bwi.c b/sys/dev/bwi/if_bwi.c index ff7038546771..8770353f0c5a 100644 --- a/sys/dev/bwi/if_bwi.c +++ b/sys/dev/bwi/if_bwi.c @@ -1503,7 +1503,6 @@ bwi_stop_locked(struct bwi_softc *sc, int statechg) void bwi_intr(void *xsc) { - struct epoch_tracker et; struct bwi_softc *sc = xsc; struct bwi_mac *mac; uint32_t intr_status; @@ -1623,9 +1622,7 @@ bwi_intr(void *xsc) device_printf(sc->sc_dev, "intr noise\n"); if (txrx_intr_status[0] & BWI_TXRX_INTR_RX) { - NET_EPOCH_ENTER(et); rx_data = sc->sc_rxeof(sc); - NET_EPOCH_EXIT(et); if (sc->sc_flags & BWI_F_STOP) { BWI_UNLOCK(sc); return; diff --git a/sys/dev/bwn/if_bwn.c b/sys/dev/bwn/if_bwn.c index b90dc2dbeab7..caa8206cf413 100644 --- a/sys/dev/bwn/if_bwn.c +++ b/sys/dev/bwn/if_bwn.c @@ -5073,7 +5073,6 @@ bwn_intr(void *arg) static void bwn_intrtask(void *arg, int npending) { - struct epoch_tracker et; struct bwn_mac *mac = arg; struct bwn_softc *sc = mac->mac_sc; uint32_t merged = 0; @@ -5134,7 +5133,6 @@ bwn_intrtask(void *arg, int npending) if (mac->mac_reason_intr & BWN_INTR_NOISESAMPLE_OK) bwn_intr_noise(mac); - NET_EPOCH_ENTER(et); if (mac->mac_flags & BWN_MAC_FLAG_DMA) { if (mac->mac_reason[0] & BWN_DMAINTR_RX_DONE) { bwn_dma_rx(mac->mac_method.dma.rx); @@ -5142,7 +5140,6 @@ bwn_intrtask(void *arg, int npending) } } else rx = bwn_pio_rx(&mac->mac_method.pio.rx); - NET_EPOCH_EXIT(et); KASSERT(!(mac->mac_reason[1] & BWN_DMAINTR_RX_DONE), ("%s", __func__)); KASSERT(!(mac->mac_reason[2] & BWN_DMAINTR_RX_DONE), ("%s", __func__)); diff --git a/sys/dev/ipw/if_ipw.c b/sys/dev/ipw/if_ipw.c index 2581f13ac3eb..fd4089b7eb54 100644 --- a/sys/dev/ipw/if_ipw.c +++ b/sys/dev/ipw/if_ipw.c @@ -1158,7 +1158,6 @@ static void ipw_rx_data_intr(struct ipw_softc *sc, struct ipw_status *status, struct ipw_soft_bd *sbd, struct ipw_soft_buf *sbuf) { - struct epoch_tracker et; struct ieee80211com *ic = &sc->sc_ic; struct mbuf *mnew, *m; struct ieee80211_node *ni; @@ -1230,13 +1229,11 @@ ipw_rx_data_intr(struct ipw_softc *sc, struct ipw_status *status, IPW_UNLOCK(sc); ni = ieee80211_find_rxnode(ic, mtod(m, struct ieee80211_frame_min *)); - NET_EPOCH_ENTER(et); if (ni != NULL) { (void) ieee80211_input(ni, m, rssi - nf, nf); ieee80211_free_node(ni); } else (void) ieee80211_input_all(ic, m, rssi - nf, nf); - NET_EPOCH_EXIT(et); IPW_LOCK(sc); bus_dmamap_sync(sc->rbd_dmat, sc->rbd_map, BUS_DMASYNC_PREWRITE); diff --git a/sys/dev/iwi/if_iwi.c b/sys/dev/iwi/if_iwi.c index fc9677c6a3d6..57249d288acb 100644 --- a/sys/dev/iwi/if_iwi.c +++ b/sys/dev/iwi/if_iwi.c @@ -1179,7 +1179,6 @@ static void iwi_frame_intr(struct iwi_softc *sc, struct iwi_rx_data *data, int i, struct iwi_frame *frame) { - struct epoch_tracker et; struct ieee80211com *ic = &sc->sc_ic; struct mbuf *mnew, *m; struct ieee80211_node *ni; @@ -1269,13 +1268,11 @@ iwi_frame_intr(struct iwi_softc *sc, struct iwi_rx_data *data, int i, IWI_UNLOCK(sc); ni = ieee80211_find_rxnode(ic, mtod(m, struct ieee80211_frame_min *)); - NET_EPOCH_ENTER(et); if (ni != NULL) { type = ieee80211_input(ni, m, rssi, nf); ieee80211_free_node(ni); } else type = ieee80211_input_all(ic, m, rssi, nf); - NET_EPOCH_EXIT(et); IWI_LOCK(sc); if (sc->sc_softled) { diff --git a/sys/dev/iwm/if_iwm.c b/sys/dev/iwm/if_iwm.c index f4af7b1f315b..df6b37d33ce5 100644 --- a/sys/dev/iwm/if_iwm.c +++ b/sys/dev/iwm/if_iwm.c @@ -3467,7 +3467,6 @@ static bool iwm_rx_mpdu(struct iwm_softc *sc, struct mbuf *m, uint32_t offset, bool stolen) { - struct epoch_tracker et; struct ieee80211com *ic; struct ieee80211_frame *wh; struct ieee80211_node *ni; @@ -3487,8 +3486,6 @@ iwm_rx_mpdu(struct iwm_softc *sc, struct mbuf *m, uint32_t offset, ni = ieee80211_find_rxnode(ic, (struct ieee80211_frame_min *)wh); IWM_UNLOCK(sc); - - NET_EPOCH_ENTER(et); if (ni != NULL) { IWM_DPRINTF(sc, IWM_DEBUG_RECV, "input m %p\n", m); ieee80211_input_mimo(ni, m); @@ -3497,8 +3494,6 @@ iwm_rx_mpdu(struct iwm_softc *sc, struct mbuf *m, uint32_t offset, IWM_DPRINTF(sc, IWM_DEBUG_RECV, "inputall m %p\n", m); ieee80211_input_mimo_all(ic, m); } - NET_EPOCH_EXIT(et); - IWM_LOCK(sc); return true; diff --git a/sys/dev/iwn/if_iwn.c b/sys/dev/iwn/if_iwn.c index 4091bf135ae1..8433c16cce23 100644 --- a/sys/dev/iwn/if_iwn.c +++ b/sys/dev/iwn/if_iwn.c @@ -3020,7 +3020,6 @@ static void iwn_rx_done(struct iwn_softc *sc, struct iwn_rx_desc *desc, struct iwn_rx_data *data) { - struct epoch_tracker et; struct iwn_ops *ops = &sc->ops; struct ieee80211com *ic = &sc->sc_ic; struct iwn_rx_ring *ring = &sc->rxq; @@ -3180,7 +3179,6 @@ iwn_rx_done(struct iwn_softc *sc, struct iwn_rx_desc *desc, } IWN_UNLOCK(sc); - NET_EPOCH_ENTER(et); /* Send the frame to the 802.11 layer. */ if (ni != NULL) { @@ -3192,7 +3190,6 @@ iwn_rx_done(struct iwn_softc *sc, struct iwn_rx_desc *desc, } else (void)ieee80211_input_all(ic, m, rssi - nf, nf); - NET_EPOCH_EXIT(et); IWN_LOCK(sc); DPRINTF(sc, IWN_DEBUG_TRACE, "->%s: end\n",__func__); diff --git a/sys/dev/malo/if_malo.c b/sys/dev/malo/if_malo.c index 17c1c5145ee3..5f8a4c0b4099 100644 --- a/sys/dev/malo/if_malo.c +++ b/sys/dev/malo/if_malo.c @@ -1935,7 +1935,6 @@ malo_set_channel(struct ieee80211com *ic) static void malo_rx_proc(void *arg, int npending) { - struct epoch_tracker et; struct malo_softc *sc = arg; struct ieee80211com *ic = &sc->malo_ic; struct malo_rxbuf *bf; @@ -2068,13 +2067,11 @@ malo_rx_proc(void *arg, int npending) /* dispatch */ ni = ieee80211_find_rxnode(ic, (struct ieee80211_frame_min *)wh); - NET_EPOCH_ENTER(et); if (ni != NULL) { (void) ieee80211_input(ni, m, rssi, ds->nf); ieee80211_free_node(ni); } else (void) ieee80211_input_all(ic, m, rssi, ds->nf); - NET_EPOCH_EXIT(et); rx_next: /* NB: ignore ENOMEM so we process more descriptors */ (void) malo_rxbuf_init(sc, bf); diff --git a/sys/dev/mwl/if_mwl.c b/sys/dev/mwl/if_mwl.c index 69489d5ee2ec..5d726cbb18fe 100644 --- a/sys/dev/mwl/if_mwl.c +++ b/sys/dev/mwl/if_mwl.c @@ -2604,7 +2604,6 @@ cvtrssi(uint8_t ssi) static void mwl_rx_proc(void *arg, int npending) { - struct epoch_tracker et; struct mwl_softc *sc = arg; struct ieee80211com *ic = &sc->sc_ic; struct mwl_rxbuf *bf; @@ -2793,8 +2792,6 @@ mwl_rx_proc(void *arg, int npending) /* dispatch */ ni = ieee80211_find_rxnode(ic, (const struct ieee80211_frame_min *) wh); - - NET_EPOCH_ENTER(et); if (ni != NULL) { mn = MWL_NODE(ni); #ifdef MWL_ANT_INFO_SUPPORT @@ -2810,7 +2807,6 @@ mwl_rx_proc(void *arg, int npending) ieee80211_free_node(ni); } else (void) ieee80211_input_all(ic, m, rssi, nf); - NET_EPOCH_EXIT(et); rx_next: /* NB: ignore ENOMEM so we process more descriptors */ (void) mwl_rxbuf_init(sc, bf); diff --git a/sys/dev/otus/if_otus.c b/sys/dev/otus/if_otus.c index 4696cfa08d2b..9fb2af8aed90 100644 --- a/sys/dev/otus/if_otus.c +++ b/sys/dev/otus/if_otus.c @@ -1804,7 +1804,6 @@ otus_rxeof(struct usb_xfer *xfer, struct otus_data *data, struct mbufq *rxq) static void otus_bulk_rx_callback(struct usb_xfer *xfer, usb_error_t error) { - struct epoch_tracker et; struct otus_softc *sc = usbd_xfer_softc(xfer); struct ieee80211com *ic = &sc->sc_ic; struct ieee80211_frame *wh; @@ -1855,7 +1854,6 @@ tr_setup: * callback and safe to unlock. */ OTUS_UNLOCK(sc); - NET_EPOCH_ENTER(et); while ((m = mbufq_dequeue(&scrx)) != NULL) { wh = mtod(m, struct ieee80211_frame *); ni = ieee80211_find_rxnode(ic, @@ -1868,7 +1866,6 @@ tr_setup: } else (void)ieee80211_input_mimo_all(ic, m); } - NET_EPOCH_EXIT(et); #ifdef IEEE80211_SUPPORT_SUPERG ieee80211_ff_age_all(ic, 100); #endif diff --git a/sys/dev/ral/rt2560.c b/sys/dev/ral/rt2560.c index 4ae46b66ae49..d7cafe1994c9 100644 --- a/sys/dev/ral/rt2560.c +++ b/sys/dev/ral/rt2560.c @@ -1083,7 +1083,6 @@ rt2560_prio_intr(struct rt2560_softc *sc) static void rt2560_decryption_intr(struct rt2560_softc *sc) { - struct epoch_tracker et; struct ieee80211com *ic = &sc->sc_ic; struct rt2560_rx_desc *desc; struct rt2560_rx_data *data; @@ -1194,13 +1193,12 @@ rt2560_decryption_intr(struct rt2560_softc *sc) wh = mtod(m, struct ieee80211_frame *); ni = ieee80211_find_rxnode(ic, (struct ieee80211_frame_min *)wh); - NET_EPOCH_ENTER(et); if (ni != NULL) { (void) ieee80211_input(ni, m, rssi, nf); ieee80211_free_node(ni); } else (void) ieee80211_input_all(ic, m, rssi, nf); - NET_EPOCH_EXIT(et); + RAL_LOCK(sc); sc->sc_flags &= ~RT2560_F_INPUT_RUNNING; skip: desc->flags = htole32(RT2560_RX_BUSY); diff --git a/sys/dev/ral/rt2661.c b/sys/dev/ral/rt2661.c index 14bd808a6a7f..1194ef12189f 100644 --- a/sys/dev/ral/rt2661.c +++ b/sys/dev/ral/rt2661.c @@ -955,7 +955,6 @@ rt2661_tx_dma_intr(struct rt2661_softc *sc, struct rt2661_tx_ring *txq) static void rt2661_rx_intr(struct rt2661_softc *sc) { - struct epoch_tracker et; struct ieee80211com *ic = &sc->sc_ic; struct rt2661_rx_desc *desc; struct rt2661_rx_data *data; @@ -1072,13 +1071,11 @@ rt2661_rx_intr(struct rt2661_softc *sc) /* send the frame to the 802.11 layer */ ni = ieee80211_find_rxnode(ic, (struct ieee80211_frame_min *)wh); - NET_EPOCH_ENTER(et); if (ni != NULL) { (void) ieee80211_input(ni, m, rssi, nf); ieee80211_free_node(ni); } else (void) ieee80211_input_all(ic, m, rssi, nf); - NET_EPOCH_EXIT(et); RAL_LOCK(sc); sc->sc_flags &= ~RAL_INPUT_RUNNING; diff --git a/sys/dev/ral/rt2860.c b/sys/dev/ral/rt2860.c index 1a1047e26097..122764012ce3 100644 --- a/sys/dev/ral/rt2860.c +++ b/sys/dev/ral/rt2860.c @@ -1176,7 +1176,6 @@ rt2860_maxrssi_chain(struct rt2860_softc *sc, const struct rt2860_rxwi *rxwi) static void rt2860_rx_intr(struct rt2860_softc *sc) { - struct epoch_tracker et; struct rt2860_rx_radiotap_header *tap; struct ieee80211com *ic = &sc->sc_ic; struct ieee80211_frame *wh; @@ -1324,13 +1323,11 @@ rt2860_rx_intr(struct rt2860_softc *sc) /* send the frame to the 802.11 layer */ ni = ieee80211_find_rxnode(ic, (struct ieee80211_frame_min *)wh); - NET_EPOCH_ENTER(et); if (ni != NULL) { (void)ieee80211_input(ni, m, rssi - nf, nf); ieee80211_free_node(ni); } else (void)ieee80211_input_all(ic, m, rssi - nf, nf); - NET_EPOCH_EXIT(et); RAL_LOCK(sc); diff --git a/sys/dev/rtwn/pci/rtwn_pci_rx.c b/sys/dev/rtwn/pci/rtwn_pci_rx.c index 3bc033716a9e..7f06725afb0e 100644 --- a/sys/dev/rtwn/pci/rtwn_pci_rx.c +++ b/sys/dev/rtwn/pci/rtwn_pci_rx.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include @@ -83,7 +82,6 @@ rtwn_pci_setup_rx_desc(struct rtwn_pci_softc *pc, static void rtwn_pci_rx_frame(struct rtwn_pci_softc *pc) { - struct epoch_tracker et; struct rtwn_softc *sc = &pc->pc_sc; struct rtwn_rx_ring *ring = &pc->rx_ring; struct rtwn_rx_stat_pci *rx_desc = &ring->desc[ring->cur]; @@ -163,15 +161,12 @@ rtwn_pci_rx_frame(struct rtwn_pci_softc *pc) /* Send the frame to the 802.11 layer. */ RTWN_UNLOCK(sc); - - NET_EPOCH_ENTER(et); if (ni != NULL) { (void)ieee80211_input_mimo(ni, m); /* Node is no longer needed. */ ieee80211_free_node(ni); } else (void)ieee80211_input_mimo_all(ic, m); - NET_EPOCH_EXIT(et); RTWN_LOCK(sc); diff --git a/sys/dev/rtwn/usb/rtwn_usb_rx.c b/sys/dev/rtwn/usb/rtwn_usb_rx.c index 30921bdc2101..5db967ddcc18 100644 --- a/sys/dev/rtwn/usb/rtwn_usb_rx.c +++ b/sys/dev/rtwn/usb/rtwn_usb_rx.c @@ -361,7 +361,6 @@ rtwn_rx_frame(struct rtwn_softc *sc, struct mbuf *m) void rtwn_bulk_rx_callback(struct usb_xfer *xfer, usb_error_t error) { - struct epoch_tracker et; struct rtwn_usb_softc *uc = usbd_xfer_softc(xfer); struct rtwn_softc *sc = &uc->uc_sc; struct ieee80211com *ic = &sc->sc_ic; @@ -404,7 +403,6 @@ tr_setup: m->m_pkthdr.PH_loc.ptr = rtwn_rx_frame(sc, m); m = m->m_nextpkt; } - NET_EPOCH_ENTER(et); RTWN_UNLOCK(sc); m = m0; while (m != NULL) { @@ -422,7 +420,6 @@ tr_setup: m = next; } RTWN_LOCK(sc); - NET_EPOCH_EXIT(et); break; default: /* needs it to the inactive queue due to a error. */ diff --git a/sys/dev/usb/wlan/if_rsu.c b/sys/dev/usb/wlan/if_rsu.c index dd23f313a524..1cb38f3d40b3 100644 --- a/sys/dev/usb/wlan/if_rsu.c +++ b/sys/dev/usb/wlan/if_rsu.c @@ -2555,7 +2555,6 @@ rsu_rxeof(struct usb_xfer *xfer, struct rsu_data *data) static void rsu_bulk_rx_callback(struct usb_xfer *xfer, usb_error_t error) { - struct epoch_tracker et; struct rsu_softc *sc = usbd_xfer_softc(xfer); struct ieee80211com *ic = &sc->sc_ic; struct ieee80211_node *ni; @@ -2590,7 +2589,6 @@ tr_setup: * ieee80211_input() because here is at the end of a USB * callback and safe to unlock. */ - NET_EPOCH_ENTER(et); while (m != NULL) { next = m->m_next; m->m_next = NULL; @@ -2609,7 +2607,6 @@ tr_setup: RSU_LOCK(sc); m = next; } - NET_EPOCH_EXIT(et); break; default: /* needs it to the inactive queue due to a error. */ diff --git a/sys/dev/usb/wlan/if_rum.c b/sys/dev/usb/wlan/if_rum.c index 364f02393d8d..f97e7e477026 100644 --- a/sys/dev/usb/wlan/if_rum.c +++ b/sys/dev/usb/wlan/if_rum.c @@ -1168,7 +1168,6 @@ rum_bulk_read_callback(struct usb_xfer *xfer, usb_error_t error) struct ieee80211com *ic = &sc->sc_ic; struct ieee80211_frame_min *wh; struct ieee80211_node *ni; - struct epoch_tracker et; struct mbuf *m = NULL; struct usb_page_cache *pc; uint32_t flags; @@ -1287,7 +1286,6 @@ tr_setup: else ni = NULL; - NET_EPOCH_ENTER(et); if (ni != NULL) { (void) ieee80211_input(ni, m, rssi, RT2573_NOISE_FLOOR); @@ -1295,7 +1293,6 @@ tr_setup: } else (void) ieee80211_input_all(ic, m, rssi, RT2573_NOISE_FLOOR); - NET_EPOCH_EXIT(et); } RUM_LOCK(sc); rum_start(sc); diff --git a/sys/dev/usb/wlan/if_run.c b/sys/dev/usb/wlan/if_run.c index 8eca1a8ab0b4..9df50534ec00 100644 --- a/sys/dev/usb/wlan/if_run.c +++ b/sys/dev/usb/wlan/if_run.c @@ -2870,7 +2870,6 @@ run_rx_frame(struct run_softc *sc, struct mbuf *m, uint32_t dmalen) struct ieee80211com *ic = &sc->sc_ic; struct ieee80211_frame *wh; struct ieee80211_node *ni; - struct epoch_tracker et; struct rt2870_rxd *rxd; struct rt2860_rxwi *rxwi; uint32_t flags; @@ -2993,14 +2992,12 @@ run_rx_frame(struct run_softc *sc, struct mbuf *m, uint32_t dmalen) } } - NET_EPOCH_ENTER(et); if (ni != NULL) { (void)ieee80211_input(ni, m, rssi, nf); ieee80211_free_node(ni); } else { (void)ieee80211_input_all(ic, m, rssi, nf); } - NET_EPOCH_EXIT(et); return; diff --git a/sys/dev/usb/wlan/if_uath.c b/sys/dev/usb/wlan/if_uath.c index 86c7eb6b2bdd..7d5e50590ea2 100644 --- a/sys/dev/usb/wlan/if_uath.c +++ b/sys/dev/usb/wlan/if_uath.c @@ -2703,7 +2703,6 @@ uath_bulk_rx_callback(struct usb_xfer *xfer, usb_error_t error) struct ieee80211com *ic = &sc->sc_ic; struct ieee80211_frame *wh; struct ieee80211_node *ni; - struct epoch_tracker et; struct mbuf *m = NULL; struct uath_data *data; struct uath_rx_desc *desc = NULL; @@ -2750,7 +2749,6 @@ setup: ni = ieee80211_find_rxnode(ic, (struct ieee80211_frame_min *)wh); nf = -95; /* XXX */ - NET_EPOCH_ENTER(et); if (ni != NULL) { (void) ieee80211_input(ni, m, (int)be32toh(desc->rssi), nf); @@ -2759,7 +2757,6 @@ setup: } else (void) ieee80211_input_all(ic, m, (int)be32toh(desc->rssi), nf); - NET_EPOCH_EXIT(et); m = NULL; desc = NULL; } diff --git a/sys/dev/usb/wlan/if_upgt.c b/sys/dev/usb/wlan/if_upgt.c index 9d3a11e961c4..200b1d9264d9 100644 --- a/sys/dev/usb/wlan/if_upgt.c +++ b/sys/dev/usb/wlan/if_upgt.c @@ -2209,7 +2209,6 @@ upgt_bulk_rx_callback(struct usb_xfer *xfer, usb_error_t error) struct ieee80211com *ic = &sc->sc_ic; struct ieee80211_frame *wh; struct ieee80211_node *ni; - struct epoch_tracker et; struct mbuf *m = NULL; struct upgt_data *data; int8_t nf; @@ -2247,14 +2246,12 @@ setup: ni = ieee80211_find_rxnode(ic, (struct ieee80211_frame_min *)wh); nf = -95; /* XXX */ - NET_EPOCH_ENTER(et); if (ni != NULL) { (void) ieee80211_input(ni, m, rssi, nf); /* node is no longer needed */ ieee80211_free_node(ni); } else (void) ieee80211_input_all(ic, m, rssi, nf); - NET_EPOCH_EXIT(et); m = NULL; } UPGT_LOCK(sc); diff --git a/sys/dev/usb/wlan/if_ural.c b/sys/dev/usb/wlan/if_ural.c index e55faab226ba..9e9e92230e3a 100644 --- a/sys/dev/usb/wlan/if_ural.c +++ b/sys/dev/usb/wlan/if_ural.c @@ -848,7 +848,6 @@ ural_bulk_read_callback(struct usb_xfer *xfer, usb_error_t error) struct ural_softc *sc = usbd_xfer_softc(xfer); struct ieee80211com *ic = &sc->sc_ic; struct ieee80211_node *ni; - struct epoch_tracker et; struct mbuf *m = NULL; struct usb_page_cache *pc; uint32_t flags; @@ -929,13 +928,11 @@ tr_setup: if (m) { ni = ieee80211_find_rxnode(ic, mtod(m, struct ieee80211_frame_min *)); - NET_EPOCH_ENTER(et); if (ni != NULL) { (void) ieee80211_input(ni, m, rssi, nf); ieee80211_free_node(ni); } else (void) ieee80211_input_all(ic, m, rssi, nf); - NET_EPOCH_EXIT(et); } RAL_LOCK(sc); ural_start(sc); diff --git a/sys/dev/usb/wlan/if_urtw.c b/sys/dev/usb/wlan/if_urtw.c index b159c513a126..cf02bd1dfb5b 100644 --- a/sys/dev/usb/wlan/if_urtw.c +++ b/sys/dev/usb/wlan/if_urtw.c @@ -4041,7 +4041,6 @@ urtw_bulk_rx_callback(struct usb_xfer *xfer, usb_error_t error) struct urtw_softc *sc = usbd_xfer_softc(xfer); struct ieee80211com *ic = &sc->sc_ic; struct ieee80211_node *ni; - struct epoch_tracker et; struct mbuf *m = NULL; struct urtw_data *data; int8_t nf = -95; @@ -4085,14 +4084,12 @@ setup: } else ni = NULL; - NET_EPOCH_ENTER(et); if (ni != NULL) { (void) ieee80211_input(ni, m, rssi, nf); /* node is no longer needed */ ieee80211_free_node(ni); } else (void) ieee80211_input_all(ic, m, rssi, nf); - NET_EPOCH_EXIT(et); m = NULL; } URTW_LOCK(sc); diff --git a/sys/dev/usb/wlan/if_zyd.c b/sys/dev/usb/wlan/if_zyd.c index 110bba2fa9fa..aa0942c069da 100644 --- a/sys/dev/usb/wlan/if_zyd.c +++ b/sys/dev/usb/wlan/if_zyd.c @@ -2219,7 +2219,6 @@ zyd_bulk_read_callback(struct usb_xfer *xfer, usb_error_t error) struct zyd_softc *sc = usbd_xfer_softc(xfer); struct ieee80211com *ic = &sc->sc_ic; struct ieee80211_node *ni; - struct epoch_tracker et; struct zyd_rx_desc desc; struct mbuf *m; struct usb_page_cache *pc; @@ -2275,7 +2274,6 @@ tr_setup: * "ieee80211_input" here, and not some lines up! */ ZYD_UNLOCK(sc); - NET_EPOCH_ENTER(et); for (i = 0; i < sc->sc_rx_count; i++) { rssi = sc->sc_rx_data[i].rssi; m = sc->sc_rx_data[i].m; @@ -2291,7 +2289,6 @@ tr_setup: } else (void)ieee80211_input_all(ic, m, rssi, nf); } - NET_EPOCH_EXIT(et); ZYD_LOCK(sc); zyd_start(sc); break; diff --git a/sys/dev/wpi/if_wpi.c b/sys/dev/wpi/if_wpi.c index 93c5bf0a60fd..0a5996cf1d97 100644 --- a/sys/dev/wpi/if_wpi.c +++ b/sys/dev/wpi/if_wpi.c @@ -1907,7 +1907,6 @@ static void wpi_rx_done(struct wpi_softc *sc, struct wpi_rx_desc *desc, struct wpi_rx_data *data) { - struct epoch_tracker et; struct ieee80211com *ic = &sc->sc_ic; struct wpi_rx_ring *ring = &sc->rxq; struct wpi_rx_stat *stat; @@ -2027,7 +2026,6 @@ wpi_rx_done(struct wpi_softc *sc, struct wpi_rx_desc *desc, } WPI_UNLOCK(sc); - NET_EPOCH_ENTER(et); /* Send the frame to the 802.11 layer. */ if (ni != NULL) { @@ -2037,7 +2035,6 @@ wpi_rx_done(struct wpi_softc *sc, struct wpi_rx_desc *desc, } else (void)ieee80211_input_all(ic, m, stat->rssi, WPI_RSSI_OFFSET); - NET_EPOCH_EXIT(et); WPI_LOCK(sc); return; diff --git a/sys/dev/wtap/if_wtap.c b/sys/dev/wtap/if_wtap.c index 05487572c242..ddb0cb466297 100644 --- a/sys/dev/wtap/if_wtap.c +++ b/sys/dev/wtap/if_wtap.c @@ -439,7 +439,6 @@ wtap_inject(struct wtap_softc *sc, struct mbuf *m) static void wtap_rx_proc(void *arg, int npending) { - struct epoch_tracker et; struct wtap_softc *sc = (struct wtap_softc *)arg; struct ieee80211com *ic = &sc->sc_ic; struct mbuf *m; @@ -480,7 +479,6 @@ wtap_rx_proc(void *arg, int npending) ni = ieee80211_find_rxnode_withkey(ic, mtod(m, const struct ieee80211_frame_min *), IEEE80211_KEYIX_NONE); - NET_EPOCH_ENTER(et); if (ni != NULL) { /* * Sending station is known, dispatch directly. @@ -490,8 +488,7 @@ wtap_rx_proc(void *arg, int npending) } else { type = ieee80211_input_all(ic, m, 1<<7, 10); } - NET_EPOCH_EXIT(et); - + /* The mbufs are freed by the Net80211 stack */ free(bf, M_WTAP_RXBUF); } diff --git a/sys/net80211/ieee80211_hostap.c b/sys/net80211/ieee80211_hostap.c index dcbcffbe09a0..2a90353938ff 100644 --- a/sys/net80211/ieee80211_hostap.c +++ b/sys/net80211/ieee80211_hostap.c @@ -422,6 +422,8 @@ hostap_deliver_data(struct ieee80211vap *vap, (void) ieee80211_vap_xmitpkt(vap, mcopy); } if (m != NULL) { + struct epoch_tracker et; + /* * Mark frame as coming from vap's interface. */ @@ -438,7 +440,9 @@ hostap_deliver_data(struct ieee80211vap *vap, m->m_pkthdr.ether_vtag = ni->ni_vlan; m->m_flags |= M_VLANTAG; } + NET_EPOCH_ENTER(et); ifp->if_input(ifp, m); + NET_EPOCH_EXIT(et); } } diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c index a1db4a50c2ce..f2da4852485a 100644 --- a/sys/net80211/ieee80211_input.c +++ b/sys/net80211/ieee80211_input.c @@ -273,6 +273,7 @@ void ieee80211_deliver_data(struct ieee80211vap *vap, struct ieee80211_node *ni, struct mbuf *m) { + struct epoch_tracker et; struct ether_header *eh = mtod(m, struct ether_header *); struct ifnet *ifp = vap->iv_ifp; @@ -303,7 +304,9 @@ ieee80211_deliver_data(struct ieee80211vap *vap, m->m_pkthdr.ether_vtag = ni->ni_vlan; m->m_flags |= M_VLANTAG; } + NET_EPOCH_ENTER(et); ifp->if_input(ifp, m); + NET_EPOCH_EXIT(et); } struct mbuf * From nobody Wed Jun 12 23:12:36 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W01Xh4yJCz5NfTY; Wed, 12 Jun 2024 23:12:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W01Xh4WH6z4Zx4; Wed, 12 Jun 2024 23:12:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718233956; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gcvZwy4BiUlDcaS5FeBMuswpaEdgkzI7ygHLnc7nfls=; b=pPEwmrbMjEtIibjhcH/fTgy63GNVQ74QZxgxxW0JMpopeOiZEmlwjDUubKsKUgf2AtU3uw nHchC/YcK4CrDUciSv3bKjSpR5QF87h5VMsx09Q1X+UxcpK5+E/dG8YqEIqZD6+lUrJqKM CuJhVu+rX/pk15Aa2GRyqP7d2kCJo8GWF9QouCfyYxWUSaVrLKpLz/7Ns8+Zx9a2NISJeb ioJ378517fiEOqQ8XvG1evcJThSHOxefqcnEzlNzfACWJa7xoikLgL7vad44GhtlCGOam0 m4wo9d402PfJDLm1zPqk3Q3+FoucLlPJMuwHanqJR5dhXrTsA28b0wFb7bsezQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718233956; a=rsa-sha256; cv=none; b=DChWFgIuJ6pkV0idOmdjcwdN2iJe92hsBbst9JoFREQrnXxXXniqKp8SD5F6G3XW98+qSW Fcmic05jdxAC//G/jYsew52ICw9UYl2BF3ULl6XbqXQAQBHunkXfm3Du+XLHJjqcqVzWcY gxl5yS41g5DASEBzMwcsvn2fZOGGFAMeZFO0k8HADutVKfjZk9O2IyDwfUJMkxhsqv5N9H SrYutKhwKUyC8Dtp2GiM+6EqH9d+BYpjpPA++WL4KPZ6bshOC2KbIteQ0YXDq0BDwibeO3 DB3GW7BLcWB/U9rZUXWFyAUTguZP+04WC5pr52YIO7kIa5Zt+UXJOBNoSGZKUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718233956; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gcvZwy4BiUlDcaS5FeBMuswpaEdgkzI7ygHLnc7nfls=; b=PK1+Pt3HUAiS6BytnUr+SPoW7G4dqrb0FuayHMIf5j5wP4yBz6o3Eslu8Jkf6lKXYmGe0y HIAWUfT+itzekdlPkeGM9K1vAJJvUC0gFcTpfoegZexTcWTzbSp3e/eRDVKFF4efY5CBGm zeFuE/H3B72h05TD9p1lEn5n29qEucA6e+kghXK2xC45spI8dJTwQ+TLnXvX0ebNxaACnE gdOFqjMyQU7NlqXgzqRifg625vbafPUE22EhBSEbO+QVv1dK5aOAPk4eDZRD0zQdg+Sg2F HcDpvgWG2QMpvxxJEiwpX3ec0Kn/ARRIgERg/qe9mmi/xftK8v0HCdHCNC7MFQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W01Xh46fBz1Bgq; Wed, 12 Jun 2024 23:12:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CNCakh011186; Wed, 12 Jun 2024 23:12:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CNCafr011183; Wed, 12 Jun 2024 23:12:36 GMT (envelope-from git) Date: Wed, 12 Jun 2024 23:12:36 GMT Message-Id: <202406122312.45CNCafr011183@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: ec1f285f2e63 - main - nfscl: Add support for the NFSv4.1/4.2 WANT_xxx flags List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ec1f285f2e631b8aae3e08b3f68c6451a45c0941 Auto-Submitted: auto-generated The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=ec1f285f2e631b8aae3e08b3f68c6451a45c0941 commit ec1f285f2e631b8aae3e08b3f68c6451a45c0941 Author: Rick Macklem AuthorDate: 2024-06-12 23:11:10 +0000 Commit: Rick Macklem CommitDate: 2024-06-12 23:11:10 +0000 nfscl: Add support for the NFSv4.1/4.2 WANT_xxx flags NFSv4.1/4.2 defined new OPEN_WANT_xxx flags that a client can use to hint to the server that delegations are or are not wanted. This patch adds use of those delegations to the client. This patch should only affect the NFSv4.1/4.2 behaviour when delegations are enabled, which is not the default. MFC after: 1 month --- sys/fs/nfsclient/nfs_clrpcops.c | 77 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 68 insertions(+), 9 deletions(-) diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index 8c5532268287..13bdc74655dd 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -389,13 +389,24 @@ nfsrpc_open(vnode_t vp, int amode, struct ucred *cred, NFSPROC_T *p) mode |= NFSV4OPEN_ACCESSREAD; if (amode & FWRITE) mode |= NFSV4OPEN_ACCESSWRITE; + if (NFSHASNFSV4N(nmp)) { + if (!NFSHASPNFS(nmp) && nfscl_enablecallb != 0 && + nfs_numnfscbd > 0) { + if ((mode & NFSV4OPEN_ACCESSWRITE) != 0) + mode |= NFSV4OPEN_WANTWRITEDELEG; + else + mode |= NFSV4OPEN_WANTANYDELEG; + } else + mode |= NFSV4OPEN_WANTNODELEG; + } nfhp = np->n_fhp; retrycnt = 0; do { dp = NULL; - error = nfscl_open(vp, nfhp->nfh_fh, nfhp->nfh_len, mode, 1, - cred, p, NULL, &op, &newone, &ret, 1, true); + error = nfscl_open(vp, nfhp->nfh_fh, nfhp->nfh_len, + (mode & NFSV4OPEN_ACCESSBOTH), 1, cred, p, NULL, + &op, &newone, &ret, 1, true); if (error) { return (error); } @@ -547,7 +558,8 @@ nfsrpc_openrpc(struct nfsmount *nmp, vnode_t vp, u_int8_t *nfhp, int fhlen, cred); NFSM_BUILD(tl, u_int32_t *, 5 * NFSX_UNSIGNED); *tl++ = txdr_unsigned(op->nfso_own->nfsow_seqid); - *tl++ = txdr_unsigned(mode & NFSV4OPEN_ACCESSBOTH); + *tl++ = txdr_unsigned(mode & (NFSV4OPEN_ACCESSBOTH | + NFSV4OPEN_WANTDELEGMASK)); *tl++ = txdr_unsigned((mode >> NFSLCK_SHIFT) & NFSV4OPEN_DENYBOTH); tsep = nfsmnt_mdssession(nmp); *tl++ = tsep->nfsess_clientid.lval[0]; @@ -664,6 +676,13 @@ nfsrpc_openrpc(struct nfsmount *nmp, vnode_t vp, u_int8_t *nfhp, int fhlen, &ret, &acesize, p); if (error) goto nfsmout; + } else if (deleg == NFSV4OPEN_DELEGATENONEEXT && + NFSHASNFSV4N(nmp)) { + NFSM_DISSECT(tl, uint32_t *, NFSX_UNSIGNED); + deleg = fxdr_unsigned(uint32_t, *tl); + if (deleg == NFSV4OPEN_CONTENTION || + deleg == NFSV4OPEN_RESOURCE) + NFSM_DISSECT(tl, uint32_t *, NFSX_UNSIGNED); } else if (deleg != NFSV4OPEN_DELEGATENONE) { error = NFSERR_BADXDR; goto nfsmout; @@ -1546,7 +1565,7 @@ nfsrpc_lookup(vnode_t dvp, char *name, int len, struct ucred *cred, NFSM_BUILD(tl, uint32_t *, 6 * NFSX_UNSIGNED); *tl++ = txdr_unsigned(NFSV4OP_OPEN); *tl++ = 0; /* seqid, ignored. */ - *tl++ = txdr_unsigned(openmode); + *tl++ = txdr_unsigned(openmode | NFSV4OPEN_WANTNODELEG); *tl++ = txdr_unsigned(NFSV4OPEN_DENYNONE); *tl++ = 0; /* ClientID, ignored. */ *tl = 0; @@ -1668,6 +1687,13 @@ nfsrpc_lookup(vnode_t dvp, char *name, int len, struct ucred *cred, ndp->nfsdl_stateid.other[0] = *tl++; ndp->nfsdl_stateid.other[1] = *tl++; ndp->nfsdl_stateid.other[2] = *tl++; + } else if (deleg == NFSV4OPEN_DELEGATENONEEXT && + NFSHASNFSV4N(nmp)) { + NFSM_DISSECT(tl, uint32_t *, NFSX_UNSIGNED); + deleg = fxdr_unsigned(uint32_t, *tl); + if (deleg == NFSV4OPEN_CONTENTION || + deleg == NFSV4OPEN_RESOURCE) + NFSM_DISSECT(tl, uint32_t *, NFSX_UNSIGNED); } else if (deleg != NFSV4OPEN_DELEGATENONE) { error = NFSERR_BADXDR; goto nfsmout; @@ -2595,8 +2621,17 @@ nfsrpc_createv4(vnode_t dvp, char *name, int namelen, struct vattr *vap, */ NFSM_BUILD(tl, u_int32_t *, 5 * NFSX_UNSIGNED); *tl++ = txdr_unsigned(owp->nfsow_seqid); - *tl++ = txdr_unsigned(NFSV4OPEN_ACCESSWRITE | - NFSV4OPEN_ACCESSREAD); + if (NFSHASNFSV4N(nmp)) { + if (!NFSHASPNFS(nmp) && nfscl_enablecallb != 0 && + nfs_numnfscbd > 0) + *tl++ = txdr_unsigned(NFSV4OPEN_ACCESSWRITE | + NFSV4OPEN_ACCESSREAD | NFSV4OPEN_WANTWRITEDELEG); + else + *tl++ = txdr_unsigned(NFSV4OPEN_ACCESSWRITE | + NFSV4OPEN_ACCESSREAD | NFSV4OPEN_WANTNODELEG); + } else + *tl++ = txdr_unsigned(NFSV4OPEN_ACCESSWRITE | + NFSV4OPEN_ACCESSREAD); *tl++ = txdr_unsigned(NFSV4OPEN_DENYNONE); tsep = nfsmnt_mdssession(nmp); *tl++ = tsep->nfsess_clientid.lval[0]; @@ -2714,6 +2749,13 @@ nfsrpc_createv4(vnode_t dvp, char *name, int namelen, struct vattr *vap, &ret, &acesize, p); if (error) goto nfsmout; + } else if (deleg == NFSV4OPEN_DELEGATENONEEXT && + NFSHASNFSV4N(nmp)) { + NFSM_DISSECT(tl, uint32_t *, NFSX_UNSIGNED); + deleg = fxdr_unsigned(uint32_t, *tl); + if (deleg == NFSV4OPEN_CONTENTION || + deleg == NFSV4OPEN_RESOURCE) + NFSM_DISSECT(tl, uint32_t *, NFSX_UNSIGNED); } else if (deleg != NFSV4OPEN_DELEGATENONE) { error = NFSERR_BADXDR; goto nfsmout; @@ -8109,7 +8151,8 @@ nfsrpc_openlayoutrpc(struct nfsmount *nmp, vnode_t vp, u_int8_t *nfhp, 0, 0, cred); NFSM_BUILD(tl, uint32_t *, 5 * NFSX_UNSIGNED); *tl++ = txdr_unsigned(op->nfso_own->nfsow_seqid); - *tl++ = txdr_unsigned(mode & NFSV4OPEN_ACCESSBOTH); + *tl++ = txdr_unsigned(mode & (NFSV4OPEN_ACCESSBOTH | + NFSV4OPEN_WANTDELEGMASK)); *tl++ = txdr_unsigned((mode >> NFSLCK_SHIFT) & NFSV4OPEN_DENYBOTH); tsep = nfsmnt_mdssession(nmp); *tl++ = tsep->nfsess_clientid.lval[0]; @@ -8210,6 +8253,13 @@ nfsrpc_openlayoutrpc(struct nfsmount *nmp, vnode_t vp, u_int8_t *nfhp, &ret, &acesize, p); if (error != 0) goto nfsmout; + } else if (deleg == NFSV4OPEN_DELEGATENONEEXT && + NFSHASNFSV4N(nmp)) { + NFSM_DISSECT(tl, uint32_t *, NFSX_UNSIGNED); + deleg = fxdr_unsigned(uint32_t, *tl); + if (deleg == NFSV4OPEN_CONTENTION || + deleg == NFSV4OPEN_RESOURCE) + NFSM_DISSECT(tl, uint32_t *, NFSX_UNSIGNED); } else if (deleg != NFSV4OPEN_DELEGATENONE) { error = NFSERR_BADXDR; goto nfsmout; @@ -8301,8 +8351,17 @@ nfsrpc_createlayout(vnode_t dvp, char *name, int namelen, struct vattr *vap, */ NFSM_BUILD(tl, u_int32_t *, 5 * NFSX_UNSIGNED); *tl++ = txdr_unsigned(owp->nfsow_seqid); - *tl++ = txdr_unsigned(NFSV4OPEN_ACCESSWRITE | - NFSV4OPEN_ACCESSREAD); + if (NFSHASNFSV4N(nmp)) { + if (!NFSHASPNFS(nmp) && nfscl_enablecallb != 0 && + nfs_numnfscbd > 0) + *tl++ = txdr_unsigned(NFSV4OPEN_ACCESSWRITE | + NFSV4OPEN_ACCESSREAD | NFSV4OPEN_WANTWRITEDELEG); + else + *tl++ = txdr_unsigned(NFSV4OPEN_ACCESSWRITE | + NFSV4OPEN_ACCESSREAD | NFSV4OPEN_WANTNODELEG); + } else + *tl++ = txdr_unsigned(NFSV4OPEN_ACCESSWRITE | + NFSV4OPEN_ACCESSREAD); *tl++ = txdr_unsigned(NFSV4OPEN_DENYNONE); tsep = nfsmnt_mdssession(nmp); *tl++ = tsep->nfsess_clientid.lval[0]; From nobody Wed Jun 12 23:18:24 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W01gP1JKQz5KxBF; Wed, 12 Jun 2024 23:18:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W01gP0rGpz4bGC; Wed, 12 Jun 2024 23:18:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718234305; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mRvCl+6b5p8C552Nn8R5vVBqAGhUXkbf/f5dKWUFbyk=; b=G1wUoO8Md4BqJ7U2ZNITidP3SijF9n3M5B/AohTVi6r+AN90ZEeFwMHyTHy7kYkhhiA3UP 0QD+Ql5lWJ4Sa/WEgWtS1m9XiZwbvzm5Zxx0zgcCbhc820sHelb33c0g63RCurPaLPz70m SKLNE064hy0dBcjLqXxYqS5qo46a9IGU1g1R6oHlUFyq5N68iRtHsvn0nhlSbIroUVLttr r3DLjXOwIundVrMJVeWUs7iWK01tlFkqwJlS7jW/it6xDY3/OpXuYrsrMEnfUfmA0RvG6U xisA9wq8i3iApJpBe+ZzBCDvfYiTHnDceREWH6OtaPfK3X/x3ATFRNIlwv9QeQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718234305; a=rsa-sha256; cv=none; b=CrQ2IhXVH2HRCJy2SsKvQwGNGGU4u95aEDrjK3omBv/63fndIOIkfbSbE4+Sz11I6x+CqR g2VGmp4KZ0I3hJRwqDXf5+a/JKORLx2pWQOGR9djxnikgX0nflM4IWIDuptTFeOQqAfGhB 6pDL2nGu5zXASXE1hwrB0a3s9UupRV0CA7f6G/sgoBse8eV1SzCKs/p5sVF0L7ZqYmtnOL vJF9N4TGJUCrRPwhWfsLZ4HfOdJW1kQ5GlZ5qrbTlci3M0YH27GyxVojcg0AiZGjl5cKO4 sC8qVzkbmjDj20PIZMY7/O/yjMA+xpqwtR9C0bP/qm9BMOFMgN9hia6ts0pvMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718234305; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mRvCl+6b5p8C552Nn8R5vVBqAGhUXkbf/f5dKWUFbyk=; b=bcWn9jky5NLjwoaBb6DaNEJtZY8ujJxG2a13kGwnbL7GH3Zt78qy3jrPZudavXrI73REGX rTuxw+ZMoanT+lIQc+amYzrN05OqJJ0mvGr3OVmZA7EvzdQjAb7M715+qL5Be1qvBA3Q7O buSPFkvxlT3hhsOrS+CO7/cn+ALfHLcDJqctyjCKdR7n3IXm/MaNpmPkpO0IcHDNJtP4Yd UMNAwmwowOVyX3sQ0dwI04UTlims3OpuVzzQLVS7iGKh8cV/UZgztjqzwl8H1apLsJy7sb aULX83D2RobMVHp3HmVBNdoz5wZRR1tWjBaGmkixrXPnoPpfAk2JGHaatGDMHg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W01gP0KKMz1Bcx; Wed, 12 Jun 2024 23:18:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CNIOx1012078; Wed, 12 Jun 2024 23:18:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CNIOVa012075; Wed, 12 Jun 2024 23:18:24 GMT (envelope-from git) Date: Wed, 12 Jun 2024 23:18:24 GMT Message-Id: <202406122318.45CNIOVa012075@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: 4308d6e0fc09 - main - nfscl: Add a check for VREG for delegations List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4308d6e0fc09c807483f09b8fea7f5182d19fd01 Auto-Submitted: auto-generated The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=4308d6e0fc09c807483f09b8fea7f5182d19fd01 commit 4308d6e0fc09c807483f09b8fea7f5182d19fd01 Author: Rick Macklem AuthorDate: 2024-06-12 23:17:23 +0000 Commit: Rick Macklem CommitDate: 2024-06-12 23:17:23 +0000 nfscl: Add a check for VREG for delegations Since delegations are only issued for regular files, check v_type to see if the query is for a regular file. This is a simple optimization for the non-VREG case. While here, fix a couple of global variable declarations. This patch should only affect the NFSv4.1/4.2 behaviour when delegations are enabled, which is not the default. MFC after: 1 month --- sys/fs/nfsclient/nfs_clstate.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/fs/nfsclient/nfs_clstate.c b/sys/fs/nfsclient/nfs_clstate.c index 9fbaa6e63a56..aef5d71592af 100644 --- a/sys/fs/nfsclient/nfs_clstate.c +++ b/sys/fs/nfsclient/nfs_clstate.c @@ -93,9 +93,8 @@ NFSREQSPINLOCK; NFSCLSTATEMUTEX; int nfscl_inited = 0; struct nfsclhead nfsclhead; /* Head of clientid list */ -int nfscl_deleghighwater = NFSCLDELEGHIGHWATER; -int nfscl_layouthighwater = NFSCLLAYOUTHIGHWATER; +static int nfscl_deleghighwater = NFSCLDELEGHIGHWATER; static int nfscl_delegcnt = 0; static int nfscl_layoutcnt = 0; static int nfscl_getopen(struct nfsclownerhead *, struct nfsclopenhash *, @@ -4647,7 +4646,7 @@ nfscl_mustflush(vnode_t vp) np = VTONFS(vp); nmp = VFSTONFS(vp->v_mount); - if (!NFSHASNFSV4(nmp)) + if (!NFSHASNFSV4(nmp) || vp->v_type != VREG) return (1); NFSLOCKMNT(nmp); if ((nmp->nm_privflag & NFSMNTP_DELEGISSUED) == 0) { @@ -4687,7 +4686,7 @@ nfscl_nodeleg(vnode_t vp, int writedeleg) np = VTONFS(vp); nmp = VFSTONFS(vp->v_mount); - if (!NFSHASNFSV4(nmp)) + if (!NFSHASNFSV4(nmp) || vp->v_type != VREG) return (1); NFSLOCKMNT(nmp); if ((nmp->nm_privflag & NFSMNTP_DELEGISSUED) == 0) { From nobody Wed Jun 12 23:42:41 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W02CP6DF7z5L0Mw; Wed, 12 Jun 2024 23:42:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W02CP5lnWz4fY4; Wed, 12 Jun 2024 23:42:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718235761; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I7YEmVkBbSUH633CwiItCt8TxIV+9Hsis/xlbz6f0Tw=; b=qoLBqpbqAriQXEDS3udLEIlbduofNNAmimVQdw9AL6eHsjDiStAC5ozGLNTUl+CqX6QtAV XM5BIf6ee2jO3ociYIYVKaFhcdzFQRRZxhlkDKByD9lBK6iW1gDBH8cySfvqJXxBh3QBKw AHfG5qxRG8pmdlOqZOX1FOT2LuH3Q76QQE3mfjWKOwfZPmd+b0frE0mS+7C4hAspeeWcTT 1xgRFOMpn38Hl7yoV/9Ucnuw3x+ET8+94kHUJZbxh2blFByZEb5OsUno53QsLMtp9rY6zM jdwrNx2o0Sp1tAYc+2Bdn7dVzWILKgf3hsVINdIYqxDvp9Id3NxN4OK4YUnmwA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718235761; a=rsa-sha256; cv=none; b=Dwg8z+sWfyd4qVU2o4QtXK9BOPGtSIrn1z2ikYon1tiLuP8NRWeAy/qQrL6S6wIuFw5qsB WA60HIvEgQF+8zJIa2tZ3syf+tFYPfmKgulCcrSD+SD2uycr1Vn/q5oWP1ZDDQevBumGcm P/KC+MFGpSwjpEbEzHqYNW5WJkoMwaaEHYwTGcu5hRv1E4iJfDHE5pKNha9rHqo5xSWSTP uX6aUl9fRaZxJV8QvBJB0JZzF0AQPcNTcZfW+qsEY91LE2E1LgGFJ+7/AVlYyHfr09P0PS 2AxL2vPKWk4zVbQ2cTBKt6Lt4UG7TUnof6g0iswVok6KdSi2rFZ3KKbDEzsWuw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718235761; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I7YEmVkBbSUH633CwiItCt8TxIV+9Hsis/xlbz6f0Tw=; b=sOSFjxEI5vCSE7uw+dqIYdo2KcZm415e9nP6VAm4ZYNaHh/tOg1iHsX2w+dq4/pMJeBipZ vFGDwjhygt15ZEFCC0LcgzFE14eLdgvqewc0gdUeiSwGrV6IKN7sv5mb4L6S9kpW0zljq7 iHiDyUSNyJ9yA0Vq2bb6SfulmWk0Gf2XFblOCOiMMRD1cqpvSCBQAb1gA0+rjpByQE5PlH PXdPx+YfkxT9IrQ4XJ3rieiqJ4KH2JO8tyr7bC3zqFSUAT62dSZtZexzkfMckCnccX2vzb 05ZUNTbffSkk1BmJ7SXQ4PO8gDrAijvqLaKcUhFFxMTIAOZ6XUkdBh4eOB95EQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W02CP4qgrz1Ckk; Wed, 12 Jun 2024 23:42:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CNgfSG061390; Wed, 12 Jun 2024 23:42:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CNgfXJ061387; Wed, 12 Jun 2024 23:42:41 GMT (envelope-from git) Date: Wed, 12 Jun 2024 23:42:41 GMT Message-Id: <202406122342.45CNgfXJ061387@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: bb53f071e85a - main - nfscl: Add support for read delegations and atomic upgrade List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bb53f071e85a2ebb5b405e7fec4661a725b7caf5 Auto-Submitted: auto-generated The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=bb53f071e85a2ebb5b405e7fec4661a725b7caf5 commit bb53f071e85a2ebb5b405e7fec4661a725b7caf5 Author: Rick Macklem AuthorDate: 2024-06-12 23:41:12 +0000 Commit: Rick Macklem CommitDate: 2024-06-12 23:41:12 +0000 nfscl: Add support for read delegations and atomic upgrade For NFSv4.1/4.2, an atomic upgrade of a delegation from a read delegation to a write delegation is allowed and can result in significantly improved performance. This patch adds this upgrade to the NFSv4.1/4.2 client and enables use of read delegations. For a test case of building a FreeBSD kernel (sources and output objects) over a NFSv4.2 mount, these changes reduced the elapsed time by 30% and included a reduction of 80% for RPC counts when delegations were enabled. As such, with this patch there are at least certain cases where enabling delegations seems to be worth the increased complexity they bring. This patch should only affect the NFSv4.1/4.2 behaviour when delegations are enabled, which is not the default. MFC after: 1 month --- sys/fs/nfsclient/nfs_clstate.c | 38 ++++++++++++++++++++++---------------- sys/fs/nfsclient/nfs_clsubs.c | 6 +++--- sys/fs/nfsclient/nfs_clvnops.c | 2 +- 3 files changed, 26 insertions(+), 20 deletions(-) diff --git a/sys/fs/nfsclient/nfs_clstate.c b/sys/fs/nfsclient/nfs_clstate.c index aef5d71592af..0a1eb51e279f 100644 --- a/sys/fs/nfsclient/nfs_clstate.c +++ b/sys/fs/nfsclient/nfs_clstate.c @@ -439,18 +439,6 @@ nfscl_deleg(mount_t mp, struct nfsclclient *clp, u_int8_t *nfhp, KASSERT(mp != NULL, ("nfscl_deleg: mp NULL")); nmp = VFSTONFS(mp); - /* - * First, if we have received a Read delegation for a file on a - * read/write file system, just return it, because they aren't - * useful, imho. - */ - if (dp != NULL && !NFSMNT_RDONLY(mp) && - (dp->nfsdl_flags & NFSCLDL_READ)) { - nfscl_trydelegreturn(dp, cred, nmp, p); - free(dp, M_NFSCLDELEG); - *dpp = NULL; - return (0); - } /* * Since a delegation might be added to the mount, @@ -478,17 +466,35 @@ nfscl_deleg(mount_t mp, struct nfsclclient *clp, u_int8_t *nfhp, nfscl_delegcnt++; } else { /* - * Delegation already exists, what do we do if a new one?? + * A delegation already exists. If the new one is a Write + * delegation and the old one a Read delegation, return the + * Read delegation. Otherwise, return the new delegation. */ if (dp != NULL) { - printf("Deleg already exists!\n"); - free(dp, M_NFSCLDELEG); - *dpp = NULL; + if ((dp->nfsdl_flags & NFSCLDL_WRITE) != 0 && + (tdp->nfsdl_flags & NFSCLDL_READ) != 0) { + TAILQ_REMOVE(&clp->nfsc_deleg, tdp, nfsdl_list); + LIST_REMOVE(tdp, nfsdl_hash); + *dpp = NULL; + TAILQ_INSERT_HEAD(&clp->nfsc_deleg, dp, + nfsdl_list); + LIST_INSERT_HEAD(NFSCLDELEGHASH(clp, nfhp, + fhlen), dp, nfsdl_hash); + dp->nfsdl_timestamp = NFSD_MONOSEC + 120; + } else { + *dpp = NULL; + tdp = dp; /* Return this one. */ + } } else { *dpp = tdp; + tdp = NULL; } } NFSUNLOCKCLSTATE(); + if (tdp != NULL) { + nfscl_trydelegreturn(tdp, cred, nmp, p); + free(tdp, M_NFSCLDELEG); + } return (0); } diff --git a/sys/fs/nfsclient/nfs_clsubs.c b/sys/fs/nfsclient/nfs_clsubs.c index 80ab979d22d7..8bb51e29e1d1 100644 --- a/sys/fs/nfsclient/nfs_clsubs.c +++ b/sys/fs/nfsclient/nfs_clsubs.c @@ -188,7 +188,7 @@ ncl_getattrcache(struct vnode *vp, struct vattr *vaper) np = VTONFS(vp); vap = &np->n_vattr.na_vattr; nmp = VFSTONFS(vp->v_mount); - mustflush = nfscl_mustflush(vp); /* must be before mtx_lock() */ + mustflush = nfscl_nodeleg(vp, 0); /* must be before mtx_lock() */ NFSLOCKNODE(np); /* XXX n_mtime doesn't seem to be updated on a miss-and-reload */ timeo = (time_second - np->n_mtime.tv_sec) / 10; @@ -221,8 +221,8 @@ ncl_getattrcache(struct vnode *vp, struct vattr *vaper) (time_second - np->n_attrstamp), timeo); #endif - if ((time_second - np->n_attrstamp) >= timeo && - (mustflush != 0 || np->n_attrstamp == 0)) { + if (mustflush != 0 && (np->n_attrstamp == 0 || + time_second - np->n_attrstamp >= timeo)) { nfsstatsv1.attrcache_misses++; NFSUNLOCKNODE(np); KDTRACE_NFS_ATTRCACHE_GET_MISS(vp); diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index 76a3cdf9281e..13341dfc26e0 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -940,7 +940,7 @@ nfs_close(struct vop_close_args *ap) /* * Get attributes so "change" is up to date. */ - if (error == 0 && nfscl_mustflush(vp) != 0 && + if (error == 0 && nfscl_nodeleg(vp, 0) != 0 && vp->v_type == VREG && (VFSTONFS(vp->v_mount)->nm_flag & NFSMNT_NOCTO) == 0) { ret = nfsrpc_getattr(vp, cred, ap->a_td, &nfsva); From nobody Thu Jun 13 00:24:58 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W038B4Tm7z5L3TV; Thu, 13 Jun 2024 00:24:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W038B3tmxz4jx8; Thu, 13 Jun 2024 00:24:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718238298; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aEoJDBtzQ94yHiI3JSBqOhlPpYSPoSYItZAztl4fqII=; b=B2REi+ZgW2OpP/nr9DvMxv5X3kWTqOF6q52foH50YhpROEa46pQGz6Zx8c6kHh+QmPbeKx 8qZS0r3i0tru/64y8tphiJnA8lF88TirljYKVSSEk/8Ti+8FY+uqDU8VOPwmI6hN/vkaxH y1YvpIJRweMotW52vjqU1TjIj95kNm9s2z5kuJtbEaR7/Ij1uv+WEBVNYY5/y6IanK8NQ9 m1QtI7ObYPRWt0QhcZG0wTca5DxYMWIXHPeN4zcaxSRuLhoHBl3Dzvb/IytywM6ppt4Orp 1O+SIV1lX+XNig7tPJHax0+RtnTu9zoApsNTZSmtVHXI+0uRd4x4lprmPCW6fg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718238298; a=rsa-sha256; cv=none; b=Jn+SyrKwdbg24vtlgvRbG2+5/6vl9gqAIRFff0z8/auuMGzNh0oVF2iXFrMMHvOmOJqvvg 1T2jeV2NeGEjYF91wOqH6k5DaDKUBkcuqXC8pzyl0RvP6+m7TlBgWbj/glZ5xsBk+KU/G4 qkucwMuM64V17AtWkhAe0qCcxdBdVbunncFcJt+R8RAo0lrGqE6vtL010D+ydHjlM+CR3N +p+hmQLiDG2q6dBw+oGWRnWQk7Z+5FNz0zlcjUUXav8euZMBixeptv/L7Ouw7eQc1Gs1Zw j5iD7+B0OmxzzUYOU1AbsS/dmKWBbvLQ2tsA17kdqnu12QktRUjiPf7JnI2K9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718238298; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aEoJDBtzQ94yHiI3JSBqOhlPpYSPoSYItZAztl4fqII=; b=D1cLeXhaGcBAU92kSZl2IzwuJuhApUFqqZZQ4+2JX6+6gFHLH5+GeH6JuZVuQAfi1xhRe7 XQQxRD/7Lh3+eYJ97ugGGU2E8rZU7lt0lRA1wQ00rap8k08Uth3jdekugaKKFwpzgTt+w+ +V7GRAV8RaEc0WasJqrAK0WI/DW339pmsHS1yz80qz/sD7Lkz2Fm0XSq6IG/+PcrBW/AbO k0e/W3Qw3Dv7w7qW77JR1Ctn8IXRs/XStcqZzPsrYMcGp7CbYMBi0tVMjupBQgWW1x6Dmj D9g8SMuJ8Nm1ggaelkB/11WnaJgF4SzEdHgxKV6YUXcg992nYGNV8nPuHJ4GWA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W038B3VLXzFSl; Thu, 13 Jun 2024 00:24:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45D0Owed029922; Thu, 13 Jun 2024 00:24:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45D0OwO9029919; Thu, 13 Jun 2024 00:24:58 GMT (envelope-from git) Date: Thu, 13 Jun 2024 00:24:58 GMT Message-Id: <202406130024.45D0OwO9029919@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: a16cb8709de7 - main - tzsetup: Correct UTC description List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a16cb8709de7ddc6dd6ab71918af9fc5fd96f377 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=a16cb8709de7ddc6dd6ab71918af9fc5fd96f377 commit a16cb8709de7ddc6dd6ab71918af9fc5fd96f377 Author: Ed Maste AuthorDate: 2024-06-13 00:08:04 +0000 Commit: Ed Maste CommitDate: 2024-06-13 00:24:49 +0000 tzsetup: Correct UTC description UTC is Coordinated Universal Time, not Greenwich Mean Time. Reviewed by: imp, allanjude MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45573 --- usr.sbin/tzsetup/tzsetup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/tzsetup/tzsetup.c b/usr.sbin/tzsetup/tzsetup.c index fee5762b6fa6..617de4efb765 100644 --- a/usr.sbin/tzsetup/tzsetup.c +++ b/usr.sbin/tzsetup/tzsetup.c @@ -957,7 +957,7 @@ main(int argc, char **argv) "If it is set to local time,\n" "or you don't know, please choose NO here!"); - conf.title = "Select local or UTC (Greenwich Mean Time) clock"; + conf.title = "Select local or UTC (Coordinated Universal Time) clock"; if (bsddialog_yesno(&conf, prompt, 7, 73) == BSDDIALOG_YES) { if (reallydoit) unlink(path_wall_cmos_clock); From nobody Thu Jun 13 12:44:47 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0MYq5wW2z5NcFl; Thu, 13 Jun 2024 12:44:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0MYq54ZNz42B2; Thu, 13 Jun 2024 12:44:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718282687; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Pa9qm6iPiB2aR3TaQiZbP9WQGGtjZZAeORKAUMIIQxk=; b=ESswZaaWkzOL3QorvrYXQCLs5oEWBsaMBwOWRP6vsBe6OhtALw/mWEKm7eS0bd/qMxMsBO iRe29g+FPnasCBKOx2kNMf2YqVhLXcgNWa6baptd1n2cLe+Rt21hPAu9MEEj1WFWXdDt+F LQR5TdadHUuF6I4rRS3dHSuoVk0pxyHb8k0oNZOCZSjAStAcWrhRGzGiFfQ7aX1Wb3LJuh /d8UbsGiSVDgkEcpDVDuyE9mOYHdy3I7I458mT5/C5rPxL6kcKjt5mtIF80Cb3Dt8SJE4F Q1uq9lm9i+IxEIIysZwOtf4m436sJcWjkyJaFtw1oGYhZ0SLX8kYWokzMiieCA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718282687; a=rsa-sha256; cv=none; b=ZpFBYWMCXWINgeC9y9HcqYXO7YRiqtA0KMll+RUAdAZLj2IVwhk0yYrC1rXaT1673tRU57 03SbOJsAJChnfELODHln0zwwRJG4sbw80D55FLrsReXG1JsqotCA4nGZvtu2sOBxp6e2/Z CE8Vifl/vJUcG0X7ZfYn3qhfzMXS24jvhmUYbPb8+mXJ1+7dIRQOaSviPMJ0PBdoSvW4WO D14kv8vJ2EviP7GZasxqX2He9+igxaPochCbEweh+6XD0UJ08JztKxYDvLT7XIXht73NTM CDDrcRqzYUw0S1uGOzFccQgJxB4PZF1UXHABND6uAUAzTEwa3fEv0A17RAqB+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718282687; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Pa9qm6iPiB2aR3TaQiZbP9WQGGtjZZAeORKAUMIIQxk=; b=lo6H2GVgcA2vat+4N+dDqN0fUSj6Bm3WwgmlgH73lux4vD9UIdPk/8sFFTk+y9cMEABECs bIccJwJ3lCdPfRvU1NuKXpcwJWtYsG4Z0MdUSWZ33vMVNiaqch3sV2fgGMaNmKw+HRxH38 ms7pSQ6DkmPuXMSVTAZ2zn7CWq1iMDyOkZrKkZxPVlgesLGnKVjs8Hf/ffyWR9GYYbpEY0 +ck5SBstapfKe5ptKZIXNXENwon0b5Hg3VGZlkNY8YZzr7VUe0cM2VlPQwztXhSJAnt7ZM rQCuAm972GGMq86jdGGvxdI9ws8RUOhxYh9SQKd3NdRFJwBmMYlMWy3GYC/VUQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0MYq4H4czdM4; Thu, 13 Jun 2024 12:44:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45DCilKm080535; Thu, 13 Jun 2024 12:44:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45DCils5080532; Thu, 13 Jun 2024 12:44:47 GMT (envelope-from git) Date: Thu, 13 Jun 2024 12:44:47 GMT Message-Id: <202406131244.45DCils5080532@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 49e0e1481778 - stable/14 - pf: add sctp multihome probe points List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 49e0e148177897d0d7a6e9ac6d0413a8b38681f9 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=49e0e148177897d0d7a6e9ac6d0413a8b38681f9 commit 49e0e148177897d0d7a6e9ac6d0413a8b38681f9 Author: Kristof Provost AuthorDate: 2024-06-06 15:35:09 +0000 Commit: Kristof Provost CommitDate: 2024-06-13 12:17:34 +0000 pf: add sctp multihome probe points Add probe points to allow us to probe when we add or remove multihome addresses. Example use: pf:sctp:multihome:add { printf("Add tag %x address %x", arg0, ((struct pf_sctp_source *)arg1)->addr.v4.s_addr); } pf:sctp:multihome:remove { printf("Remove tag %x address %x", arg0, ((struct pf_sctp_source *)arg2)->addr.v4.s_addr); } MFC after: 1 week Sponsored by: Orange Business Services (cherry picked from commit f042e1515433456dca4a2be8ec8ac60c75860304) --- sys/netpfil/pf/pf.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 6874dd59c1f7..ae0c5dcf8128 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -128,6 +128,10 @@ SDT_PROBE_DEFINE5(pf, ip, state, lookup, "struct pfi_kkif *", "struct pf_kstate *"); SDT_PROBE_DEFINE4(pf, sctp, multihome, test, "struct pfi_kkif *", "struct pf_krule *", "struct mbuf *", "int"); +SDT_PROBE_DEFINE2(pf, sctp, multihome, add, "uint32_t", + "struct pf_sctp_source *"); +SDT_PROBE_DEFINE3(pf, sctp, multihome, remove, "uint32_t", + "struct pf_kstate *", "struct pf_sctp_source *"); SDT_PROBE_DEFINE3(pf, eth, test_rule, entry, "int", "struct ifnet *", "struct mbuf *"); @@ -6001,11 +6005,12 @@ pf_sctp_multihome_detach_addr(const struct pf_kstate *s) key.v_tag = s->dst.scrub->pfss_v_tag; ep = RB_FIND(pf_sctp_endpoints, &V_pf_sctp_endpoints, &key); if (ep != NULL) { - /* XXX Actually remove! */ TAILQ_FOREACH_SAFE(i, &ep->sources, entry, tmp) { if (pf_addr_cmp(&i->addr, &s->key[PF_SK_WIRE]->addr[s->direction == PF_OUT], s->key[PF_SK_WIRE]->af) == 0) { + SDT_PROBE3(pf, sctp, multihome, remove, + key.v_tag, s, i); TAILQ_REMOVE(&ep->sources, i, entry); free(i, M_PFTEMP); break; @@ -6026,6 +6031,8 @@ pf_sctp_multihome_detach_addr(const struct pf_kstate *s) if (pf_addr_cmp(&i->addr, &s->key[PF_SK_WIRE]->addr[s->direction == PF_IN], s->key[PF_SK_WIRE]->af) == 0) { + SDT_PROBE3(pf, sctp, multihome, remove, + key.v_tag, s, i); TAILQ_REMOVE(&ep->sources, i, entry); free(i, M_PFTEMP); break; @@ -6083,6 +6090,7 @@ pf_sctp_multihome_add_addr(struct pf_pdesc *pd, struct pf_addr *a, uint32_t v_ta i->af = pd->af; memcpy(&i->addr, a, sizeof(*a)); TAILQ_INSERT_TAIL(&ep->sources, i, entry); + SDT_PROBE2(pf, sctp, multihome, add, v_tag, i); PF_SCTP_ENDPOINTS_UNLOCK(); } From nobody Thu Jun 13 12:44:47 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0MYr1MYsz5Nc7Y; Thu, 13 Jun 2024 12:44:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0MYr066Pz42cw; Thu, 13 Jun 2024 12:44:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718282688; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LSEgWMBoTkClNKJeG/YwE5jh8Av6NmfZxjOq9+MZETs=; b=vpe3Mn84LqXhTHg2VypFHc+hwG3C1X9Vw/wFz7W54A50VRNrz4F6OahfPdUcj0Fge4OYmg aIu6GaGKdMIBr5brntgVnS95pJMpx1zGhxqllqTZU+jpgkpwJn2U0cW0T2hupQiztRmCo9 TSiDWq0kS3j9C6gl8oFxmoZcZH2dvwNGkuW/OMr/bVbBMQ4nB+ZfGtA22WDuJd/sDIdELF g09D94pCwy4Q/WjB/gwImLYEOOMdIWKyzvw6ZmdEyGR4ElybGON0DCbePpNd6NIFDvgv/Z 4W3trCiHiMJJ0E5GhZ+5XvjOfaXtBzaZIGye3vyCjGDjvqsqT9j6Utwkd1LV9Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718282688; a=rsa-sha256; cv=none; b=yqEXV0yv7A+JCjK/U8vGtl5U+BgaHLTJjaC8ptLIFY5rahTnnpv/MuOfV4ui/xEERWkoJ0 DmDtNAtDGNNbzXU3gnri87LROg66qeN0lTSQPbCw4JTRx/YmX8Chcj0y6A8UUpq7CFWVHr ORP/J3xgDiKqL1iQq1446ram+1n6+esCDmFfOw8ScEJVwTS37g1SAAmXuBD1xHhX8HjRbl yK//+HlNqyr1Oz9pDTcfHmBkoyi8fCIjPL5u0g3Nk/pNSk1nsEjcYHugDVEatZJFGCxGay tfP+VQ0VU1S8glCf+cS47ZO1NKXT2H9asC7W16BPTRpM4d9emyj0v66vHA46UQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718282688; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LSEgWMBoTkClNKJeG/YwE5jh8Av6NmfZxjOq9+MZETs=; b=KjVdcEaP8YLA3JIkvJo4EncGbazpIfCNcD8o7+HGQ4TOPN2goJvEQZcxou7Fuqqtrd3GWf 1Nlka+11j/HPNV8vd6SKZ1Irll4QMNilpDp9040Ehc0YJ2q+3aZ0ECcC/wv53CKjUizLuu 1xpBqFhLrtqMNzJEcDMCh34DvxbHyWZ3xaOxTtEPL+eEXNCfiFrt9wjpBigWuIueu+om5V bXNYcpY7ePRAdGJBSgjpdXvO+K0zUOpLi6QdgxA3i2RpcOBwHrmraYkg+WkKLk3PyvgOMm 3lDJOXCYj5GR/lKKmBRLn6ylv9gcP1VQRWVCn2grqvvyEpDeVH1LQdTYdr/Cww== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0MYq6T9SzdM5; Thu, 13 Jun 2024 12:44:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45DCilTJ080633; Thu, 13 Jun 2024 12:44:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45DCilX9080629; Thu, 13 Jun 2024 12:44:47 GMT (envelope-from git) Date: Thu, 13 Jun 2024 12:44:47 GMT Message-Id: <202406131244.45DCilX9080629@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 00a51ada6bed - stable/13 - pf: add sctp multihome probe points List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 00a51ada6bede2baee2da19bfa8f500ef6075fff Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=00a51ada6bede2baee2da19bfa8f500ef6075fff commit 00a51ada6bede2baee2da19bfa8f500ef6075fff Author: Kristof Provost AuthorDate: 2024-06-06 15:35:09 +0000 Commit: Kristof Provost CommitDate: 2024-06-13 12:18:19 +0000 pf: add sctp multihome probe points Add probe points to allow us to probe when we add or remove multihome addresses. Example use: pf:sctp:multihome:add { printf("Add tag %x address %x", arg0, ((struct pf_sctp_source *)arg1)->addr.v4.s_addr); } pf:sctp:multihome:remove { printf("Remove tag %x address %x", arg0, ((struct pf_sctp_source *)arg2)->addr.v4.s_addr); } MFC after: 1 week Sponsored by: Orange Business Services (cherry picked from commit f042e1515433456dca4a2be8ec8ac60c75860304) --- sys/netpfil/pf/pf.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 2c171514e946..97ae44cff69f 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -120,6 +120,10 @@ SDT_PROBE_DEFINE5(pf, ip, state, lookup, "struct pfi_kkif *", "struct pf_kstate *"); SDT_PROBE_DEFINE4(pf, sctp, multihome, test, "struct pfi_kkif *", "struct pf_krule *", "struct mbuf *", "int"); +SDT_PROBE_DEFINE2(pf, sctp, multihome, add, "uint32_t", + "struct pf_sctp_source *"); +SDT_PROBE_DEFINE3(pf, sctp, multihome, remove, "uint32_t", + "struct pf_kstate *", "struct pf_sctp_source *"); SDT_PROBE_DEFINE2(pf, purge, state, rowcount, "int", "size_t"); /* @@ -5410,11 +5414,12 @@ pf_sctp_multihome_detach_addr(const struct pf_kstate *s) key.v_tag = s->dst.scrub->pfss_v_tag; ep = RB_FIND(pf_sctp_endpoints, &V_pf_sctp_endpoints, &key); if (ep != NULL) { - /* XXX Actually remove! */ TAILQ_FOREACH_SAFE(i, &ep->sources, entry, tmp) { if (pf_addr_cmp(&i->addr, &s->key[PF_SK_WIRE]->addr[s->direction == PF_OUT], s->key[PF_SK_WIRE]->af) == 0) { + SDT_PROBE3(pf, sctp, multihome, remove, + key.v_tag, s, i); TAILQ_REMOVE(&ep->sources, i, entry); free(i, M_PFTEMP); break; @@ -5435,6 +5440,8 @@ pf_sctp_multihome_detach_addr(const struct pf_kstate *s) if (pf_addr_cmp(&i->addr, &s->key[PF_SK_WIRE]->addr[s->direction == PF_IN], s->key[PF_SK_WIRE]->af) == 0) { + SDT_PROBE3(pf, sctp, multihome, remove, + key.v_tag, s, i); TAILQ_REMOVE(&ep->sources, i, entry); free(i, M_PFTEMP); break; @@ -5492,6 +5499,7 @@ pf_sctp_multihome_add_addr(struct pf_pdesc *pd, struct pf_addr *a, uint32_t v_ta i->af = pd->af; memcpy(&i->addr, a, sizeof(*a)); TAILQ_INSERT_TAIL(&ep->sources, i, entry); + SDT_PROBE2(pf, sctp, multihome, add, v_tag, i); PF_SCTP_ENDPOINTS_UNLOCK(); } From nobody Thu Jun 13 16:48:19 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0Syq5HYcz5NyH3; Thu, 13 Jun 2024 16:48:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0Syq4Sq4z4Vj6; Thu, 13 Jun 2024 16:48:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718297299; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RtPkCY0tBNDiVMfw2jwCDmKW5u1ZKt2Aa5KEIsdF9wg=; b=Iq/eQ0HOItDT8ZXx5jUeAjpt86hNagFmQpmRvZXO8UcNzV5h+XJWOSMw9DS4jOpTtLEtuy h4VZY3+S9ZIBGVVsmYpbHF3U3K6UrsomgJJt/Q1qMHnp8zI0Nhp/VWPMd8SCEcK5fVr4Ql z/Rvv9yVUIifdLWB2y7+K9tSgHUUq8TT3ngUo4v82eSVNIBkAx8cvwK2wiDmPE5Nse5zfB n1rekkslwVx+2QcxBfigK3AbhcgOYGwgA7oI0YKUhzNWkdhmxQdkFVJUeO5w9xkQrCZSfS BV3hufZGOAc5q/3lHivf6eO6B22lewWUHXjSDzUUzAMzGMd8VbD7OZWoDxnApQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718297299; a=rsa-sha256; cv=none; b=g45JIlKublHSx4mOJm9joQgIuUcTM/BJPSanqS8dfHcWicrsKweeDR3Z4PUShF+S1Rbni5 fle6tc/Enwd5d20sxg/bgVaa9RYpuKFTIVN80VXztGVlyVtq3rCIQTY5gsMWy5hQH9UpY/ Hb8+v3wGac5jbeQsTCivq8pvbv5kEDW9PXEw+zh30FJ1qCMiGhNJryWX9Ov2vIpF55RtZH aEGyrOuw6tjvAZW7u4NsNl+R/EvqyG6tC9r9VuNjgXNptBJO+mEj/Fh772bPb1Pj3g6dGl /37R8JQO8f11mSloknmwGO1Qn28whWtGNZBnIHIrnFPOM5CZbs06dsSofER1yA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718297299; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RtPkCY0tBNDiVMfw2jwCDmKW5u1ZKt2Aa5KEIsdF9wg=; b=b26H5PX1K2gp7pjTuq4jl+EZas0jzuKveVuxw3XgAFFndVV/+MlOpZ1EBiT+3t+zH6sNr5 x132jKdyX5bwRKEgC5FGcAwvFKesUb9q6sBffY2RhXMp5peQ/i3ApUxL9TxsA+rHLNd0y2 qfMyHhaPT5kBEKsDshPHP0MBfa3AUfiko0RWuwRPzZnecVzfmSsBXF5kpcQmm2+Vk1sZMw gEzqucavUTbGMTk6L17zUIF4p2+tsicRK4e0dV1VPoGlUOC+AV5mmQBDXH6/VNyHZ8dI7+ ITLBVK01lQCbegevXk2CPUMquHHPAOMt51XpuWE5u+auOHxCXpE31v/g8nM+RQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0Syq43rgzknH; Thu, 13 Jun 2024 16:48:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45DGmJDw086087; Thu, 13 Jun 2024 16:48:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45DGmJlv086084; Thu, 13 Jun 2024 16:48:19 GMT (envelope-from git) Date: Thu, 13 Jun 2024 16:48:19 GMT Message-Id: <202406131648.45DGmJlv086084@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: c0d0bc2bed80 - main - subr_pctrie: add leaf callbacks to pctrie_reclaim List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c0d0bc2bed8003d2f2b24c3c29ce971ca8dfc556 Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=c0d0bc2bed8003d2f2b24c3c29ce971ca8dfc556 commit c0d0bc2bed8003d2f2b24c3c29ce971ca8dfc556 Author: Doug Moore AuthorDate: 2024-06-13 16:44:38 +0000 Commit: Doug Moore CommitDate: 2024-06-13 16:48:09 +0000 subr_pctrie: add leaf callbacks to pctrie_reclaim PCTRIE_RECLAIM frees all the interior nodes in a pctrie, but is little used because most trie-destroyers want to free leaves of the tree too. Add PCTRIE_RECLAIM_CALLBACK, with two extra arguments, a callback function and an auxiliary argument, that is invoked on every non-NULL leaf in the tree as the tree is destroyed. Reviewed by: rlibby, kib (previous version) Differential Revision: https://reviews.freebsd.org/D45565 --- sys/kern/subr_pctrie.c | 78 ++++++++++++++++++++++++++++++++++++++------------ sys/sys/pctrie.h | 25 ++++++++++++++++ 2 files changed, 85 insertions(+), 18 deletions(-) diff --git a/sys/kern/subr_pctrie.c b/sys/kern/subr_pctrie.c index 4017f98c207d..347c2bffd503 100644 --- a/sys/kern/subr_pctrie.c +++ b/sys/kern/subr_pctrie.c @@ -198,7 +198,6 @@ pctrie_root_store(struct pctrie *ptree, struct pctrie_node *node, static __inline bool pctrie_isleaf(struct pctrie_node *node) { - return (((uintptr_t)node & PCTRIE_ISLEAF) != 0); } @@ -217,10 +216,18 @@ pctrie_toleaf(uint64_t *val) static __inline uint64_t * pctrie_toval(struct pctrie_node *node) { - return ((uint64_t *)((uintptr_t)node & ~PCTRIE_FLAGS)); } +/* + * Returns the associated pointer extracted from node and field offset. + */ +static __inline void * +pctrie_toptr(struct pctrie_node *node, int keyoff) +{ + return ((void *)(((uintptr_t)node & ~PCTRIE_FLAGS) - keyoff)); +} + /* * Make 'child' a child of 'node'. */ @@ -792,14 +799,14 @@ pctrie_remove_lookup(struct pctrie *ptree, uint64_t index, } /* - * Prune all the leaves of 'node' before its first non-leaf child, make child - * zero of 'node' point up to 'parent', make 'node' into 'parent' and that - * non-leaf child into 'node'. Repeat until a node has been stripped of all - * children, and mark it for freeing, returning its parent. + * Walk the subtrie rooted at *pnode in order, invoking callback on leaves and + * using the leftmost child pointer for path reversal, until an interior node + * is stripped of all children, and returned for deallocation, with *pnode left + * pointing the parent of that node. */ -static struct pctrie_node * -pctrie_reclaim_prune(struct pctrie_node **pnode, - struct pctrie_node *parent) +static __always_inline struct pctrie_node * +pctrie_reclaim_prune(struct pctrie_node **pnode, struct pctrie_node *parent, + pctrie_cb_t callback, int keyoff, void *arg) { struct pctrie_node *child, *node; int slot; @@ -812,8 +819,11 @@ pctrie_reclaim_prune(struct pctrie_node **pnode, PCTRIE_UNSERIALIZED); pctrie_node_store(&node->pn_child[slot], PCTRIE_NULL, PCTRIE_UNSERIALIZED); - if (pctrie_isleaf(child)) + if (pctrie_isleaf(child)) { + if (callback != NULL) + callback(pctrie_toptr(child, keyoff), arg); continue; + } /* Climb one level down the trie. */ pctrie_node_store(&node->pn_child[0], parent, PCTRIE_UNSERIALIZED); @@ -827,8 +837,9 @@ pctrie_reclaim_prune(struct pctrie_node **pnode, /* * Recover the node parent from its first child and continue pruning. */ -struct pctrie_node * -pctrie_reclaim_resume(struct pctrie_node **pnode) +static __always_inline struct pctrie_node * +pctrie_reclaim_resume_compound(struct pctrie_node **pnode, + pctrie_cb_t callback, int keyoff, void *arg) { struct pctrie_node *parent, *node; @@ -839,24 +850,55 @@ pctrie_reclaim_resume(struct pctrie_node **pnode) parent = pctrie_node_load(&node->pn_child[0], NULL, PCTRIE_UNSERIALIZED); pctrie_node_store(&node->pn_child[0], PCTRIE_NULL, PCTRIE_UNSERIALIZED); - return (pctrie_reclaim_prune(pnode, parent)); + return (pctrie_reclaim_prune(pnode, parent, callback, keyoff, arg)); } /* * Find the trie root, and start pruning with a NULL parent. */ -struct pctrie_node * -pctrie_reclaim_begin(struct pctrie_node **pnode, - struct pctrie *ptree) +static __always_inline struct pctrie_node * +pctrie_reclaim_begin_compound(struct pctrie_node **pnode, + struct pctrie *ptree, + pctrie_cb_t callback, int keyoff, void *arg) { struct pctrie_node *node; node = pctrie_root_load(ptree, NULL, PCTRIE_UNSERIALIZED); pctrie_root_store(ptree, PCTRIE_NULL, PCTRIE_UNSERIALIZED); - if (pctrie_isleaf(node)) + if (pctrie_isleaf(node)) { + if (callback != NULL && node != PCTRIE_NULL) + callback(pctrie_toptr(node, keyoff), arg); return (NULL); + } *pnode = node; - return (pctrie_reclaim_prune(pnode, NULL)); + return (pctrie_reclaim_prune(pnode, NULL, callback, keyoff, arg)); +} + +struct pctrie_node * +pctrie_reclaim_resume(struct pctrie_node **pnode) +{ + return (pctrie_reclaim_resume_compound(pnode, NULL, 0, NULL)); +} + +struct pctrie_node * +pctrie_reclaim_begin(struct pctrie_node **pnode, struct pctrie *ptree) +{ + return (pctrie_reclaim_begin_compound(pnode, ptree, NULL, 0, NULL)); +} + +struct pctrie_node * +pctrie_reclaim_resume_cb(struct pctrie_node **pnode, + pctrie_cb_t callback, int keyoff, void *arg) +{ + return (pctrie_reclaim_resume_compound(pnode, callback, keyoff, arg)); +} + +struct pctrie_node * +pctrie_reclaim_begin_cb(struct pctrie_node **pnode, struct pctrie *ptree, + pctrie_cb_t callback, int keyoff, void *arg) +{ + return (pctrie_reclaim_begin_compound(pnode, ptree, + callback, keyoff, arg)); } /* diff --git a/sys/sys/pctrie.h b/sys/sys/pctrie.h index 06b9fca79528..4e1d8c7f8617 100644 --- a/sys/sys/pctrie.h +++ b/sys/sys/pctrie.h @@ -36,6 +36,8 @@ #ifdef _KERNEL +typedef void (*pctrie_cb_t)(void *ptr, void *arg); + #define PCTRIE_DEFINE_SMR(name, type, field, allocfn, freefn, smr) \ PCTRIE_DEFINE(name, type, field, allocfn, freefn) \ \ @@ -218,6 +220,24 @@ name##_PCTRIE_RECLAIM(struct pctrie *ptree) \ freefn(ptree, freenode); \ } \ \ +/* \ + * While reclaiming all internal trie nodes, invoke callback(leaf, arg) \ + * on every leaf in the trie, in order. \ + */ \ +static __inline __unused void \ +name##_PCTRIE_RECLAIM_CALLBACK(struct pctrie *ptree, \ + pctrie_cb_t callback, void *arg) \ +{ \ + struct pctrie_node *freenode, *node; \ + \ + for (freenode = pctrie_reclaim_begin_cb(&node, ptree, \ + callback, __offsetof(struct type, field), arg); \ + freenode != NULL; \ + freenode = pctrie_reclaim_resume_cb(&node, \ + callback, __offsetof(struct type, field), arg)) \ + freefn(ptree, freenode); \ +} \ + \ static __inline __unused struct type * \ name##_PCTRIE_REPLACE(struct pctrie *ptree, struct type *ptr) \ { \ @@ -269,6 +289,11 @@ uint64_t *pctrie_lookup_unlocked(struct pctrie *ptree, uint64_t key, struct pctrie_node *pctrie_reclaim_begin(struct pctrie_node **pnode, struct pctrie *ptree); struct pctrie_node *pctrie_reclaim_resume(struct pctrie_node **pnode); +struct pctrie_node *pctrie_reclaim_begin_cb(struct pctrie_node **pnode, + struct pctrie *ptree, + pctrie_cb_t callback, int keyoff, void *arg); +struct pctrie_node *pctrie_reclaim_resume_cb(struct pctrie_node **pnode, + pctrie_cb_t callback, int keyoff, void *arg); uint64_t *pctrie_remove_lookup(struct pctrie *ptree, uint64_t index, struct pctrie_node **killnode); uint64_t *pctrie_replace(struct pctrie *ptree, uint64_t *newval); From nobody Thu Jun 13 17:10:29 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0TSQ0yzsz5P0yq for ; Thu, 13 Jun 2024 17:10:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0TSQ0MmFz4ZNb; Thu, 13 Jun 2024 17:10:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718298630; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MbTk623owjEJtkQmD0UXW1Z97nlSDmCDBF87KcYh3cQ=; b=SFJirtSZdRmcN5tHoLFlTge7/B8V05sEcBr/JqOO4FqjPikQWuhF9KmB8ECGQ8EK493gqi Eq3ueMQv0zdMDEimpspHLmBq7s6oq83av0oxQU74CyvwGr1mxJ25cVoKTTyg3kAhzNmoEa sLEhPHVGcBABiTS3rebxLSsfKVtAusN5mMkkRVJsUfzjbf5imM44frNc3wvBeBVVQrVqmK JjtJBg6cDYD1cs4dz+RzFYltli8KsLXwmooMmr7rLs2YAKX7XmmfBaB20UW7VYfNDEJmpA afWrCDFn0Z/InxqEM/LK2awN4X6SrqWW+OHwk9Ar1UACQm5ZgumLHFfkrr74TQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718298630; a=rsa-sha256; cv=none; b=aTMGJNHiImJqnIC1i11KyxFROf9WDy2FpnmO/fDXDuDeh3VDfO852jmHSE7hcLsdkcbcd1 cvBQKWMAHiRkE8lmdS1GS17ydxhSd2s+rJCoHdowo2L+xECushkD4i6bG7wWrdKVSa6FLD z/1yMeXkUiGW5bKFShO1xC6fDk3JBtkkih3xZric0ClpKbqnzrkEehZ3DxksmfWEYgyXPf 0qrMaV/duRH22vkppJp9zn9Z6L2ggBWDqwFt5oh6bx2wC00jOg0jkQiM/YtoD6KvyrP05m n54OT3SlAXFhugbNwagPDAq8fFDQDn2R7GPt0OfinscvHXJiEzdQSeAvz7/c8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718298630; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MbTk623owjEJtkQmD0UXW1Z97nlSDmCDBF87KcYh3cQ=; b=ZMj6gIIteJCdIMnTzQ1U+PYOfTnoLZdgH0xNjly6GJUct7LN4Gbre405A4dY5OarhaRm7r 3Q+ycTQk9CLq/PCtduzBoX5IrErH526OxJYPvE3KYxwHvhjQQZuATgFZ65it3hxPZaLyr/ tnwBVOYgMbN/c0q2bp+ZzsNqOL5NSVpDue0SRC9lrzedg8RwiLs0Bp+g6KfjyELKW4XTYt V/O/tSirP+7H65XZpW/DdgXiHGJQd3cpmgoY4OcYo5NgghqjjFGYbYpzYuhExLFHLQCrZS e4+fb0uwr5ntMQmAC+JnCuv7HmvLYhZf1C8MVsLfVecIidFGpK1lLpc+npQ9eA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0TSP6zv9zlng; Thu, 13 Jun 2024 17:10:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45DHATLE029089; Thu, 13 Jun 2024 17:10:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45DHATfJ029086; Thu, 13 Jun 2024 17:10:29 GMT (envelope-from git) Date: Thu, 13 Jun 2024 17:10:29 GMT Message-Id: <202406131710.45DHATfJ029086@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Colin Percival Subject: git: 101745a5e59d - internal/admin - Add Osama Abboud (osamaabb) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/internal/admin X-Git-Reftype: branch X-Git-Commit: 101745a5e59dccaf96105f4477ae45b29a75d398 Auto-Submitted: auto-generated The branch internal/admin has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=101745a5e59dccaf96105f4477ae45b29a75d398 commit 101745a5e59dccaf96105f4477ae45b29a75d398 Author: Colin Percival AuthorDate: 2024-06-13 17:08:57 +0000 Commit: Colin Percival CommitDate: 2024-06-13 17:08:57 +0000 Add Osama Abboud (osamaabb) Osama will be helping akiyano to maintain the Elastic Network Adapter driver for AWS. I will be mentoring and akiyano will be co-mentoring. Approved by: core --- access | 1 + mentors | 1 + 2 files changed, 2 insertions(+) diff --git a/access b/access index a74b2c079142..66ca6628d07a 100644 --- a/access +++ b/access @@ -120,6 +120,7 @@ nyan obrien oh olce +osamaabb oshogbo peter peter@wemm.org peterj diff --git a/mentors b/mentors index 2a3cc4452f2a..bab3f6241e4e 100644 --- a/mentors +++ b/mentors @@ -17,6 +17,7 @@ def oshogbo jfree imp Co-mentor: markj oh manu olce emaste Co-mentor: markj +osamaabb cperciva Co-mentor: akiyano ram ken Co-mentor: mav rcm kp ssaxena imp From nobody Thu Jun 13 18:12:52 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0VrP0vlcz5P5vQ; Thu, 13 Jun 2024 18:12:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0VrP092gz4gnd; Thu, 13 Jun 2024 18:12:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718302373; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CpPZrA4lXYsYcbaBzFGW3ybhd9b3cJqHJPNvO3B2ng4=; b=VpQVODy19Ax5znBuCL+sCEltCrGsZX3F1ogLDC6w1GLuLKOYZFz7seoPDf6VqVuA7iku7R QCuZHC9MU8/lsJOsEk8VqMVKjLn8czG78mPa82FjbCEEaRDwZNeOiQyNaQlFYgfImR7mjJ /honsZ2naJsKpmDZpw9YUP87IyBZIg3giGdI/WHdJS1AxcTOiUnelIlEAZJil5g8eBIqow h8m5MZi7hnJmEzZox7LbkmqlDwpL7+WaHuOp5UuGdNiG93ztcuHyFlIx1oXevjONzhSXZ1 d5Vc67Mi/eIEKmAe4a+4WU/bZaFTTcT9AM6Rbad5YBCjgP+svuC4/lH0kSbp2w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718302373; a=rsa-sha256; cv=none; b=AuqIiOQ5vbieXGBNi2XhaM2OgU/uuY32Z9y29mV8Cwrkz7Is5mI/vQT+EnqsKu5hzhtLZ1 xV/yB7rBGMTmr1OIZfqm6YQdHgQKzsLGwCyXRIKfLwXbdr/hVvG+OVX1aqOGJ89iMqPDr3 zEL10Wh8mF/X3tE4MJU1GfKh1UOYfsITDA9O9m+baci2WpNb2co6Iyl1GVzNYIxx8d45o3 OG7p/6MI02hS8wSwasetW2qh4ZAouP0bfHS8Htjii/OX/p8T151s/myAYNA5PWc8zC+Q0Y 6P5wgoSTsyNKHLZ2OjxmFT0QMNZrWW47tX7RmwJrdxYCIC4ET8bBPGuJGqKN1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718302373; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CpPZrA4lXYsYcbaBzFGW3ybhd9b3cJqHJPNvO3B2ng4=; b=aYdMqSuQeSpkuQETkRNpeQVU53GjvxzrYbr5VL8ZPlS/4SNhOtv8D66frdGAS68Sy7z2iA YJ215rSdFxiJcqpCmiUYZJX4dCQoKNV05U/DpgpNVB0tjXrbSHygPcUxHjFKs5ks+gsw1u 6qifMyMrxYz0m2zdTe5ATEYwnPhm52TfQZthcZazD/XjiQXHzEHzL5ZsWTbgevKx5kBE0L /Cwvxkmjg4oHp4oy3MsPL5iNtGDxguYD9vGQ12ZjHM0xc7NkHYQsNNduC19Bq8KRmivWg9 l5qtxKy73Je1ALeKXWiOECMJO76snOnK6w1OkibyKnm3X2wKdfW2KKW22qDLbQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0VrN6tCDznTm; Thu, 13 Jun 2024 18:12:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45DICqMT037352; Thu, 13 Jun 2024 18:12:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45DICqoK037349; Thu, 13 Jun 2024 18:12:52 GMT (envelope-from git) Date: Thu, 13 Jun 2024 18:12:52 GMT Message-Id: <202406131812.45DICqoK037349@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 927bb4aa5f81 - stable/14 - find: add SIGINFO handler List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 927bb4aa5f8128537145d69b13641afd68aa01d9 Auto-Submitted: auto-generated The branch stable/14 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=927bb4aa5f8128537145d69b13641afd68aa01d9 commit 927bb4aa5f8128537145d69b13641afd68aa01d9 Author: Goran Mekić AuthorDate: 2024-01-11 22:35:25 +0000 Commit: Alan Somers CommitDate: 2024-06-13 18:11:32 +0000 find: add SIGINFO handler Print number of files processed and path currently being processed on SIGINFO. Reviewed by: des, asomers Sponsored by: Axcient Differential Revision: https://reviews.freebsd.org/D43380 (cherry picked from commit d06a00963b7f724b6fdd7d7cdcbed57c534196a9) --- usr.bin/find/extern.h | 1 + usr.bin/find/find.c | 9 +++++++++ usr.bin/find/main.c | 10 ++++++++++ 3 files changed, 20 insertions(+) diff --git a/usr.bin/find/extern.h b/usr.bin/find/extern.h index 3436f8cf07bf..323b9bfdfb93 100644 --- a/usr.bin/find/extern.h +++ b/usr.bin/find/extern.h @@ -126,3 +126,4 @@ extern int exitstatus; extern time_t now; extern int dotfd; extern FTS *tree; +extern volatile sig_atomic_t showinfo; diff --git a/usr.bin/find/find.c b/usr.bin/find/find.c index 3bff4982b4b6..57225e8fa23f 100644 --- a/usr.bin/find/find.c +++ b/usr.bin/find/find.c @@ -172,6 +172,7 @@ find_execute(PLAN *plan, char *paths[]) { FTSENT *entry; PLAN *p; + size_t counter = 0; int e; tree = fts_open(paths, ftsoptions, (issort ? find_compare : NULL)); @@ -213,6 +214,14 @@ find_execute(PLAN *plan, char *paths[]) continue; #endif /* FTS_W */ } + + if (showinfo) { + fprintf(stderr, "Scanning: %s/%s\n", entry->fts_path, entry->fts_name); + fprintf(stderr, "Scanned: %lu\n\n", counter); + showinfo = 0; + } + ++counter; + #define BADCH " \t\n\\'\"" if (isxargs && strpbrk(entry->fts_path, BADCH)) { (void)fflush(stdout); diff --git a/usr.bin/find/main.c b/usr.bin/find/main.c index 56f1feece6e4..9e02e75638f4 100644 --- a/usr.bin/find/main.c +++ b/usr.bin/find/main.c @@ -68,8 +68,10 @@ int isxargs; /* don't permit xargs delimiting chars */ int mindepth = -1, maxdepth = -1; /* minimum and maximum depth */ int regexp_flags = REG_BASIC; /* use the "basic" regexp by default*/ int exitstatus; +volatile sig_atomic_t showinfo = 0; static void usage(void) __dead2; +static void siginfo_handler(int sig __unused); int main(int argc, char *argv[]) @@ -81,6 +83,8 @@ main(int argc, char *argv[]) (void)time(&now); /* initialize the time-of-day */ + (void)signal(SIGINFO, siginfo_handler); + p = start = argv; Hflag = Lflag = 0; ftsoptions = FTS_NOSTAT | FTS_PHYSICAL; @@ -161,3 +165,9 @@ usage(void) " find [-H | -L | -P] [-EXdsx] -f path [path ...] [expression]"); exit(1); } + +static void +siginfo_handler(int sig __unused) +{ + showinfo = 1; +} From nobody Thu Jun 13 18:17:27 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0Vxh0D2Lz5P6Dy; Thu, 13 Jun 2024 18:17:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0Vxg6Rb8z4hRq; Thu, 13 Jun 2024 18:17:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718302647; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fSHMcC3F2/Vy5rOeLQ7oFvHUXiN9XWcrBj8++Db7vbg=; b=D6/VKgmFNjNLjbD9LYCyzbsWGXsOt0/NxbNf7WxYGNHiIDzqeFlIymZxavaKiomcS+3eHs n/Fcbefisq3QahptZT1YL66rv9UYAgYR//92CeHvUFZCpcZ8BBO4Xk6hW5JA4x00gzfzsw wuA3O4LbOoN1GBzf25Cm+fVCLRs/FM9gMWn6JSsfM0Lz2QV2qil9wSTKvWN6A2BpC3UWRt 4uR5422M4nK3SBTFRR197N4KoQyoJ4lBCDuxU8M6y6p/iiEHP7uf+87+/JrMIBcoIVfdvw II3GIuovTTgIIorGkXf2/g4XzM8aFjXL1wCqnzqriB9Zzb+b+Badb1sLJjpaUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718302647; a=rsa-sha256; cv=none; b=aBavET773E2WADbxmZrj4UXnIr9+Y9cWorVVso91eCG7aZjJYNVoqC+bScYfmPbIBnczGC jExUOKrxNCGRTodsTic89PCNAjhRiK0UC+dd/qdV0faNu3uDNKNUCrEahvL6WgafjlF4GY V5JLnjf1vKleinD4nBU98JDsUXkMQCuhN4aAQRwsNm9kh1krL04E1FXeM3XP2w5MdNVXUP yJoTBvfnjsjpx/TPRloThTAyxFG+JQG8ybijXslRNvh9eDG6eVhG5pM7S0XqoFyMW9Z++l 2tZdqQiyT3Jj/4nPdaxhAH+qaP2iCvMEwh8jeTbMNm8EJmEVjgtCikiN6t93uw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718302647; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fSHMcC3F2/Vy5rOeLQ7oFvHUXiN9XWcrBj8++Db7vbg=; b=ldCvesXszPo1ru1K0NO2yD5Go/YCUyPLzXMprNU1CdLS1S7wIlcY0ddskAlUCXmy3ZerfS cb96o2Du4mPEyfDkEapTXonR/zocIXmBtfiXF2gG5+cdaq1JCF/+j6HQct1zP5lsNOeN+I 31HbbB6Y2uPGdMdGHjbd5MKzHV9zyFHla6xp7R4MGUL6qNN14PRs0RQfvbwpSEy95LKX4b IoTtcQVYY0ByotzwwfN477D9rHuyIeFbunUdBV2dMNK1b9r+fi7SlbeRiHJEcahq4FdVTg 3HYaRFJ3XP7z3uUgDU62gammUUeGIZxELBO324c/E4baY+XBvLSdotql27a20Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0Vxg62cgznTp; Thu, 13 Jun 2024 18:17:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45DIHRKD038099; Thu, 13 Jun 2024 18:17:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45DIHRLs038096; Thu, 13 Jun 2024 18:17:27 GMT (envelope-from git) Date: Thu, 13 Jun 2024 18:17:27 GMT Message-Id: <202406131817.45DIHRLs038096@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 57a32d76f6bd - stable/14 - tests/fusefs: fix all tests that depend on kern.maxphys List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 57a32d76f6bdd67afb527b375b357d1310de69dc Auto-Submitted: auto-generated The branch stable/14 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=57a32d76f6bdd67afb527b375b357d1310de69dc commit 57a32d76f6bdd67afb527b375b357d1310de69dc Author: Gleb Smirnoff AuthorDate: 2024-05-06 19:03:20 +0000 Commit: Alan Somers CommitDate: 2024-06-13 18:15:51 +0000 tests/fusefs: fix all tests that depend on kern.maxphys The tests try to read kern.maxphys sysctl into int value, while unsigned long is required. Not sure when this was broken, seems like since cd8537910406e. Reviewed by: asomers Differential Revision: https://reviews.freebsd.org/D45053 (cherry picked from commit e9b411d273336647e61704213964b995952a44fd) --- tests/sys/fs/fusefs/bmap.cc | 12 ++++++------ tests/sys/fs/fusefs/read.cc | 2 +- tests/sys/fs/fusefs/utils.cc | 13 ++++++------- tests/sys/fs/fusefs/utils.hh | 2 +- tests/sys/fs/fusefs/write.cc | 5 +++-- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/tests/sys/fs/fusefs/bmap.cc b/tests/sys/fs/fusefs/bmap.cc index 4c9edac9360a..48c9c7d038ed 100644 --- a/tests/sys/fs/fusefs/bmap.cc +++ b/tests/sys/fs/fusefs/bmap.cc @@ -105,8 +105,8 @@ TEST_F(Bmap, bmap) arg.runb = -1; ASSERT_EQ(0, ioctl(fd, FIOBMAP2, &arg)) << strerror(errno); EXPECT_EQ(arg.bn, pbn); - EXPECT_EQ(arg.runp, m_maxphys / m_maxbcachebuf - 1); - EXPECT_EQ(arg.runb, m_maxphys / m_maxbcachebuf - 1); + EXPECT_EQ((unsigned long)arg.runp, m_maxphys / m_maxbcachebuf - 1); + EXPECT_EQ((unsigned long)arg.runb, m_maxphys / m_maxbcachebuf - 1); leak(fd); } @@ -142,7 +142,7 @@ TEST_F(Bmap, default_) arg.runb = -1; ASSERT_EQ(0, ioctl(fd, FIOBMAP2, &arg)) << strerror(errno); EXPECT_EQ(arg.bn, 0); - EXPECT_EQ(arg.runp, m_maxphys / m_maxbcachebuf - 1); + EXPECT_EQ((unsigned long )arg.runp, m_maxphys / m_maxbcachebuf - 1); EXPECT_EQ(arg.runb, 0); /* In the middle */ @@ -152,8 +152,8 @@ TEST_F(Bmap, default_) arg.runb = -1; ASSERT_EQ(0, ioctl(fd, FIOBMAP2, &arg)) << strerror(errno); EXPECT_EQ(arg.bn, lbn * m_maxbcachebuf / DEV_BSIZE); - EXPECT_EQ(arg.runp, m_maxphys / m_maxbcachebuf - 1); - EXPECT_EQ(arg.runb, m_maxphys / m_maxbcachebuf - 1); + EXPECT_EQ((unsigned long )arg.runp, m_maxphys / m_maxbcachebuf - 1); + EXPECT_EQ((unsigned long )arg.runb, m_maxphys / m_maxbcachebuf - 1); /* Last block */ lbn = filesize / m_maxbcachebuf - 1; @@ -163,7 +163,7 @@ TEST_F(Bmap, default_) ASSERT_EQ(0, ioctl(fd, FIOBMAP2, &arg)) << strerror(errno); EXPECT_EQ(arg.bn, lbn * m_maxbcachebuf / DEV_BSIZE); EXPECT_EQ(arg.runp, 0); - EXPECT_EQ(arg.runb, m_maxphys / m_maxbcachebuf - 1); + EXPECT_EQ((unsigned long )arg.runb, m_maxphys / m_maxbcachebuf - 1); leak(fd); } diff --git a/tests/sys/fs/fusefs/read.cc b/tests/sys/fs/fusefs/read.cc index 373f742d4fd3..9693428914e6 100644 --- a/tests/sys/fs/fusefs/read.cc +++ b/tests/sys/fs/fusefs/read.cc @@ -1339,7 +1339,7 @@ TEST_P(ReadAhead, readahead) { expect_open(ino, 0, 1); maxcontig = m_noclusterr ? m_maxbcachebuf : m_maxbcachebuf + m_maxreadahead; - clustersize = MIN(maxcontig, m_maxphys); + clustersize = MIN((unsigned long )maxcontig, m_maxphys); for (offs = 0; offs < bufsize; offs += clustersize) { len = std::min((size_t)clustersize, (size_t)(filesize - offs)); expect_read(ino, offs, len, len, contents + offs); diff --git a/tests/sys/fs/fusefs/utils.cc b/tests/sys/fs/fusefs/utils.cc index 55a552e28eeb..831ded0c0815 100644 --- a/tests/sys/fs/fusefs/utils.cc +++ b/tests/sys/fs/fusefs/utils.cc @@ -130,8 +130,7 @@ class FuseEnv: public Environment { void FuseTest::SetUp() { const char *maxbcachebuf_node = "vfs.maxbcachebuf"; const char *maxphys_node = "kern.maxphys"; - int val = 0; - size_t size = sizeof(val); + size_t size; /* * XXX check_environment should be called from FuseEnv::SetUp, but @@ -141,12 +140,12 @@ void FuseTest::SetUp() { if (IsSkipped()) return; - ASSERT_EQ(0, sysctlbyname(maxbcachebuf_node, &val, &size, NULL, 0)) - << strerror(errno); - m_maxbcachebuf = val; - ASSERT_EQ(0, sysctlbyname(maxphys_node, &val, &size, NULL, 0)) + size = sizeof(m_maxbcachebuf); + ASSERT_EQ(0, sysctlbyname(maxbcachebuf_node, &m_maxbcachebuf, &size, + NULL, 0)) << strerror(errno); + size = sizeof(m_maxphys); + ASSERT_EQ(0, sysctlbyname(maxphys_node, &m_maxphys, &size, NULL, 0)) << strerror(errno); - m_maxphys = val; /* * Set the default max_write to a distinct value from MAXPHYS to catch * bugs that confuse the two. diff --git a/tests/sys/fs/fusefs/utils.hh b/tests/sys/fs/fusefs/utils.hh index 383f01ea4bfe..506e8a985212 100644 --- a/tests/sys/fs/fusefs/utils.hh +++ b/tests/sys/fs/fusefs/utils.hh @@ -77,7 +77,7 @@ class FuseTest : public ::testing::Test { public: int m_maxbcachebuf; - int m_maxphys; + unsigned long m_maxphys; FuseTest(): m_maxreadahead(0), diff --git a/tests/sys/fs/fusefs/write.cc b/tests/sys/fs/fusefs/write.cc index f931f350a7c3..336ec79c8fec 100644 --- a/tests/sys/fs/fusefs/write.cc +++ b/tests/sys/fs/fusefs/write.cc @@ -184,7 +184,7 @@ virtual void SetUp() { if (m_maxphys < 2 * DFLTPHYS) GTEST_SKIP() << "MAXPHYS must be at least twice DFLTPHYS" << " for this test"; - if (m_maxphys < 2 * m_maxbcachebuf) + if (m_maxphys < 2 * (unsigned long )m_maxbcachebuf) GTEST_SKIP() << "MAXPHYS must be at least twice maxbcachebuf" << " for this test"; } @@ -860,7 +860,8 @@ TEST_F(WriteMaxWrite, write) ssize_t halfbufsize, bufsize; halfbufsize = m_mock->m_maxwrite; - if (halfbufsize >= m_maxbcachebuf || halfbufsize >= m_maxphys) + if (halfbufsize >= m_maxbcachebuf || + (unsigned long )halfbufsize >= m_maxphys) GTEST_SKIP() << "Must lower m_maxwrite for this test"; bufsize = halfbufsize * 2; contents = new int[bufsize / sizeof(int)]; From nobody Thu Jun 13 18:17:28 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0Vxj10wsz5P6Px; Thu, 13 Jun 2024 18:17:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0Vxj0NGSz4hFx; Thu, 13 Jun 2024 18:17:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718302649; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kbsfPdj0dA0R/M48LTAd1DoAbcYDmhCRZKj0AnrSlvk=; b=NIHwS1BJWjai04nylKfCtWHAJjSu2Nme//pYtJF7HMj6FxkUWyLYkXbuoZwbsstUyWDChX M7AdNI26EpT1Zs7tDtA7Ph9JFwqS5t7MYjU55r/geiCwF6KUl4+rJBUGD0SGLi509pcvet YAl7afjv9brEDAJjFTNjDhK9CHNsAaG8dsFG6Man9tiKa3HKmGnNsxs95DMvntn3DBTN+5 MxGIFDvM7INdoAKUpSY93787/9UeDPrbrHIXcKUJ8Rj8VkURhjQMNPB4RlA5eFzhVaZ7z5 OqMfeCYg+KJLV0vxAJlfPDSlRu80e0uZQkwVaeIsKQ6Vfj55qNAsNANAdomdAA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718302649; a=rsa-sha256; cv=none; b=gTqvPgRV7jPzqIDwBV6h/++CMYYrJS5+OtZ4K2e0B7bXY4KWVNO7FZLzQaCJ3kkb1xtDVv ObeD13Z2o+IbXZUtYCkt4qQHpbomS+TDlJQaYRjeWbdlSBF6PTwUuLZm59ihdMuP+HXB2d +AFO9nyHBmhJa7NApebx985ctnsKy1bxiXy8mmxieqphlhNBzZCciMXzq4MWtosHQicTpI o7Yy5kjHtd2USM8NdGQoAx4ScWkJMzVzH+mHt8XJRhHBN13SxjwakzpqwKh+jXLqZXFbWT 3p9NqBYT8RD6evC75UBniRs25m5kBXHv+4hc8xni8t1tw2fRi+uUiTi+DqOwMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718302649; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kbsfPdj0dA0R/M48LTAd1DoAbcYDmhCRZKj0AnrSlvk=; b=GcAhNHmehQ+ZQMnbiX509eM/TkHRLNRks+b1OSQRPm0bAn4OXYHcGdBc2KMZ+RDL6Mq4z5 eRVaPhzZ//AQurHPaCi3JtHkmDDcfBOiBaHarZxPALB6QSPVzuOo3mE1jVG2YTAxdDtPn/ xSIEKBEXeKEDHPwIAtOOMWDtvUTUKmgakf/JYd2hui8sP3f4Y/VvOeGSaEjr7p+zjtAHCn clDHTozzOeW4PoIIg8AJJUk8y5wXhYVHLUtIXJOP5y8yilGG3uZGoRHRIRPXntM/M9c5gf WUHV6NPveTjCMjAe/saMCGl4PFxwZYR1WOd3QjfkHqojdqhiKzSNb9d4SG1XQw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0Vxh74Y8znZB; Thu, 13 Jun 2024 18:17:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45DIHSVJ038156; Thu, 13 Jun 2024 18:17:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45DIHSFo038153; Thu, 13 Jun 2024 18:17:28 GMT (envelope-from git) Date: Thu, 13 Jun 2024 18:17:28 GMT Message-Id: <202406131817.45DIHSFo038153@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 27b195425080 - stable/14 - fusefs: make the tests more robust to changes to maxphys List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 27b1954250802b8f2db4328c962bc6587a4ee3a9 Auto-Submitted: auto-generated The branch stable/14 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=27b1954250802b8f2db4328c962bc6587a4ee3a9 commit 27b1954250802b8f2db4328c962bc6587a4ee3a9 Author: Alan Somers AuthorDate: 2024-05-09 14:40:21 +0000 Commit: Alan Somers CommitDate: 2024-06-13 18:15:58 +0000 fusefs: make the tests more robust to changes to maxphys Remove assumptions in two test cases that maxphys won't be huge. Reported by: kib Sponsored by: Axcient (cherry picked from commit b2792a300ddb8d8334b234fe7744f5141cc96103) --- tests/sys/fs/fusefs/bmap.cc | 17 +++++++++++++---- tests/sys/fs/fusefs/write.cc | 2 +- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/tests/sys/fs/fusefs/bmap.cc b/tests/sys/fs/fusefs/bmap.cc index 48c9c7d038ed..30612079657d 100644 --- a/tests/sys/fs/fusefs/bmap.cc +++ b/tests/sys/fs/fusefs/bmap.cc @@ -77,8 +77,6 @@ class BmapEof: public Bmap, public WithParamInterface {}; /* * Test FUSE_BMAP - * XXX The FUSE protocol does not include the runp and runb variables, so those - * must be guessed in-kernel. */ TEST_F(Bmap, bmap) { @@ -105,8 +103,19 @@ TEST_F(Bmap, bmap) arg.runb = -1; ASSERT_EQ(0, ioctl(fd, FIOBMAP2, &arg)) << strerror(errno); EXPECT_EQ(arg.bn, pbn); - EXPECT_EQ((unsigned long)arg.runp, m_maxphys / m_maxbcachebuf - 1); - EXPECT_EQ((unsigned long)arg.runb, m_maxphys / m_maxbcachebuf - 1); + /* + * XXX The FUSE protocol does not include the runp and runb variables, + * so those must be guessed in-kernel. There's no "right" answer, so + * just check that they're within reasonable limits. + */ + EXPECT_LE(arg.runb, lbn); + EXPECT_LE((unsigned long)arg.runb, m_maxreadahead / m_maxbcachebuf); + EXPECT_LE((unsigned long)arg.runb, m_maxphys / m_maxbcachebuf); + EXPECT_GT(arg.runb, 0); + EXPECT_LE(arg.runp, filesize / m_maxbcachebuf - lbn); + EXPECT_LE((unsigned long)arg.runp, m_maxreadahead / m_maxbcachebuf); + EXPECT_LE((unsigned long)arg.runp, m_maxphys / m_maxbcachebuf); + EXPECT_GT(arg.runp, 0); leak(fd); } diff --git a/tests/sys/fs/fusefs/write.cc b/tests/sys/fs/fusefs/write.cc index 336ec79c8fec..1fe2e3cc522d 100644 --- a/tests/sys/fs/fusefs/write.cc +++ b/tests/sys/fs/fusefs/write.cc @@ -179,7 +179,7 @@ class WriteCluster: public WriteBack { public: virtual void SetUp() { m_async = true; - m_maxwrite = 1 << 25; // Anything larger than MAXPHYS will suffice + m_maxwrite = UINT32_MAX; // Anything larger than MAXPHYS will suffice WriteBack::SetUp(); if (m_maxphys < 2 * DFLTPHYS) GTEST_SKIP() << "MAXPHYS must be at least twice DFLTPHYS" From nobody Thu Jun 13 18:24:05 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0W5K47v4z5P6sc; Thu, 13 Jun 2024 18:24:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0W5K2Mw0z4kB6; Thu, 13 Jun 2024 18:24:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718303045; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kD01sr6xAhE0JdgIGgOC+T1sSVnGuYzclsT4P0vxTKY=; b=d13o86vRffNI06S65Ooqtdkp3uyn8vbo/Op+Zqm/E8jkVEThe1Vx92ShRkJGNWSwiK2Hh4 YLLMcF2+MS/QqCBDmp4wn9yG2aj8Eom+TJvdO0SFPBA+uaR0e2WzEj3DkGV8aEkPlxgRpc AkYW/QGPdbJPaR2qVY+YqEtnrpG4KU4sNREIXnbg5mJYe2TFxY6Lh7vy6hcSp5r6mKv1ju 6NZr1gXC4mY79+0piExNRZNZZ/uzaczmn8TncAUfx5hg1kOXaMpMOj2+ssUMryjDZD8gaW WElOBVF2w7tnqeq/IV0Q9cIgexQYLe3lW+8GG0rQ5bDB9s6G1Xcm/5qAWTyzHQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718303045; a=rsa-sha256; cv=none; b=TDOfwokohLOwY6+jW4DjYDt7MS9YvMTJ77OVCV1BIufphz1zGOwZFYQAO1jT7NLDvS/q1m zf0tIBhDYGH1vFRrU4miegFTVYBYlXM0CWrwNMSQxvNmj5Rcl4Xp2F/mDIx/W40LgRhrel v41BLBArBM2aLaEKmBHq40047QAcLUTBc8BI29PhvTulbUrvdUxyNA1GEf4M2merfQy5w9 WqhF/T1IEsH1CTvKh+xn4wByeAH7vRnVy6JCgLqYNZIBU88jK/LIBkyX203GurYuqw+B50 THcqBVxy4Kd2DsdcrPtl16SYdcgTZDzP4VfJbxEDcRz2wDLukgDZ+8A9fh9tTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718303045; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kD01sr6xAhE0JdgIGgOC+T1sSVnGuYzclsT4P0vxTKY=; b=UBRa27w/b7gwEsDn/lWeNwKdLoPL3jfHKf1gpkH23SNaUYTuTUhmyi6XNhZxgrYhNKX4T3 euFiDNi3Q8CGr9MR776b/dRtUQyCKktFni85c2aWavoXNvdaXG7CTEUe1bSQs5/7ntEcj3 aCQalBkrEKbfhvo9gUkgz2csneBhHP/uiGLxonkWGzCLl9Fel4ZEn3gpZHyhOf++FzbNcO /mOx6kPy6dBJcg2H4Dq24oZASnOtr6M13abxCdRgp1V/SYqT+KVe6cHJUPUVOpF6PIccXo F4wkZa9rfhdh5/70Kpo4bFFwfo5GFJ9j3o9GPO9W7uYvmXrJ9OzX34dcqUsGWg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0W5K1zLWznb3; Thu, 13 Jun 2024 18:24:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45DIO5Jf054290; Thu, 13 Jun 2024 18:24:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45DIO5kY054287; Thu, 13 Jun 2024 18:24:05 GMT (envelope-from git) Date: Thu, 13 Jun 2024 18:24:05 GMT Message-Id: <202406131824.45DIO5kY054287@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 055df035b564 - stable/14 - rc.conf.5: remove obsolete advice about kld_list List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 055df035b564a137563204e74987e497131731f4 Auto-Submitted: auto-generated The branch stable/14 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=055df035b564a137563204e74987e497131731f4 commit 055df035b564a137563204e74987e497131731f4 Author: Alan Somers AuthorDate: 2024-05-18 14:25:10 +0000 Commit: Alan Somers CommitDate: 2024-06-13 18:23:38 +0000 rc.conf.5: remove obsolete advice about kld_list Loading modules via kld_list is no longer substantially faster than via loader.conf. [skip ci] Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D45242 (cherry picked from commit 3bb5428ad643e38dd755c8d66c8ac2ae8f7575b5) --- share/man/man5/rc.conf.5 | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5 index a76cb1a04e0a..5a8e4e2c1c5b 100644 --- a/share/man/man5/rc.conf.5 +++ b/share/man/man5/rc.conf.5 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 18, 2023 +.Dd May 18, 2024 .Dt RC.CONF 5 .Os .Sh NAME @@ -334,10 +334,6 @@ A whitespace-separated list of kernel modules to load right after the local disks are mounted, without any .Pa .ko extension or path. -Loading modules at this point in the boot process is -much faster than doing it via -.Pa /boot/loader.conf -for those modules not necessary for mounting local disks. .It Va kldxref_enable .Pq Vt bool Set to From nobody Thu Jun 13 18:24:41 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0W621hKnz5P7Gp; Thu, 13 Jun 2024 18:24:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0W6217j5z4kYY; Thu, 13 Jun 2024 18:24:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718303082; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dh+Clq9gHjkUvCBU5D2tAj0Sjc6qd+NiByHeu/Vek60=; b=VC5oPai0SbzuDQ29sLLFmEDy7o+VCUo+Sq/OSJ2I5CRtR1p+n1JD6sTjnv5/fcrsRZ/OXe o+M8scHrKu8yRZpW+s8noDhwregCA5M7q8BZYjPnT7ydcIwKJ+YpjQtAufSuABPFbORsKZ pjDzCMwWcWmeK9PslJFBoNgwlNeJoTKrpF7AEa+2nTBnufROOz5cfxYE73xLBxW8uHBQ/S 7gEsy4QqjsUI1+qIsRCg5iP6WzhyR9GDTaO+ADYsNirdYmoBBSfnzd7ZKgkN8ktsvzBqhk c/0Q10hiICodG7cjEMsfKB1RjTiPOKCyawQT27o/6LF15aL8d5xnX6SHgE1pTg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718303082; a=rsa-sha256; cv=none; b=YjEamruoBd5FXFiX1RHiUQ6qGs/eFiatQQizvhvc313z9e0Ij/usdCkGCYRigrr/pNa4xi 1dxwxBCrcYyxso11vZFrEvg8K6iESRz/ji3/TXMpuVYdw0AU1OssNqkaM2uBE4tPshZpzr iwB3mDjadDYAeF5nh0IsVyLVdaJ3cUYauxVjI7vUeXHd2tyzPNBHasHlNDgD0ejff8ifiD sFPm7WZMucuz4Y091i0xf6sEbQbbrO0Vpkx5CW+Wd+6QqqozAkUBJE9wnth2bdWh4u2fIf gWFqh9AkQxeZeJAszITOjXsj5+jn7+rfGZE3hShOctlsAw4rhdglCoZ5hLzdoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718303082; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dh+Clq9gHjkUvCBU5D2tAj0Sjc6qd+NiByHeu/Vek60=; b=FfWxBCxtTlsVhkyBPHqybBjx3aKUpcrUVrfZ70OUucHPBWDogyD+iOmi1sPLRndmlL23+6 xvFrA9LnMzhLkVMEh5Qs8K5x2WTdKzQicuUFGtKsvaD2oLndUqZqHQT2kElg55ikgbUeD6 7pXTMkSIIBTWSoygH1/K/kK5Bf4Fvc3FupBZAEDmZz0RYay/RNfy3WrMgNUTSPlgzub76q yOjfY+klpJbN6ZCwI8tTHXsn/TaYJokE48ZXtbclcjWV1furVKoZxhAb3CzH8D9sVdCrr6 xS1Rc7quOsabwb4WKE5vfI0XpFIaBESpZcfFX0V2LxGdbumhFl8Vs5lV4qIALA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0W620gK2znXp; Thu, 13 Jun 2024 18:24:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45DIOftF054492; Thu, 13 Jun 2024 18:24:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45DIOfsV054489; Thu, 13 Jun 2024 18:24:41 GMT (envelope-from git) Date: Thu, 13 Jun 2024 18:24:41 GMT Message-Id: <202406131824.45DIOfsV054489@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 454319f12e5d - stable/14 - vfs_getopt(9): fix typo List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 454319f12e5db203c452f8c6b61be9cbe0236df3 Auto-Submitted: auto-generated The branch stable/14 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=454319f12e5db203c452f8c6b61be9cbe0236df3 commit 454319f12e5db203c452f8c6b61be9cbe0236df3 Author: Alan Somers AuthorDate: 2024-05-19 15:49:03 +0000 Commit: Alan Somers CommitDate: 2024-06-13 18:24:21 +0000 vfs_getopt(9): fix typo [skip ci] Reported by: Claudiu (cherry picked from commit 3cc1b35bc1bdcdee279b3ee7d0e0946b684df898) --- share/man/man9/vfs_getopt.9 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/share/man/man9/vfs_getopt.9 b/share/man/man9/vfs_getopt.9 index 0e68655f540f..ff0f027314c7 100644 --- a/share/man/man9/vfs_getopt.9 +++ b/share/man/man9/vfs_getopt.9 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.Dd July 31, 2011 +.Dd May 19, 2024 .Dt VFS_GETOPT 9 .Os .Sh NAME @@ -46,7 +46,7 @@ .Fa "struct vfsoptlist *opts" "const char *name" "void **buf" "int *len" .Fc .Ft "char *" -.Fn vfs_getops "struct vfsoptlist *opts" "const char *name" "int *error" +.Fn vfs_getopts "struct vfsoptlist *opts" "const char *name" "int *error" .Ft int .Fo vfs_flagopt .Fa "struct vfsoptlist *opts" "const char *name" "uint64_t *flags" "uint64_t flag" @@ -177,7 +177,7 @@ function returns 0 if the option was found; otherwise, is returned. .Pp The -.Fn vfs_getops +.Fn vfs_getopts function returns the specified option if it is found, and is .Dv NUL terminated. From nobody Thu Jun 13 18:26:02 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0W7Z6K3Bz5P7RH; Thu, 13 Jun 2024 18:26:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0W7Z5q12z4knM; Thu, 13 Jun 2024 18:26:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718303162; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lGEcrBK9iwbEGplJ0DgHzLN6hatry9Zi666sx7NGeCs=; b=MkOybhonx9u/O+jEBkMrQt/EzcNbLA+/Q+NzuFn8CwUXUXzFyni9vChKtsmk0i/VrEqg7z e6KeEwnPVLcl8tkepDKj3/QtNZtT48YgCjydt5fhCSbqrJHZ8TaKHThekmmnE0086vsicd OPoQXSiEalcX+xJvagr22peMXbtxdN0UWvwqvWs2na0LpmfK/Ot/mBG30NEvaBm/2Il4GX L0JmrZ4NiRrpWbeMIoy3u5jDQc2ujRqRZpLUUGVY1u2tBfkBfhpTlBnmGjHRzpLw4/gtNb b+8SoDNsLb12pKjZXxDOKIDDr8fbtVSQEBYDAMkFFd+MvenJUFiIfcNOl1ZJGg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718303162; a=rsa-sha256; cv=none; b=Knuf0oBpOwrh4H2Mbnmav8v7AlqpvMWpM4Kv4MqscNsG8cAOt0efma1XeMj0rCICBQxw0M VdaY1x3TB+a2j0VlKLJOPLU8baMwySzH++iL5wQ+Hi26GfmXHME3/OdLsSKe3bVDBglhO4 KDip0gnFELWb/qCCcecWjdW9MUNzm597978HDf+6reiRS+pso/GcGuX7beBILVjWB+6qko fQB278HO6Po7Jpc85lZ3oXYThbJmM2ugGfIF5qxUsYQ7htAtvyU4ueX8wy9vof26sVHKUx BtcVJnbKFIzCkXfPVemYxvP+muSj/rJVaAYyn49AKJBaL6CcJk1VqZtbCDompw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718303162; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lGEcrBK9iwbEGplJ0DgHzLN6hatry9Zi666sx7NGeCs=; b=F+LWgntTxbUFLxR1Sr9bNQOcC0DkbX71AxrPDcLnCMtGhfX0WdDrwdVwoe/PUHYMZzu34q noHt5+E0fViJHCpQzwLDI+oPPurv/wxJLOLc9jLDlsOTCxfjXtBJw9NSOfQJSe8ZLNCIvy NBGgaJQ+M0TRKnEbzfLDSIiwbPQFJK+66udjtEbab5um/2KY4X2IgfpUZdZX+bPeEy9+at dF933PIrKw5lFie5Innp8Y8AnebYc32oU50pAHZd/dHapk0phYOOEfKXo+we6XGFn9hVHq /QSEbhkK4FVdMhR0jIDfsdCL6blRVQy+zQnl/20/hW6QzLECZPETZiWw2bP8Mw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0W7Z5LN5znJW; Thu, 13 Jun 2024 18:26:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45DIQ2nK054807; Thu, 13 Jun 2024 18:26:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45DIQ24m054804; Thu, 13 Jun 2024 18:26:02 GMT (envelope-from git) Date: Thu, 13 Jun 2024 18:26:02 GMT Message-Id: <202406131826.45DIQ24m054804@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 6b4c5030b68f - stable/14 - mdconfig: fix cleanup in the attach_size_rounddown test List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6b4c5030b68f970c66653b6ae5c5d6b760435da5 Auto-Submitted: auto-generated The branch stable/14 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=6b4c5030b68f970c66653b6ae5c5d6b760435da5 commit 6b4c5030b68f970c66653b6ae5c5d6b760435da5 Author: Alan Somers AuthorDate: 2024-05-31 21:18:25 +0000 Commit: Alan Somers CommitDate: 2024-06-13 18:25:24 +0000 mdconfig: fix cleanup in the attach_size_rounddown test Sponsored by: Axcient (cherry picked from commit d1bd097d52cb5f8b0484e1f22c5506846f4ed304) --- sbin/mdconfig/tests/mdconfig_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/mdconfig/tests/mdconfig_test.sh b/sbin/mdconfig/tests/mdconfig_test.sh index 9aaf724206b1..655b7fd63b40 100755 --- a/sbin/mdconfig/tests/mdconfig_test.sh +++ b/sbin/mdconfig/tests/mdconfig_test.sh @@ -291,7 +291,7 @@ attach_size_rounddown_body() -x "mdconfig -r -u ${md#md} -s ${ms2}b" check_diskinfo "$md" 16384 2 $ss } -attach_size_rounddown() +attach_size_rounddown_cleanup() { cleanup_common } From nobody Thu Jun 13 18:30:24 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0WDc2YHpz5P7mf; Thu, 13 Jun 2024 18:30:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0WDc22Vdz4l7h; Thu, 13 Jun 2024 18:30:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718303424; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+kYPRC/kt4JIEjKOwuT4o9OZ8ObSiQCXgiprygxf5xQ=; b=yzhQBDGDAPF2UEow12f30qmjcc0xfYVfMOjzqpmw7bKcUqGesah6SRlKhkGM2qI029DMJz 7FG5qe4uuSwpcySYBei4PiUSkXk6DFMqQqPRTfAtGX2pca8gD1L4Y/1JqmRmTro53tg4bE uT+sImBUqFWGmgD4C708TmPh9G1bY5WUOS6BW5KhzgCwn+MqTI9Wat8G6fZxzFjJaWA+Os Tf3UqRVo5eRnw2tEaNWKMwm7WQUgOWt/ZvE+rWeP2n9WPiztSiPwR+w1ex6vDAXrnlaPfV CV0Y6q8HDXPFAN4eRfzrW6KWHB9KWaHwlJ+k13dCPNVQumZDubM5bi56PKRn5Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718303424; a=rsa-sha256; cv=none; b=SAwBUViwuG2/D6Y/y1Q7Z11AfaVKrbib5L9bO50SPMvOVr3sDw0aSSxqFiIiymxTzcCFMI RIM1SJ5XrLof9PWk9p2Mg0uQ4yEEoxIIpZmTFlTV2XnZWNTmr+GldGRfmE5bjpcZ0y3/+n QDTJrB9ixct+ze/wVJMbOEtcTtvDFqdgKE7I93cFtIIU4sZNCL0ojxaSKKPhC+aiAigo+g u/laXHwVucrN2ZBvagUHL0HRLIdhkAY2HVAHnarsPq8Hj4unMlwSg0lVNijnXUaxxSTnKZ wrhpe9rr7rc64RKH7pNEE0KCK334lVDZBpr5Jh00maapUVihwoJqMQgRCNLaow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718303424; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+kYPRC/kt4JIEjKOwuT4o9OZ8ObSiQCXgiprygxf5xQ=; b=I0Nnpy1UCXPWJ5aQHJK9BOL7/iy0lDIuudUeVSThTSMcO8B2qoRfGZ5lADcBMKDl0MpWuR vlezXfj3pXQvcSYrFYlWdeJ+BRLdb3lnZnv/BNWXuwiINO0ihBh8lIW6lTsYvq1YPpxydH G++v+iIFp7F8gldSA+79aN2Y+UkxWFM3hJWorKwIWseRvx9qjs0hvODY938xSwhgOV9/As MDD3UElkgw58zgjIo/LrCi3g+PSRghmEC7PzCkzif08WQJzKPmzvo4cxsZ/462tFB34E8Q krnrWK/tbeGtV5lNH1qs5Ji2szON7y1IBQk1zSlcMSbibUoHwE9uG6TKKzXfCg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0WDc1KR2znVk; Thu, 13 Jun 2024 18:30:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45DIUO43064021; Thu, 13 Jun 2024 18:30:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45DIUO6R064018; Thu, 13 Jun 2024 18:30:24 GMT (envelope-from git) Date: Thu, 13 Jun 2024 18:30:24 GMT Message-Id: <202406131830.45DIUO6R064018@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 20ac2dc15f03 - stable/13 - find: add SIGINFO handler List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 20ac2dc15f03c885a7d9b8f5bc1facd3074c40a8 Auto-Submitted: auto-generated The branch stable/13 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=20ac2dc15f03c885a7d9b8f5bc1facd3074c40a8 commit 20ac2dc15f03c885a7d9b8f5bc1facd3074c40a8 Author: Goran Mekić AuthorDate: 2024-01-11 22:35:25 +0000 Commit: Alan Somers CommitDate: 2024-06-13 18:29:45 +0000 find: add SIGINFO handler Print number of files processed and path currently being processed on SIGINFO. Reviewed by: des, asomers Sponsored by: Axcient Differential Revision: https://reviews.freebsd.org/D43380 (cherry picked from commit d06a00963b7f724b6fdd7d7cdcbed57c534196a9) --- usr.bin/find/extern.h | 1 + usr.bin/find/find.c | 9 +++++++++ usr.bin/find/main.c | 10 ++++++++++ 3 files changed, 20 insertions(+) diff --git a/usr.bin/find/extern.h b/usr.bin/find/extern.h index 3436f8cf07bf..323b9bfdfb93 100644 --- a/usr.bin/find/extern.h +++ b/usr.bin/find/extern.h @@ -126,3 +126,4 @@ extern int exitstatus; extern time_t now; extern int dotfd; extern FTS *tree; +extern volatile sig_atomic_t showinfo; diff --git a/usr.bin/find/find.c b/usr.bin/find/find.c index 3bff4982b4b6..57225e8fa23f 100644 --- a/usr.bin/find/find.c +++ b/usr.bin/find/find.c @@ -172,6 +172,7 @@ find_execute(PLAN *plan, char *paths[]) { FTSENT *entry; PLAN *p; + size_t counter = 0; int e; tree = fts_open(paths, ftsoptions, (issort ? find_compare : NULL)); @@ -213,6 +214,14 @@ find_execute(PLAN *plan, char *paths[]) continue; #endif /* FTS_W */ } + + if (showinfo) { + fprintf(stderr, "Scanning: %s/%s\n", entry->fts_path, entry->fts_name); + fprintf(stderr, "Scanned: %lu\n\n", counter); + showinfo = 0; + } + ++counter; + #define BADCH " \t\n\\'\"" if (isxargs && strpbrk(entry->fts_path, BADCH)) { (void)fflush(stdout); diff --git a/usr.bin/find/main.c b/usr.bin/find/main.c index 9ed1d1d4e29b..295e0f966362 100644 --- a/usr.bin/find/main.c +++ b/usr.bin/find/main.c @@ -68,8 +68,10 @@ int isxargs; /* don't permit xargs delimiting chars */ int mindepth = -1, maxdepth = -1; /* minimum and maximum depth */ int regexp_flags = REG_BASIC; /* use the "basic" regexp by default*/ int exitstatus; +volatile sig_atomic_t showinfo = 0; static void usage(void); +static void siginfo_handler(int sig __unused); int main(int argc, char *argv[]) @@ -81,6 +83,8 @@ main(int argc, char *argv[]) (void)time(&now); /* initialize the time-of-day */ + (void)signal(SIGINFO, siginfo_handler); + p = start = argv; Hflag = Lflag = 0; ftsoptions = FTS_NOSTAT | FTS_PHYSICAL; @@ -161,3 +165,9 @@ usage(void) " find [-H | -L | -P] [-EXdsx] -f path [path ...] [expression]"); exit(1); } + +static void +siginfo_handler(int sig __unused) +{ + showinfo = 1; +} From nobody Thu Jun 13 18:52:47 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0WkS0V5Nz5P9Ch; Thu, 13 Jun 2024 18:52:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0WkS004wz4n2L; Thu, 13 Jun 2024 18:52:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718304768; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eioNDVLCcJ6QLuoriRY+xUbid493fojn0JBFKEnjqdk=; b=j+ld5/nKW8+XnsfIz/RvIrcVrcugqM+VO4De5wVEiu41PGh845iKes9C+ZLDL3txlzoKUl IyKKy2WDemzWZgU4hnkS+XNknfZw/D10e7grEFOiHgV/XiTsQ9D+ByW3Kv+xW9QgX7SWxn iT1XXsTJkDWOKBglfV3E47dpxlOeC0PwJmuZZv9kM6SIN5P+1PTxLPdpFLlCkY8JGS8gBQ 1XwOtahQSagmRPyQHM8ea9htPoOFuYdUQ461jH28pSBhHGjdDYj1iXzEy8IyAE14bx3x6U sdsU1xSpCoHHxuGAYXeNnadIDJRAXLRbg8CD9+l9A+79Wl0i71patUVwR0LD0w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718304768; a=rsa-sha256; cv=none; b=n8Nj3ZYfdV1rAMfPM5xGJk3lDVqPXeW+wqjEIr64WTLHBuARaRB1eJB7mory3pvYhGJ1Hx xe5eWsirCiUx4Oyh3dnALAYUfHRd5dlkBx8/A85ZqdsORt3SZsMlQraeXIxhUXteDXTgiU yWUtbzTezibJ+mFEGWzStRQtEHxdSFRJvZGDoVYLQVgy1UncZZAv7+nOvUZjM7U2YXOkdS 3AOx21/cP4n/ZyXqRrRhQaolpyTI/U5Ln17D5BPxo47NnTyvI10ho+HDglgthnXicL0dOM QUx/REhaGRbEoAYIwtDjXx0ss9tcF5avC3VxSWpGI7P33DDexlIgLw9q3cZVoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718304768; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eioNDVLCcJ6QLuoriRY+xUbid493fojn0JBFKEnjqdk=; b=OPhFL2+woN+HeJmlB3IotYCQ1kRULk3B35lLs4ydJrUr6NycWAMFEcfw2nCGKZi5afqIom JtiiFOin6lk2FYGcaTCryPuSk3VISs0Hx0kpm7TZtEZVPKf0oSW/F8/Iu+X+0v0w+qMoIg o6hGx9RwMVIcZWUQCQCOfedJfp5B+kcj9LXwFq/5XLrna79uVEHM/nVpIT7ZvMOiBkWKQ6 UC7J41oG1VjbpVaPJMLdX/+TdozTusv++UzLoSkRwZlxJmf9pAMEeGKgSrAozGhm42JF1g pyK1+l+MN18s9ccijcLOf7slKbWDpbIvMhIdzuz/gIImMPw55Yd+rFXdBW/DEg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0WkR6jHczpMl; Thu, 13 Jun 2024 18:52:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45DIqlNf004454; Thu, 13 Jun 2024 18:52:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45DIqlnB004450; Thu, 13 Jun 2024 18:52:47 GMT (envelope-from git) Date: Thu, 13 Jun 2024 18:52:47 GMT Message-Id: <202406131852.45DIqlnB004450@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: d2acf0a44709 - main - swap_pager: pctrie_reclaim_cb in meta_free_all List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d2acf0a447093dcf0805c75490e1cd989bc8c36c Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=d2acf0a447093dcf0805c75490e1cd989bc8c36c commit d2acf0a447093dcf0805c75490e1cd989bc8c36c Author: Doug Moore AuthorDate: 2024-06-13 18:47:54 +0000 Commit: Doug Moore CommitDate: 2024-06-13 18:52:25 +0000 swap_pager: pctrie_reclaim_cb in meta_free_all Replace the lookup-remove loop in swp_pager_meta_free_all with a call to SWAP_PCTRIE_RECLAIM_CALLBACK, to eliminate repeated trie searches. Reviewed by: rlibby Differential Revision: https://reviews.freebsd.org/D45583 --- sys/vm/swap_pager.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index 3bfda3eea169..c339f70ddea1 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -2220,8 +2220,11 @@ swp_pager_meta_free(vm_object_t object, vm_pindex_t pindex, vm_pindex_t count, } static void -swp_pager_meta_free_block(struct swblk *sb, struct page_range *range) +swp_pager_meta_free_block(void *sbv, void *rangev) { + struct swblk *sb = sbv; + struct page_range *range = rangev; + for (int i = 0; i < SWAP_META_PAGES; i++) { if (sb->d[i] != SWAPBLK_NONE) swp_pager_update_freerange(range, sb->d[i]); @@ -2238,19 +2241,13 @@ swp_pager_meta_free_block(struct swblk *sb, struct page_range *range) static void swp_pager_meta_free_all(vm_object_t object) { - struct swblk *sb; struct page_range range; - vm_pindex_t pindex; VM_OBJECT_ASSERT_WLOCKED(object); swp_pager_init_freerange(&range); - for (pindex = 0; (sb = SWAP_PCTRIE_LOOKUP_GE( - &object->un_pager.swp.swp_blks, pindex)) != NULL;) { - pindex = sb->p + SWAP_META_PAGES; - SWAP_PCTRIE_REMOVE(&object->un_pager.swp.swp_blks, sb->p); - swp_pager_meta_free_block(sb, &range); - } + SWAP_PCTRIE_RECLAIM_CALLBACK(&object->un_pager.swp.swp_blks, + swp_pager_meta_free_block, &range); swp_pager_freeswapspace(&range); } From nobody Thu Jun 13 18:52:48 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0WkT1wMWz5P8wk; Thu, 13 Jun 2024 18:52:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0WkT0q8Dz4mwl; Thu, 13 Jun 2024 18:52:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718304769; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0dWE8kdb7tJ9de+EOK9KGl4XrRUI0MecbSh+Z6BOsf0=; b=FUrywa3JhFUK63HSpBiNBht0p+/7B6x5ou21fbq7KORqmkhnfAMCEck3Vfw7VM6DjrQgu7 sdXofDoLd/rO+9cuevnAOheq2LxBVEyuhzYAOQ0/kE6kkRcxN9BFoEL//nO++6oP6ajtSF DfWlvezRROVPCzK5Z3g3D2yDSG6z1E2S69tk4VdG1GRvLJEEjJJUuPSlNnnyeOlmT+AosZ mOy5aznk2QSIH452IHhKh0+rsRcPTwGTz/G2xSXgMWqvVm63FJFwFjP5ct4nz/nm6xg1jE SXB4y31DdhU6vN1EKYQTT+mH56+eBuqaXvQqzWp3tG7GYAErSnzmOAEm/lhFTg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718304769; a=rsa-sha256; cv=none; b=bZ81sLqZNuHbwo4zrYFRO1McONQNvfLBFcUIKflxlQNPssl88ymKbHsdPSszGdQUbkAnTB cGZkcvyenX97e4S1X8F4Ix8+t9TIRv5oKQqZ87vxf3XmVMhI7J8J41cLIgF2pJuRvtncpw aYGGHmg1iyyaglevDzZYqWQDkkxlSXG87klAva9QQgbl2tGTpcSKyrLhgjXToq284YfZ+p MDa2dEMiLhYFrJdcDbP4ic8MjiF7pKuR9L+ic6jBRQbJohWNqj4gxk3GIFpU00g/S2euZj uL3zv1gsMGy445w5UmVa3InWLD7y40Dcm43hjY380Gt841ccFEFWplnXsqVaiw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718304769; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0dWE8kdb7tJ9de+EOK9KGl4XrRUI0MecbSh+Z6BOsf0=; b=KumA8L+/vI1AKgnhTifKeor5J7esAVCV0hJXhb7g8d0I7vaSmj6JulxvJRxhk56212/vPp qRZLvSxBE5RUduZjI+oWNHx3Zd8zsU5r+AvFLYhYmDCtmCRGokMDF278FFLV2QbQkf3e19 gsa437ih2/fgSMXjQHSxaMv3N8E4UbUDQECvyQSH/Hupt2e8jZL714eUrET7LwMJBixzo/ a6hl6BVf807wUTWkLFGd5zdjbdTSA3o4y3dWojAWYJLXGz2e9Fkbq15Chg9gSUBH3ys/MW 4qsoTE/giHdFlQtHVJ83pSxWLEM9yDfU3QdAJU6urZvZrQkrV02qXa0AfDC9hg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0WkT0PjJznqx; Thu, 13 Jun 2024 18:52:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45DIqmG5004506; Thu, 13 Jun 2024 18:52:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45DIqmxu004503; Thu, 13 Jun 2024 18:52:48 GMT (envelope-from git) Date: Thu, 13 Jun 2024 18:52:48 GMT Message-Id: <202406131852.45DIqmxu004503@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: a7f67ebd8275 - main - subr_rangeset: use pctrie_reclaim_cb in remove_all List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a7f67ebd8275165b2f6099de20790e112f8b1433 Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=a7f67ebd8275165b2f6099de20790e112f8b1433 commit a7f67ebd8275165b2f6099de20790e112f8b1433 Author: Doug Moore AuthorDate: 2024-06-13 18:49:43 +0000 Commit: Doug Moore CommitDate: 2024-06-13 18:52:25 +0000 subr_rangeset: use pctrie_reclaim_cb in remove_all Replace the lookup-remove loop in rangeet_remove_all with a call to SWAP_PCTRIE_RECLAIM_CALLBACK, to eliminate repeated trie searches. Reviewed by: rlibby Differential Revision: https://reviews.freebsd.org/D45584 --- sys/kern/subr_rangeset.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/sys/kern/subr_rangeset.c b/sys/kern/subr_rangeset.c index 0a675b4a2fce..94b77a449d22 100644 --- a/sys/kern/subr_rangeset.c +++ b/sys/kern/subr_rangeset.c @@ -232,18 +232,20 @@ rangeset_remove(struct rangeset *rs, uint64_t start, uint64_t end) return (rangeset_remove_pred(rs, start, end, rangeset_true_pred)); } +static void +rangeset_remove_leaf(void *rv, void *rsv) +{ + struct rs_el *r = rv; + struct rangeset *rs = rsv; + + rs->rs_free_data(rs->rs_data_ctx, r); +} + void rangeset_remove_all(struct rangeset *rs) { - struct rs_el *r; - - for (;;) { - r = RANGESET_PCTRIE_LOOKUP_GE(&rs->rs_trie, 0); - if (r == NULL) - break; - RANGESET_PCTRIE_REMOVE(&rs->rs_trie, r->re_start); - rs->rs_free_data(rs->rs_data_ctx, r); - } + RANGESET_PCTRIE_RECLAIM_CALLBACK(&rs->rs_trie, + rangeset_remove_leaf, rs); } void * From nobody Thu Jun 13 19:01:01 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0Wvx5wllz5P9k0; Thu, 13 Jun 2024 19:01:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0Wvx5SBBz4p2D; Thu, 13 Jun 2024 19:01:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718305261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=71XO1bHob0aPIwgm9dudBxyTssHfVhOdQDSuo/ui0g8=; b=OwJfcmrwgg2eAD0aZOYfkGm0XLHiSDzItFSQmGtn9gajSQjkX1COX0Xadc1jyOXQiadZ8X uzzt++T43fwVjkIGIAv17CWnIMswKBIyVmaBu08oEuEasD82R47jaULqb6dZpEGouKazpO Fl8RCot3jfwR0Jx9P0YMKDCiHvK2OV0Mqr1z6XBV10KghB5Qwuz/HuT7+370duSBDvcr2f qU7it3TVbte0nYDMogKfBHGSypG2suv3TyLz38gKxxEVyxn14PkMgqx5jda+vF+aC3Casb k+fdwKVGsRiCGtLJyk354M2j3zkKVvJmrkzWUOLbk1b2mNTuFG3KZx+wxw7ZwA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718305261; a=rsa-sha256; cv=none; b=B9h5pC8IPDY8dZGrdjfFHZBqZIFhm8/lUNbr6CmlJ3LxMnmh+DWJuGAr3YW2QelikQ1rGF G/dIKC2xZCfAMKVUwDr9sqctauXL2iSIZ9gK/OBcNXqG0iA120EQQ2UicdIL7PoINq315u +D9IGTDrhmw7Hb+5g7pLitkQ8LRqHlB7BHkgISYBa3bEgil9Xv2kSVcO5onhbW7z5V8+w4 +iTd4/KwLX69tOp6aNo0LiByGNCVm2N2138DDtcKXymLwQf4cQ/Jy/Xg7jeLCFIleqHH/c bAAlllFx2zqH+cHsPfD8ZBlyRN900t5mbfux6Wqat+cARoEgc0ZZPh6wkT/WPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718305261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=71XO1bHob0aPIwgm9dudBxyTssHfVhOdQDSuo/ui0g8=; b=wvpxHz7h6kNGLrONmHfUXg/SMSJoBnEdQUw5NU+YNMaAHz3fn/Q/HIL+Gdo/yLIpbG82hR JjE53lsu6lZfqeYSUe5Nr6br9pQYrJbkwnSMn8zd10zdLTlxOiSRbLwhAfTUYp1SZpwzwM fJLKjdtegvHwuWUiyjWU+h7DAIonYB7LkfU7iBQkSmOajqx3Idk45mjsC8p73MZd+qnrBt 7gO93hjnZbaUyVCKKD1MFjbJjNqfmsvDv/SPBPMJJ/2xkc1p5q+oFV/nxOVR/TgiRgjLS4 eOmLNblwZ9qSHw3GqIfbBF5K7AMbKbzeOfNUjOPiMrunbq5b8Y+sI1Eds69QVA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0Wvx53HZzpJw; Thu, 13 Jun 2024 19:01:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45DJ110b018214; Thu, 13 Jun 2024 19:01:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45DJ11qT018211; Thu, 13 Jun 2024 19:01:01 GMT (envelope-from git) Date: Thu, 13 Jun 2024 19:01:01 GMT Message-Id: <202406131901.45DJ11qT018211@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 7e9f5bcdc4fc - stable/13 - find: fix build on 32bits List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7e9f5bcdc4fcde5ba700359f1e3fe007dcfa4398 Auto-Submitted: auto-generated The branch stable/13 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=7e9f5bcdc4fcde5ba700359f1e3fe007dcfa4398 commit 7e9f5bcdc4fcde5ba700359f1e3fe007dcfa4398 Author: Baptiste Daroussin AuthorDate: 2024-01-12 06:34:28 +0000 Commit: Alan Somers CommitDate: 2024-06-13 19:00:40 +0000 find: fix build on 32bits --- usr.bin/find/find.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/find/find.c b/usr.bin/find/find.c index 57225e8fa23f..46f0e9b3c38b 100644 --- a/usr.bin/find/find.c +++ b/usr.bin/find/find.c @@ -217,7 +217,7 @@ find_execute(PLAN *plan, char *paths[]) if (showinfo) { fprintf(stderr, "Scanning: %s/%s\n", entry->fts_path, entry->fts_name); - fprintf(stderr, "Scanned: %lu\n\n", counter); + fprintf(stderr, "Scanned: %zu\n\n", counter); showinfo = 0; } ++counter; From nobody Thu Jun 13 19:02:09 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0WxF47Tmz5PB7k; Thu, 13 Jun 2024 19:02:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0WxF3QC8z4qFq; Thu, 13 Jun 2024 19:02:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718305329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NVAEXTSV/mySR94p+BJ6tDcKqhk+xZB+ewJjXKpLZ2A=; b=jLtP3ODb4S4i9XaUn8xkM1tIGiSXMSNR/cItP1eq7b4opkeFFXcIJKUEqk5piKof+/Bfyg xE+OphsqX+PD/jGwU5gDtL12JpAgAmpqSRyScDdVy5ZDm34Obv2OjM8NxIrl/tuEZynCXh vbnMO9JrwNl17CKnNcv1+rYVXxcfcsMa+HwMaQ0SnqiZvBQ3GmltIburxPT7RKl3bdEXm/ uVjNVlJp18qbK9c4rjXVb/6cdopENep4r7d+wg3V5lpnHrYbf4ZKDSb0eUiIApesHJ7t7H SqmUasdIpeDdejIRJouZy8hGfeb5BAfgfR1XSjyqVK40XPGuwwY2MueiKhaM6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718305329; a=rsa-sha256; cv=none; b=S1Rkke17IuLuoeVzMz5BA+boqB9zHFdlvBrZS+P3rDkGQeEDPALd7xnY1C6FcRnf7bxCNU vSohDgofsqctsHZNf/uOsB8xCSUduMuGi3RoXZicQ2F8B689sAP78Y3Jz7IarK4NR/ASp5 w1KqD4u/Pwt9aN1H7GMZm4tdWybUPp1LWdXayN8xJ45IGLmPBSV7jaqx1f7w6wyYGkF0Wl etxco9pKIKOKZCwmC8iDXKumwJmG2+53IrYiMnzu0on+dCc5oQeAdiqY1+Gqn1jYOvN/tX mla5W4+cLt4hc/H4zopZ1nrwMWJry9xo7qIRlUQaf0CDBTGfYtf1VWB8jgLcBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718305329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NVAEXTSV/mySR94p+BJ6tDcKqhk+xZB+ewJjXKpLZ2A=; b=dbY5YMKmOFiLehfFF9qcxEzP6Br+T8bbVUbBQQ7c8BuX1AagbYd9amDxN7eawalgn6I1qf uudh4Hdb0v5Fa5gn1L421EwwZw9AjpYb8XPU2w4JwIF/RB+N8Iw4kMaQFS35L/R1Nfl/8s hqkmgEpvxIHt+tjuhxMlrFNThxS7ohGnVEWOKAtDd/lakXNtWJ1OTst4WcRW3i5Y4H2h+R CEXbeM0z82jdb0xZcLFKUshF3x681XpymExqMiAUWypAYCvzFgqs+UqK5mJJKO+lzGXmNt AbqUDAMlbryeGHKBEM6OTI94aZ7X0BeJxlQHJ1v5yzEJ7+6So1wJCQm320EMkg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0WxF31svzpkK; Thu, 13 Jun 2024 19:02:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45DJ295w022573; Thu, 13 Jun 2024 19:02:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45DJ29ZH022570; Thu, 13 Jun 2024 19:02:09 GMT (envelope-from git) Date: Thu, 13 Jun 2024 19:02:09 GMT Message-Id: <202406131902.45DJ29ZH022570@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 61827ea82189 - stable/14 - find: fix build on 32bits List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 61827ea821894947844fb13e9950dce554af350c Auto-Submitted: auto-generated The branch stable/14 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=61827ea821894947844fb13e9950dce554af350c commit 61827ea821894947844fb13e9950dce554af350c Author: Baptiste Daroussin AuthorDate: 2024-01-12 06:34:28 +0000 Commit: Alan Somers CommitDate: 2024-06-13 19:01:56 +0000 find: fix build on 32bits --- usr.bin/find/find.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/find/find.c b/usr.bin/find/find.c index 57225e8fa23f..46f0e9b3c38b 100644 --- a/usr.bin/find/find.c +++ b/usr.bin/find/find.c @@ -217,7 +217,7 @@ find_execute(PLAN *plan, char *paths[]) if (showinfo) { fprintf(stderr, "Scanning: %s/%s\n", entry->fts_path, entry->fts_name); - fprintf(stderr, "Scanned: %lu\n\n", counter); + fprintf(stderr, "Scanned: %zu\n\n", counter); showinfo = 0; } ++counter; From nobody Thu Jun 13 19:41:35 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0Xpl1ZZRz5PDkj; Thu, 13 Jun 2024 19:41:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0Xpl1BHNz4tYY; Thu, 13 Jun 2024 19:41:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718307695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aoG7L94LpQzfes6VufGhrawMvDpQfEm+2Rlk6wXc+0U=; b=Pjg+rzOAKsmH1SqHAe4CgTUSxccVmDFZmCDvZb6E4lgXV16lNPaUdy6G3R6gitGKPbnCjr QZ1mFGSwwvSMY0i7qib/6Wp7e4pjN3foUNMQp+ocMXkQTUimsvDySISqauK20MTey8GA5R a/ucFFkAnef11dwzB6++hyPZcW1MztWIhGR685ssg1Vs6IoJxCp5v1TDqp+j8hBMRZvuhi MMJFPysaBPS4dTlvlZNiyvKTTHZy1xutta9f/qzsMBKjgPFf8txx7vCJc3xq+Te0Y1TPl1 BvChThe3DGSB3EIMhER7tTzR30CwuGtiX/IIoSe/jEZiajGlt9UmKDpuAinyZg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718307695; a=rsa-sha256; cv=none; b=WgTjhe1CDFVzxYcqpuAfhZtH9+te5D9kdapWr0aYLDqIzYFriV1Ica6pjrl4CiKazxlEn2 BhapIgTjPAYuaxqHQZbaSpa89kVlFvrTvAyi36Vk2eaITBqzVWfytpQubuOc4wDYJbrPRz Fh3NlT3El6XJFK6dNz7pVisVqRU4p8V0SJVVcThfKvElTTj2PgGSTCM9M8zJm3NXvdTkEJ AQNftsQ0HmBFNyoOaC3o/ltfuAPwfZmYU0GugAv5FFBKkDwZ1WdXgC6majzx5xUtuVfmKc nkR/4SlIZ3swteoqDQofi4yGAaFbRfzYPTSw57ggyKh99063dUiNM4IyuJ1nGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718307695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aoG7L94LpQzfes6VufGhrawMvDpQfEm+2Rlk6wXc+0U=; b=c3ImPwnx+cc+MdMcgcDtzV28Dw1g7fq9tOMjltNvMRvN2b2I4cwWkQg7wPmMnlN8AbySUh 4ZjRGoT7A65Kw+8INdRgKb9sYS5z2lRLQfJHH8QxcPKye3RgeTh1KJdWuvkO//917HFMv2 XjWnr6wTsNToVUDmBMD0CsIkogszwTC25l01eZ+cJXDu9uDaTFtMFGVZ8Ox3cbaJxxIBgM Z52S4RyG6xIMMQyJWZgAwuHBp5pmfkgysCWzfT8RKabYjvzA52jXXCeqjsxsH/bvwnxZK6 bxVledEg451E57+0C2y4KpSoOrJMGwIYWzKXnlzeGsFrKlh6h5AQVs2ld4ZmSw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0Xpl0nf9zqDs; Thu, 13 Jun 2024 19:41:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45DJfZaa086959; Thu, 13 Jun 2024 19:41:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45DJfZmk086956; Thu, 13 Jun 2024 19:41:35 GMT (envelope-from git) Date: Thu, 13 Jun 2024 19:41:35 GMT Message-Id: <202406131941.45DJfZmk086956@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: c7fc7a4b9c45 - stable/13 - fusefs: prefer new/delete over malloc/free List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c7fc7a4b9c4508e813209bad692fdac63d02846d Auto-Submitted: auto-generated The branch stable/13 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=c7fc7a4b9c4508e813209bad692fdac63d02846d commit c7fc7a4b9c4508e813209bad692fdac63d02846d Author: Alan Somers AuthorDate: 2024-01-15 23:49:47 +0000 Commit: Alan Somers CommitDate: 2024-06-13 19:40:53 +0000 fusefs: prefer new/delete over malloc/free Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D43464 (cherry picked from commit 8bae22bbbe6571da9259e0d43ffa8a56f4b3e171) --- tests/sys/fs/fusefs/bmap.cc | 5 +- tests/sys/fs/fusefs/copy_file_range.cc | 22 ++++---- tests/sys/fs/fusefs/io.cc | 30 +++++------ tests/sys/fs/fusefs/read.cc | 14 +++-- tests/sys/fs/fusefs/setattr.cc | 23 ++++----- tests/sys/fs/fusefs/write.cc | 94 +++++++++++++++------------------- 6 files changed, 82 insertions(+), 106 deletions(-) diff --git a/tests/sys/fs/fusefs/bmap.cc b/tests/sys/fs/fusefs/bmap.cc index cefbbc472825..fae5aabee471 100644 --- a/tests/sys/fs/fusefs/bmap.cc +++ b/tests/sys/fs/fusefs/bmap.cc @@ -188,7 +188,7 @@ TEST_P(BmapEof, eof) const off_t filesize = 2 * m_maxbcachebuf; const ino_t ino = 42; mode_t mode = S_IFREG | 0644; - void *buf; + char *buf; int fd; int ngetattrs; @@ -243,11 +243,12 @@ TEST_P(BmapEof, eof) out.body.attr.attr.size = filesize / 2; }))); - buf = calloc(1, filesize); + buf = new char[filesize](); fd = open(FULLPATH, O_RDWR); ASSERT_LE(0, fd) << strerror(errno); read(fd, buf, filesize); + delete[] buf; leak(fd); } diff --git a/tests/sys/fs/fusefs/copy_file_range.cc b/tests/sys/fs/fusefs/copy_file_range.cc index 17b21b888736..806ecf3c3653 100644 --- a/tests/sys/fs/fusefs/copy_file_range.cc +++ b/tests/sys/fs/fusefs/copy_file_range.cc @@ -197,7 +197,7 @@ TEST_F(CopyFileRange, evicts_cache) const char RELPATH1[] = "src.txt"; const char FULLPATH2[] = "mountpoint/dst.txt"; const char RELPATH2[] = "dst.txt"; - void *buf0, *buf1, *buf; + char *buf0, *buf1, *buf; const uint64_t ino1 = 42; const uint64_t ino2 = 43; const uint64_t fh1 = 0xdeadbeef1a7ebabe; @@ -209,7 +209,7 @@ TEST_F(CopyFileRange, evicts_cache) ssize_t len = m_maxbcachebuf; int fd1, fd2; - buf0 = malloc(m_maxbcachebuf); + buf0 = new char[m_maxbcachebuf]; memset(buf0, 42, m_maxbcachebuf); expect_lookup(RELPATH1, ino1, S_IFREG | 0644, fsize1, 1); @@ -240,7 +240,7 @@ TEST_F(CopyFileRange, evicts_cache) fd2 = open(FULLPATH2, O_RDWR); // Prime cache - buf = malloc(m_maxbcachebuf); + buf = new char[m_maxbcachebuf]; ASSERT_EQ(m_maxbcachebuf, pread(fd2, buf, m_maxbcachebuf, start2)) << strerror(errno); EXPECT_EQ(0, memcmp(buf0, buf, m_maxbcachebuf)); @@ -249,7 +249,7 @@ TEST_F(CopyFileRange, evicts_cache) ASSERT_EQ(len, copy_file_range(fd1, &start1, fd2, &start2, len, 0)); // Read again. This should bypass the cache and read direct from server - buf1 = malloc(m_maxbcachebuf); + buf1 = new char[m_maxbcachebuf]; memset(buf1, 69, m_maxbcachebuf); start2 -= len; expect_read(ino2, start2, m_maxbcachebuf, m_maxbcachebuf, buf1, -1, @@ -258,9 +258,9 @@ TEST_F(CopyFileRange, evicts_cache) << strerror(errno); EXPECT_EQ(0, memcmp(buf1, buf, m_maxbcachebuf)); - free(buf1); - free(buf0); - free(buf); + delete[] buf1; + delete[] buf0; + delete[] buf; leak(fd1); leak(fd2); } @@ -343,8 +343,8 @@ TEST_F(CopyFileRange, mmap_write) int fd; const mode_t mode = 0644; - fbuf = (uint8_t*)calloc(1, fsize); - wbuf = (uint8_t*)malloc(wsize); + fbuf = new uint8_t[fsize](); + wbuf = new uint8_t[wsize]; memset(wbuf, 1, wsize); expect_lookup(RELPATH, ino, S_IFREG | mode, fsize, 1); @@ -383,8 +383,8 @@ TEST_F(CopyFileRange, mmap_write) r = copy_file_range(fd, &offset2_in, fd, &offset2_out, copysize, 0); ASSERT_EQ(copysize, (size_t)r) << strerror(errno); - free(wbuf); - free(fbuf); + delete[] wbuf; + delete[] fbuf; } diff --git a/tests/sys/fs/fusefs/io.cc b/tests/sys/fs/fusefs/io.cc index 77df0ceede64..84c6e3c0161b 100644 --- a/tests/sys/fs/fusefs/io.cc +++ b/tests/sys/fs/fusefs/io.cc @@ -283,7 +283,8 @@ void do_ftruncate(off_t offs) void do_mapread(off_t offs, ssize_t size) { - void *control_buf, *p; + char *control_buf; + void *p; off_t pg_offset, page_mask; size_t map_size; @@ -295,8 +296,7 @@ void do_mapread(off_t offs, ssize_t size) offs - pg_offset); ASSERT_NE(p, MAP_FAILED) << strerror(errno); - control_buf = malloc(size); - ASSERT_NE(nullptr, control_buf) << strerror(errno); + control_buf = new char[size]; ASSERT_EQ(size, pread(m_control_fd, control_buf, size, offs)) << strerror(errno); @@ -304,18 +304,16 @@ void do_mapread(off_t offs, ssize_t size) compare((void*)((char*)p + pg_offset), control_buf, offs, size); ASSERT_EQ(0, munmap(p, map_size)) << strerror(errno); - free(control_buf); + delete[] control_buf; } void do_read(off_t offs, ssize_t size) { - void *test_buf, *control_buf; + char *test_buf, *control_buf; ssize_t r; - test_buf = malloc(size); - ASSERT_NE(nullptr, test_buf) << strerror(errno); - control_buf = malloc(size); - ASSERT_NE(nullptr, control_buf) << strerror(errno); + test_buf = new char[size]; + control_buf = new char[size]; errno = 0; r = pread(m_test_fd, test_buf, size, offs); @@ -327,8 +325,8 @@ void do_read(off_t offs, ssize_t size) compare(test_buf, control_buf, offs, size); - free(control_buf); - free(test_buf); + delete[] control_buf; + delete[] test_buf; } void do_mapwrite(off_t offs, ssize_t size) @@ -343,8 +341,7 @@ void do_mapwrite(off_t offs, ssize_t size) pg_offset = offs & page_mask; map_size = pg_offset + size; - buf = (char*)malloc(size); - ASSERT_NE(nullptr, buf) << strerror(errno); + buf = new char[size]; for (i=0; i < size; i++) buf[i] = random(); @@ -364,7 +361,7 @@ void do_mapwrite(off_t offs, ssize_t size) ASSERT_EQ(size, pwrite(m_control_fd, buf, size, offs)) << strerror(errno); - free(buf); + delete[] buf; ASSERT_EQ(0, munmap(p, map_size)) << strerror(errno); } @@ -373,8 +370,7 @@ void do_write(off_t offs, ssize_t size) char *buf; long i; - buf = (char*)malloc(size); - ASSERT_NE(nullptr, buf) << strerror(errno); + buf = new char[size]; for (i=0; i < size; i++) buf[i] = random(); @@ -384,7 +380,7 @@ void do_write(off_t offs, ssize_t size) << strerror(errno); m_filesize = std::max(m_filesize, offs + size); - free(buf); + delete[] buf; } }; diff --git a/tests/sys/fs/fusefs/read.cc b/tests/sys/fs/fusefs/read.cc index 5beb59e9f3be..90516a2f7c8a 100644 --- a/tests/sys/fs/fusefs/read.cc +++ b/tests/sys/fs/fusefs/read.cc @@ -1216,8 +1216,7 @@ TEST_F(Read, cache_block) char buf[bufsize]; const char *contents1 = CONTENTS0 + bufsize; - contents = (char*)calloc(1, filesize); - ASSERT_NE(nullptr, contents); + contents = new char[filesize](); memmove(contents, CONTENTS0, strlen(CONTENTS0)); expect_lookup(RELPATH, ino, filesize); @@ -1235,7 +1234,7 @@ TEST_F(Read, cache_block) ASSERT_EQ(bufsize, read(fd, buf, bufsize)) << strerror(errno); ASSERT_EQ(0, memcmp(buf, contents1, bufsize)); leak(fd); - free(contents); + delete[] contents; } /* Reading with sendfile should work (though it obviously won't be 0-copy) */ @@ -1332,10 +1331,9 @@ TEST_P(ReadAhead, readahead) { char *rbuf, *contents; off_t offs; - contents = (char*)malloc(filesize); - ASSERT_NE(nullptr, contents); + contents = new char[filesize]; memset(contents, 'X', filesize); - rbuf = (char*)calloc(1, bufsize); + rbuf = new char[bufsize](); expect_lookup(RELPATH, ino, filesize); expect_open(ino, 0, 1); @@ -1357,8 +1355,8 @@ TEST_P(ReadAhead, readahead) { ASSERT_EQ(0, memcmp(rbuf, contents, bufsize)); leak(fd); - free(rbuf); - free(contents); + delete[] rbuf; + delete[] contents; } INSTANTIATE_TEST_CASE_P(RA, ReadAhead, diff --git a/tests/sys/fs/fusefs/setattr.cc b/tests/sys/fs/fusefs/setattr.cc index 2502286c3f03..79559db33b12 100644 --- a/tests/sys/fs/fusefs/setattr.cc +++ b/tests/sys/fs/fusefs/setattr.cc @@ -448,7 +448,7 @@ TEST_F(Setattr, truncate) { TEST_F(Setattr, truncate_discards_cached_data) { const char FULLPATH[] = "mountpoint/some_file.txt"; const char RELPATH[] = "some_file.txt"; - void *w0buf, *r0buf, *r1buf, *expected; + char *w0buf, *r0buf, *r1buf, *expected; off_t w0_offset = 0; size_t w0_size = 0x30000; off_t r0_offset = 0; @@ -463,18 +463,13 @@ TEST_F(Setattr, truncate_discards_cached_data) { int fd, r; bool should_have_data = false; - w0buf = malloc(w0_size); - ASSERT_NE(nullptr, w0buf) << strerror(errno); + w0buf = new char[w0_size]; memset(w0buf, 'X', w0_size); - r0buf = malloc(r0_size); - ASSERT_NE(nullptr, r0buf) << strerror(errno); - r1buf = malloc(r1_size); - ASSERT_NE(nullptr, r1buf) << strerror(errno); + r0buf = new char[r0_size]; + r1buf = new char[r1_size]; - expected = malloc(r1_size); - ASSERT_NE(nullptr, expected) << strerror(errno); - memset(expected, 0, r1_size); + expected = new char[r1_size](); expect_lookup(RELPATH, ino, mode, 0, 1); expect_open(ino, O_RDWR, 1); @@ -558,10 +553,10 @@ TEST_F(Setattr, truncate_discards_cached_data) { r = memcmp(expected, r1buf, r1_size); ASSERT_EQ(0, r); - free(expected); - free(r1buf); - free(r0buf); - free(w0buf); + delete[] expected; + delete[] r1buf; + delete[] r0buf; + delete[] w0buf; leak(fd); } diff --git a/tests/sys/fs/fusefs/write.cc b/tests/sys/fs/fusefs/write.cc index 9a795f8e3a10..9412d68603de 100644 --- a/tests/sys/fs/fusefs/write.cc +++ b/tests/sys/fs/fusefs/write.cc @@ -311,10 +311,8 @@ TEST_F(Write, append_to_cached) uint64_t oldsize = m_maxbcachebuf / 2; int fd; - oldcontents = (char*)calloc(1, oldsize); - ASSERT_NE(nullptr, oldcontents) << strerror(errno); - oldbuf = (char*)malloc(oldsize); - ASSERT_NE(nullptr, oldbuf) << strerror(errno); + oldcontents = new char[oldsize](); + oldbuf = new char[oldsize]; expect_lookup(RELPATH, ino, oldsize); expect_open(ino, 0, 1); @@ -332,8 +330,8 @@ TEST_F(Write, append_to_cached) /* Write the new data. There should be no more read operations */ ASSERT_EQ(BUFSIZE, write(fd, CONTENTS, BUFSIZE)) << strerror(errno); leak(fd); - free(oldbuf); - free(oldcontents); + delete[] oldbuf; + delete[] oldcontents; } TEST_F(Write, append_direct_io) @@ -659,7 +657,7 @@ TEST_P(WriteEofDuringVnopStrategy, eof_during_vop_strategy) const char RELPATH[] = "some_file.txt"; Sequence seq; const off_t filesize = 2 * m_maxbcachebuf; - void *contents; + char *contents; uint64_t ino = 42; uint64_t attr_valid = 0; uint64_t attr_valid_nsec = 0; @@ -668,7 +666,7 @@ TEST_P(WriteEofDuringVnopStrategy, eof_during_vop_strategy) int ngetattrs; ngetattrs = GetParam(); - contents = calloc(1, filesize); + contents = new char[filesize](); EXPECT_LOOKUP(FUSE_ROOT_ID, RELPATH) .WillRepeatedly(Invoke( @@ -742,14 +740,12 @@ TEST_F(Write, mmap) void *p; uint64_t offset = 10; size_t len; - void *zeros, *expected; + char *zeros, *expected; len = getpagesize(); - zeros = calloc(1, len); - ASSERT_NE(nullptr, zeros); - expected = calloc(1, len); - ASSERT_NE(nullptr, expected); + zeros = new char[len](); + expected = new char[len](); memmove((uint8_t*)expected + offset, CONTENTS, bufsize); expect_lookup(RELPATH, ino, len); @@ -774,8 +770,8 @@ TEST_F(Write, mmap) ASSERT_EQ(0, munmap(p, len)) << strerror(errno); close(fd); // Write mmap'd data on close - free(expected); - free(zeros); + delete[] expected; + delete[] zeros; leak(fd); } @@ -867,8 +863,7 @@ TEST_F(WriteMaxWrite, write) if (halfbufsize >= m_maxbcachebuf || halfbufsize >= m_maxphys) GTEST_SKIP() << "Must lower m_maxwrite for this test"; bufsize = halfbufsize * 2; - contents = (int*)malloc(bufsize); - ASSERT_NE(nullptr, contents); + contents = new int[bufsize / sizeof(int)]; for (int i = 0; i < (int)bufsize / (int)sizeof(i); i++) { contents[i] = i; } @@ -885,7 +880,7 @@ TEST_F(WriteMaxWrite, write) ASSERT_EQ(bufsize, write(fd, contents, bufsize)) << strerror(errno); leak(fd); - free(contents); + delete[] contents; } TEST_F(Write, write_nothing) @@ -966,15 +961,13 @@ TEST_F(WriteCluster, clustering) const char RELPATH[] = "some_file.txt"; uint64_t ino = 42; int i, fd; - void *wbuf, *wbuf2x; + char *wbuf, *wbuf2x; ssize_t bufsize = m_maxbcachebuf; off_t filesize = 5 * bufsize; - wbuf = malloc(bufsize); - ASSERT_NE(nullptr, wbuf) << strerror(errno); + wbuf = new char[bufsize]; memset(wbuf, 'X', bufsize); - wbuf2x = malloc(2 * bufsize); - ASSERT_NE(nullptr, wbuf2x) << strerror(errno); + wbuf2x = new char[2 * bufsize]; memset(wbuf2x, 'X', 2 * bufsize); expect_lookup(RELPATH, ino, filesize); @@ -997,8 +990,8 @@ TEST_F(WriteCluster, clustering) << strerror(errno); } close(fd); - free(wbuf2x); - free(wbuf); + delete[] wbuf2x; + delete[] wbuf; } /* @@ -1015,12 +1008,11 @@ TEST_F(WriteCluster, cluster_write_err) const char RELPATH[] = "some_file.txt"; uint64_t ino = 42; int i, fd; - void *wbuf; + char *wbuf; ssize_t bufsize = m_maxbcachebuf; off_t filesize = 4 * bufsize; - wbuf = malloc(bufsize); - ASSERT_NE(nullptr, wbuf) << strerror(errno); + wbuf = new char[bufsize]; memset(wbuf, 'X', bufsize); expect_lookup(RELPATH, ino, filesize); @@ -1042,7 +1034,7 @@ TEST_F(WriteCluster, cluster_write_err) << strerror(errno); } close(fd); - free(wbuf); + delete[] wbuf; } /* @@ -1179,11 +1171,11 @@ TEST_F(WriteBack, mmap_direct_io) int fd; size_t len; ssize_t bufsize = strlen(CONTENTS); - void *p, *zeros; + char *zeros; + void *p; len = getpagesize(); - zeros = calloc(1, len); - ASSERT_NE(nullptr, zeros); + zeros = new char[len](); expect_lookup(RELPATH, ino, len); expect_open(ino, FOPEN_DIRECT_IO, 1); @@ -1203,7 +1195,7 @@ TEST_F(WriteBack, mmap_direct_io) ASSERT_EQ(0, munmap(p, len)) << strerror(errno); close(fd); // Write mmap'd data on close - free(zeros); + delete[] zeros; } /* @@ -1252,10 +1244,9 @@ TEST_F(WriteBackAsync, direct_io_ignores_unrelated_cached) ssize_t bufsize = strlen(CONTENTS0) + 1; ssize_t fsize = 2 * m_maxbcachebuf; char readbuf[bufsize]; - void *zeros; + char *zeros; - zeros = calloc(1, m_maxbcachebuf); - ASSERT_NE(nullptr, zeros); + zeros = new char[m_maxbcachebuf](); expect_lookup(RELPATH, ino, fsize); expect_open(ino, 0, 1); @@ -1282,7 +1273,7 @@ TEST_F(WriteBackAsync, direct_io_ignores_unrelated_cached) ASSERT_STREQ(readbuf, CONTENTS0); leak(fd); - free(zeros); + delete[] zeros; } /* @@ -1298,20 +1289,15 @@ TEST_F(WriteBackAsync, direct_io_partially_overlaps_cached_block) int fd; off_t bs = m_maxbcachebuf; ssize_t fsize = 3 * bs; - void *readbuf, *zeros, *ones, *zeroones, *onezeros; - - readbuf = malloc(bs); - ASSERT_NE(nullptr, readbuf) << strerror(errno); - zeros = calloc(1, 3 * bs); - ASSERT_NE(nullptr, zeros); - ones = calloc(1, 2 * bs); - ASSERT_NE(nullptr, ones); + char *readbuf, *zeros, *ones, *zeroones, *onezeros; + + readbuf = new char[bs]; + zeros = new char[3 * bs](); + ones = new char[2 * bs]; memset(ones, 1, 2 * bs); - zeroones = calloc(1, bs); - ASSERT_NE(nullptr, zeroones); + zeroones = new char[bs](); memset((uint8_t*)zeroones + bs / 2, 1, bs / 2); - onezeros = calloc(1, bs); - ASSERT_NE(nullptr, onezeros); + onezeros = new char[bs](); memset(onezeros, 1, bs / 2); expect_lookup(RELPATH, ino, fsize); @@ -1356,11 +1342,11 @@ TEST_F(WriteBackAsync, direct_io_partially_overlaps_cached_block) EXPECT_EQ(0, memcmp(ones, readbuf, bs / 2)); leak(fd); - free(zeroones); - free(onezeros); - free(ones); - free(zeros); - free(readbuf); + delete[] zeroones; + delete[] onezeros; + delete[] ones; + delete[] zeros; + delete[] readbuf; } /* From nobody Thu Jun 13 19:41:36 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0Xpm49Hlz5PDxJ; Thu, 13 Jun 2024 19:41:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0Xpm1x0gz4tbf; Thu, 13 Jun 2024 19:41:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718307696; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B81q4zBjRw4OSZta0ieWPs++qp98Qrvbjw5jBQrp2Fs=; b=UxM2jXx36qF+Dcw081jVcXOV8v/sYt9NsLgbmBCTgj+oxYOSTNUsSezgHFDw9bPgPUMWD8 YgBygYvfBrSWRULpnOnK9NeIq/9jgeQJ+BeQfc2hMr2EhPJusY1u/4mc0We9Hy8glWNu7M vfyH/Z7UTmo6MjXZX9XCfeconFzPxDENGhvrfTOpG1M6ZXB7/P0k0KV0Oj6VhQaO7Mxx2d bYFeKet6Nxbu72m9sP+uljruYl/Su+9DUVDTPhSJbl/4ubNmBCfGSUEO4prsny/f3mEbC1 S81buQLLIeWKWUxAbdFYOsCtxLBvgYP3fzGAVV5HJWYQveAmI8dAVVi7DtUWYw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718307696; a=rsa-sha256; cv=none; b=suNPRu2iF0uxwhoHY4fUixL6uhVgCVf9oll4dBjfSerrWxw3Wulhe/SwnVPz4lG++JQQye LzpF9/YhtArijhu6wvsqTX98KQ5YIPCdx/x3t/zrIUUNWQ7YQe6qoYU+8UqPYDJeaO5yke EhTfxqvcMbYyeq/pRWru2Yv01IDMjArOSCVgr06DME7YPqkjFnxj5ziJpjEEnOpLI7UMqE LKuHgGYbNkL3paWXXxbnyE5ym94paTcqUGnfq+6StPmab0VXKRx/2BEGtqVu2+Nk3GpFBb goAGM4oEhiFanTd3umXdaLUhokrFz2sYtDLU4HMQlvrWgSJs8shd83ZWG54EHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718307696; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B81q4zBjRw4OSZta0ieWPs++qp98Qrvbjw5jBQrp2Fs=; b=brOwqgBmAxiukYy1DxVGZWPRM5cfvgHeKdq+2vTCBMgSdYg8WUe8wA8N1ICOTKHRW3r+EM zEVLSzx7f8LF/V+6OM+XYX9T7kLIAClFwQLpOHm+oHxMSoh6IKQNGqdiqzFRsuAiPVgtny 2O013hbfPV8ybXz7qe8FfEIbwd6CB593KmJaCs7QH4/uYPdPu4WybfiagmNZKVf6YVtzQB s/SKfFmUpnJ2pUYqS9bdtPUntA5AaNfzIW+BuCaf2LUBQU2gQhc3eXR94fFZbXLCV0H4Qe CWGEaolvHFow0ebq7q1eFANPZet9NCOjXxR21G2KKPsPEoQ92dTl6PE/iGw9Cg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0Xpm1P3hzq2k; Thu, 13 Jun 2024 19:41:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45DJfa6D087013; Thu, 13 Jun 2024 19:41:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45DJfagT087010; Thu, 13 Jun 2024 19:41:36 GMT (envelope-from git) Date: Thu, 13 Jun 2024 19:41:36 GMT Message-Id: <202406131941.45DJfagT087010@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: f5f1f1115f5b - stable/13 - fusefs: fix some memory leaks in the tests List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f5f1f1115f5b8497b34a5394a0ed47d96a03a1b2 Auto-Submitted: auto-generated The branch stable/13 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=f5f1f1115f5b8497b34a5394a0ed47d96a03a1b2 commit f5f1f1115f5b8497b34a5394a0ed47d96a03a1b2 Author: Alan Somers AuthorDate: 2024-01-17 21:13:05 +0000 Commit: Alan Somers CommitDate: 2024-06-13 19:40:59 +0000 fusefs: fix some memory leaks in the tests (cherry picked from commit 39f5d8dd1b2fea7cff0770efb0bc3d6e33e24279) --- tests/sys/fs/fusefs/fallocate.cc | 1 + tests/sys/fs/fusefs/mockfs.cc | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/sys/fs/fusefs/fallocate.cc b/tests/sys/fs/fusefs/fallocate.cc index 73717d6b5ce7..56ab4b698f2a 100644 --- a/tests/sys/fs/fusefs/fallocate.cc +++ b/tests/sys/fs/fusefs/fallocate.cc @@ -201,6 +201,7 @@ TEST_F(PosixFallocate, erofs) build_iovec(&iov, &iovlen, "fspath", (void*)statbuf.f_mntonname, -1); build_iovec(&iov, &iovlen, "from", __DECONST(void *, "/dev/fuse"), -1); ASSERT_EQ(0, nmount(iov, iovlen, newflags)) << strerror(errno); + free_iovec(&iov, &iovlen); EXPECT_EQ(EROFS, posix_fallocate(fd, offset, length)); diff --git a/tests/sys/fs/fusefs/mockfs.cc b/tests/sys/fs/fusefs/mockfs.cc index 92fc0c0d97a1..bd7bd1b663f9 100644 --- a/tests/sys/fs/fusefs/mockfs.cc +++ b/tests/sys/fs/fusefs/mockfs.cc @@ -521,6 +521,7 @@ MockFS::MockFS(int max_readahead, bool allow_other, bool default_permissions, if (nmount(iov, iovlen, 0)) throw(std::system_error(errno, std::system_category(), "Couldn't mount filesystem")); + free_iovec(&iov, &iovlen); // Setup default handler ON_CALL(*this, process(_, _)) From nobody Thu Jun 13 19:50:01 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0Y0V0XHvz5PFPs; Thu, 13 Jun 2024 19:50:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0Y0V007rz3wg5; Thu, 13 Jun 2024 19:50:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718308202; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=or+um3x5AjN4YCMtkq/EGET0sCb7LE0WhzsihCeR7Nc=; b=TWnRsTcdHbV2VeiL6xSjT48VSdmBki6uWvWJjzX0kEbpg9uohNvYltPleinXHm+3+X+kGP 8G/+7h7GKsA+QvwJILP/hejRtBe5gvRKDzDUl6yWPBfAICRfkU9UbsRhuHDNafgjo1aSmY 7Tl9jReq2RcRuSwk6SROa7+CRxWKm5zb/ZSKd4HezIw6IbGrBgHmX00hKFcg1JyMv9xCTf b7q4xyLbjuf5qqm8hPuxSm+QX6EsFWSeK+YaIWCcHWv31WtiJz6zZGiwjNNUiDG7UehZCd tVd3XS9tPtK2h37XFvUjYfOQbDcZpCJBGsk7UJPuUNYPru9OTuSWaDxltZl5fA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718308202; a=rsa-sha256; cv=none; b=OMKK4W6/+ccn2AuUuKPxOT1Y7WSjPweDy4NPfLi3hJv97RDgyaTxPv8aB2vpOpL+Sa26Lj /npV3227pSgYIsaqvbIhA1b9vz1RQduu7FT6THbfCaMGvPOHUMRMb4uKS/1gM0RPdNCoGd o2g7GbJ45ltxDrbxDGNtl99IkLZThWY8vAU5wNdMSOt1gpmm1S65zx1OCrUFdDbQNMtHGQ zcWAAMsOTfkO4LiFaI5UtZRs5BMIQBpfQwrTkyLRXbrXv32WP2ze/qpGymsm0akWCymuPe 2UBYS0v8dIQrmoc92SsJRLxfESfrNziG+v3Sa0midFbBRq8rwFGIdS2rBbYd3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718308202; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=or+um3x5AjN4YCMtkq/EGET0sCb7LE0WhzsihCeR7Nc=; b=jkCD8jAyCIHaHoiof9Q6CFfg2eS7l2xEyj/IKGiDZdVVzs8FEfkbibTKQF2a0AllHQ+BeL ihy67hI8f87/OSrO9Nr3MB4+JvrvwS7SubMtR4Rr7fVbFJQ67mHMUs8RsN2Eu4uYIq845r VekGpmN47+9OJqDZIIiqk+NSF4FQhQUDbN333JsD4vDF9HswkCpL6aIKRKUguz1DX69XRH 0rwIDp+nNm6SfKv7lwrpHcKL4OtWOC7F3niiZXMdYjJGgVfgMTE+JE/6UeSRRZIqGnTzw2 QuyTROJV8CR1CfGEfIUl3tBq1cn5Up8KmHPPHtZw0PrO0KFNHKXPFJ/clI8ayQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0Y0T6hzmzqHR; Thu, 13 Jun 2024 19:50:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45DJo1VB092185; Thu, 13 Jun 2024 19:50:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45DJo1vB092180; Thu, 13 Jun 2024 19:50:01 GMT (envelope-from git) Date: Thu, 13 Jun 2024 19:50:01 GMT Message-Id: <202406131950.45DJo1vB092180@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: bd11dd6fb9a0 - stable/13 - fusefs: only test for incoherency if FN_SIZECHANGE is set List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: bd11dd6fb9a0e4daa04f0fa66ed38d44f716e919 Auto-Submitted: auto-generated The branch stable/13 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=bd11dd6fb9a0e4daa04f0fa66ed38d44f716e919 commit bd11dd6fb9a0e4daa04f0fa66ed38d44f716e919 Author: Emil Tsalapatis AuthorDate: 2024-02-08 01:13:43 +0000 Commit: Alan Somers CommitDate: 2024-06-13 19:46:01 +0000 fusefs: only test for incoherency if FN_SIZECHANGE is set FUSE emits spurious incoherency warnings in writethrough mode. The warnings are triggered by setattr calls generated by vnode truncation turning the cached va_size vattr stale, causing comparisons with the fresh version provided by the server to fail. Only validate the vnode's va_size vattr if the FN_SIZECHANGE flag is set. This is a part of the research work at RCSLab, University of Waterloo. Reviewed by: asomers Pull Request: https://github.com/freebsd/freebsd-src/pull/1110 (cherry picked from commit 8758bf0aaec1d4b2ebcb429e8cabc691c2c95461) --- sys/fs/fuse/fuse_internal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/fs/fuse/fuse_internal.c b/sys/fs/fuse/fuse_internal.c index c851cb2e34f4..adf84d30e801 100644 --- a/sys/fs/fuse/fuse_internal.c +++ b/sys/fs/fuse/fuse_internal.c @@ -270,10 +270,10 @@ fuse_internal_cache_attrs(struct vnode *vp, struct fuse_attr *attr, if (vnode_isreg(vp) && fvdat->cached_attrs.va_size != VNOVAL && + fvdat->flag & FN_SIZECHANGE && attr->size != fvdat->cached_attrs.va_size) { - if ( data->cache_mode == FUSE_CACHE_WB && - fvdat->flag & FN_SIZECHANGE) + if (data->cache_mode == FUSE_CACHE_WB) { const char *msg; From nobody Thu Jun 13 19:51:39 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0Y2N10QWz5PFyt; Thu, 13 Jun 2024 19:51:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0Y2N0Bl3z3wtf; Thu, 13 Jun 2024 19:51:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718308300; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ssRigyyHJnm0++WnhuKjmodx/dtUz6kMQoZT0ckkdIY=; b=so+a87RjhFm9SYOYVQXGPDg9zrlFk/4afIU8PyDklCyTU1h3aHp3TTyv8Ho1MPUCOKqaXz iHj2lUV/s3INmlmgNTBtwy5wUNYi7YigJbs1eBNgRlA5VA7uwUlezkvCY/yd63U36mu44R pFRjlx5EjFefmNzKXGay3uenkqwEh+PGcsIYQ5ZPlLDetLd6gpzvTsRBbjc9Dfsx//yw8V 7PVQpUQXCI2us/4JFMdKNBT9T4mQoB3yBGWAPRVMXDCfHFhgP+GCclhaO4+0m/xLLRJ7X5 pN/nBpMN0p6o7V28Kfq5rEP2sE6+4OvHhYuteHGY5r/HhSfdtq2QF9gJECEegg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718308300; a=rsa-sha256; cv=none; b=GfNHd60TVsRERkucbkMYatXKPnAv+pmuAcqgTwg8uM3Br0n6SQeoRc3tN0DOczX+9v9PvT 1oIlVhJ+bX84tr0nfVHAAa2RUiEBj5iQCsJRuWmGzA8KCLd7Gw0Q5cY5asFCsvV8ZFlsm+ aDrj3lXZu11BXmcQH1Qb2PGv5Nqz3/0fePzhiaJ8ZrJk1w3iahvkHWKU2X9PxpVH683Yq7 3yoJtrIYlFlCJaMte8JyaSlVpW1q5bUr7hSjvYQRYrhkWhXit2BWcrV5jx9ieaqgSw5dg5 VENvrlpvnOtIFa1WdJ2kUlH68xaDOkpzKegM9DwSWmv48OPe+hTnW+LXh0OlJw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718308300; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ssRigyyHJnm0++WnhuKjmodx/dtUz6kMQoZT0ckkdIY=; b=PLpa63yTB+K6WmebdbiVaRtPZ8eI/VS0XAPb5mSaHrTdhMSJIA2VcFLJSpaoy670dVtVD7 71BoT+vY8JWPfFH0hYzUexwmnzLySHAtId3vtnZ/hBmzhYjoIMKkyAIXIxs+qaSPm2gZt+ qxWVC8JaA72Sy2ITu4DKHXPVp6mThAZEN16i6iyZh97o8Gg6pWgrKbtqj+y1aktF3nDEOs 76PeSbfUiQrbRnQU9hFF3OwgFODkjgAlzHtjERBWVo2K9k25Ufq4mp0RZvPJmrlMhA46VV MLf4k3hbbksysYPAf7QCgr+OGdTvwa/nkKgRunWvpIlZPuowOq5I6V+S0sD1rw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0Y2M6vf8zqkc; Thu, 13 Jun 2024 19:51:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45DJpdsm000954; Thu, 13 Jun 2024 19:51:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45DJpdcK000951; Thu, 13 Jun 2024 19:51:39 GMT (envelope-from git) Date: Thu, 13 Jun 2024 19:51:39 GMT Message-Id: <202406131951.45DJpdcK000951@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: cb3c40b43049 - stable/13 - fusefs: correct a comment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: cb3c40b430496aed7b567a03e6b0da8b67077e19 Auto-Submitted: auto-generated The branch stable/13 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=cb3c40b430496aed7b567a03e6b0da8b67077e19 commit cb3c40b430496aed7b567a03e6b0da8b67077e19 Author: Alan Somers AuthorDate: 2024-04-04 20:18:56 +0000 Commit: Alan Somers CommitDate: 2024-06-13 19:51:08 +0000 fusefs: correct a comment [skip ci] Sponsored by: Axcient (cherry picked from commit c1326c01df81dd06739ddf1946e1968ddaba0c8e) --- sys/fs/fuse/fuse_node.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sys/fs/fuse/fuse_node.c b/sys/fs/fuse/fuse_node.c index 52bd2d92f4da..e3448e6fa42f 100644 --- a/sys/fs/fuse/fuse_node.c +++ b/sys/fs/fuse/fuse_node.c @@ -113,14 +113,15 @@ SYSCTL_COUNTER_U64(_vfs_fusefs_stats, OID_AUTO, node_count, CTLFLAG_RD, int fuse_data_cache_mode = FUSE_CACHE_WT; /* - * DEPRECATED - * This sysctl is no longer needed as of fuse protocol 7.23. Individual + * OBSOLETE + * This sysctl is no longer needed as of fuse protocol 7.23. Now, individual * servers can select the cache behavior they need for each mountpoint: * - writethrough: the default * - writeback: set FUSE_WRITEBACK_CACHE in fuse_init_out.flags * - uncached: set FOPEN_DIRECT_IO for every file - * The sysctl is retained primarily for use by jails supporting older FUSE - * protocols. It may be removed entirely once FreeBSD 11.3 and 12.0 are EOL. + * The sysctl is retained primarily due to the enduring popularity of libfuse2, + * which is frozen at protocol version 7.19. As of 4-April-2024, 90% of + * FreeBSD ports that use libfuse still bind to libfuse2. */ SYSCTL_PROC(_vfs_fusefs, OID_AUTO, data_cache_mode, CTLTYPE_INT | CTLFLAG_MPSAFE | CTLFLAG_RW, From nobody Thu Jun 13 20:15:12 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0YYY0l22z5PHLn; Thu, 13 Jun 2024 20:15:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0YYY0HLbz40br; Thu, 13 Jun 2024 20:15:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718309713; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=demhMVI7uRLdVdBgxafaLz12L2SGi1p3tlcAF0noQOY=; b=cJIWBFLAz5LC3CnyBZoE9FBZy0blvWiCKEpscB+4RXrwoBHF/w/IIuwhNowhyqc8M1t9qS xlNqDLwkhBREBYb4d6Eqo1IghyHvlYYSr30/80ArcxfD/jSkhySvCfsE1miHF5m6g1gDly N7+L6ToAMzKXcK40lNlJZrjbP+9tA+4jPm3uUP/xthvg2NvTK9txwVoxAYlj+sBuvKtNYU u2WBTCWm0SO1YZ9+1KHo8kkz9QffCj27HqrFwZzNB4F/vYiE6R4ZsDiZMuqByzkSXmbv0Z vbr3a/gIRMyhPSfCOG822gl2J2lgmP+8TmVXjbrWvw7Ms59iwgNh6lmq6AWZPw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718309713; a=rsa-sha256; cv=none; b=CKgjuG2HdhTTOweFruHOQdJ8e6BlkPlirL3TuJj0ORz6ieuUn4QKYbRP/+BPB+p449AuzA +18oqqsjLzKkguQBIrCsrcyXXX+d8rKvtKz6T6SnqwPbdfED0LYYo5ljK/ORYxCnLgTqlg mA38ATlWVGy3oqQzuH/EEYy7kP3iYN1C43P/4uLPmqIoy2h9v57Q7b5xbCE6N1/C7RQXhQ 5zoxBDDV0E1gM9IwRVIEQMUc4xXT4JJYN9FCYbI+jpp3rRcGA8cu5s/1dUEaEV0IOHPF/0 hYirBgvWEj3xyA7di/patoY8hsWaMa0eijNIP8j5DXpTX3/maqoN4MwU7J+xIQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718309713; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=demhMVI7uRLdVdBgxafaLz12L2SGi1p3tlcAF0noQOY=; b=QyFcWQENWLByJnT5sVoyAW92tgispXI11/RDx3zfgAX7ExlNb1KCBvuF6468iRNjebUGxJ L/d+uJhp/vvRs/3/teDYPWfm+SVZ+fDMi91YNyQ+VastQ2FM2hPY2u2dk10CD19/LlQbnh SA+ncgbHi4hO4YLQs2IrDTZOusBsxmPYc9xaT5oJZdSz5hDnOT24kYvPBmC5+EfK+xej49 teW5ZZHQ0JJmNIWFAvxWxCHUHOJiziUT4I2rBftdFJFXkWPuoLgnoNHFs9ilRGK5sxjoO6 A1tYVDnVDpe3SJ1c9Q3H3+I3EcdJPXKIvQofcD2Q/SMmwfGtb2/i3/e6PV7JqQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0YYX70ZkzrGG; Thu, 13 Jun 2024 20:15:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45DKFCww041099; Thu, 13 Jun 2024 20:15:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45DKFCaX041096; Thu, 13 Jun 2024 20:15:12 GMT (envelope-from git) Date: Thu, 13 Jun 2024 20:15:12 GMT Message-Id: <202406132015.45DKFCaX041096@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Cox Subject: git: 268f19aacc6a - main - vm: Reduce address space fragmentation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: alc X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 268f19aacc6af8f64c438e8515213023a2e66ed7 Auto-Submitted: auto-generated The branch main has been updated by alc: URL: https://cgit.FreeBSD.org/src/commit/?id=268f19aacc6af8f64c438e8515213023a2e66ed7 commit 268f19aacc6af8f64c438e8515213023a2e66ed7 Author: Alan Cox AuthorDate: 2024-06-09 16:58:27 +0000 Commit: Alan Cox CommitDate: 2024-06-13 20:13:45 +0000 vm: Reduce address space fragmentation jemalloc performs two types of virtual memory allocations: (1) large chunks of virtual memory, where the chunk size is a multiple of a superpage and explicitly aligned, and (2) small allocations, mostly 128KB, where no alignment is requested. Typically, it starts with a small allocation, and over time it makes both types of allocation. With anon_loc being updated on every allocation, we wind up with a repeating pattern of a small allocation, a large gap, and a large, aligned allocation. (As an aside, we wind up allocating a reservation for these small allocations, but it will never fill because the next large, aligned allocation updates anon_loc, leaving a gap that will never be filled with other small allocations.) With this change, anon_loc isn't updated on every allocation. So, the small allocations will be clustered together, the large allocations will be clustered together, and there will be fewer gaps between the anonymous memory allocations. In addition, I see a small reduction in reservations allocated (e.g., 1.6% during buildworld), fewer partially populated reservations, and a small increase in 64KB page promotions on arm64. Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D39845 --- sys/vm/vm_map.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index 3c7afcb6642f..fa71bb8a01d6 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -2247,8 +2247,15 @@ again: rv = vm_map_insert(map, object, offset, *addr, *addr + length, prot, max, cow); } - if (rv == KERN_SUCCESS && update_anon) - map->anon_loc = *addr + length; + + /* + * Update the starting address for clustered anonymous memory mappings + * if a starting address was not previously defined or an ASLR restart + * placed an anonymous memory mapping at a lower address. + */ + if (update_anon && rv == KERN_SUCCESS && (map->anon_loc == 0 || + *addr < map->anon_loc)) + map->anon_loc = *addr; done: vm_map_unlock(map); return (rv); @@ -4041,9 +4048,6 @@ vm_map_delete(vm_map_t map, vm_offset_t start, vm_offset_t end) entry->object.vm_object != NULL) pmap_map_delete(map->pmap, entry->start, entry->end); - if (entry->end == map->anon_loc) - map->anon_loc = entry->start; - /* * Delete the entry only after removing all pmap * entries pointing to its pages. (Otherwise, its From nobody Thu Jun 13 20:28:59 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0YsR5kwDz5PJ6V; Thu, 13 Jun 2024 20:28:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0YsR5593z418L; Thu, 13 Jun 2024 20:28:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718310539; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Lu2nCs/p6DKkDMwzxSyg4cQsywLH34pcxV1Ew64/flw=; b=yhcazvw9ez8lUebaox5A04PkiEbzqwXeqqem3mXJq8FH0D+XkPugOhgK9xHcKgScKVmlah 6xJql2Bb/8/oaIydbSadVEHxIZi0ghDrwJRgPIAhaS/wYnMOG1R1kkuODtVUFrcBF07tAS VekMzw6yvy/TMESytZZXLNtHzs+GnWPeaoQfJ62SFifNazY12gUqOCxNtxAorY2A/Jo0oL Vp1UoyqG7ytTr5MRRqiqH76WYdY5u0HsrIK0t5Q8vSgyRVR/C9dmsjBaVP2zqHtE0vh7EF 1tko52vhwaep0poZUafVoqclZvCcl4mlgZpIpxX8PPALylJ/TmQiZOI0ICo5JA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718310539; a=rsa-sha256; cv=none; b=CONfYth8I8rkeUNoXfDbfkGbCwVTAK5DvqNnVfw1BxFQyByBnFGXM0J2Coy4RfAv8yAzjO IA25SSwSGoRPDhO7Ow6JKZLu28/A6U2VuAKqMEiSq6dtzjXpNUtQHNmlk5Ymg/CToga7Fd 2f71qKU2GyYU6MZiqsGOzKRDkvd8myZVK32Zeu/NuQjpHCVWYDHev+2EraR/OBL6OIMOfL gt1dGWEQDjk5r+iFEChnAFyxYSCKx6oHRFnk9L30OmD5w1nQVQQqfyl6DqLmmDYL8kxfBw oxr7eN6iG1ecLGNMNef9hZMBI+XdgUSR2cQWYXeY7hs+urOVQSCp8mEdM6lmNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718310539; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Lu2nCs/p6DKkDMwzxSyg4cQsywLH34pcxV1Ew64/flw=; b=hCEaUu13494k+6I9uajOOve0fNMbf6TD+ySJJiwDAH/wFzM56WeIwPocVnIw2bcqZBenMv L7z/+CKZoEGjsirByD8ulm1TxvYtzap2ioZvztkE04RAsMSadMU8gSxQD9rJO1FzBkf0/1 /ci0Z0p0jvCeXdSDeWdZ1bKQxsV9NXpmmMi9ld/2ldBf7j5qYhjQv2+2nxS6MhmBGKShHn S1PTR06KP5qelS2vMi8fvQZxUuZvQhBy+MQ8vJl0XQumyhujJjyYF1bCdwf3K8HZsDkWbo cnofRaNmTpsXHZUrnP55G+ZddzysebP4RArbJEK4kmX3pwz2SPLqaR8d0n8W7w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0YsR4hTxzrR6; Thu, 13 Jun 2024 20:28:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45DKSxKY058630; Thu, 13 Jun 2024 20:28:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45DKSxBC058627; Thu, 13 Jun 2024 20:28:59 GMT (envelope-from git) Date: Thu, 13 Jun 2024 20:28:59 GMT Message-Id: <202406132028.45DKSxBC058627@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: d19851f00286 - main - subr_pctrie: add a word to a comment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d19851f002862a5510bf31fae4083fab979258be Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=d19851f002862a5510bf31fae4083fab979258be commit d19851f002862a5510bf31fae4083fab979258be Author: Doug Moore AuthorDate: 2024-06-13 20:28:15 +0000 Commit: Doug Moore CommitDate: 2024-06-13 20:28:15 +0000 subr_pctrie: add a word to a comment No functional changes. Reported by: alc --- sys/kern/subr_pctrie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/subr_pctrie.c b/sys/kern/subr_pctrie.c index 347c2bffd503..6949e3de99bf 100644 --- a/sys/kern/subr_pctrie.c +++ b/sys/kern/subr_pctrie.c @@ -802,7 +802,7 @@ pctrie_remove_lookup(struct pctrie *ptree, uint64_t index, * Walk the subtrie rooted at *pnode in order, invoking callback on leaves and * using the leftmost child pointer for path reversal, until an interior node * is stripped of all children, and returned for deallocation, with *pnode left - * pointing the parent of that node. + * pointing to the parent of that node. */ static __always_inline struct pctrie_node * pctrie_reclaim_prune(struct pctrie_node **pnode, struct pctrie_node *parent, From nobody Fri Jun 14 01:21:13 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0hLd5nZVz5N2sh; Fri, 14 Jun 2024 01:21:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0hLd59hNz4VP0; Fri, 14 Jun 2024 01:21:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718328073; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cYR6Hzpv16ZSLzq6Z/KgjdsuY47Iaj/Hl+m6s5pSjJY=; b=ik7cZmPkszlWuJjJivekkhzrXZUrtziQbXam6eyvCYKNvkPcffEbAwyQ+X2kAGcj7asSgJ Xu8VUptAmC+qzFgDStfS3sOZe+ks6vN4ZXN3jvFN/isscug3BAg3NE3A1WvkGklGBdb9+i BFrzJ0mZb4qMOKlLqCa8TavexsGXY4RbB4c/u/o+mgCwW1CbdJRxLpkW699JjhQKJ5WlgG O8L58s7o4P2mEvqlQN/8a6ESHOacWVdtdFT1wz3oLI/XeKuVlx9rYvpuUyQHnbhmYN6rM0 NkLCm06SFCWz68VIabKeVzHLkPSGRl/sc05EFrJrQ2tLfe4bceQ/fY0uDIXymw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718328073; a=rsa-sha256; cv=none; b=Fecpagyn4++tXEUA8gYdJ5YLLJKx6Tm5xKrr8hMP6xynDsE2nQKWmiRk0UuZzmJIdJ7qtA PJaEphvPT4YYuk3efsfeVFMjJvAG3/9vSM89Rf33l+le+cx3NCQB5Gl/Ygs/k9EbPb8Pqc Bd8wCLrk/k8TxMdp2kaLzvwO7fvwPriBujs6G8IQ47ksqEcTfa106HC3IGwuicW0mwu6Bo E0dAlMepYYvO7qEexBsGI+2mhipIxKPwHtN2Zdi5lvel6j6/0JljANyNDkfMGdOxSyN4nq 6Jsyst+uSNr7ogEDZ2B06N7qFiyjyx8z8n1xYiW25+TSBcL/KlDMCPzCER/+6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718328073; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cYR6Hzpv16ZSLzq6Z/KgjdsuY47Iaj/Hl+m6s5pSjJY=; b=DyeTAJWejMWE74iYW+i3NCW6ZTrV8bZUe6bNDiJjGEw1987f+lfP8Ro1wSYq4+XBqBLQ7a hn46nK0W4O7ZcXHYrSYmBF+GLutn69GGnJbdTLVodvG3s+ixUcUhP4Vvzq5n2H60sqXlDc ZvXtREOq/LLlOQaBLmZQXqzD/DDj7KQeGRP0sDlz39un3iC/XYCrOGZ+/dAc184/FBJxRd oIzFIQRRGafLD5hZUV+WMiuVXU7MRtdYLam4iKuAPVVFC4jxcXzfFZG2vvk9t5GZ4uASoU NVokqzlseVCBFwAtGgrB53QIulUJCyKb/xvPuRXKPSbUCOfHoc+DXocBeNScpQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0hLd4n4pz10xf; Fri, 14 Jun 2024 01:21:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45E1LDxC054561; Fri, 14 Jun 2024 01:21:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45E1LDgQ054558; Fri, 14 Jun 2024 01:21:13 GMT (envelope-from git) Date: Fri, 14 Jun 2024 01:21:13 GMT Message-Id: <202406140121.45E1LDgQ054558@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: d9220f64da8b - main - uniq tests: Make uniq_test:stdout more reliable List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d9220f64da8b1d55b15259e8b266b50371ed4f47 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d9220f64da8b1d55b15259e8b266b50371ed4f47 commit d9220f64da8b1d55b15259e8b266b50371ed4f47 Author: Mark Johnston AuthorDate: 2024-06-14 00:00:47 +0000 Commit: Mark Johnston CommitDate: 2024-06-14 00:00:47 +0000 uniq tests: Make uniq_test:stdout more reliable When running regression tests in paralle, this one occasionally fails because uniq exits with status 0. I believe this is because the test is a bit racy: it assumes that true(1) will exit before uniq writes to standard out. Just sleep for a bit to give the other end of the pipe to exit. Reviewed by: des MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45534 --- usr.bin/uniq/tests/uniq_test.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.bin/uniq/tests/uniq_test.sh b/usr.bin/uniq/tests/uniq_test.sh index 804e82ce7766..9d37245dee4e 100755 --- a/usr.bin/uniq/tests/uniq_test.sh +++ b/usr.bin/uniq/tests/uniq_test.sh @@ -167,6 +167,8 @@ stdout_head() { stdout_body() { ( trap "" PIPE + # Give true(1) some time to exit. + sleep 1 echo a | uniq 2>stderr echo $? >result ) | true From nobody Fri Jun 14 01:21:14 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0hLf6gxNz5N2qK; Fri, 14 Jun 2024 01:21:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0hLf63QVz4VBL; Fri, 14 Jun 2024 01:21:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718328074; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n4MP8LsOJEc/y11Uo8eNgqUjfi14KVp71WT1ASszL4w=; b=ypF2v/JwiDeftOSZAd2H3FZ3U5OyOGc37mFzXEApSXgCwocbyqLcyc82DaXLLSJ7UaNxg+ N+I9yjWVIhsBt1pIhyWVfdKy5o6NIrbMnGJWUxfXXhnbuawrLpw5OIh9K972W0YANMwhla qXag/2u4MOrCQYdyd7Uoxy87OEyD2WISrIe5ynIg1sl2O9HzfSh5mTWmmRMtDUAN4GRjwV BQ08hM+uIAHqxC+U4f1B/InD+7iv9pJAcLsWWXEKs2H8pe8kQ9KzA4QprUSl+wMASgCT3y DEG8hbw3iW0YWWeiXiRz0CqqrhEzKW5TTExUC4Dtzw8TAYv9dALrWqKIaA5llA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718328074; a=rsa-sha256; cv=none; b=eoazZITf/N/E++Fw3wJrf3qKzMckX1ye27EUwo6u/yNcZ8290yHkSaMJMj1QoqMH9AXcVK bzlIAepumDq12XBMjVTK8jUXpptBOtIVRVzDIAu5i9lKaCDhp8yh3BnUSFrtdev6fgkmzQ z9EOfv9wufL15Cw1ndA5j+iK36L9PGS//yT+cZBRd+z5xNQCE9StrvBsdZ86LWWvlgNrTz 5kxeff1bnG1M91CInT70bb9vrMn/LuyqwFlaHYuQQX0Ob4tHnK1HoadCO3khvjJf9jjB4Z Ga9XzRCW437Qr62tcIIz12BXI2Yl+zGg2pJ+NUWjEx6lu7sCPUbO5163BHvIVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718328074; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n4MP8LsOJEc/y11Uo8eNgqUjfi14KVp71WT1ASszL4w=; b=V7zIEp17tnJbGCZ1rb0u6j817fqz86QxCUIVPv9Jt+AXo7KgcBDhgkW6BUF7UcRm5nmiLa Hhstd3aMo+T8gDOBweT84uaKkwJV9N0aFnQ4Yw/7R1inFffadZ5SNJOhdLH4o3qa3JEBjL khBmRNGwVipyiP/Jxh5DIPAcq2uk8jHYLC6Mhn30oTOZ4pihJlzdIKYObdWwc0537i3xNZ nCHXmPFeVG2sYTDCs9IGfApCFq4/7MWAXjeZMUX/hB8DX4ow1wke4dphMjeL77UhkADwEG mCbWnAhabOtxkomzN9DeUAJOwbYBssDukZAo+O7Z0nHduj23bVTrQIpgkvp/Hg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0hLf5frkz10vd; Fri, 14 Jun 2024 01:21:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45E1LE1k054612; Fri, 14 Jun 2024 01:21:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45E1LEn1054609; Fri, 14 Jun 2024 01:21:14 GMT (envelope-from git) Date: Fri, 14 Jun 2024 01:21:14 GMT Message-Id: <202406140121.45E1LEn1054609@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: ab250b02ba4c - main - bnxt: Use a simpler test for 32-bit platforms List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ab250b02ba4ca29572a29dedc9e6276cba5a66db Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ab250b02ba4ca29572a29dedc9e6276cba5a66db commit ab250b02ba4ca29572a29dedc9e6276cba5a66db Author: Mark Johnston AuthorDate: 2024-06-14 00:02:32 +0000 Commit: Mark Johnston CommitDate: 2024-06-14 01:18:26 +0000 bnxt: Use a simpler test for 32-bit platforms Suggested by: jrtc27 Fixes: c867ba72889d ("bnxt: Do not compile on 32-bit platforms") --- sys/modules/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/modules/Makefile b/sys/modules/Makefile index d3ef4c63a41c..7ce956957fd5 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -442,8 +442,7 @@ SUBDIR+= dtrace SUBDIR+= opensolaris .endif -.if ${MACHINE_ARCH} != "i386" && ${MACHINE_CPUARCH} != "arm" && \ - ${MACHINE_ARCH} != "powerpc" && ${MACHINE_ARCH} != "powerpcspe" +.if !${MACHINE_ABI:Mlong32} _bnxt= bnxt .endif From nobody Fri Jun 14 01:21:15 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0hLh10lnz5N2qT; Fri, 14 Jun 2024 01:21:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0hLh0BK0z4VBQ; Fri, 14 Jun 2024 01:21:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718328076; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6plyWhQabunl3dW5/Xq+rFUKNIU/dM9HtCR7DNbrMb4=; b=GDcRf/aEDx12s/CAr8aRtDwIHy0Z0/oTM1pssfSmIIv6VAVPlKX5fw4ng8Z2t4s9ipEj9t qjghWyw8esiaTUE4NDFbxkGoIvSo1RrpsOExGukdaux7Ag3N1GWNGPq40KtrHcI7NQ3Tgs InSYMGJ17IJ/lCWl+4fXrqXS/loHyGe+SsdXxUynpxqZ7X5gmp6zULhYxiw4KXWzhU0b2B VIB8FwAwZQ8gIzDvktwxwpTuisOy8A97Y/4iskpT36+tAuzdi9F3cb2/2YeNn7yqIeeMtX dlIf+CRX+b5d7MhluKJZzr9eWln/7SLi3Po7XBnA8ll5189d1C5Dn9p6rdHxBQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718328076; a=rsa-sha256; cv=none; b=E83Nqxn3pfyIpZ+q9UvKCH0e1W9fUDSQUF9/E+M2XyRGl/lyxuwmmLq7EN5QdeUx+4647G gY5L+8zjDHkuSnjva5Qp3tEqKGJ3zwkVJBBsKxpoVodZXLvUAkMefrgRMCWGOkzcQ+5t/l XptLDLSL5AD9A8OXTLdTXPFGRLNTPTVXhxcGsEEFXux4vYOpl3N+rQRXQIFaqtmd+oUdg0 U8ZFrZn7oT6fXUkNGEc+5F6Kz8yxcZlcXFtV85+Dz+0VG7zJzerKPLGMGClxuDQxrEyLZ6 BB6hYpNBbcYXX3U3Cu0zYZ21Tml1Xgqh/Kj5tjyfZSjwHsivURGTPDlwzbOf1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718328076; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6plyWhQabunl3dW5/Xq+rFUKNIU/dM9HtCR7DNbrMb4=; b=uR+LZr+w1XNtEWNOWBgru8z93yjV0118OqODzOfOnN4IxkgBnc8Ae51LhFGym8DBYDzhSW cAy7QRIJsubRvgWEuPSZzAobsts/Mf/En1ad++agsfMwT3ZIjct7HkkE6ZdYYa0XADsh3g /12DlSaGOpMdeKvXGjovfJdavlQv57mzISKnl32nkvQ1T/iCoSvcD+eqRYosqgiTQ8IlFL 1yEV8ClWXUJm1S5uXBdU8dcEUNuE/YbnccGNoPINOqBD2rzi5tCO/On9CYl1iY80Mfk1a7 zBGrkaT4Qs1wLftoikep91fb+a89i5pwPxeT8ZwPlQ+q5oipawv068BmVdiwkg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0hLg6Smpz10ct; Fri, 14 Jun 2024 01:21:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45E1LFso054664; Fri, 14 Jun 2024 01:21:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45E1LFXI054661; Fri, 14 Jun 2024 01:21:15 GMT (envelope-from git) Date: Fri, 14 Jun 2024 01:21:15 GMT Message-Id: <202406140121.45E1LFXI054661@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 69ccea1c89da - main - vm_page: Let vm_page_init_page() take a pool parameter List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 69ccea1c89da82cbb772ac4cca62c1067346fe95 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=69ccea1c89da82cbb772ac4cca62c1067346fe95 commit 69ccea1c89da82cbb772ac4cca62c1067346fe95 Author: Mark Johnston AuthorDate: 2024-06-14 00:11:03 +0000 Commit: Mark Johnston CommitDate: 2024-06-14 01:18:59 +0000 vm_page: Let vm_page_init_page() take a pool parameter This is useful for a subsequent patch which implements lazy initialization of vm_page structures using a dedicate vm_phys free page pool. No functional change intended. Reviewed by: alc, kib, emaste MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D40399 --- sys/amd64/amd64/efirt_machdep.c | 3 ++- sys/vm/vm_page.c | 10 +++++----- sys/vm/vm_page.h | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/sys/amd64/amd64/efirt_machdep.c b/sys/amd64/amd64/efirt_machdep.c index 5d0106e2aa88..2c00a16b1499 100644 --- a/sys/amd64/amd64/efirt_machdep.c +++ b/sys/amd64/amd64/efirt_machdep.c @@ -245,7 +245,8 @@ efi_create_1t1_map(struct efi_md *map, int ndesc, int descsz) m = PHYS_TO_VM_PAGE(va); if (m != NULL && VM_PAGE_TO_PHYS(m) == 0) { - vm_page_init_page(m, va, -1); + vm_page_init_page(m, va, -1, + VM_FREEPOOL_DEFAULT); m->order = VM_NFREEORDER + 1; /* invalid */ m->pool = VM_NFREEPOOL + 1; /* invalid */ pmap_page_set_memattr_noflush(m, mode); diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 4b97637668b4..3077b023754a 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -497,9 +497,8 @@ vm_page_domain_init(int domain) * lists. */ void -vm_page_init_page(vm_page_t m, vm_paddr_t pa, int segind) +vm_page_init_page(vm_page_t m, vm_paddr_t pa, int segind, int pool) { - m->object = NULL; m->ref_count = 0; m->busy_lock = VPB_FREED; @@ -509,7 +508,7 @@ vm_page_init_page(vm_page_t m, vm_paddr_t pa, int segind) m->psind = 0; m->segind = segind; m->order = VM_NFREEORDER; - m->pool = VM_FREEPOOL_DEFAULT; + m->pool = pool; m->valid = m->dirty = 0; pmap_page_init(m); } @@ -756,7 +755,8 @@ vm_page_startup(vm_offset_t vaddr) #if defined(__i386__) && defined(VM_PHYSSEG_DENSE) for (ii = 0; ii < vm_page_array_size; ii++) { m = &vm_page_array[ii]; - vm_page_init_page(m, (first_page + ii) << PAGE_SHIFT, 0); + vm_page_init_page(m, (first_page + ii) << PAGE_SHIFT, 0, + VM_FREEPOOL_DEFAULT); m->flags = PG_FICTITIOUS; } #endif @@ -765,7 +765,7 @@ vm_page_startup(vm_offset_t vaddr) seg = &vm_phys_segs[segind]; for (m = seg->first_page, pa = seg->start; pa < seg->end; m++, pa += PAGE_SIZE) - vm_page_init_page(m, pa, segind); + vm_page_init_page(m, pa, segind, VM_FREEPOOL_DEFAULT); /* * Add the segment's pages that are covered by one of diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h index 221f58b8fb04..5422f8df89a0 100644 --- a/sys/vm/vm_page.h +++ b/sys/vm/vm_page.h @@ -645,7 +645,7 @@ void vm_page_free_invalid(vm_page_t); vm_page_t vm_page_getfake(vm_paddr_t paddr, vm_memattr_t memattr); void vm_page_initfake(vm_page_t m, vm_paddr_t paddr, vm_memattr_t memattr); void vm_page_init_marker(vm_page_t marker, int queue, uint16_t aflags); -void vm_page_init_page(vm_page_t m, vm_paddr_t pa, int segind); +void vm_page_init_page(vm_page_t m, vm_paddr_t pa, int segind, int pool); int vm_page_insert (vm_page_t, vm_object_t, vm_pindex_t); void vm_page_invalid(vm_page_t m); void vm_page_launder(vm_page_t m); From nobody Fri Jun 14 01:21:16 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0hLj69Dwz5N2nL; Fri, 14 Jun 2024 01:21:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0hLj0wPhz4VV0; Fri, 14 Jun 2024 01:21:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718328077; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yvntLzBnE5ANynjvuPP4z1JWBn8WoWn+EwJPNTVzD/M=; b=VqNEZ5rokGWOd1ZFgSJ9Jgb/EDLJtiiI1fHtivZOTizxOQ7PF7HSOczfO+TI0FD3QElGfY UqXKMy4xu3SP3zXjw9Ut91G+P7N6bbqRifJRWthj3LsvAhOh5b5w1ANAfDkZ/H8+mHaakn KYOzAFEiATqs8gfdg4Ayrq29y3B6rAEuI1jFJbEZOBXj1VfZZmmVPNNCl1YR2XBGEp8jXt Q7b8QGhEEWkYW2tl3f4TJ1ZT5asNZPh+g8vfgLtyIFy0IpMBV6vr9fJQu633WjOlJzIkOf X92f9E/gXc/KrJsySDbFpL/XtjPV40BjGYbwOAoj0S32yScDZeUN/I5cv4cJsw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718328077; a=rsa-sha256; cv=none; b=sflXfj/HhAxWVKFPmwQcR663PA9iiMED4hyyo6msNiDJUFW4w07iXlBVxArdE7i8H42/2d 8cpW6RPm1sJBcH14l0N1YI8HQeChG2mm/b272GI1G5FCMJW1G/eIMrV/0sOhokhn+PpTi3 7OxXhqkvOnW1pjOF4nL3T8yWSzfpDXTDR2hBNmQMkdF+b1XsW69VWdmTBUWYHY+aNJpoOo VX59Tkx6JhvOLTRyIsjLGmWle/gSkOqshFFeeeLy1OxFRhbOlsA2YuqsrhhPRdxiVor07u K22DRjjYnSzuG5o1CzTSiC4nZlJ4s/6GMghsUjFxJeuINRRyoFo8h50u2lvrkw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718328077; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yvntLzBnE5ANynjvuPP4z1JWBn8WoWn+EwJPNTVzD/M=; b=YOufWXnb0pVxQuZTlKfq4yFYmn2pflBRrk/x2WteNmwz6o1nlUxw8KmwawKQ7vT4GC7viQ EgwIKanAzOidBQ693VqZJ8lV/5FHaFs5rWw8Ryn9tu/GNdrE9zfPJjJuG6KYiBa0utf821 gHsv4eQeArsp7WYKUAFWT2ZZdPr17e5lgDgSZ30/tAG90qrVPX3CMf4IC0107Wxr8mc++Y blJAif9soDvWfBo1TIDKISmL1h5jVKAJSdq51cwmsj7GgIYRr6y6jmiPCnS0d2xaOxJHqy F5en3kIfzsEtdZH0GlhxixNL8+W9twYbJw+A59mUnj5/jHcP+xub0mPXNncF2A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0hLj0KD9z10vf; Fri, 14 Jun 2024 01:21:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45E1LGfU054716; Fri, 14 Jun 2024 01:21:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45E1LGmD054713; Fri, 14 Jun 2024 01:21:16 GMT (envelope-from git) Date: Fri, 14 Jun 2024 01:21:16 GMT Message-Id: <202406140121.45E1LGmD054713@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: d7ec4a8859b4 - main - vm_phys: Factor out some calls to vm_freelist_add() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d7ec4a8859b44beb9ef69620134ba5c5ce4d598c Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d7ec4a8859b44beb9ef69620134ba5c5ce4d598c commit d7ec4a8859b44beb9ef69620134ba5c5ce4d598c Author: Mark Johnston AuthorDate: 2024-06-14 00:11:15 +0000 Commit: Mark Johnston CommitDate: 2024-06-14 01:18:59 +0000 vm_phys: Factor out some calls to vm_freelist_add() A subsequent patch will make this factoring more worthwhile. No functional change intended. Reviewed by: dougm, alc, kib, emaste MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D40400 --- sys/vm/vm_phys.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/sys/vm/vm_phys.c b/sys/vm/vm_phys.c index 62e84a5b52bd..6323fb484030 100644 --- a/sys/vm/vm_phys.c +++ b/sys/vm/vm_phys.c @@ -680,6 +680,15 @@ vm_phys_split_pages(vm_page_t m, int oind, struct vm_freelist *fl, int order, } } +static void +vm_phys_enq_chunk(struct vm_freelist *fl, vm_page_t m, int order, int tail) +{ + KASSERT(order >= 0 && order < VM_NFREEORDER, + ("%s: invalid order %d", __func__, order)); + + vm_freelist_add(fl, m, order, tail); +} + /* * Add the physical pages [m, m + npages) at the beginning of a power-of-two * aligned and sized set to the specified free list. @@ -706,13 +715,13 @@ vm_phys_enq_beg(vm_page_t m, u_int npages, struct vm_freelist *fl, int tail) KASSERT(m->order == VM_NFREEORDER, ("%s: page %p has unexpected order %d", __func__, m, m->order)); - order = ilog2(npages); + order = ilog2(npages); KASSERT(order < VM_NFREEORDER, ("%s: order %d is out of range", __func__, order)); - vm_freelist_add(fl, m, order, tail); + vm_phys_enq_chunk(fl, m, order, tail); m += 1 << order; - npages -= 1 << order; - } + npages -= 1 << order; + } } /* @@ -743,9 +752,7 @@ vm_phys_enq_range(vm_page_t m, u_int npages, struct vm_freelist *fl, int tail) ("vm_phys_enq_range: page %p has unexpected order %d", m, m->order)); order = ffs(npages) - 1; - KASSERT(order < VM_NFREEORDER, - ("vm_phys_enq_range: order %d is out of range", order)); - vm_freelist_add(fl, m, order, tail); + vm_phys_enq_chunk(fl, m, order, tail); m += 1 << order; npages -= 1 << order; } @@ -1203,7 +1210,7 @@ vm_phys_enqueue_contig(vm_page_t m, u_long npages) KASSERT(seg == &vm_phys_segs[m->segind], ("%s: page range [%p,%p) spans multiple segments", __func__, m_end - npages, m)); - vm_freelist_add(fl, m, order, 1); + vm_phys_enq_chunk(fl, m, order, 1); m += 1 << order; } /* Free blocks of diminishing size. */ From nobody Fri Jun 14 01:21:18 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0hLk3ndPz5N2nQ; Fri, 14 Jun 2024 01:21:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0hLk1Rj6z4VXc; Fri, 14 Jun 2024 01:21:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718328078; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uKuRpM+N+htlSfH3g7fL+mavSA+u22ASK9EHBIFfcZ0=; b=T3RQQwGZxxQ7qAYKyUgalY6G2IvV6kcopdslzqVv2h9QDgpSzi6K/yrAufG1MTV8t2L3HA bOtyzsh88bNwv4zub1/EnYjNH78QjxR41LqkmcbNSZko3N7zesKgcLWLn4CtVgteHYbBzd UFvOYt9Nc2o707yHhKNA52uH/7uGcMQwvnNIKDgf/q7uwznBKtStARg+EJn590CBdF04Gz PNBekGaYJYVjvc7LHn8Fx9K+/QmvQorjmg571Pce6d8NvG6tnKAKnIoIBewiR3cHMe0lga nr1/N73ng++bH6194wnwrI1bLgnKVbNlmbQyLswqQs5ysjR8d3RgBy3UP/t08w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718328078; a=rsa-sha256; cv=none; b=IA7jIA3np1St0FY+poVyBJAR/gRom3B0Cr14YIevGag48gwTjIYt/Uc4Z1NU6OUHm1IPFq jnwfNgqVNWYypeopS00lWttnUcWroerJOtQmuprbXzlPUNsoSwgx3Q4fc3geC2JUB6lFy/ 01VRfgRBzwijTj5jKuwseQdXM+ndjDY/0P5BJnjNLsewDZCmstKO81Imo6xJzvFuprNaFp UPI8Hoz63JT6SeoUBNdOC8Vk4Y7f5LHngZ7e41NBJPOnbUkqdX1Xl9r/2ZEKS4+oycWUU2 xz6RjsELbOuGzTqld++ig7XMBmVmX/rXIbCBnz3RG3Y1QpzHVWMv8msQSg3iag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718328078; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uKuRpM+N+htlSfH3g7fL+mavSA+u22ASK9EHBIFfcZ0=; b=tWRws/1/HmqlRESHcbs0IZ0BslndSlGOswDMr17A49dxeij+Oq1MPet8QQZix6c2HISAA6 Ueyt6dn9wHVuMj0ajmiyChNgkESOglCictq6NfRm8C5KKdCEhaH4K/YdlgsR04rgEkQBhc 8YpOYlqP9ebTjlygSeXChCxkYBGhcTXCCp0ZsxTBzIF3z6/tug2D/n2h20VQTcHTd5KbbE BkwerZia24OcN9eHDgdJFJlWDEeIcq1xVc2bUnNMcdZxJ/2ow3IoBTS0SEbdm5Fkz8Ovym G0bwJsHHaydHEOt9fMWozMGM2DP+Z6dsnJpSU8bf3f0LSAR5hMBC6B41wvc8lQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0hLk10hpz10Rj; Fri, 14 Jun 2024 01:21:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45E1LIVE054761; Fri, 14 Jun 2024 01:21:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45E1LIQv054758; Fri, 14 Jun 2024 01:21:18 GMT (envelope-from git) Date: Fri, 14 Jun 2024 01:21:18 GMT Message-Id: <202406140121.45E1LIQv054758@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 69cbb18746b6 - main - vm_phys: Add a vm_phys_seg_paddr_to_vm_page() helper List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 69cbb18746b69cbcdf79f1728d0435a1c86fff58 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=69cbb18746b69cbcdf79f1728d0435a1c86fff58 commit 69cbb18746b69cbcdf79f1728d0435a1c86fff58 Author: Mark Johnston AuthorDate: 2024-06-14 00:11:36 +0000 Commit: Mark Johnston CommitDate: 2024-06-14 01:18:59 +0000 vm_phys: Add a vm_phys_seg_paddr_to_vm_page() helper No functional change intended. Suggested by: alc Reviewed by: dougm, alc, kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D43636 --- sys/vm/vm_page.c | 2 +- sys/vm/vm_phys.c | 29 +++++++++++++++++++++-------- sys/vm/vm_phys.h | 1 + 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 3077b023754a..37149cb660cb 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -782,7 +782,7 @@ vm_page_startup(vm_offset_t vaddr) if (pagecount == 0) continue; - m = seg->first_page + atop(startp - seg->start); + m = vm_phys_seg_paddr_to_vm_page(seg, startp); vmd = VM_DOMAIN(seg->domain); vm_domain_free_lock(vmd); vm_phys_enqueue_contig(m, pagecount); diff --git a/sys/vm/vm_phys.c b/sys/vm/vm_phys.c index 6323fb484030..35e544708c84 100644 --- a/sys/vm/vm_phys.c +++ b/sys/vm/vm_phys.c @@ -932,6 +932,19 @@ vm_phys_alloc_freelist_pages(int domain, int freelist, int pool, int order) return (NULL); } +/* + * Find the vm_page corresponding to the given physical address, which must lie + * within the given physical memory segment. + */ +vm_page_t +vm_phys_seg_paddr_to_vm_page(struct vm_phys_seg *seg, vm_paddr_t pa) +{ + KASSERT(pa >= seg->start && pa < seg->end, + ("%s: pa %#jx is out of range", __func__, (uintmax_t)pa)); + + return (&seg->first_page[atop(pa - seg->start)]); +} + /* * Find the vm_page corresponding to the given physical address. */ @@ -941,7 +954,7 @@ vm_phys_paddr_to_vm_page(vm_paddr_t pa) struct vm_phys_seg *seg; if ((seg = vm_phys_paddr_to_seg(pa)) != NULL) - return (&seg->first_page[atop(pa - seg->start)]); + return (vm_phys_seg_paddr_to_vm_page(seg, pa)); return (NULL); } @@ -1157,7 +1170,7 @@ vm_phys_free_pages(vm_page_t m, int order) pa ^= ((vm_paddr_t)1 << (PAGE_SHIFT + order)); if (pa < seg->start || pa >= seg->end) break; - m_buddy = &seg->first_page[atop(pa - seg->start)]; + m_buddy = vm_phys_seg_paddr_to_vm_page(seg, pa); if (m_buddy->order != order) break; fl = (*seg->free_queues)[m_buddy->pool]; @@ -1166,7 +1179,7 @@ vm_phys_free_pages(vm_page_t m, int order) vm_phys_set_pool(m->pool, m_buddy, order); order++; pa &= ~(((vm_paddr_t)1 << (PAGE_SHIFT + order)) - 1); - m = &seg->first_page[atop(pa - seg->start)]; + m = vm_phys_seg_paddr_to_vm_page(seg, pa); } while (order < VM_NFREEORDER - 1); } fl = (*seg->free_queues)[m->pool]; @@ -1278,8 +1291,8 @@ vm_phys_find_range(vm_page_t bounds[], int segind, int domain, pa_end = MIN(high, seg->end); if (pa_end - pa_start < ptoa(npages)) continue; - bounds[0] = &seg->first_page[atop(pa_start - seg->start)]; - bounds[1] = &seg->first_page[atop(pa_end - seg->start)]; + bounds[0] = vm_phys_seg_paddr_to_vm_page(seg, pa_start); + bounds[1] = vm_phys_seg_paddr_to_vm_page(seg, pa_end); return (seg - vm_phys_segs); } return (-1); @@ -1313,7 +1326,7 @@ vm_phys_unfree_page(vm_page_t m) order++; pa = m->phys_addr & (~(vm_paddr_t)0 << (PAGE_SHIFT + order)); if (pa >= seg->start) - m_set = &seg->first_page[atop(pa - seg->start)]; + m_set = vm_phys_seg_paddr_to_vm_page(seg, pa); else return (false); } @@ -1338,10 +1351,10 @@ vm_phys_unfree_page(vm_page_t m) order--; pa_half = m_set->phys_addr ^ (1 << (PAGE_SHIFT + order)); if (m->phys_addr < pa_half) - m_tmp = &seg->first_page[atop(pa_half - seg->start)]; + m_tmp = vm_phys_seg_paddr_to_vm_page(seg, pa_half); else { m_tmp = m_set; - m_set = &seg->first_page[atop(pa_half - seg->start)]; + m_set = vm_phys_seg_paddr_to_vm_page(seg, pa_half); } vm_freelist_add(fl, m_tmp, order, 0); } diff --git a/sys/vm/vm_phys.h b/sys/vm/vm_phys.h index 1f502ad745c4..300443accdb6 100644 --- a/sys/vm/vm_phys.h +++ b/sys/vm/vm_phys.h @@ -77,6 +77,7 @@ void vm_phys_free_contig(vm_page_t m, u_long npages); void vm_phys_free_pages(vm_page_t m, int order); void vm_phys_init(void); vm_page_t vm_phys_paddr_to_vm_page(vm_paddr_t pa); +vm_page_t vm_phys_seg_paddr_to_vm_page(struct vm_phys_seg *seg, vm_paddr_t pa); void vm_phys_register_domains(int ndomains, struct mem_affinity *affinity, int *locality); bool vm_phys_unfree_page(vm_page_t m); From nobody Fri Jun 14 01:21:19 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0hLl2wLjz5N2qZ; Fri, 14 Jun 2024 01:21:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0hLl22PVz4VGw; Fri, 14 Jun 2024 01:21:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718328079; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mW6wBZ6cq7N0s9CXPfB4o+z+Ozil2JYI9SINgkMER4Q=; b=SGQClL512BrdekMXNMgvJVj4DXuL28/q3Og7gOmze+LeXkZCG2DQ3N1+FMup/Nhgm2fXkf 3xv9qziOUYG21ZcRwQEG0OYVbIUW1E4i/CDjKuul9Y4YnXizc+DElgG0WyT2OUlyzVQppk LAqKlKoJwjCGa9oGfcbTrAAMQTMnutdLw+Rx2BBMYsd9jGHoFUb/f7J3zigPyFda5vQqxf WXPtbg8AU/IC4ku+HFlhxKbEaPulqBjuxnFVhDB/c5uzk3EKpi/clkbkVxWKOvV8nvVp1T ysHsGpMSdOStkwydzuzDPttVaIxBTwWB2t3dpX+ZnacJV5xXl0nDz3MYGMDRiA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718328079; a=rsa-sha256; cv=none; b=lD9Ctlqb/tR+hPCrXBbjziRXC8Dah8OxYeqgbzfW6mN8nYyRdrnF3Po3l5DlAuyx3FdXMB 5yaJoN5vY4XM2oBnjSaoX7K4ZUflqEf14Jsi1swFIbbI3GVTqR0HGWYPzjSqP+dhAnY96S 7VAEv0vZ9a7+B7Rqd3V4wFIxjt65Uz+RSlaD9huPfR3ZjPIoyL+FkSsDxt7K70DCbKDIAa pH//alMmC8qnO5EDn6T/kHaBGSvlLfKakephgEWJGjB0p2We0YEGkRja2BEidx3Qs4OHTu 0MXEBF+RRPc2aM7gZ3Z0TBmYQiGk919mGF3hDDW3ccW2tQHh5/4x9H/anCU8Ow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718328079; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mW6wBZ6cq7N0s9CXPfB4o+z+Ozil2JYI9SINgkMER4Q=; b=yUk2g0pAtHRHJXlYi5RAfHZYwj5RtBaIC587N0SxfqvMyepBEYpXUfR8wFPcuNHuTROho0 je5Tit9Hc4FCyWKQ+NyeIfrt8uQvEWpixqxYQrSasfnQ450UeFhfpb5AELe0NjAD/NAf3j RYnGy2gYAecJ+RiXB9QxsLnJggJCarrduDTwy8szGjDhyoPNYqIWpGlijDaAJP45DHx3j3 6oqU4QtfdPZylgwteDbVn3pSk8ATV86O/Du2DDl6+spX5N7kK87MzKSXbs/f5tzJSWo88y X2yjP/fpBJF/hzUxN5w/cy4ZZrLbWoT30m3cs635Ilem379+fFPOF9sZcJ+eAQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0hLl1dddz10Rk; Fri, 14 Jun 2024 01:21:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45E1LJWt054806; Fri, 14 Jun 2024 01:21:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45E1LJt2054803; Fri, 14 Jun 2024 01:21:19 GMT (envelope-from git) Date: Fri, 14 Jun 2024 01:21:19 GMT Message-Id: <202406140121.45E1LJt2054803@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: b16b4c22d2d1 - main - vm_page: Implement lazy page initialization List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b16b4c22d2d19bfb3d8e0fcce9e83b9d69f915e8 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b16b4c22d2d19bfb3d8e0fcce9e83b9d69f915e8 commit b16b4c22d2d19bfb3d8e0fcce9e83b9d69f915e8 Author: Mark Johnston AuthorDate: 2024-06-14 00:11:47 +0000 Commit: Mark Johnston CommitDate: 2024-06-14 01:19:00 +0000 vm_page: Implement lazy page initialization FreeBSD's boot times have decreased to the point where vm_page array initialization represents a significant fraction of the total boot time. For example, when booting FreeBSD in Firecracker (a VMM designed to support lightweight VMs) with 128MB and 1GB of RAM, vm_page initialization consumes 9% (3ms) and 37% (21.5ms) of the kernel boot time, respectively. This is generally relevant in cloud environments, where one wants to be able to spin up VMs as quickly as possible. This patch implements lazy initialization of (most) page structures, following a suggestion from cperciva@. The idea is to introduce a new free pool, VM_FREEPOOL_LAZYINIT, into which all vm_page structures are initially placed. For this to work, we need only initialize the first free page of each chunk placed into the buddy allocator. Then, early page allocations draw from the lazy init pool and initialize vm_page chunks (up to 16MB, 4096 pages) on demand. Once APs are started, an idle-priority thread drains the lazy init pool in the background to avoid introducing extra latency in the allocator. With this scheme, almost all of the initialization work is moved out of the critical path. A couple of vm_phys operations require the pool to be drained before they can run: vm_phys_find_range() and vm_phys_unfree_page(). However, these are rare operations. I believe that vm_phys_find_freelist_contig() does not require any special treatment, as it only ever accesses the first page in a power-of-2-sized free page chunk, which is always initialized. For now the new pool is only used on amd64 and arm64, since that's where I can easily test and those platforms would get the most benefit. Reviewed by: alc, kib Differential Revision: https://reviews.freebsd.org/D40403 --- sys/amd64/include/vmparam.h | 16 ++-- sys/arm64/include/vmparam.h | 16 ++-- sys/vm/vm_page.c | 65 ++++++++++++-- sys/vm/vm_phys.c | 201 ++++++++++++++++++++++++++++++++++++++++---- sys/vm/vm_phys.h | 2 +- 5 files changed, 263 insertions(+), 37 deletions(-) diff --git a/sys/amd64/include/vmparam.h b/sys/amd64/include/vmparam.h index 93c2648e8fac..2ffa51d9021c 100644 --- a/sys/amd64/include/vmparam.h +++ b/sys/amd64/include/vmparam.h @@ -94,14 +94,16 @@ #define VM_PHYSSEG_MAX 63 /* - * Create two free page pools: VM_FREEPOOL_DEFAULT is the default pool - * from which physical pages are allocated and VM_FREEPOOL_DIRECT is - * the pool from which physical pages for page tables and small UMA - * objects are allocated. + * Create three free page pools: VM_FREEPOOL_DEFAULT is the default pool from + * which physical pages are allocated and VM_FREEPOOL_DIRECT is the pool from + * which physical pages for page tables and small UMA objects are allocated. + * VM_FREEPOOL_LAZINIT is a special-purpose pool that is populated only during + * boot and is used to implement deferred initialization of page structures. */ -#define VM_NFREEPOOL 2 -#define VM_FREEPOOL_DEFAULT 0 -#define VM_FREEPOOL_DIRECT 1 +#define VM_NFREEPOOL 3 +#define VM_FREEPOOL_LAZYINIT 0 +#define VM_FREEPOOL_DEFAULT 1 +#define VM_FREEPOOL_DIRECT 2 /* * Create up to three free page lists: VM_FREELIST_DMA32 is for physical pages diff --git a/sys/arm64/include/vmparam.h b/sys/arm64/include/vmparam.h index 0e93e4026d4a..08a3b18da64e 100644 --- a/sys/arm64/include/vmparam.h +++ b/sys/arm64/include/vmparam.h @@ -73,14 +73,16 @@ #define VM_PHYSSEG_MAX 64 /* - * Create two free page pools: VM_FREEPOOL_DEFAULT is the default pool - * from which physical pages are allocated and VM_FREEPOOL_DIRECT is - * the pool from which physical pages for small UMA objects are - * allocated. + * Create three free page pools: VM_FREEPOOL_DEFAULT is the default pool from + * which physical pages are allocated and VM_FREEPOOL_DIRECT is the pool from + * which physical pages for page tables and small UMA objects are allocated. + * VM_FREEPOOL_LAZINIT is a special-purpose pool that is populated only during + * boot and is used to implement deferred initialization of page structures. */ -#define VM_NFREEPOOL 2 -#define VM_FREEPOOL_DEFAULT 0 -#define VM_FREEPOOL_DIRECT 1 +#define VM_NFREEPOOL 3 +#define VM_FREEPOOL_LAZYINIT 0 +#define VM_FREEPOOL_DEFAULT 1 +#define VM_FREEPOOL_DIRECT 2 /* * Create two free page lists: VM_FREELIST_DMA32 is for physical pages that have diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 37149cb660cb..8e94c02089ae 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -333,9 +333,9 @@ vm_page_blacklist_add(vm_paddr_t pa, bool verbose) if (m == NULL) return (true); /* page does not exist, no failure */ - vmd = vm_pagequeue_domain(m); + vmd = VM_DOMAIN(vm_phys_domain(pa)); vm_domain_free_lock(vmd); - found = vm_phys_unfree_page(m); + found = vm_phys_unfree_page(pa); vm_domain_free_unlock(vmd); if (found) { vm_domain_freecnt_inc(vmd, -1); @@ -568,6 +568,9 @@ vm_page_startup(vm_offset_t vaddr) #if defined(__i386__) && defined(VM_PHYSSEG_DENSE) long ii; #endif +#ifdef VM_FREEPOOL_LAZYINIT + int lazyinit; +#endif vaddr = round_page(vaddr); @@ -748,6 +751,11 @@ vm_page_startup(vm_offset_t vaddr) */ vm_phys_init(); +#ifdef VM_FREEPOOL_LAZYINIT + lazyinit = 1; + TUNABLE_INT_FETCH("debug.vm.lazy_page_init", &lazyinit); +#endif + /* * Initialize the page structures and add every available page to the * physical memory allocator's free lists. @@ -763,9 +771,50 @@ vm_page_startup(vm_offset_t vaddr) vm_cnt.v_page_count = 0; for (segind = 0; segind < vm_phys_nsegs; segind++) { seg = &vm_phys_segs[segind]; - for (m = seg->first_page, pa = seg->start; pa < seg->end; - m++, pa += PAGE_SIZE) - vm_page_init_page(m, pa, segind, VM_FREEPOOL_DEFAULT); + + /* + * If lazy vm_page initialization is not enabled, simply + * initialize all of the pages in the segment. Otherwise, we + * only initialize: + * 1. Pages not covered by phys_avail[], since they might be + * freed to the allocator at some future point, e.g., by + * kmem_bootstrap_free(). + * 2. The first page of each run of free pages handed to the + * vm_phys allocator, which in turn defers initialization + * of pages until they are needed. + * This avoids blocking the boot process for long periods, which + * may be relevant for VMs (which ought to boot as quickly as + * possible) and/or systems with large amounts of physical + * memory. + */ +#ifdef VM_FREEPOOL_LAZYINIT + if (lazyinit) { + startp = seg->start; + for (i = 0; phys_avail[i + 1] != 0; i += 2) { + if (startp >= seg->end) + break; + + if (phys_avail[i + 1] < startp) + continue; + if (phys_avail[i] <= startp) { + startp = phys_avail[i + 1]; + continue; + } + + m = vm_phys_seg_paddr_to_vm_page(seg, startp); + for (endp = MIN(phys_avail[i], seg->end); + startp < endp; startp += PAGE_SIZE, m++) { + vm_page_init_page(m, startp, segind, + VM_FREEPOOL_DEFAULT); + } + } + } else +#endif + for (m = seg->first_page, pa = seg->start; + pa < seg->end; m++, pa += PAGE_SIZE) { + vm_page_init_page(m, pa, segind, + VM_FREEPOOL_DEFAULT); + } /* * Add the segment's pages that are covered by one of @@ -783,6 +832,12 @@ vm_page_startup(vm_offset_t vaddr) continue; m = vm_phys_seg_paddr_to_vm_page(seg, startp); +#ifdef VM_FREEPOOL_LAZYINIT + if (lazyinit) { + vm_page_init_page(m, startp, segind, + VM_FREEPOOL_LAZYINIT); + } +#endif vmd = VM_DOMAIN(seg->domain); vm_domain_free_lock(vmd); vm_phys_enqueue_contig(m, pagecount); diff --git a/sys/vm/vm_phys.c b/sys/vm/vm_phys.c index 35e544708c84..a28b3a40691e 100644 --- a/sys/vm/vm_phys.c +++ b/sys/vm/vm_phys.c @@ -47,14 +47,18 @@ #include #include #include +#include #include #include #include #include #include #include +#include #include #include +#include +#include #include #include @@ -141,6 +145,7 @@ vm_paddr_t dump_avail[PHYS_AVAIL_COUNT]; * Provides the mapping from VM_FREELIST_* to free list indices (flind). */ static int __read_mostly vm_freelist_to_flind[VM_NFREELIST]; +static int __read_mostly vm_default_freepool; CTASSERT(VM_FREELIST_DEFAULT == 0); @@ -184,6 +189,16 @@ static void vm_phys_create_seg(vm_paddr_t start, vm_paddr_t end); static void vm_phys_split_pages(vm_page_t m, int oind, struct vm_freelist *fl, int order, int tail); +static bool __diagused +vm_phys_pool_valid(int pool) +{ +#ifdef VM_FREEPOOL_LAZYINIT + if (pool == VM_FREEPOOL_LAZYINIT) + return (false); +#endif + return (pool >= 0 && pool < VM_NFREEPOOL); +} + /* * Red-black tree helpers for vm fictitious range management. */ @@ -621,6 +636,12 @@ vm_phys_init(void) } } +#ifdef VM_FREEPOOL_LAZYINIT + vm_default_freepool = VM_FREEPOOL_LAZYINIT; +#else + vm_default_freepool = VM_FREEPOOL_DEFAULT; +#endif + rw_init(&vm_phys_fictitious_reg_lock, "vmfctr"); } @@ -687,6 +708,17 @@ vm_phys_enq_chunk(struct vm_freelist *fl, vm_page_t m, int order, int tail) ("%s: invalid order %d", __func__, order)); vm_freelist_add(fl, m, order, tail); +#ifdef VM_FREEPOOL_LAZYINIT + if (__predict_false(m->pool == VM_FREEPOOL_LAZYINIT)) { + vm_page_t m_next; + int npages; + + npages = 1 << order; + m_next = m + npages; + vm_page_init_page(m_next, m->phys_addr + ptoa(npages), m->segind, + VM_FREEPOOL_LAZYINIT); + } +#endif } /* @@ -760,15 +792,33 @@ vm_phys_enq_range(vm_page_t m, u_int npages, struct vm_freelist *fl, int tail) } /* - * Set the pool for a contiguous, power of two-sized set of physical pages. + * Set the pool for a contiguous, power of two-sized set of physical pages. + * + * If the pages currently belong to the lazy init pool, then the corresponding + * page structures must be initialized. In this case it is assumed that the + * first page in the run has already been initialized. */ static void vm_phys_set_pool(int pool, vm_page_t m, int order) { - vm_page_t m_tmp; - - for (m_tmp = m; m_tmp < &m[1 << order]; m_tmp++) - m_tmp->pool = pool; +#ifdef VM_FREEPOOL_LAZYINIT + if (__predict_false(m->pool == VM_FREEPOOL_LAZYINIT)) { + vm_paddr_t pa; + int segind; + + m->pool = pool; + + TSENTER(); + pa = m->phys_addr + PAGE_SIZE; + segind = m->segind; + for (vm_page_t m_tmp = m + 1; m_tmp < &m[1 << order]; + m_tmp++, pa += PAGE_SIZE) + vm_page_init_page(m_tmp, pa, segind, pool); + TSEXIT(); + } else +#endif + for (vm_page_t m_tmp = m; m_tmp < &m[1 << order]; m_tmp++) + m_tmp->pool = pool; } /* @@ -792,7 +842,7 @@ vm_phys_alloc_npages(int domain, int pool, int npages, vm_page_t ma[]) KASSERT(domain >= 0 && domain < vm_ndomains, ("vm_phys_alloc_npages: domain %d is out of range", domain)); - KASSERT(pool < VM_NFREEPOOL, + KASSERT(vm_phys_pool_valid(pool), ("vm_phys_alloc_npages: pool %d is out of range", pool)); KASSERT(npages <= 1 << (VM_NFREEORDER - 1), ("vm_phys_alloc_npages: npages %d is out of range", npages)); @@ -821,7 +871,8 @@ vm_phys_alloc_npages(int domain, int pool, int npages, vm_page_t ma[]) } } for (oind = VM_NFREEORDER - 1; oind >= 0; oind--) { - for (pind = 0; pind < VM_NFREEPOOL; pind++) { + for (pind = vm_default_freepool; pind < VM_NFREEPOOL; + pind++) { alt = vm_phys_free_queues[domain][flind][pind]; while ((m = TAILQ_FIRST(&alt[oind].pl)) != NULL) { @@ -888,7 +939,7 @@ vm_phys_alloc_freelist_pages(int domain, int freelist, int pool, int order) KASSERT(freelist < VM_NFREELIST, ("vm_phys_alloc_freelist_pages: freelist %d is out of range", freelist)); - KASSERT(pool < VM_NFREEPOOL, + KASSERT(vm_phys_pool_valid(pool), ("vm_phys_alloc_freelist_pages: pool %d is out of range", pool)); KASSERT(order < VM_NFREEORDER, ("vm_phys_alloc_freelist_pages: order %d is out of range", order)); @@ -917,7 +968,7 @@ vm_phys_alloc_freelist_pages(int domain, int freelist, int pool, int order) * use them to satisfy the allocation. */ for (oind = VM_NFREEORDER - 1; oind >= order; oind--) { - for (pind = 0; pind < VM_NFREEPOOL; pind++) { + for (pind = vm_default_freepool; pind < VM_NFREEPOOL; pind++) { alt = &vm_phys_free_queues[domain][flind][pind][0]; m = TAILQ_FIRST(&alt[oind].pl); if (m != NULL) { @@ -1157,7 +1208,7 @@ vm_phys_free_pages(vm_page_t m, int order) KASSERT(m->order == VM_NFREEORDER, ("vm_phys_free_pages: page %p has unexpected order %d", m, m->order)); - KASSERT(m->pool < VM_NFREEPOOL, + KASSERT(vm_phys_pool_valid(m->pool), ("vm_phys_free_pages: page %p has unexpected pool %d", m, m->pool)); KASSERT(order < VM_NFREEORDER, @@ -1186,6 +1237,107 @@ vm_phys_free_pages(vm_page_t m, int order) vm_freelist_add(fl, m, order, 1); } +#ifdef VM_FREEPOOL_LAZYINIT +/* + * Initialize all pages lingering in the lazy init pool of a NUMA domain, moving + * them to the default pool. This is a prerequisite for some rare operations + * which need to scan the page array and thus depend on all pages being + * initialized. + */ +static void +vm_phys_lazy_init_domain(int domain, bool locked) +{ + static bool initdone[MAXMEMDOM]; + struct vm_domain *vmd; + struct vm_freelist *fl; + vm_page_t m; + int pind; + bool unlocked; + + if (__predict_true(atomic_load_bool(&initdone[domain]))) + return; + + vmd = VM_DOMAIN(domain); + if (locked) + vm_domain_free_assert_locked(vmd); + else + vm_domain_free_lock(vmd); + if (atomic_load_bool(&initdone[domain])) + goto out; + pind = VM_FREEPOOL_LAZYINIT; + for (int freelist = 0; freelist < VM_NFREELIST; freelist++) { + int flind; + + flind = vm_freelist_to_flind[freelist]; + if (flind < 0) + continue; + fl = vm_phys_free_queues[domain][flind][pind]; + for (int oind = 0; oind < VM_NFREEORDER; oind++) { + if (atomic_load_int(&fl[oind].lcnt) == 0) + continue; + while ((m = TAILQ_FIRST(&fl[oind].pl)) != NULL) { + /* + * Avoid holding the lock across the + * initialization unless there's a free page + * shortage. + */ + vm_freelist_rem(fl, m, oind); + unlocked = vm_domain_allocate(vmd, + VM_ALLOC_NORMAL, 1 << oind); + if (unlocked) + vm_domain_free_unlock(vmd); + vm_phys_set_pool(VM_FREEPOOL_DEFAULT, m, oind); + if (unlocked) { + vm_domain_freecnt_inc(vmd, 1 << oind); + vm_domain_free_lock(vmd); + } + vm_phys_free_pages(m, oind); + } + } + } + atomic_store_bool(&initdone[domain], true); +out: + if (!locked) + vm_domain_free_unlock(vmd); +} + +static void +vm_phys_lazy_init(void) +{ + for (int domain = 0; domain < vm_ndomains; domain++) + vm_phys_lazy_init_domain(domain, false); + atomic_store_int(&vm_default_freepool, VM_FREEPOOL_DEFAULT); +} + +static void +vm_phys_lazy_init_kthr(void *arg __unused) +{ + vm_phys_lazy_init(); + kthread_exit(); +} + +static void +vm_phys_lazy_sysinit(void *arg __unused) +{ + struct thread *td; + int error; + + error = kthread_add(vm_phys_lazy_init_kthr, NULL, curproc, &td, + RFSTOPPED, 0, "vmlazyinit"); + if (error == 0) { + thread_lock(td); + sched_prio(td, PRI_MIN_IDLE); + sched_add(td, SRQ_BORING); + } else { + printf("%s: could not create lazy init thread: %d\n", + __func__, error); + vm_phys_lazy_init(); + } +} +SYSINIT(vm_phys_lazy_init, SI_SUB_SMP, SI_ORDER_ANY, vm_phys_lazy_sysinit, + NULL); +#endif /* VM_FREEPOOL_LAZYINIT */ + /* * Free a contiguous, arbitrarily sized set of physical pages, without * merging across set boundaries. @@ -1291,6 +1443,12 @@ vm_phys_find_range(vm_page_t bounds[], int segind, int domain, pa_end = MIN(high, seg->end); if (pa_end - pa_start < ptoa(npages)) continue; +#ifdef VM_FREEPOOL_LAZYINIT + /* + * The pages on the free lists must be initialized. + */ + vm_phys_lazy_init_domain(domain, false); +#endif bounds[0] = vm_phys_seg_paddr_to_vm_page(seg, pa_start); bounds[1] = vm_phys_seg_paddr_to_vm_page(seg, pa_end); return (seg - vm_phys_segs); @@ -1306,21 +1464,30 @@ vm_phys_find_range(vm_page_t bounds[], int segind, int domain, * The free page queues must be locked. */ bool -vm_phys_unfree_page(vm_page_t m) +vm_phys_unfree_page(vm_paddr_t pa) { struct vm_freelist *fl; struct vm_phys_seg *seg; - vm_paddr_t pa, pa_half; - vm_page_t m_set, m_tmp; + vm_paddr_t pa_half; + vm_page_t m, m_set, m_tmp; int order; + seg = vm_phys_paddr_to_seg(pa); + vm_domain_free_assert_locked(VM_DOMAIN(seg->domain)); + + /* + * The pages on the free lists must be initialized. + */ +#ifdef VM_FREEPOOL_LAZYINIT + vm_phys_lazy_init_domain(seg->domain, true); +#endif + /* * First, find the contiguous, power of two-sized set of free * physical pages containing the given physical page "m" and * assign it to "m_set". */ - seg = &vm_phys_segs[m->segind]; - vm_domain_free_assert_locked(VM_DOMAIN(seg->domain)); + m = vm_phys_paddr_to_vm_page(pa); for (m_set = m, order = 0; m_set->order == VM_NFREEORDER && order < VM_NFREEORDER - 1; ) { order++; @@ -1459,7 +1626,7 @@ vm_phys_find_queues_contig( /* Search for a large enough free block. */ size = npages << PAGE_SHIFT; for (oind = order; oind < VM_NFREEORDER; oind++) { - for (pind = 0; pind < VM_NFREEPOOL; pind++) { + for (pind = vm_default_freepool; pind < VM_NFREEPOOL; pind++) { fl = (*queues)[pind]; TAILQ_FOREACH(m_ret, &fl[oind].pl, listq) { /* @@ -1479,7 +1646,7 @@ vm_phys_find_queues_contig( if (order < VM_NFREEORDER) return (NULL); /* Search for a long-enough sequence of max-order blocks. */ - for (pind = 0; pind < VM_NFREEPOOL; pind++) { + for (pind = vm_default_freepool; pind < VM_NFREEPOOL; pind++) { fl = (*queues)[pind]; m_ret = vm_phys_find_freelist_contig(fl, npages, low, high, alignment, boundary); diff --git a/sys/vm/vm_phys.h b/sys/vm/vm_phys.h index 300443accdb6..bd086fd5571f 100644 --- a/sys/vm/vm_phys.h +++ b/sys/vm/vm_phys.h @@ -80,7 +80,7 @@ vm_page_t vm_phys_paddr_to_vm_page(vm_paddr_t pa); vm_page_t vm_phys_seg_paddr_to_vm_page(struct vm_phys_seg *seg, vm_paddr_t pa); void vm_phys_register_domains(int ndomains, struct mem_affinity *affinity, int *locality); -bool vm_phys_unfree_page(vm_page_t m); +bool vm_phys_unfree_page(vm_paddr_t pa); int vm_phys_mem_affinity(int f, int t); void vm_phys_early_add_seg(vm_paddr_t start, vm_paddr_t end); vm_paddr_t vm_phys_early_alloc(int domain, size_t alloc_size); From nobody Fri Jun 14 01:21:20 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0hLm4Fyhz5N2lS; Fri, 14 Jun 2024 01:21:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0hLm2gbBz4VHB; Fri, 14 Jun 2024 01:21:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718328080; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WOPF2D5O9Uvz5PRNJUqmew1E4pMLeX6JlCmZoy+4ZuM=; b=lrop7gJdKYrWnXi7XeWqcwJ66KZKQvVD8mexMb14gecYWsuy3pcJmaEich4/g9XK91tSIn 5myh8r5vPo4nuOGDTjqbDOhhbIFGcEzPLpd38W8pWW7Xc1Emf2jVSYZ9W68Qsf2vzfW6GB vhI6ueWfNhUZH6Lyep2Bk8msiCNpNdc2uhDap/1iXdZ8HIJWKp4L4mCjx6KI8NC8W+R6US EmkDOQKAweJTEjU44q1B0iU5+Q+XWSS/J0pytvgTA1UJ8ONYm/mkAfAK7RYW27bVDzGtHR 4N/1Di6zgmsqrq77nmNmMGDvwh95lc91sOBmtZqpIhLRX4FmQFxkYF0R7e6uxA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718328080; a=rsa-sha256; cv=none; b=FDWakaIrsl63KkGmU+T31PndlAYciTFyNZZf0gpdZ18gLkIptbNISsMol0HofQeq9M6p0U kLWe9aMLvSUlHKZn6ujmoyDJDYn5y0iTcYoST7t9BNMlRTrtr18kD6+cGM1xnnFBJk4ymK nGKxW/QzPXzPDUL8cV2nS5t+lpCftzJ74BCUjJV3UZ8NCun2jzPYOV5HBnK7sXmGltrejr p2tvVVWGCTlZeYMfo7Ey+jtg4THg/fZp+4mKopw9qp4Rww7jXZhwp+SmgDR5G61YlAKRmc +LHPdckiNFBZwMMtqsXswSii7oZozUO01SQdgxcBZ6AtV0kXYRyVBRDTbVYlng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718328080; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WOPF2D5O9Uvz5PRNJUqmew1E4pMLeX6JlCmZoy+4ZuM=; b=XiXtbOYEbHnMrR4ZMKCkRlBCR57uEs03vBrLeqteXsUplP9sxKCrtU9f2YX3YlBcwtlbWZ cCdVRfjmnGC2UDOXZ0mZk/UMG8asUQvCG/9g6WFt+RScS9OyyeB1+LnPa3xITfiK//iLcM 2EyoA/AaWo9F8sFv9/chc1E5nNqH1Vf5SBrCRY4LVgOpAp9bGrfNdD7YVZ4kT1ITPUB2GS GZo9ns3Yi/IeziaAqM4qasOFvi0JxX6EVguxPUhiJLPba8w9wkSsbVHAORQiDvTVWvoa7A PPkQ5kB1DD74VlDFWpG5OsfJ6mSeXFMUx+0lwxbfuaSJ7jEvTZsJaZLMMpSc9w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0hLm2G7Bz1097; Fri, 14 Jun 2024 01:21:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45E1LK8f054993; Fri, 14 Jun 2024 01:21:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45E1LKZN054979; Fri, 14 Jun 2024 01:21:20 GMT (envelope-from git) Date: Fri, 14 Jun 2024 01:21:20 GMT Message-Id: <202406140121.45E1LKZN054979@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: a03354b00238 - main - arm64/vmm: Implement vm_disable_vcpu_creation() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a03354b00238b73568efe225c754cba197393f77 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a03354b00238b73568efe225c754cba197393f77 commit a03354b00238b73568efe225c754cba197393f77 Author: Mark Johnston AuthorDate: 2024-06-14 00:16:28 +0000 Commit: Mark Johnston CommitDate: 2024-06-14 01:19:00 +0000 arm64/vmm: Implement vm_disable_vcpu_creation() No functional change intended. Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D45556 --- sys/arm64/include/vmm.h | 1 + sys/arm64/vmm/vmm.c | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/sys/arm64/include/vmm.h b/sys/arm64/include/vmm.h index c06d2ad947e4..cf00dd60a43f 100644 --- a/sys/arm64/include/vmm.h +++ b/sys/arm64/include/vmm.h @@ -127,6 +127,7 @@ struct vm_eventinfo { int vm_create(const char *name, struct vm **retvm); struct vcpu *vm_alloc_vcpu(struct vm *vm, int vcpuid); +void vm_disable_vcpu_creation(struct vm *vm); void vm_slock_vcpus(struct vm *vm); void vm_unlock_vcpus(struct vm *vm); void vm_destroy(struct vm *vm); diff --git a/sys/arm64/vmm/vmm.c b/sys/arm64/vmm/vmm.c index a2cc63448f19..c6a49ebc4b03 100644 --- a/sys/arm64/vmm/vmm.c +++ b/sys/arm64/vmm/vmm.c @@ -141,6 +141,7 @@ struct vm { volatile cpuset_t active_cpus; /* (i) active vcpus */ volatile cpuset_t debug_cpus; /* (i) vcpus stopped for debug */ int suspend; /* (i) stop VM execution */ + bool dying; /* (o) is dying */ volatile cpuset_t suspended_cpus; /* (i) suspended vcpus */ volatile cpuset_t halted_cpus; /* (x) cpus in a hard halt */ struct mem_map mem_maps[VM_MAX_MEMMAPS]; /* (i) guest address space */ @@ -405,6 +406,14 @@ vm_init(struct vm *vm, bool create) } } +void +vm_disable_vcpu_creation(struct vm *vm) +{ + sx_xlock(&vm->vcpus_init_lock); + vm->dying = true; + sx_xunlock(&vm->vcpus_init_lock); +} + struct vcpu * vm_alloc_vcpu(struct vm *vm, int vcpuid) { @@ -423,7 +432,7 @@ vm_alloc_vcpu(struct vm *vm, int vcpuid) sx_xlock(&vm->vcpus_init_lock); vcpu = vm->vcpu[vcpuid]; - if (vcpu == NULL/* && !vm->dying*/) { + if (vcpu == NULL && !vm->dying) { vcpu = vcpu_alloc(vm, vcpuid); vcpu_init(vcpu); From nobody Fri Jun 14 01:21:21 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0hLn5BZkz5N2sv; Fri, 14 Jun 2024 01:21:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0hLn3N6Hz4VbX; Fri, 14 Jun 2024 01:21:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718328081; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dlgC+ADtc1bFEAM3h4zpb+e/Wg/vTleAtqBrYFj+PeA=; b=UBL0fVpRbInPM+rVQkf0RhUVxqHBTnDLKGej20ZgquytzXZwqeR1n0GsProl06DVQ9kH1+ 7nVqVttINBuf3JSz2CcpCh+AQrFRbtquZmLhofV/p8hGrHZrAB40xFmFuAonpj/yL2o35V E3BG9H7rFEvBGx6j+U3kB53SK0FZ8RXD0tBP6pbsQRAoSKWCYpQCDV/znEk+s0YFNSfnnC 2WTlGeD4cbzCQNwHXOxSOPdSH8DBA1Csx8lOJXnsUy3cnCiPpvwra8/dk4PxUvmmqeLAfa lfMZGwkBN9x73Ur6OYrRM1qHDLLFcvOAqD+2OXDurysi9KS+B2FuNosKXhBcZg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718328081; a=rsa-sha256; cv=none; b=nbWlqCFQtjaGMegUROEVJG3mhiDvRB60d27V2fT/Kj+xFDIU3CD7svFRtS1MH0hOdGowZG aFAIo6UsIh4CgTRQQ3ZOPe8PPVXfDSj83yKt9/IX3O8al7eabl4QCMGSgDR7xQ2ARDnReB uFlA7j4d0qJpanzogh0iOu7v1Fxms5VwEosAZlirQvdaoXyL896auBaHdssIMY5gMIkAAq FyGUr/3J5Otm+zqa1SDHUF/2O9Z26cgxSLlawpXDa5twq0obYHuFBDOVImR2eVYH6Dq/io pFQ7XnPnoj/Jb+Psqt7ZxZ910mKC/bvF+Slrd+Dm0Vl/SjSIVDFf3BE+WUUMjA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718328081; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dlgC+ADtc1bFEAM3h4zpb+e/Wg/vTleAtqBrYFj+PeA=; b=AJYmCzFaY6LvCsdw0VveJTSN7iDm9q14/8Nmbiy4Ey6K3+QcsKN8bWNz84+7OWeLPN+h58 rQ46/8BQJqvY00y0wVd6jKLtTAtTrIQxdR6gS8cFoAd//YwYWRTcMvD7ULn5RSUefFeMKb KIGQM/YUGY0Dmyw8sv2Sl85ZaMgWo5AK02qvWJDkJfMrgLjs3Pi8ZApfsbnpajnaJkhdgW fAguowAys5cEOesHae1PcEt4aop9n91nh/Av6e5ETQNTTSiaJHYKHtX3qNGDVl2WjSDMac tjZPU/ED/AfedDVNWZufaQ40elGn2KXHnLRNL6+7XjQYiQFgduOFGI34BeeVpA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0hLn2wzZz10m3; Fri, 14 Jun 2024 01:21:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45E1LL6B055879; Fri, 14 Jun 2024 01:21:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45E1LL3e055867; Fri, 14 Jun 2024 01:21:21 GMT (envelope-from git) Date: Fri, 14 Jun 2024 01:21:21 GMT Message-Id: <202406140121.45E1LL3e055867@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: d730cdea2ab3 - main - arm64/vmm: Avoid unnecessary indirection in vmmops_modinit() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d730cdea2ab32750e45955dd2e570152b6f81def Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d730cdea2ab32750e45955dd2e570152b6f81def commit d730cdea2ab32750e45955dd2e570152b6f81def Author: Mark Johnston AuthorDate: 2024-06-14 00:16:57 +0000 Commit: Mark Johnston CommitDate: 2024-06-14 01:19:00 +0000 arm64/vmm: Avoid unnecessary indirection in vmmops_modinit() Most of vmm.h is machine-independent. Simplify merging amd64 and arm64 vmm code by removing this machine-dependent routine from arm64's vmm.h. No functional change intended. Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D45557 --- sys/arm64/include/vmm.h | 7 ------- sys/arm64/vmm/vmm_arm64.c | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/sys/arm64/include/vmm.h b/sys/arm64/include/vmm.h index cf00dd60a43f..05b013557c06 100644 --- a/sys/arm64/include/vmm.h +++ b/sys/arm64/include/vmm.h @@ -201,13 +201,6 @@ cpuset_t vm_active_cpus(struct vm *vm); cpuset_t vm_debug_cpus(struct vm *vm); cpuset_t vm_suspended_cpus(struct vm *vm); -static __inline bool -virt_enabled(void) -{ - - return (has_hyp()); -} - static __inline int vcpu_rendezvous_pending(struct vm_eventinfo *info) { diff --git a/sys/arm64/vmm/vmm_arm64.c b/sys/arm64/vmm/vmm_arm64.c index 6b058a993cdd..1b61871014a7 100644 --- a/sys/arm64/vmm/vmm_arm64.c +++ b/sys/arm64/vmm/vmm_arm64.c @@ -239,7 +239,7 @@ vmmops_modinit(int ipinum) int cpu, i; bool rv __diagused; - if (!virt_enabled()) { + if (!has_hyp()) { printf( "vmm: Processor doesn't have support for virtualization\n"); return (ENXIO); From nobody Fri Jun 14 01:21:22 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0hLq05sJz5N2qt; Fri, 14 Jun 2024 01:21:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0hLp3rFlz4VQh; Fri, 14 Jun 2024 01:21:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718328082; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zk5Q9bUxQ+KLI5xwHbHaJouO0twxQdeVUJCOE1q0vWw=; b=CCtL6hT0qs7gId5H7WElIB02J9SWWp3U77dOYMxY0AVp0zupMK96BithjliGbhlvECzKp7 TtjYzgytpyYgMUnk9eNZnfONgMIIINwZRR7tR8KS7kVi280QIbPN9xWV/6Vsx4i30PmIol 0OOiiTmJA/UYz2jl9fsn1iGaicKu8HFK16y3rxhSiTraUAwDJiIE7sz9G3om8gKcpU4OhB v9X2qIvF0pXyXJIOWrOF/RShU6SjznhBYG2fUnFdm9qmVgX0epq/a8IkBysXVD0z5kN9w8 +5RlIU8OibeGnWulz7J5yGX7Qv4UTO3ic9D9KuKDYrwHm3YuWFNPUGiwCekI8g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718328082; a=rsa-sha256; cv=none; b=A7BBcEYH+uFd+DqMCm9fEvaE/1ag/c0BchOc7Zfx8xGXh5gY90TMShkNRW+sCfmTTx41/w D1DZ6iScYM4Hw/1i23+pr9Ui0HK3flH8ghSLvjdZt8UHGlxfjKRWzWm72ckrrlPDdxe8WD WymRg0cHeo/JAhbvsNJGORpuxYZ8PgGoegi06HiK9ADggh2/fLiMLkXi25yyqwk8jHP0xy dKWpl6spTTLkheeXDRHNhktMoofUiyzWWoCAUHBI34AMO4PWHQGFogzPbYt7Q97AHsfGch 1aucAzQevRd4Y9XVYJcU/0cLYjgW5s8KBCoAhSqPYo6M1cB42HTqvQiJrfXbIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718328082; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zk5Q9bUxQ+KLI5xwHbHaJouO0twxQdeVUJCOE1q0vWw=; b=UQaOEmmF04PNiqWjWsrRYMVImedu+oztEF1f1WwbTCFcjdHdwGvMwGGzA3TbUcGAbKoXX1 iMrfk8wWVtPUTRC9WFVGJGBpld9WAvBWxZrELi2LfvjBlqvnaciXGXBuJEbfMY4GgVPat7 V/X3CupZZaHD0T0PsurVngg6IspEv66LQ2WZKanEFKJu2NUPyewTunc27snhAaJPXnYw/k bL345zmGKpTtnBRqXGfegU/VRUjfJoz8nE3K6xcyLgeEqY1n4b0D5mEf7TqAWRwmvaFKFe a5CUOPwInMndNuS7lExZ8fkzHNqRhkGvCP25bYTlRY8BIw2w563bSnamE5Uuig== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0hLp3SZJz10m4; Fri, 14 Jun 2024 01:21:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45E1LM73057375; Fri, 14 Jun 2024 01:21:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45E1LMGk057361; Fri, 14 Jun 2024 01:21:22 GMT (envelope-from git) Date: Fri, 14 Jun 2024 01:21:22 GMT Message-Id: <202406140121.45E1LMGk057361@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: aede0d3badd1 - main - amd64/vmm: Make vmm.h more self-contained List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aede0d3badd1be92b57deb14c494785ab61022d4 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=aede0d3badd1be92b57deb14c494785ab61022d4 commit aede0d3badd1be92b57deb14c494785ab61022d4 Author: Mark Johnston AuthorDate: 2024-06-14 00:17:07 +0000 Commit: Mark Johnston CommitDate: 2024-06-14 01:19:00 +0000 amd64/vmm: Make vmm.h more self-contained CTASSERT is defined in kassert.h, so include that here. No functional change intended. MFC after: 1 week --- sys/amd64/include/vmm.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/amd64/include/vmm.h b/sys/amd64/include/vmm.h index 08c54ed7c49b..37972d54bd99 100644 --- a/sys/amd64/include/vmm.h +++ b/sys/amd64/include/vmm.h @@ -144,6 +144,8 @@ enum x2apic_state { (SPECNAMELEN - VM_MAX_PREFIXLEN - VM_MAX_SUFFIXLEN - 1) #ifdef _KERNEL +#include + CTASSERT(VM_MAX_NAMELEN >= VM_MIN_NAMELEN); struct vm; From nobody Fri Jun 14 04:19:04 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0mHr6Mxjz5NKT2; Fri, 14 Jun 2024 04:19:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0mHr5kj4z4mGP; Fri, 14 Jun 2024 04:19:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718338744; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5B5VvieNBc+S4Q+9qQ+mmxV7FUWT9vxOV+BN05682Lk=; b=ZdnFvL5XWxKpZfonOuoHyImxsprkpvpQl/cRv1W9Y34gynUVkRrDYWHVsR1pzcH01T9p3u YTrFSjK5GoLPbfjjhQRs8KAu8z5Rzqei1HU6Nh9Qac1Lx5MaE4q8Jhu+0s2gApPG+Nta9r Tg9rHZBPq8/+BQnyuKDLMMess/zNGUbRUTNxfcYV83vJcX1w7eoOM1Oqd5il4Lh1Hc7uYN KEuFLj0Rw25lsD5BFIdhoAHKTtgTIrjEbdFhArn2/zLLMsPNsuCn8ZHNFiZQpcFmwiOItQ h5O8t3Ci2wUqlVmBeTOu/4E/WkhFDs0Dk7BvO/BVEhVdYj6yfs6i5v1HxxQ56A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718338744; a=rsa-sha256; cv=none; b=MZUFpAJeBPtyTkRgiSLn6G75fNEkeKV4OiqHi0DONHLarnsvPlQblu4CRPSFydlyB/+iBX lnyh9rAqvT4iPbHnrYg4bYNh0clueuz0KRcRN/Q4B41MR52rGcmD2Hg/eRTMIRnLOW7P2J 0IznQT88qb5zdLdQiX5ly1lwR5DShaL7bODoe1+5Qia9z14b2/KyHK0bNxYBVDbcJO5ULG qs2EAiw6VXrA//Q6bDuVN2MtN7QnzxkBzrKcpRYawnqRePmXz06UOp64hPRASSD7Lw2znc LLCOylTa9JPxdzCWKaVk4IDgYx21pWnezdxi5vIEhWkpiy5XZSnhrRlm26ZPyw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718338744; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5B5VvieNBc+S4Q+9qQ+mmxV7FUWT9vxOV+BN05682Lk=; b=MFiFWbA/tZhCOXkPmwaMFrBfyrLuxP/KGzsIbdJPolvpCbcnN0tfgkOYQ4a2Dm3GsU7MHd NQRNmGjYzyEM976eeo8+QAetp+C2DG5ZSucTNXXCikE8FBS4dY2noeFGvGwtbSsCVpYctB MGhwS5c2lIBiWzdBHvcV2bcOSn1z0r+pfNtqth2cq0akSC9ILZ7fWbjy5M19gPXM2/bM1Y pVhix0JSmFcC4+5mUiFUwuvQOA3xyW6imJpsT5ffIryGZpB9JkmWMIwtjrCxy3PpqMmwR/ 5wE6kGfQDv1wdjWAm/SMArw3IJlZ/SRFheDwjgmY+99q58DGfPJbQJPNMgeWeg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0mHr5L6Yz14vr; Fri, 14 Jun 2024 04:19:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45E4J46V050323; Fri, 14 Jun 2024 04:19:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45E4J4Tx050320; Fri, 14 Jun 2024 04:19:04 GMT (envelope-from git) Date: Fri, 14 Jun 2024 04:19:04 GMT Message-Id: <202406140419.45E4J4Tx050320@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: fbff6d54da14 - main - vm_phys: Fix vm_phys_find_range() after commit 69cbb18746b6 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fbff6d54da146e98ec2ce4ebfbb86339d4f9fa21 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=fbff6d54da146e98ec2ce4ebfbb86339d4f9fa21 commit fbff6d54da146e98ec2ce4ebfbb86339d4f9fa21 Author: Mark Johnston AuthorDate: 2024-06-14 04:09:45 +0000 Commit: Mark Johnston CommitDate: 2024-06-14 04:18:26 +0000 vm_phys: Fix vm_phys_find_range() after commit 69cbb18746b6 vm_phys_seg_paddr_to_vm_page() expects a PA that's in bounds, but vm_phys_find_range() purposefully returns a pointer to the end of the last page in a segment. Fixes: 69cbb18746b6 ("vm_phys: Add a vm_phys_seg_paddr_to_vm_page() helper") --- sys/vm/vm_phys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/vm/vm_phys.c b/sys/vm/vm_phys.c index a28b3a40691e..53e58283eb9f 100644 --- a/sys/vm/vm_phys.c +++ b/sys/vm/vm_phys.c @@ -1450,7 +1450,7 @@ vm_phys_find_range(vm_page_t bounds[], int segind, int domain, vm_phys_lazy_init_domain(domain, false); #endif bounds[0] = vm_phys_seg_paddr_to_vm_page(seg, pa_start); - bounds[1] = vm_phys_seg_paddr_to_vm_page(seg, pa_end); + bounds[1] = &seg->first_page[atop(pa_end - seg->start)]; return (seg - vm_phys_segs); } return (-1); From nobody Fri Jun 14 07:20:04 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0rJh4bwFz5Nb4S; Fri, 14 Jun 2024 07:20:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0rJh3s1nz54wK; Fri, 14 Jun 2024 07:20:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718349604; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yqwWq/rkBOJojdceA6PFXoUFEYYrnZMEiTdj9CgHmHc=; b=HhOhFLb8dQM6biOFFKcT43qWfm4ocB1IVYJtwdqrO/oNuLH02fxwhDt4vPf4ooj5p0+yoR RtbbEal5vJbmJk2Q+KbpmJ6o0qj6kKrCJdwwdgnVYYuJUHJHvzC88z7xYyvvgNWUb1fpE0 jc//O6FlTnaEVOKJeSK7Ojk45tN1vPWk5IZkd+JGjAwWUsRw/3vKItY3MpavqeVp9Wr9VT vmKxwuPgU9BIiw89Bi/qQ0CVL3yI8MUrENBjp2ktmJzOThHnKH+i/uv8w8vgqYXSHPk1dM 2An5U1VB2exKVQhRQC4kpm/sVWDCJaTq9vzFhrhyomaPxjjYQdTNo94zvjrUAQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718349604; a=rsa-sha256; cv=none; b=rMIc1kjFNFWSkKndNoeYiWjISHPV2jnigvE7h5yv7sz6Yw4zYS+KzIAQ1B1V2KmLq6/ySd 6+OVYZXIBhWm9XYBNFMyrixE7DjLmSvgFg6zghTL+LQBE6+aVpAw76FGGn/ofv+kYZKAe5 iiVjK5insKJzTkxzEhBIb8uruRCm+DyN1KmROmmmnn1ckLN+jbgqx3kHU9Zhey++Epyv03 JOHB0krsqKIT4uhZ9JEMuDQPTNXppPzWUS/G0nmdYVImmcV0vJJncBj5quBUxya4DIIx/2 dgjRRW21GgNvR5EMeTGVRLMPKrMAXPgHUEuWKWd7D8xGszAJVon8Wkm20VyaPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718349604; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yqwWq/rkBOJojdceA6PFXoUFEYYrnZMEiTdj9CgHmHc=; b=obgODbx64U86OBdBJKBF7DojmBpRLuwKxU8NIxipGVQNDYe3OqjIYut5L34xPq9AgKKr/n oNU3c4xOwN4B/IBrLLvDa5hR1TFd3Edj4PlOSg/ves8V7JODCadcBkTzFDq0e1jzbqUDLQ P/t2fXRc2n92wnhDhkZZGw0XoyewIwHHyBq5VGyYguxAFCo1qhNxVpWVeXY67oLbvDeVlu noZZE6IW67t0XnraKO/9Lv61uqIQYx3zjM8kP8JciYCOlYq7fjJwGQdThBoJKCqTC5zEHA Mte6wu7g0YQ/2BlngyLt0eCcD4UnastqPYpNJkP5Gnf9hB8sd2jTWT80siavFw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0rJh3L9Rz19l7; Fri, 14 Jun 2024 07:20:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45E7K4qk058064; Fri, 14 Jun 2024 07:20:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45E7K4aZ058059; Fri, 14 Jun 2024 07:20:04 GMT (envelope-from git) Date: Fri, 14 Jun 2024 07:20:04 GMT Message-Id: <202406140720.45E7K4aZ058059@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: 2a21cfe60fcf - main - pctrie: avoid typecast List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2a21cfe60fcf8e49dad60a9a40d2fc9e62cda563 Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=2a21cfe60fcf8e49dad60a9a40d2fc9e62cda563 commit 2a21cfe60fcf8e49dad60a9a40d2fc9e62cda563 Author: Doug Moore AuthorDate: 2024-06-14 07:19:03 +0000 Commit: Doug Moore CommitDate: 2024-06-14 07:19:03 +0000 pctrie: avoid typecast Have PCTRIE_RECLAIM_CALLBACK typecast one function pointer type to another, to relieve the writer of the call back function from having to cast its first argument from void* to member type. Reviewed by: rlibby Differential Revision: https://reviews.freebsd.org/D45586 --- sys/kern/subr_rangeset.c | 3 +-- sys/sys/pctrie.h | 3 ++- sys/vm/swap_pager.c | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/sys/kern/subr_rangeset.c b/sys/kern/subr_rangeset.c index 94b77a449d22..ddb1839531ea 100644 --- a/sys/kern/subr_rangeset.c +++ b/sys/kern/subr_rangeset.c @@ -233,9 +233,8 @@ rangeset_remove(struct rangeset *rs, uint64_t start, uint64_t end) } static void -rangeset_remove_leaf(void *rv, void *rsv) +rangeset_remove_leaf(struct rs_el *r, void *rsv) { - struct rs_el *r = rv; struct rangeset *rs = rsv; rs->rs_free_data(rs->rs_data_ctx, r); diff --git a/sys/sys/pctrie.h b/sys/sys/pctrie.h index 4e1d8c7f8617..d06b533a54b7 100644 --- a/sys/sys/pctrie.h +++ b/sys/sys/pctrie.h @@ -226,9 +226,10 @@ name##_PCTRIE_RECLAIM(struct pctrie *ptree) \ */ \ static __inline __unused void \ name##_PCTRIE_RECLAIM_CALLBACK(struct pctrie *ptree, \ - pctrie_cb_t callback, void *arg) \ + void (*typed_cb)(struct type *, void *), void *arg) \ { \ struct pctrie_node *freenode, *node; \ + pctrie_cb_t callback = (pctrie_cb_t)typed_cb; \ \ for (freenode = pctrie_reclaim_begin_cb(&node, ptree, \ callback, __offsetof(struct type, field), arg); \ diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index c339f70ddea1..455c39ab6fd7 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -2220,9 +2220,8 @@ swp_pager_meta_free(vm_object_t object, vm_pindex_t pindex, vm_pindex_t count, } static void -swp_pager_meta_free_block(void *sbv, void *rangev) +swp_pager_meta_free_block(struct swblk *sb, void *rangev) { - struct swblk *sb = sbv; struct page_range *range = rangev; for (int i = 0; i < SWAP_META_PAGES; i++) { From nobody Fri Jun 14 14:03:15 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W11Fv6rzFz5Nvdw; Fri, 14 Jun 2024 14:03:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W11Fv6QDlz4YfY; Fri, 14 Jun 2024 14:03:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718373795; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WU7M6oER3D7Yv9NE2QzdAPee4kzEINgp8J87ZbK0o9g=; b=NUzCmZ3xg6P5AjKq21wld46QAEn6Wv2Y3/rKfgM0JCxNqsGHbckn/V9jDr9kUutb5VM0pI SYJhGw3+T2wpoKFP5mDUgoofR/rm948gqROisdBxzLHlFYImT9BDEPtkbnrgSwdhulFPCe 2UMpJI7QkKCq1Jn3pbUFT7yf8EYBNWpLSin/FcLGPjTZpjosCB2lnN+k/lKGTXWdcZwnP3 xrAEo3Ag+Z2GymeffgbuMmVke67M9UaXN8jDP46pV6nR47SDx9t2024P56zX82L7cligXU lQw8I2BqN8Ep4ZsBcUnAdj0RzhIbaD5LH/qefmwX27vkrkm+wGpOpr8qMB7UCA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718373795; a=rsa-sha256; cv=none; b=RKXj3Ra39x2+YV/FNWRaJ45EAnoojaxTm3K/EKsTjrj91xH+95+SssytUKqn2t2L+yjUn9 dJvGPJdr0b0xm5qYlEMAaP3DdxfS26mZUCqVY1owpLMOev7Auf1hFdEtR2GONdQILnjmqg febWNMD+LY3S1O8O5ruXPnagadPsm/yMCukCcI/jDOCuqw1jzm00QgDkxE1qsAhLdCOGYH fR8PDPm6pWsPiHIr0JP42VPP0Sq5ToPHVW8jqbtm7lcwEYKRemblxpOFEO1hZ2A5P7vlRD jPnFochlQQyUXN+3wUmTPnq0SeoMuH0uoSuUizo5hOt0/JU4eERjewdsocqaBA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718373795; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WU7M6oER3D7Yv9NE2QzdAPee4kzEINgp8J87ZbK0o9g=; b=ypZse7ekEd/Pq9vLeCerEUJFsvicF8qfmZdnzFxbKnLKpUeO/8T6g4pTJm6jF9JoPyKYyJ 9l3aU8MvaxTx/91Nqf/an09TEqpniLN4fPhWkdoYumJqwhZKVIXG0ztRG/IOncwm3Ia/NX KQEv2B3DMbuFtRK+RrBjNPo1NgWcDZl3wnJuft/iCj2d6QDeWP1GJPKX6TpTfvITpzrt5K Py7UGFcvqXv3gBUj95AFdCupFKGO2L6fhTQiXk374wyH+DcpApADiQ8wv+Uky6wQDRsn2B Wvvc7KTQmw+bm9ST0sQODFvQtswLXdb2zbtduLIj18HIdZKGQOJQbuioqoNsGQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W11Fv61WNzNbJ; Fri, 14 Jun 2024 14:03:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45EE3FqB045746; Fri, 14 Jun 2024 14:03:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45EE3FdZ045743; Fri, 14 Jun 2024 14:03:15 GMT (envelope-from git) Date: Fri, 14 Jun 2024 14:03:15 GMT Message-Id: <202406141403.45EE3FdZ045743@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 70e3e1bde9bf - main - tzsetup: add detail for -s option List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 70e3e1bde9bf0ddf7fc18b97487fe2d23d4fc5ed Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=70e3e1bde9bf0ddf7fc18b97487fe2d23d4fc5ed commit 70e3e1bde9bf0ddf7fc18b97487fe2d23d4fc5ed Author: Ed Maste AuthorDate: 2024-06-13 15:23:26 +0000 Commit: Ed Maste CommitDate: 2024-06-14 14:02:31 +0000 tzsetup: add detail for -s option Skipping the UTC question via -s will not create or delete /etc/wall_cmos_clock. Reported by: Tomoaki AOKI Reviewed by: imp, allanjude, jrm Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45576 --- usr.sbin/tzsetup/tzsetup.8 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/usr.sbin/tzsetup/tzsetup.8 b/usr.sbin/tzsetup/tzsetup.8 index 60461363da9a..499d25765541 100644 --- a/usr.sbin/tzsetup/tzsetup.8 +++ b/usr.sbin/tzsetup/tzsetup.8 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 18, 2023 +.Dd June 14, 2024 .Dt TZSETUP 8 .Os .Sh NAME @@ -59,6 +59,10 @@ The name is obtained from .Pa /var/db/zoneinfo . .It Fl s Skip the initial question about adjusting the clock if not set to UTC. +.Nm +will neither create nor delete +.Pa /etc/wall_cmos_clock . +On a newly installed system the hardware clock will keep UTC. .El .Pp It is possible to short-circuit the menu system by specifying the From nobody Fri Jun 14 15:29:24 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W139J5127z5P30P; Fri, 14 Jun 2024 15:29:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W139J4GyTz4kY6; Fri, 14 Jun 2024 15:29:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718378964; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qb0/z8uhH3D0xC/XbBzBMQDyxEGm8jOx1Jqu0EhoSBc=; b=G7pc6pU514s0wu3W864Rm212/R0rDjIzIrwtxg53adF1mzTcxjy1mjZcDGK5/oxRHa32o9 IkQHG1HqEJk1luoWvyhUge1aVyFFaUJLQF3ahf3lRPx5Tz2iogRgPylS07z7UjRMlxbo/U UIZk1LnqOIs2M8tOuLkxqV1sxLSsK34viQts5lMuIoxz3E+Z/15VcaMCHgemaPRfA+XMTh 589RO9Laqq9zdCzAIWdogsmEcX3U1Vnhtw3rUM2fH03dnHfjfOdrUEoACzvNsp6biCTNJl emkRiLX8E3bhAQWG+8nFHiwhWhNYiWBjwFJ68IZAm26ORXObq6LjB2hptCj5rQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718378964; a=rsa-sha256; cv=none; b=Fe0YDgEfL7TgSM1KjBBjuhboceHAfrpgpkMYdKbvaxyE9oWIHK3EEbQxCPpz1Kb3Sif5vg bqwF++Pp335jY4ONIwwXyxPpC50gULrqDb0crdpP0TdXutl8GdgJStFw5hcCcBpdOy9LcX Bv3V5p6H2FtPtUR5sezx8esCiUkshJ0EG5WMFL+m5ojqgcta6vB4hRKjgLHLpNAKTqLgGB ly0CVTjNzOtI/Npd4k0maBvtnmlFnJPGkpMkiBAr0Glo0AOzdzgFComXIwS0mmPvVDy2Hg pSzsBkoPTttaWsbJSCJ77NrOpCd7YNE5MWaL0rSOQae5ku/cVP+Nh623ATII7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718378964; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qb0/z8uhH3D0xC/XbBzBMQDyxEGm8jOx1Jqu0EhoSBc=; b=tKYqfxd4JusNhVh0wbTD6/wZIzgiZ8zbHanh9dGlAXmN9tzt81ZDgZC342833DKHikGB6+ xDQd+olCJsG0Ns4HqV9b0JX59I08DAi8Z2jqOgqbOHjTX/h/kPUiKUFL0WRjucNQODRYve 0H3A6V+HbTDC+X5FSXumHSKNi1zk12IPZThyiI0erH/n9sX2DOcurDJoHnE2VHLwDzFQeR /GaTt8GyZFpJNhXnhMzXRFLUYSXAmPEBcxFRE4Y1en5/9Zau8I3LYT5YYxJ0cWqv4XWGB+ 023Tmo7JT/ZPT3DxByIR2qM9v1xm1W2kHoL9AcOUf6/VYp9j0GLSkJGpqjRYdw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W139J3t1ZzQmF; Fri, 14 Jun 2024 15:29:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45EFTOLV081352; Fri, 14 Jun 2024 15:29:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45EFTOSd081349; Fri, 14 Jun 2024 15:29:24 GMT (envelope-from git) Date: Fri, 14 Jun 2024 15:29:24 GMT Message-Id: <202406141529.45EFTOSd081349@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: de4bfd6b9987 - main - udp_var: correct intoudpcb macro unintended identifier dependency List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: de4bfd6b9987987f82485e582beaa26338ed01d2 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=de4bfd6b9987987f82485e582beaa26338ed01d2 commit de4bfd6b9987987f82485e582beaa26338ed01d2 Author: Reid Linnemann AuthorDate: 2024-05-07 22:46:35 +0000 Commit: Kristof Provost CommitDate: 2024-06-14 15:28:28 +0000 udp_var: correct intoudpcb macro unintended identifier dependency Change 483fe9651 embedded struct inpcb into struct udpcb and updated the intoudpcb macro to use __containerof to locate it. This change accidentally introduced a dependency on the identifier inp being defined in the block the macro is expanded in. This should have been the macro argument ip. This change makes this simple correction. No functional change intended. Reviewed by: kp Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netinet/udp_var.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/udp_var.h b/sys/netinet/udp_var.h index 0d70bad91df4..2528e4fcb30f 100644 --- a/sys/netinet/udp_var.h +++ b/sys/netinet/udp_var.h @@ -120,7 +120,7 @@ struct udpcb { void *u_tun_ctx; /* Tunneling callback context. */ }; -#define intoudpcb(ip) __containerof((inp), struct udpcb, u_inpcb) +#define intoudpcb(ip) __containerof((ip), struct udpcb, u_inpcb) #define sotoudpcb(so) (intoudpcb(sotoinpcb(so))) VNET_PCPUSTAT_DECLARE(struct udpstat, udpstat); From nobody Fri Jun 14 15:35:06 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W13Ht6cbsz5P3lQ; Fri, 14 Jun 2024 15:35:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W13Ht60zbz4ldY; Fri, 14 Jun 2024 15:35:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718379306; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lXiLzaGfUM9XqSzhIT57b9faQO6vZrXIS0bfDNgPKXI=; b=T0DvqEy+j9vvMLjGUbBvjk6wHbkwv2ZzEdKoKQrJFd3woUmoyz/gWx/ANzZwl/pomSe6jF TB5NMLeLO4r9b0TNOXBd73LCxHkNI5x6xbxgL4Y/ECl9NHfMZfvff2jhyaZE23hniF8b9X 01e3jfoJwkhicltcOvXpUA9IIzDUZJrXVDJCjcp7eR7p2GVwqcxtgxH1KD2irg5QIbBiss 0/+epeWr4Ys5wWW7PJuTsrf4Aez+wcVYtS3euvrKrrLBmu2PWxytwOlnIrNH5fPtc7TwWC gE4HoxqF5mJXuDfCK5LlBlQgrACv0ynOSpJAUqHLETPtH1oUfu+ZKuk0B6Hi4A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718379306; a=rsa-sha256; cv=none; b=R1/sqAsVKMUYctCh1j71v9YgsFS++xCqKT2+HesNb8tatpOJyifea/vzRWygsdJ82y8NkX kW2NANXRr25pvSpl4Lir12rh648rwxf00DoD0SmmeCkgp6iXoGtVSJ+PQ1zXcL9cJcSn62 PGHKMzfa+66puzN+8EoTOxRPEP0vLXhsFv9fOHjO7k8bRocbAECznsg7Gz1Gb0KNw2Wr1/ 65BLCXv6PXDmk66SbYv+Nkz4RdBguLDHjzv1yyeqApL9q/iwfG7Ya/hX3inyiidKBxIdH7 A9iCxv2geiCevRjgd7qj2TJvNoOpLoBhGFnxr66EhJo7nVTzX4WDNTU4i9cTNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718379306; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lXiLzaGfUM9XqSzhIT57b9faQO6vZrXIS0bfDNgPKXI=; b=i6NhfWfwOd2fWzQQmn0D+/EkZ8zOPLeamh44Tg1J376OFwDcBQlorblCH7S7vKvKTKIibU iP7BinWm0NktzMX2ps1wRzPIH/qsPmdb0iCh9uLDFuXQkWbeMfSWPFkWwl8EAOA2PI66YX 3jW/Tl7Y9HsJOX1bsduYBRVV3J3eDbL/vsXIuCEpbAG2Qz2A23TmhErT9UJPCVR5EuKEf8 WYhUPLzxzOMUmKj6EtwlW7tmg9/3eGoEuIhRLp9jlKVN5t4IhF+iUl4ls0IuFturiVAliy yi6CY1DaW80FkOfrMEvLt3z2zhiDT0sEap27TV6WJLuea+/luEnzob+6Hx5NVg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W13Ht5ZZKzQXb; Fri, 14 Jun 2024 15:35:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45EFZ6K7097630; Fri, 14 Jun 2024 15:35:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45EFZ64g097627; Fri, 14 Jun 2024 15:35:06 GMT (envelope-from git) Date: Fri, 14 Jun 2024 15:35:06 GMT Message-Id: <202406141535.45EFZ64g097627@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: ec7358885de0 - main - libkern.h: Make more self-sufficient List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ec7358885de020711b30114df59f21c6bf042639 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=ec7358885de020711b30114df59f21c6bf042639 commit ec7358885de020711b30114df59f21c6bf042639 Author: Warner Losh AuthorDate: 2024-06-14 14:29:08 +0000 Commit: Warner Losh CommitDate: 2024-06-14 15:34:05 +0000 libkern.h: Make more self-sufficient libkern.h uses KASSERT, which fails when building in the boot loader. This is hacked around in a number of other places, but it's easier to just include sys/kassert.h here. Those other hacks still work, but are no longer really needed and can be torn down over time. Reviewed by: emaste Sponsored by: Netflix --- sys/sys/libkern.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/sys/libkern.h b/sys/sys/libkern.h index afdfe7346b28..6dc4bc87c3fe 100644 --- a/sys/sys/libkern.h +++ b/sys/sys/libkern.h @@ -36,6 +36,7 @@ #ifdef _KERNEL #include #endif +#include #ifndef LIBKERN_INLINE #define LIBKERN_INLINE static __inline From nobody Fri Jun 14 15:35:07 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W13Hw1Dr4z5P3nb; Fri, 14 Jun 2024 15:35:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W13Hv63kKz4lXp; Fri, 14 Jun 2024 15:35:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718379307; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QGhyu8piTzrYrZG+dV92UggQMjg82uofwCHS5v2jPjU=; b=xuCcLNqHoyVPIOjgUhIDvdcCvJSIMWtwXRArIQ/CxOTyiK+AIV4fb97F3UBZ4CTt+FJJUG Bq6dMJyOgonAvqqMScOqVmX85MQi4t6zNPJzQzwdbi+69Dq5IvUdVOFoaKB9TGuktofqVF 93ntkCm/ZR2IpIfpyLXeQQ8r/h5QOTxzc1tWn8wYvFDHw63NaNv4imtSX7VRbkP0FaMq5H axvDytfA/vK3rrgLvqQxtckb9AoCkdmuQVDDY9BTDHp5ISYWaNHSP1hP2IjrogunbvCrY+ w/w/XeRgVxsBwUbW47UcSxVsq02nJZXevw+/miTjtaxglUu0SKoCG0KuaRJ2Bw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718379307; a=rsa-sha256; cv=none; b=Am7bdFfonvFLrOZyo3GTPrEE8rA4DsvmFBVzwEjo9+BV54DMxUUTrwH1k7jArvHIMNK7nK 6JFysWl86RAXAlpsvgeIJVWQv4WHijN2tLLAmTtE7oigKRsc53BZDQZBYhmaznWzy89av0 Q//yeMD2vNCGjDnJnRIL0mMUj3IswU91+9EMA1HXrZcJ/7hd6jeWYgz4eKNafprKJCI6Ef qDd0ncn/f5oLp1wcwM/Rdq5yWTzpnGwzadTc909c//rEuwbeRo9EGavXLsMyqz648LTgmY ytUFWNka91smXf9kfhvwKZ3wmQknDmW/Tz9mDDJeXqT2F/57mAu6LRrJCWATFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718379307; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QGhyu8piTzrYrZG+dV92UggQMjg82uofwCHS5v2jPjU=; b=h37iPWwwns6Xt9Mx51w9ms1EYMTnZTrjSSbAz6vW0QvLrvRf6XqdmCFr7ZDbbGWfkbHd+/ jm7rXWhghUuvlbHAO6LSWpow41VKYek2Qf4lKKdutK4kBimB4xcu+EziBqA/cFy9IOFB6t 9AaGwGc79BMnfaGEpJw8p42I62d29L5fzpWhcj2O9P9Di+kiquLaxnov4NVXZehvz+bc55 VAvPcd/r+GOTKBlGbDHlV9cmzdY6IrHa0PM570TLTsKzGO53yK2MyARA5yb3ab7HVd4io+ PKigm591vXZef8ZTQdfpKDteI6/FZVM6L9ihbyeW8Qi9FQRr+e9KUbXi/y0N6A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W13Hv5hCZzR0n; Fri, 14 Jun 2024 15:35:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45EFZ7db097675; Fri, 14 Jun 2024 15:35:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45EFZ7sr097672; Fri, 14 Jun 2024 15:35:07 GMT (envelope-from git) Date: Fri, 14 Jun 2024 15:35:07 GMT Message-Id: <202406141535.45EFZ7sr097672@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 4fd5b8aed896 - main - boot1.chrp: Include memset List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4fd5b8aed89643707556fa859ba58bcfd335f6f7 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=4fd5b8aed89643707556fa859ba58bcfd335f6f7 commit 4fd5b8aed89643707556fa859ba58bcfd335f6f7 Author: Warner Losh AuthorDate: 2024-06-14 14:30:30 +0000 Commit: Warner Losh CommitDate: 2024-06-14 15:34:05 +0000 boot1.chrp: Include memset Normally, memset isn't used. However for OPT_INIT_ALL=zero it is. Always include it since we're not space constrained and latter-day loaders won't include a copy if it's not actually used. Reviewed by: emaste Sponsored by: Netflix --- stand/powerpc/boot1.chrp/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stand/powerpc/boot1.chrp/Makefile b/stand/powerpc/boot1.chrp/Makefile index 22a3f983affd..11b9e356219b 100644 --- a/stand/powerpc/boot1.chrp/Makefile +++ b/stand/powerpc/boot1.chrp/Makefile @@ -6,7 +6,7 @@ NEWVERSWHAT= "Open Firmware boot block" ${MACHINE_ARCH} INSTALLFLAGS= -b FILES= boot1.hfs -SRCS= boot1.c ashldi3.c syncicache.c +SRCS= boot1.c ashldi3.c syncicache.c memset.c CFLAGS+=-I${LDRSRC} # Load boot1.elf below kernel. From nobody Fri Jun 14 16:16:06 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W14CB6GWGz5P6N1; Fri, 14 Jun 2024 16:16:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W14CB5hX3z4rZZ; Fri, 14 Jun 2024 16:16:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718381766; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HuefF3V4hF41ed7som96ZkokQvEJf2mU0aDdmdVNYFI=; b=WmpcHYThsUYSzqTuyPnQMAa5CjCNi4gL7tozD3b4ZK8FzWcu0LbCbRy5XuXU2FbTwOasAw xRVemH9IETUVIiw3Ob8S6behxE+czHybo9EpK26OhwCu4SjDH3962oEuYhE0QCtUdBrcjy dATS3pPw9JnXpFhOaZYZYevETK/2RWZII6Q9Kcr9eXdk3I7XIMuU9RjYIPw42pY8w4AyHo v9u3sXofr3XqIkMSUa0x/6qIihsZWPFLsCWAU7cG/oX3xhispOVsUOww9oJzSsQoc6S8KO 4M3WXucxohqxCyX3V36TdQ/hsdq/KjUjGJbcf4J84+ZYOgKq/ksGeW+zihJ9QQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718381766; a=rsa-sha256; cv=none; b=mq7gHqzpxRe6DpP373MILTkiDbupPKiaJZuf/QfRBv2OyxhTBXZs6E0FLTEjyO5Qga8NIB 8Q2OPVT6YMlOuqpjrNPhE24fQ9q82P5x5o3+ShHk8YYDe9ssCCYwtKO8SoKBhx/lnC/Hht 3OyCEnaZ5d1lJ/Py0jEBTOg+tt+15LzL6JB4IxZip0m9jxCO26JC1r8H0LgcqUKwwZcZXD mRLP+m8PP6+il6C0EBcAhBS2UvtgncsqejeIANWj4LOistlNpkEj5QCuLKvejIiojNDm+l UbGbNTXSgNlFWFIs0cKILRXW12xCiA01HpHfdhmFoTJs0n0+kbV5ZjzcggUhaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718381766; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HuefF3V4hF41ed7som96ZkokQvEJf2mU0aDdmdVNYFI=; b=QTtT/4yLJ6T/SVkSF60c1Fv7Xx0LFvA+oumm/FpUYfX07/U/aro7WiF+1kTM5HzjxCFkEg dpYVz//pXqYKqGWCTL4O7YgbG7Cnommp+FAvUDCsmdjwtSXOnJKa7lCjXEPSbHJdSRJWAJ ZfEW/Rvm1WCGjjzQ6NUpe9jchz8TSrGsdbf8lgGLuW/1syQTHlW5b5mXe23yAk+l2xNJJE FokmmNEthk3NyEVCmMRYKCvCaQ3++dbYui88RAf76FzdeJQRewA6aICCv8Ia7TFmUgVbDt g/n9f6bP99H3osUO87skCfkRm6qGgmlAWxQb/HtqAir06vKentzzDJl4I8h48A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W14CB59PszR61; Fri, 14 Jun 2024 16:16:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45EGG621065858; Fri, 14 Jun 2024 16:16:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45EGG6U9065855; Fri, 14 Jun 2024 16:16:06 GMT (envelope-from git) Date: Fri, 14 Jun 2024 16:16:06 GMT Message-Id: <202406141616.45EGG6U9065855@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: aa6fb1d277be - main - tzsetup: ask local/UTC question only on x86 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aa6fb1d277be47c51abc309ac9305def0fce7f9d Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=aa6fb1d277be47c51abc309ac9305def0fce7f9d commit aa6fb1d277be47c51abc309ac9305def0fce7f9d Author: Ed Maste AuthorDate: 2024-06-12 23:48:24 +0000 Commit: Ed Maste CommitDate: 2024-06-14 16:15:48 +0000 tzsetup: ask local/UTC question only on x86 Storing local time in the RTC is a legacy of 1990s PCs; it's not relevant on other platforms of interest to FreeBSD. While here switch to C99 bool. Sponsored by: The FreeBSD Foundation Reviewed by: allanjude (earlier), imp (earlier) Differential Revision: https://reviews.freebsd.org/D45575 --- usr.sbin/tzsetup/tzsetup.8 | 3 ++- usr.sbin/tzsetup/tzsetup.c | 25 +++++++++++++++---------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/usr.sbin/tzsetup/tzsetup.8 b/usr.sbin/tzsetup/tzsetup.8 index 499d25765541..4e70875ec74b 100644 --- a/usr.sbin/tzsetup/tzsetup.8 +++ b/usr.sbin/tzsetup/tzsetup.8 @@ -62,7 +62,8 @@ Skip the initial question about adjusting the clock if not set to UTC. .Nm will neither create nor delete .Pa /etc/wall_cmos_clock . -On a newly installed system the hardware clock will keep UTC. +On a newly installed system, the hardware clock will keep UTC. +This option is enabled automatically on non-x86 hardware. .El .Pp It is possible to short-circuit the menu system by specifying the diff --git a/usr.sbin/tzsetup/tzsetup.c b/usr.sbin/tzsetup/tzsetup.c index 617de4efb765..6629dd81f250 100644 --- a/usr.sbin/tzsetup/tzsetup.c +++ b/usr.sbin/tzsetup/tzsetup.c @@ -826,23 +826,28 @@ main(int argc, char **argv) char prompt[128]; int fd; #endif - int c, rv, skiputc; + int c, rv; + bool skiputc; + char *dztpath; +#if defined(__i386__) || defined(__amd64__) char vm_guest[16] = ""; size_t len = sizeof(vm_guest); - char *dztpath; + skiputc = false; + + /* Default skiputc to true for VM guests */ + if (sysctlbyname("kern.vm_guest", vm_guest, &len, NULL, 0) == 0 && + strcmp(vm_guest, "none") != 0) + skiputc = true; +#else + skiputc = true; +#endif dztpath = NULL; - skiputc = 0; #ifdef HAVE_BSDDIALOG setlocale(LC_ALL, ""); #endif - /* Default skiputc to 1 for VM guests */ - if (sysctlbyname("kern.vm_guest", vm_guest, &len, NULL, 0) == 0 && - strcmp(vm_guest, "none") != 0) - skiputc = 1; - while ((c = getopt(argc, argv, "C:d:nrs")) != -1) { switch (c) { case 'C': @@ -861,7 +866,7 @@ main(int argc, char **argv) #endif break; case 's': - skiputc = 1; + skiputc = true; break; default: usage(); @@ -951,7 +956,7 @@ main(int argc, char **argv) if (bsddialog_init() == BSDDIALOG_ERROR) errx(1, "Error bsddialog: %s\n", bsddialog_geterror()); - if (skiputc == 0) { + if (!skiputc) { snprintf(prompt, sizeof(prompt), "Is this machine's CMOS clock set to UTC? " "If it is set to local time,\n" From nobody Fri Jun 14 16:25:19 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W14Pq58mNz5P7JS; Fri, 14 Jun 2024 16:25:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W14Pq4WvVz4sbd; Fri, 14 Jun 2024 16:25:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718382319; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rJTI2odQjv+5jak2iZLptIML+4/kRWkKNLLYI513pBA=; b=DT7UDfy6X9ZuciTr9S6SO3r2pxaiAXyLZbYvjMZSYX5q2IhiuFs04zCj9X+cw635iBt6Hl c//9bOA9dsnOVwmbLip4hvGRg9re0NXIainPh4lBDuOHt41mCHySMPK402l8fWd/G4SZCv 678iv1fHnSiChKcc2n1lwXmtYIWx4bv/AXJhqr7ZXPg5A+ylKxnkudrBvh8RZo3ReI1B2j 5f472Ex3OyyP5l9SH6YPSvGZvO3B0Lr6wQCAZPT8XAiDi16L4FEe+gQtcIQKWuf4PMGxhV GsAWqQhsrrBtDObKMkwcROYfTSay5Lrd52XpIvI9XFI43nPjLo/NJ/duHHn2EQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718382319; a=rsa-sha256; cv=none; b=QeF0pQpyksqoG1wNDpQtRxwmm53b4B8s8CwOSpL13dOcgROAv4jt87tPVYVfFVVXgDxjkd ubuYWcRGXw1YRs6hCbrbFTs4DXnwafjmsWVacpiRY3WMYmhmZATcnp+jVNC5Pm0gTIPpUG cWzQysOgXqiSHSVtY7g4Gyoj0IoykNY8uOy8Vbud0ib7iUOgaXEN2Jbw4kq0vNGowhMGkR vRVjz1n0iS0zhvSni1RabRmtGXI0GuJrNy7l5UbGxeJxCEy5D6BRt2+iYTTDpc6GS/zplM EC7TvKwSWC5xeT4ETyxnTE2Xll1FMtm5SLJXIWv9nh3IzZYxe9uwVP+zviec2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718382319; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rJTI2odQjv+5jak2iZLptIML+4/kRWkKNLLYI513pBA=; b=DfOXAt8zfXv8Nvi6Z8VEDmFtUtnYc9iMWbXHW7qTguZ3yaCqkbkt4uHFc6mAplZgtpGR2g 1Z/zHI3/XNi6IPqHtcQeFVb0RBWEUR8doV5Ej2BML02m+cuBuPzAGIMQriavqXSlQnxcLL TqHFdvtw34uvO1ju+FU6v/gxAvzv3TyvPNyA0pnleoEyfmbkFBTdbsmOdqlfwi8kQ6+6Gt /AFgR3rojxg85t9du9xUeB8UkYtQWJ1k5490PnLtTm1AENxA04+6Fq7waTu0hdWo59q+zm ie/cU9E/lLloLWZoVbCtlEfBoBriZHmE+lqT21rgXRbC9mXyUETpC0G08UD4fg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W14Pq3qWPzRLq; Fri, 14 Jun 2024 16:25:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45EGPJpE082012; Fri, 14 Jun 2024 16:25:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45EGPJj1082009; Fri, 14 Jun 2024 16:25:19 GMT (envelope-from git) Date: Fri, 14 Jun 2024 16:25:19 GMT Message-Id: <202406141625.45EGPJj1082009@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: fb1028dcd4ae - main - hda: add support for Tiger Lake-H List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fb1028dcd4aedc4d48dbd97314f008c663b2e711 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=fb1028dcd4aedc4d48dbd97314f008c663b2e711 commit fb1028dcd4aedc4d48dbd97314f008c663b2e711 Author: Adam Retter AuthorDate: 2024-06-14 15:57:15 +0000 Commit: Ed Maste CommitDate: 2024-06-14 16:24:59 +0000 hda: add support for Tiger Lake-H PR: 272682 Reported by: Miguel Salcedo Reviewed by: emaste --- sys/dev/sound/pci/hda/hdac.c | 1 + sys/dev/sound/pci/hda/hdac.h | 2 ++ sys/dev/sound/pci/hda/hdacc.c | 1 + 3 files changed, 4 insertions(+) diff --git a/sys/dev/sound/pci/hda/hdac.c b/sys/dev/sound/pci/hda/hdac.c index e45c121eb10b..336602b6bbf4 100644 --- a/sys/dev/sound/pci/hda/hdac.c +++ b/sys/dev/sound/pci/hda/hdac.c @@ -109,6 +109,7 @@ static const struct { { HDA_INTEL_CMLKLP, "Intel Comet Lake-LP", 0, 0 }, { HDA_INTEL_CMLKH, "Intel Comet Lake-H", 0, 0 }, { HDA_INTEL_TGLK, "Intel Tiger Lake", 0, 0 }, + { HDA_INTEL_TGLKH, "Intel Tiger Lake-H", 0, 0 }, { HDA_INTEL_GMLK, "Intel Gemini Lake", 0, 0 }, { HDA_INTEL_ALLK, "Intel Alder Lake", 0, 0 }, { HDA_INTEL_ALLKM, "Intel Alder Lake-M", 0, 0 }, diff --git a/sys/dev/sound/pci/hda/hdac.h b/sys/dev/sound/pci/hda/hdac.h index b40bfc7f6da3..4b4bd70f800f 100644 --- a/sys/dev/sound/pci/hda/hdac.h +++ b/sys/dev/sound/pci/hda/hdac.h @@ -98,6 +98,7 @@ #define HDA_INTEL_CMLKLP HDA_MODEL_CONSTRUCT(INTEL, 0x02c8) #define HDA_INTEL_CMLKH HDA_MODEL_CONSTRUCT(INTEL, 0x06c8) #define HDA_INTEL_TGLK HDA_MODEL_CONSTRUCT(INTEL, 0xa0c8) +#define HDA_INTEL_TGLKH HDA_MODEL_CONSTRUCT(INTEL, 0x43c8) #define HDA_INTEL_MTL HDA_MODEL_CONSTRUCT(INTEL, 0x7e28) #define HDA_INTEL_ARLS HDA_MODEL_CONSTRUCT(INTEL, 0x7f50) #define HDA_INTEL_ARL HDA_MODEL_CONSTRUCT(INTEL, 0x7728) @@ -911,6 +912,7 @@ #define HDA_CODEC_INTELGMLK1 HDA_CODEC_CONSTRUCT(INTEL, 0x280d) #define HDA_CODEC_INTELICLK HDA_CODEC_CONSTRUCT(INTEL, 0x280f) #define HDA_CODEC_INTELTGLK HDA_CODEC_CONSTRUCT(INTEL, 0x2812) +#define HDA_CODEC_INTELTGLKH HDA_CODEC_CONSTRUCT(INTEL, 0x2814) #define HDA_CODEC_INTELALLK HDA_CODEC_CONSTRUCT(INTEL, 0x2815) #define HDA_CODEC_INTELJLK HDA_CODEC_CONSTRUCT(INTEL, 0x281a) #define HDA_CODEC_INTELELLK HDA_CODEC_CONSTRUCT(INTEL, 0x281b) diff --git a/sys/dev/sound/pci/hda/hdacc.c b/sys/dev/sound/pci/hda/hdacc.c index 009c9098ac3b..81395a1a9ae7 100644 --- a/sys/dev/sound/pci/hda/hdacc.c +++ b/sys/dev/sound/pci/hda/hdacc.c @@ -393,6 +393,7 @@ static const struct { { HDA_CODEC_INTELGMLK1, 0, "Intel Gemini Lake" }, { HDA_CODEC_INTELICLK, 0, "Intel Ice Lake" }, { HDA_CODEC_INTELTGLK, 0, "Intel Tiger Lake" }, + { HDA_CODEC_INTELTGLKH, 0, "Intel Tiger Lake-H" }, { HDA_CODEC_INTELALLK, 0, "Intel Alder Lake" }, { HDA_CODEC_SII1390, 0, "Silicon Image SiI1390" }, { HDA_CODEC_SII1392, 0, "Silicon Image SiI1392" }, From nobody Fri Jun 14 16:42:57 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W14pB1hxqz5P8NF; Fri, 14 Jun 2024 16:42:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W14pB0nBkz4vD7; Fri, 14 Jun 2024 16:42:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718383378; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ne2u0aYBH+UyxGxSUpJVKi+fVro1XgWLmpSbwsrVGI0=; b=TYaxUB9fsnZsTLN86mgAcRWE/OTydinJsN0Prv2HUwKcbKrfRDyXIb6DQgeP+nKf53zvQu 5UVkzj6vm7vPzcaXbwCNZulvEQIRuW6VxPbvaYjL6ZTl5FCX4dAcrGjM5S0wJ2mhsFLQ4w VO/Cemsyw0oXiwOiSzrWzzl7KwAAGv7uOa4VSbdYxpcCVEeBlDUZj/ctgXJqcHag4Z0YUv 3Xug65ZpizKG9KsZ6u6DGR0jZzPl4NyGwkPdJ9nNDzyuBwzf0IsPccHueCwpqcoQDuQ3kv vFIjxF6cmY+vL06YB6iKzDGXgWHMz41J4YDfRgIpIBK1dBUSKsReS0kh7JVNkw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718383378; a=rsa-sha256; cv=none; b=iJ21Bh9X/VecvjsS7niNvPC5L6UrKPs9PJ6eYTlOeIOoMTMej6VrMMvP8faXtCIPmUj0QE WfBNmtKzgVDc2EcElNZlukIs+jJ8M1O6TSU745ZuPFRoqM9l97tAevYn5DG8IWD99BM62f Smq+3rOn2B6/aIGxwm732efsEjFgD45SfWcvNSn3kQXFIxe6BmUJV2qJ+xuPQyfPwP5i+4 xcfWF1VLdviEcp8Moj66uzKgnWEZ7ShABLd01Bn/wvdWyTA/866i6fTstHRdCZjHovoJpS 5kYOc1wMLWiNgpaNSkR0cUi+wLrLw6ZT8lwNuh27hWjRqnXNkT1bQgvbBcSw0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718383378; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ne2u0aYBH+UyxGxSUpJVKi+fVro1XgWLmpSbwsrVGI0=; b=TWKup2YQQt4SeOPpma3dKh/qqL35cM2FJqsb38WiimpkzJO9u1iFxBQbGgONzfCUm6r9ZH mgaak0kVjJ6fW6LdRLPg7L3SNFXmCRT6wZoy6V82RL3+6OuSmg7I+lB8W6BrpRHyf4LWXD S2ccfRmvG/QmspcIwkw3IyXyY+RePLe7WJmj6ibGWt6Mrzn8TGJVjwbOIdvT6ThkI+HUJC 9av/eQEbclaptR3acYD4+Pw7gpZ+zTp796sg2sIIP4el2KdR4gvpfPxSUpCFSuXlcKXnDt G44AMJ44FbLPZO85tVznfEtY01tJxv0tQ6qkFztRuZwicK381NTU3o/2fruOxg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W14pB0NYfzShF; Fri, 14 Jun 2024 16:42:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45EGgvVV015807; Fri, 14 Jun 2024 16:42:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45EGgvmP015804; Fri, 14 Jun 2024 16:42:57 GMT (envelope-from git) Date: Fri, 14 Jun 2024 16:42:57 GMT Message-Id: <202406141642.45EGgvmP015804@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 97ab935d566c - main - rk_pinctrl: fix error check List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 97ab935d566c85458bc7cab99c402f026d704eff Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=97ab935d566c85458bc7cab99c402f026d704eff commit 97ab935d566c85458bc7cab99c402f026d704eff Author: John F. Carr AuthorDate: 2024-06-14 16:37:06 +0000 Commit: Mitchell Horne CommitDate: 2024-06-14 16:42:27 +0000 rk_pinctrl: fix error check The parse_bias method returns a signed int, with a value of -1 when the device tree reports nothing of the bias configuration. Convert the local 'bias' from unsigned to signed to properly check this condition. PR: 229721 Reviewed by: mhorne MFC after: 3 days --- sys/arm64/rockchip/rk_pinctrl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/arm64/rockchip/rk_pinctrl.c b/sys/arm64/rockchip/rk_pinctrl.c index 4892b0bf236c..6137f7f0d50a 100644 --- a/sys/arm64/rockchip/rk_pinctrl.c +++ b/sys/arm64/rockchip/rk_pinctrl.c @@ -1141,9 +1141,9 @@ rk_pinctrl_configure_pin(struct rk_pinctrl_softc *sc, uint32_t *pindata) { phandle_t pin_conf; struct syscon *syscon; - uint32_t bank, subbank, pin, function, bias; + uint32_t bank, subbank, pin, function; uint32_t bit, mask, reg, drive; - int i, rv; + int i, rv, bias; bank = pindata[0]; pin = pindata[1]; From nobody Fri Jun 14 16:58:05 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W157d3kfdz5P9Xd; Fri, 14 Jun 2024 16:58:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W157d368Nz3wmS; Fri, 14 Jun 2024 16:58:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718384285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7tssy7seHY0ZkKoEybYUGeYYr45CiBsnUAKCf301BUo=; b=Csx6GQ3emDWkA/hxOBw6wdJaP8YiChyGQZD+OSwifaVZ0pcpC6h7epIqyx8/L/vU5f2364 UpXd1CmtJuIDqCTBzjmqhT0kOQmdMmx6XTA/oD6rJAqoxAtrQO7Y+Il/OjwMXrREbq2ASj 1k1B9u0d6iMTOmmmpS69c6GdjHuusQwtyWBq6DoJGgUTVJeh90Urpv5pP6OHV6PCnoCzt/ 4UXt+r74yP7+BSQN6pGE27op9yPpE/rEMGi0VfBEWqn6EiGQq8f4raQwqwje7juiTiyjh3 q9ElbNbSEMGsBNK5Hjm5CI5M/UgkWDdcEo+5ePfOP1kGYnEAfL7h+Sld4gppmg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718384285; a=rsa-sha256; cv=none; b=wtXVa+uKj9+z3xyk97nnTR2tMwlnFkXsH+/JgWkM6ZV8SJSJCE3nvHd8J2Wr93G61VUbaR KhR/6u+/4RZbcy12zoPpMZ1Zaq61NnZhh7ZuE5+Ik0Er3FIhHtjx5AdHPetuk2sxwhuybn dtkrBBSeaGLpj/I9BrFBulBOKu9R+z6rTaQwohZGdwtoOlhlTJNFyrHU+PIx68/hDWOeQ1 N5p0bA/Z+UhtRw3SAFl5/YII4GJ9orCCjd40nEIHWY9wk4TjDp5CxBJA//cJBjb0FuhINP d+oo8eMbtsVyDj+MxGNW8KPHT1DGD2WrAbOXxAKdyAihygX/EZNUmqcLWLiQtw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718384285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7tssy7seHY0ZkKoEybYUGeYYr45CiBsnUAKCf301BUo=; b=rjEzRomaPoK4qjqe+obt0erPUordRoWLTfKGWZ+hAscSm4L2LEfuynLRa/3orRnAeJyP5E L5EYFwsfmOJzBpzOkMYMr/JKmsosHhCJGBbbaDy2g08AueQCT79rGmAoEeMLD+bsMryiVN OLkUuzmv6GR0CBa7JySPYGXvTrPffHEH8sUM8B6JXLP1dYeGiD+AWc4aBErToH1QU0D9J3 Rg3rnZgvOlOym9AsY1gUqVx7UdA0seeHB/djvbp0B1KBUBk7euh5X1gPWEcC+Wa1dPuHTk lF/KJDd+aeBRPkywXUDsgi7OX+JuBC5yFyaazGNZGBhUkhng0lQy3oarYLL5Mw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W157d2ZlszSZK; Fri, 14 Jun 2024 16:58:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45EGw5XK032959; Fri, 14 Jun 2024 16:58:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45EGw5P3032956; Fri, 14 Jun 2024 16:58:05 GMT (envelope-from git) Date: Fri, 14 Jun 2024 16:58:05 GMT Message-Id: <202406141658.45EGw5P3032956@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: e6ecffccdec6 - stable/14 - sound: Include sound(4) channel information in sndstat nvlist List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e6ecffccdec60420c9e3654b8c9c4408e2fe4537 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=e6ecffccdec60420c9e3654b8c9c4408e2fe4537 commit e6ecffccdec60420c9e3654b8c9c4408e2fe4537 Author: Christos Margiolis AuthorDate: 2024-06-09 15:30:22 +0000 Commit: Christos Margiolis CommitDate: 2024-06-14 16:57:57 +0000 sound: Include sound(4) channel information in sndstat nvlist Extend SNDST_DSPS_PROVIDER_INFO for sound(4) to include information about each channel in a given device, similar to how cat'ing /dev/sndstat with hw.snd.verbose=2 works. While here, document all provider_info fields. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: dev_submerge.ch, markj Differential Revision: https://reviews.freebsd.org/D45501 (cherry picked from commit bbca3a75bb412f7106a569b82c616404103be084) --- share/man/man4/sndstat.4 | 140 +++++++++++++++++++++++++++++++++++++------- sys/dev/sound/pcm/sndstat.c | 115 +++++++++++++++++++++++++++++++++++- sys/sys/sndstat.h | 37 ++++++++++-- 3 files changed, 265 insertions(+), 27 deletions(-) diff --git a/share/man/man4/sndstat.4 b/share/man/man4/sndstat.4 index ba130dacaecb..f638fc6834fe 100644 --- a/share/man/man4/sndstat.4 +++ b/share/man/man4/sndstat.4 @@ -29,7 +29,7 @@ .\" .\" Note: The date here should be updated whenever a non-trivial .\" change is made to the manual page. -.Dd April 15, 2021 +.Dd June 5, 2024 .Dt SNDSTAT 4 .Os .Sh NAME @@ -60,25 +60,55 @@ struct sndstioc_nv_arg { Here is an example of an nvlist object with explanations of the common fields: .Bd -literal -offset indent dsps (NVLIST ARRAY): 1 - from_user (BOOL): FALSE - nameunit (STRING): [pcm0] - devnode (STRING): [dsp0] - desc (STRING): [Generic (0x8086) (Analog Line-out)] - pchan (NUMBER): 1 (1) (0x1) - rchan (NUMBER): 0 (0) (0x0) - info_play (NVLIST): - min_rate (NUMBER): 48000 (48000) (0xbb80) - max_rate (NUMBER): 48000 (48000) (0xbb80) - formats (NUMBER): 16 (16) (0x10) - min_chn (NUMBER): 2 (2) (0x2) - max_chn (NUMBER): 2 (2) (0x2) - provider_info (NVLIST): - unit (NUMBER): 0 (0) (0x0) - bitperfect (BOOL): FALSE - pvchan (NUMBER): 1 (1) (0x1) - rvchan (NUMBER): 0 (0) (0x0) - provider (STRING): [sound(4)] - , + from_user (BOOL): FALSE + nameunit (STRING): [pcm0] + devnode (STRING): [dsp0] + desc (STRING): [Generic (0x8086) (Analog Line-out)] + pchan (NUMBER): 1 + rchan (NUMBER): 0 + info_play (NVLIST): + min_rate (NUMBER): 48000 + max_rate (NUMBER): 48000 + formats (NUMBER): 16 + min_chn (NUMBER): 2 + max_chn (NUMBER): 2 + provider_info (NVLIST): + unit (NUMBER): 0 + bitperfect (BOOL): FALSE + pvchan (NUMBER): 1 + rvchan (NUMBER): 0 + channel_info (NVLIST_ARRAY): 1 + name (STRING): pcm0:virtual_play:dsp0.vp0 + parentchan (STRING): pcm0:play:dsp0.p0 + unit (NUMBER): 1 + latency (NUMBER): 2 + rate (NUMBER): 48000 + format (NUMBER): 0x201000 + pid (NUMBER): 1234 + comm (STRING): mpv + interrupts (NUMBER): 0 + feedcount (NUMBER): 0 + xruns (NUMBER): 0 + left_volume (NUMBER): 45 + right_volume (NUMBER): 45 + hwbuf_fmt (NUMBER): 0x200010 + hwbuf_size (NUMBER): 0 + hwbuf_blksz (NUMBER): 0 + hwbuf_blkcnt (NUMBER): 0 + hwbuf_free (NUMBER): 0 + hwbuf_ready (NUMBER): 0 + swbuf_fmt (NUMBER): 0x201000 + swbuf_size (NUMBER): 16384 + swbuf_blksz (NUMBER): 2048 + swbuf_blkcnt (NUMBER): 8 + swbuf_free (NUMBER): 16384 + swbuf_ready (NUMBER): 0 + feederchain (STRING): + [userland -> + feeder_root(0x00201000) -> + feeder_format(0x00201000 -> 0x00200010) -> + feeder_volume(0x00200010) -> hardware] + provider (STRING): [sound(4)] .Ed .Bl -tag -width ".Dv provider_info" .It Dv from_user @@ -133,6 +163,76 @@ Provider-specific fields. This field may not exist if the PCM audio device is not provided by in-kernel interface. This field will not exist if the provider field is an empty string. +For the +.Xr sound 4 +provider, there are a number of name/value pairs inside this field: +.Bl -tag -width ".Dv channel_info" +.It Dv unit +Sound card unit. +.It Dv bitperfect +Whether the sound card has bit-perfect mode enabled. +.It Dv pvchan +Number of playback virtual channels. +.It Dv rvchan +Number of recording virtual channels. +.It Dv channel_info +Channel information. +There are a number of name/value pairs inside this field: +.Bl -tag -width ".Dv hwbuf_blkcnt" +.It Dv name +Channel name. +.It Dv parenchan +Parent channel name (e.g., in the case of virtual channels). +.It Dv unit +Channel unit. +.It Dv latency +Latency. +.It Dv rate +Sampling rate. +.It Dv format +Sampling format. +.It Dv pid +PID of the process consuming the channel. +.It Dv comm +Name of the process consuming the channel. +.It Dv interrupts +Number of interrupts since the channel has been opened. +.It Dv xruns +Number of overruns/underruns, depending on channel direction. +.It Dv feedcount +Number of read/written bytes since the channel has been opened. +.It Dv left_volume +Left volume. +.It Dv right_volume +Right volume. +.It Dv hwbuf_format +Hardware buffer format. +.It Dv hwbuf_size +Hardware buffer size. +.It Dv hwbuf_blksz +Hardware buffer block size. +.It Dv hwbuf_blkcnt +Hardware buffer block count. +.It Dv hwbuf_free +Free space in hardware buffer (in bytes). +.It Dv hwbuf_ready +Number of bytes ready to be read/written from hardware buffer. +.It Dv swbuf_format +Software buffer format. +.It Dv swbuf_size +Software buffer size. +.It Dv swbuf_blksz +Software buffer block size. +.It Dv swbuf_blkcnt +Software buffer block count. +.It Dv swbuf_free +Free space in software buffer (in bytes). +.It Dv swbuf_ready +Number of bytes ready to be read/written from software buffer. +.It Dv feederchain +Channel feeder chain. +.El +.El .It Dv provider A string specifying the provider of the PCm audio device. .El diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c index 6670a1e43aac..3be376e1da01 100644 --- a/sys/dev/sound/pcm/sndstat.c +++ b/sys/dev/sound/pcm/sndstat.c @@ -392,9 +392,12 @@ sndstat_create_diinfo_nv(uint32_t min_rate, uint32_t max_rate, uint32_t formats, static int sndstat_build_sound4_nvlist(struct snddev_info *d, nvlist_t **dip) { + struct pcm_channel *c; + struct pcm_feeder *f; + struct sbuf sb; uint32_t maxrate, minrate, fmts, minchn, maxchn; - nvlist_t *di = NULL, *sound4di = NULL, *diinfo = NULL; - int err; + nvlist_t *di = NULL, *sound4di = NULL, *diinfo = NULL, *cdi = NULL; + int err, nchan; di = nvlist_create(0); if (di == NULL) { @@ -451,8 +454,116 @@ sndstat_build_sound4_nvlist(struct snddev_info *d, nvlist_t **dip) sound4di, SNDST_DSPS_SOUND4_BITPERFECT, d->flags & SD_F_BITPERFECT); nvlist_add_number(sound4di, SNDST_DSPS_SOUND4_PVCHAN, d->pvchancount); nvlist_add_number(sound4di, SNDST_DSPS_SOUND4_RVCHAN, d->rvchancount); + + nchan = 0; + CHN_FOREACH(c, d, channels.pcm) { + sbuf_new(&sb, NULL, 4096, SBUF_AUTOEXTEND); + cdi = nvlist_create(0); + if (cdi == NULL) { + sbuf_delete(&sb); + PCM_RELEASE_QUICK(d); + err = ENOMEM; + goto done; + } + + nvlist_add_string(cdi, SNDST_DSPS_SOUND4_CHAN_NAME, c->name); + nvlist_add_string(cdi, SNDST_DSPS_SOUND4_CHAN_PARENTCHAN, + c->parentchannel != NULL ? c->parentchannel->name : ""); + nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_UNIT, nchan++); + nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_LATENCY, + c->latency); + nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_RATE, c->speed); + nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_FORMAT, + c->format); + nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_PID, c->pid); + nvlist_add_string(cdi, SNDST_DSPS_SOUND4_CHAN_COMM, c->comm); + nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_INTR, + c->interrupts); + nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_FEEDCNT, + c->feedcount); + nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_XRUNS, c->xruns); + nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_LEFTVOL, + CHN_GETVOLUME(c, SND_VOL_C_PCM, SND_CHN_T_FL)); + nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_RIGHTVOL, + CHN_GETVOLUME(c, SND_VOL_C_PCM, SND_CHN_T_FR)); + nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_HWBUF_FORMAT, + sndbuf_getfmt(c->bufhard)); + nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_HWBUF_SIZE, + sndbuf_getsize(c->bufhard)); + nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_HWBUF_BLKSZ, + sndbuf_getblksz(c->bufhard)); + nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_HWBUF_BLKCNT, + sndbuf_getblkcnt(c->bufhard)); + nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_HWBUF_FREE, + sndbuf_getfree(c->bufhard)); + nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_HWBUF_READY, + sndbuf_getready(c->bufhard)); + nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_SWBUF_FORMAT, + sndbuf_getfmt(c->bufsoft)); + nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_SWBUF_SIZE, + sndbuf_getsize(c->bufsoft)); + nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_SWBUF_BLKSZ, + sndbuf_getblksz(c->bufsoft)); + nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_SWBUF_BLKCNT, + sndbuf_getblkcnt(c->bufsoft)); + nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_SWBUF_FREE, + sndbuf_getfree(c->bufsoft)); + nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_SWBUF_READY, + sndbuf_getready(c->bufsoft)); + + sbuf_printf(&sb, "[%s", + (c->direction == PCMDIR_REC) ? "hardware" : "userland"); + sbuf_printf(&sb, " -> "); + f = c->feeder; + while (f->source != NULL) + f = f->source; + while (f != NULL) { + sbuf_printf(&sb, "%s", f->class->name); + if (f->desc->type == FEEDER_FORMAT) { + sbuf_printf(&sb, "(0x%08x -> 0x%08x)", + f->desc->in, f->desc->out); + } else if (f->desc->type == FEEDER_MATRIX) { + sbuf_printf(&sb, "(%d.%d -> %d.%d)", + AFMT_CHANNEL(f->desc->in) - + AFMT_EXTCHANNEL(f->desc->in), + AFMT_EXTCHANNEL(f->desc->in), + AFMT_CHANNEL(f->desc->out) - + AFMT_EXTCHANNEL(f->desc->out), + AFMT_EXTCHANNEL(f->desc->out)); + } else if (f->desc->type == FEEDER_RATE) { + sbuf_printf(&sb, + "(0x%08x q:%d %d -> %d)", + f->desc->out, + FEEDER_GET(f, FEEDRATE_QUALITY), + FEEDER_GET(f, FEEDRATE_SRC), + FEEDER_GET(f, FEEDRATE_DST)); + } else { + sbuf_printf(&sb, "(0x%08x)", + f->desc->out); + } + sbuf_printf(&sb, " -> "); + f = f->parent; + } + sbuf_printf(&sb, "%s]", + (c->direction == PCMDIR_REC) ? "userland" : "hardware"); + + sbuf_finish(&sb); + nvlist_add_string(cdi, SNDST_DSPS_SOUND4_CHAN_FEEDERCHAIN, + sbuf_data(&sb)); + sbuf_delete(&sb); + + nvlist_append_nvlist_array(sound4di, + SNDST_DSPS_SOUND4_CHAN_INFO, cdi); + nvlist_destroy(cdi); + err = nvlist_error(sound4di); + if (err) { + PCM_RELEASE_QUICK(d); + goto done; + } + } nvlist_move_nvlist(di, SNDST_DSPS_PROVIDER_INFO, sound4di); sound4di = NULL; + PCM_RELEASE_QUICK(d); nvlist_add_string(di, SNDST_DSPS_PROVIDER, SNDST_DSPS_SOUND4_PROVIDER); diff --git a/sys/sys/sndstat.h b/sys/sys/sndstat.h index e0e403b1a72a..6fef6502ec89 100644 --- a/sys/sys/sndstat.h +++ b/sys/sys/sndstat.h @@ -68,11 +68,38 @@ struct sndstioc_nv_arg { /* * sound(4)-specific name/value pair names */ -#define SNDST_DSPS_SOUND4_PROVIDER "sound(4)" -#define SNDST_DSPS_SOUND4_UNIT "unit" -#define SNDST_DSPS_SOUND4_BITPERFECT "bitperfect" -#define SNDST_DSPS_SOUND4_PVCHAN "pvchan" -#define SNDST_DSPS_SOUND4_RVCHAN "rvchan" +#define SNDST_DSPS_SOUND4_PROVIDER "sound(4)" +#define SNDST_DSPS_SOUND4_UNIT "unit" +#define SNDST_DSPS_SOUND4_BITPERFECT "bitperfect" +#define SNDST_DSPS_SOUND4_PVCHAN "pvchan" +#define SNDST_DSPS_SOUND4_RVCHAN "rvchan" +#define SNDST_DSPS_SOUND4_CHAN_INFO "channel_info" +#define SNDST_DSPS_SOUND4_CHAN_NAME "name" +#define SNDST_DSPS_SOUND4_CHAN_PARENTCHAN "parentchan" +#define SNDST_DSPS_SOUND4_CHAN_UNIT "unit" +#define SNDST_DSPS_SOUND4_CHAN_LATENCY "latency" +#define SNDST_DSPS_SOUND4_CHAN_RATE "rate" +#define SNDST_DSPS_SOUND4_CHAN_FORMAT "format" +#define SNDST_DSPS_SOUND4_CHAN_PID "pid" +#define SNDST_DSPS_SOUND4_CHAN_COMM "comm" +#define SNDST_DSPS_SOUND4_CHAN_INTR "interrupts" +#define SNDST_DSPS_SOUND4_CHAN_FEEDCNT "feedcount" +#define SNDST_DSPS_SOUND4_CHAN_XRUNS "xruns" +#define SNDST_DSPS_SOUND4_CHAN_LEFTVOL "left_volume" +#define SNDST_DSPS_SOUND4_CHAN_RIGHTVOL "right_volume" +#define SNDST_DSPS_SOUND4_CHAN_HWBUF_FORMAT "hwbuf_format" +#define SNDST_DSPS_SOUND4_CHAN_HWBUF_SIZE "hwbuf_size" +#define SNDST_DSPS_SOUND4_CHAN_HWBUF_BLKSZ "hwbuf_blksz" +#define SNDST_DSPS_SOUND4_CHAN_HWBUF_BLKCNT "hwbuf_blkcnt" +#define SNDST_DSPS_SOUND4_CHAN_HWBUF_FREE "hwbuf_free" +#define SNDST_DSPS_SOUND4_CHAN_HWBUF_READY "hwbuf_ready" +#define SNDST_DSPS_SOUND4_CHAN_SWBUF_FORMAT "swbuf_format" +#define SNDST_DSPS_SOUND4_CHAN_SWBUF_SIZE "swbuf_size" +#define SNDST_DSPS_SOUND4_CHAN_SWBUF_BLKSZ "swbuf_blksz" +#define SNDST_DSPS_SOUND4_CHAN_SWBUF_BLKCNT "swbuf_blkcnt" +#define SNDST_DSPS_SOUND4_CHAN_SWBUF_FREE "swbuf_free" +#define SNDST_DSPS_SOUND4_CHAN_SWBUF_READY "swbuf_ready" +#define SNDST_DSPS_SOUND4_CHAN_FEEDERCHAIN "feederchain" /* * Maximum user-specified nvlist buffer size From nobody Fri Jun 14 17:12:06 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W15Rp1hD8z5PBM5; Fri, 14 Jun 2024 17:12:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W15Rp1246z40s9; Fri, 14 Jun 2024 17:12:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718385126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dj+h5tXCw17ytnq3r02UomjLAdvCYSrihiaw3GI30/k=; b=OPPS0laJX2bHvp/usbtvUAfZ0h8PabwQXGSLoQCmqZT4YWOw07q8T6a3jrh/WnhRXNSXoY uWfc/TW0LCiIFR0NVqz7fdmE30af+tQTgQNprCY5cfLWFV60/fd+sWgM5Z52KNId4DRgdx L21n9nouLIWHlqfXEXwPdIohTfriZlNe7oZavYP420UVWgzf1BOZXbTJVkCtZwVVL7K1eL uZ1ZYhwMjUD95/EF6vWGKBJc4/tmnJWLfHOJLFiCC1EveAh2r6/jehXeXFM4FsWrZV8B32 VQg7Wuo3V8KbICDSR2pmSufJjd0fp3qmHiaUdpufwly/w7IlCQDnrMWxf21xCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718385126; a=rsa-sha256; cv=none; b=TCZ1YL6c5E3mk4djo8wNwhNClTZHmguEgoP1qIrxQF7pCiPv8eE5Fa6jyPAil6Pfy+19uH Rc+Mw/AjNhGFgnlpcmca6DfJSFaE0aILOL/DvYril84gF881VP4SnztTc7ov8jgTT7uTc9 NpDONh/ER8mBremQK6gKg8DvlNCMSLTxyxdihflyk7iti1KTShGToGfvlKafjUD+qOcjAH j1g21UgfXgWP7Lz06Rf0XEhRPg9WyW/HZ4to33kDqaWayiCRJmCKB8UdYKrLnfpVnXKumY hCCC0VVB4qIDCU2mzZ85zMF3vCqnkDuNaN2SKzYoWhIKDfd/NV5makrQzQlC5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718385126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dj+h5tXCw17ytnq3r02UomjLAdvCYSrihiaw3GI30/k=; b=f8cX3hS3dh6y869W2s5IpnC9kj0s6tGgyXDonz8GWYXtkyQltgNSEZU72uVaec7/ns+D49 ljkLoDoSkktc9O/NpbRyiiug+SU8nKaOl5BFPuFaqrv7C7g7xA5LhHm3ASGgyw01d0fwBv bF6PAdurimTkkrWAnnT56uTzrjepXZzxCyxwg9jHbjxzdYEXfWLyhoddr6rQXHk1+vGD7l fIOBkzgnPDxkE5S5wj8fVK2Gs7pzajUJVfEIY1W8XBqdm788uTeKh7M2vQIuebyZAvLC09 iLUQZ9z3dAkUiWZFIC0cHFD1mlEPZklaNG+J/raALLZ5pUw6t20C0Odyq0MaEg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W15Rp0dYFzT6P; Fri, 14 Jun 2024 17:12:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45EHC6dc063291; Fri, 14 Jun 2024 17:12:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45EHC6JN063288; Fri, 14 Jun 2024 17:12:06 GMT (envelope-from git) Date: Fri, 14 Jun 2024 17:12:06 GMT Message-Id: <202406141712.45EHC6JN063288@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: cadc9c7db780 - main - boot/efi: Fix warning for non-standard formats when debugging List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cadc9c7db780877396da23f3683a8c69c9b1c01e Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=cadc9c7db780877396da23f3683a8c69c9b1c01e commit cadc9c7db780877396da23f3683a8c69c9b1c01e Author: John F. Carr AuthorDate: 2024-06-14 17:06:03 +0000 Commit: Warner Losh CommitDate: 2024-06-14 17:11:05 +0000 boot/efi: Fix warning for non-standard formats when debugging Add -Wno-format for zfs_module and regroup. This fixes warnings when EFI_DEBUG is defined. PR: 279071 Reviewed-by: imp --- stand/efi/boot1/Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/stand/efi/boot1/Makefile b/stand/efi/boot1/Makefile index fb1c7d74eec1..607c30f10cf7 100644 --- a/stand/efi/boot1/Makefile +++ b/stand/efi/boot1/Makefile @@ -12,11 +12,12 @@ CFLAGS+= -DEFI_BOOT1 # seems to matter on arm64 where wchar_t defaults to an int instead # of a short. There's no good cast to use here so just ignore the # warnings for now. -CWARNFLAGS.proto.c+= -Wno-format -CWARNFLAGS.boot1.c+= -Wno-format +CWARNFLAGS.proto.c += -Wno-format +CWARNFLAGS.boot1.c += -Wno-format +CWARNFLAGS.ufs_module.c += -Wno-format +CWARNFLAGS.zfs_module.c += -Wno-format # Disable bogus alignment issues -CWARNFLAGS.ufs_module.c += -Wno-format CWARNFLAGS.ufs_module.c += -Wno-cast-align # Disable warnings that are currently incompatible with the zfs boot code From nobody Fri Jun 14 18:02:25 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W16Ys1dHZz5PGFw; Fri, 14 Jun 2024 18:02:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W16Ys192yz478k; Fri, 14 Jun 2024 18:02:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718388145; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FPI7C0/sQ+DtsyVKlGETor0Rr+onY+kNa2EhNt77GGM=; b=Dffhl1FsD8jaLkP+RUYG8UYqJgR8rV+mRJaz4TIrLec5f7Iwl20657A9DibAYLFmnipOz8 XEUC2pDpTlCfN4/Z24Cs/p19AxGxS9p0cyIEN3h+1oSS6WC0lhdbQSHdEQny6B2IYdGiCe xXbC/HIghYRZYa0odLplkCkMzYGSKrOvIm9aHmzWGDkTLgWOb0LK5HBHaL6HVmXSm/Irh9 1NveUuaHCjfH9j3zw/xjcSpai9ANm7BWsdTEYK8ii9yCSxD4VkdI/eZwGpiLxxuVQPlGCe 2Hj3NFn48jYJJmYKa7Tbjql+quXUlJHifEp8SEURH4xEDBkugxqoVgb3kSyRVw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718388145; a=rsa-sha256; cv=none; b=mZGVSpIvOMkxXEXuuGIr3XMPtRwZPhWKTzb54kvAFjxfBm/Mc7cSmVNoo18FrxJGdHyZmJ nzPRmvPxaE1XVcoVFYOIwXKXoCelSWACvxavzRBsysWirakveensbGr+dQ+YU81NAzibbP QRSIH+zn8l9yWZWJN5I+m3bqYh/sbX+15GTWkV3rEqSH78oQYw/0PoSZLrUxfbiYB8RsJt Z5GVMGvQyScRkdGbWJItIxSvIga/IczzVbzD2+E2B802PHCaiFB56njYSSZUxu9RqIUiwx byiuNXF7FVFZaaholJxP2ocjvNpST2nimoNjOlsk2GIkH2GGaHtyWaiIFdLXBw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718388145; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FPI7C0/sQ+DtsyVKlGETor0Rr+onY+kNa2EhNt77GGM=; b=xOR0eRdrRCQsN1a7zhOMir2UEuO2GYFG2fR6t+Isu9sCAzbWSykyRQTj/DHoRwSgnNxdbM 4F22cxAXfzi2jUJjmEmsWkJ4r9bicTWxAtLizLk/3yjej1UdqfYMVQlQV1XO7Qc6NLVwID LKrRIVvWNloml+zpaCe9JSvxpsBgyeVZK+hlktbbWtbB3kEg6hMPK64RRToBSM+1MzdVYt yVNoWLVNrfukED/0q/nPc/1dMygxWmLQ0c508S9RPTLw+3/kyyxPfu0vfpqQqCR3CViNq7 G+uNIb+GE9EvbfQWFZiRHG4JEMKqOtaY5zkuywU+p2+xzwFYORWnS42X1ozyqw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W16Ys0m2BzX2t; Fri, 14 Jun 2024 18:02:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45EI2PVC052943; Fri, 14 Jun 2024 18:02:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45EI2PuH052940; Fri, 14 Jun 2024 18:02:25 GMT (envelope-from git) Date: Fri, 14 Jun 2024 18:02:25 GMT Message-Id: <202406141802.45EI2PuH052940@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 0e4e77072f65 - main - riscv: adjust physmem reservation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0e4e77072f65df71644140e41229b868a73f3371 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=0e4e77072f65df71644140e41229b868a73f3371 commit 0e4e77072f65df71644140e41229b868a73f3371 Author: Mitchell Horne AuthorDate: 2024-06-14 17:57:28 +0000 Commit: Mitchell Horne CommitDate: 2024-06-14 18:02:05 +0000 riscv: adjust physmem reservation Make sure we do this BEFORE pmap_bootstrap(). Reviewed by: markj, jhb MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45325 --- sys/riscv/riscv/machdep.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sys/riscv/riscv/machdep.c b/sys/riscv/riscv/machdep.c index f44056f56212..1e2b96acd3a1 100644 --- a/sys/riscv/riscv/machdep.c +++ b/sys/riscv/riscv/machdep.c @@ -549,10 +549,6 @@ initriscv(struct riscv_bootparams *rvbp) cache_setup(); - /* Bootstrap enough of pmap to enter the kernel proper */ - kernlen = (lastaddr - KERNBASE); - pmap_bootstrap(rvbp->kern_l1pt, rvbp->kern_phys, kernlen); - #ifdef FDT /* * XXX: Unconditionally exclude the lowest 2MB of physical memory, as @@ -565,6 +561,11 @@ initriscv(struct riscv_bootparams *rvbp) physmem_exclude_region(mem_regions[0].mr_start, L2_SIZE, EXFLAG_NODUMP | EXFLAG_NOALLOC); #endif + + /* Bootstrap enough of pmap to enter the kernel proper */ + kernlen = (lastaddr - KERNBASE); + pmap_bootstrap(rvbp->kern_l1pt, rvbp->kern_phys, kernlen); + physmem_init_kernel_globals(); /* Establish static device mappings */ From nobody Fri Jun 14 18:02:26 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W16Yt3C1Vz5PGFx; Fri, 14 Jun 2024 18:02:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W16Yt2QXmz46tq; Fri, 14 Jun 2024 18:02:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718388146; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uRW+ASm8bB6vDT1vqIsIVkWL77yE+5PLcUYE6UdwScc=; b=FsXzNEWa7D8322Ud34Pdkgf1iwg5ZHkQKpVCiMXV8mdxKJsH+LDdBXbI92YiTsJkebaamG FXJABcQgXn7lzJyE6gKBKW6/JgEUpV63/A8OXXW7oMTBQWejTutBkrFAjOQdYnPMMmELno 3wVJmOEUChslWtYEHEtlosTLsQu5cscWoFimiRxpus6ZyW78zV2rW16WTrFkHK1I9DWMMe 7CP9udtkZpl3gQ94yIa4SfvLujAevpA6gEd3PIknIALQiWCU/+55l0Y/2ddb5LFFPftNmA n6c2V0Xd/9lfKFCpBr6ZpiisJDzp3MALxSyNkmOhMQLP/siuIZQkC/74aYc+UA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718388146; a=rsa-sha256; cv=none; b=Tq/PtOz0zC2qG6jArkQPeqGiHumMovUCKWbdPKs0Pd9oAFMVdfL7iE8ZN3w920zZqVF93r BKXU7TZBJssC264ZnfyDSKgsN7BrWAh5GbwBSgcxEoKAjm0IcyKpkB2tWXDARtgQNOq8AS TXBAtu+gfS3PuUg0FPc6MtObN0p+Wddsg2bmN9nnVNfo8vYMwLPLkAVXlvBKSP7GXAYV+3 ruowe0FNboYJazoWNiAIqaPFnHE6hKBo7X+8/7LyiTPwJDo8bnRmy4RvgeE8H0clp1mnUT 0wA9H4eEw07zG7crrd/iwA5WZoEWSxWZMN7x1e8w3oy1AxjAqpP9TfG1+W9TDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718388146; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uRW+ASm8bB6vDT1vqIsIVkWL77yE+5PLcUYE6UdwScc=; b=ms2Q9FQfcl42ULNihrPHFxgFNGEmyUq6qE+a739dVePhU0jR/k00n7SNBL/wyhDvlcr+hm 8yM+hFTDAAlTBhp4qWVQ840ekHGBw5oDi362G6RJvDLEkR+EhNnpQuI30zZbdIMvm/MeOs 1kFvkPbyiPtDcpneF1WAf8sNJ5+E/Ndrpfw6Uqeo67o/Uj9GvhbuBL7SbkqnAxmXO+ocF6 61jkDF4t/utGMJBJDHgo7mCKSJjzeJDqC8C3B/L2+2z145NpOsppvbV32dR2tRRwI/4PL/ nYbbWXplj1zoizrqVr22eDpxbLrMTxxRYgiUAo/7POtuYFRmuCEecXr+2xEnFA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W16Yt2222zWDP; Fri, 14 Jun 2024 18:02:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45EI2Qif052996; Fri, 14 Jun 2024 18:02:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45EI2Qqu052993; Fri, 14 Jun 2024 18:02:26 GMT (envelope-from git) Date: Fri, 14 Jun 2024 18:02:26 GMT Message-Id: <202406141802.45EI2Qqu052993@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 3ff981587ff8 - main - riscv: Don't handle missing kernel L3 pages List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3ff981587ff8f05c06092d05edcc50f1ede1bbd6 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=3ff981587ff8f05c06092d05edcc50f1ede1bbd6 commit 3ff981587ff8f05c06092d05edcc50f1ede1bbd6 Author: Mitchell Horne AuthorDate: 2023-11-24 17:21:51 +0000 Commit: Mitchell Horne CommitDate: 2024-06-14 18:02:05 +0000 riscv: Don't handle missing kernel L3 pages This code path should never be hit, if it does it means we did not bootstrap correctly. Turn it into a panic like we do on amd64 and arm64. Reviewed by: markj, jhb Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45326 --- sys/riscv/riscv/pmap.c | 43 +++++-------------------------------------- 1 file changed, 5 insertions(+), 38 deletions(-) diff --git a/sys/riscv/riscv/pmap.c b/sys/riscv/riscv/pmap.c index 8176975b049c..1902f1f4009b 100644 --- a/sys/riscv/riscv/pmap.c +++ b/sys/riscv/riscv/pmap.c @@ -2911,14 +2911,13 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, u_int flags, int8_t psind) { struct rwlock *lock; - pd_entry_t *l1, *l2, l2e; + pd_entry_t *l2, l2e; pt_entry_t new_l3, orig_l3; pt_entry_t *l3; pv_entry_t pv; - vm_paddr_t opa, pa, l2_pa, l3_pa; - vm_page_t mpte, om, l2_m, l3_m; - pt_entry_t entry; - pn_t l2_pn, l3_pn, pn; + vm_paddr_t opa, pa; + vm_page_t mpte, om; + pn_t pn; int rv; bool nosleep; @@ -2990,39 +2989,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, } l3 = pmap_l3(pmap, va); } else { - l3 = pmap_l3(pmap, va); - /* TODO: This is not optimal, but should mostly work */ - if (l3 == NULL) { - if (l2 == NULL) { - l2_m = vm_page_alloc_noobj(VM_ALLOC_WIRED | - VM_ALLOC_ZERO); - if (l2_m == NULL) - panic("pmap_enter: l2 pte_m == NULL"); - - l2_pa = VM_PAGE_TO_PHYS(l2_m); - l2_pn = (l2_pa / PAGE_SIZE); - - l1 = pmap_l1(pmap, va); - entry = (PTE_V); - entry |= (l2_pn << PTE_PPN0_S); - pmap_store(l1, entry); - pmap_distribute_l1(pmap, pmap_l1_index(va), entry); - l2 = pmap_l1_to_l2(l1, va); - } - - l3_m = vm_page_alloc_noobj(VM_ALLOC_WIRED | - VM_ALLOC_ZERO); - if (l3_m == NULL) - panic("pmap_enter: l3 pte_m == NULL"); - - l3_pa = VM_PAGE_TO_PHYS(l3_m); - l3_pn = (l3_pa / PAGE_SIZE); - entry = (PTE_V); - entry |= (l3_pn << PTE_PPN0_S); - pmap_store(l2, entry); - l3 = pmap_l2_to_l3(l2, va); - } - pmap_invalidate_page(pmap, va); + panic("pmap_enter: missing L3 table for kernel va %#lx", va); } orig_l3 = pmap_load(l3); From nobody Fri Jun 14 18:02:27 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W16Yv5cyCz5PGSm; Fri, 14 Jun 2024 18:02:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W16Yv3C1gz46yn; Fri, 14 Jun 2024 18:02:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718388147; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rw7tVkfk0/GTWH3CkLygPEU8DLJVQxEMB2gL7j3zApo=; b=MICO96gLLz3eEE73Ymaggp1J2agqPPWbgZuD0sqHX2Uez+wShoY1O1CeoVBsMycTi1fPms xFsD7Fo2vRDrZE5tjC6ov2oBP3BIWDjFJ0Dz5+nmU2otBYPdEslG8axuKNSZoGKhQelqlY nffu+SFFhNlfg0NDY+IizoSJ7Pb0WUB3CXEg1xcuqCHYGQi2fH1w3mMBJhTnG8gdmzKwR9 n2F7lh6YeidkP4dVyyOwOY4wzfrSdW9AKMpN6x+G/fGY/E9zue+PF7rPbIiHgRCjigM9lm Vcf4nC7cLk7oSpKv3UNhWUO4Jd/QXryOvKWCR9djpVi7V43ZrDbI35YsDO8vUA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718388147; a=rsa-sha256; cv=none; b=ahFZoAADF8ahsFK1PIq2BRZjXd90loaaWMK2gHMUGecMe5qcIbw1M7CWuTp6y94laMhT6k GsH7TYm45YkjCm9mtNdz4jbyb4OgLRrNggaqdbdKPDDNrnJVxWJ9S3PhHKRqeeBzBqj29h sFxXcWElA8QRe3j7SL9PYuw/w5XD6Dic+EEK6SAA7RxJCmGtIhw2H/0vnT0Ev5a1ddkrb+ Rrh+uHbcE65crWnk6EDxhpi+hJ5lTgCXJy9EuZa5gD2RZ5uqkiIMrOH4EkACuY1Lf3BxCk QTD1KdL7EowV2jeZ+84spuICYuwMxwk5FHhxxl0tmG0yRrPmtb3zm88bZjQY4g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718388147; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rw7tVkfk0/GTWH3CkLygPEU8DLJVQxEMB2gL7j3zApo=; b=eLln1n9rqc6JfKIfooeHsNO+S9KG+tI4qEZlhaHScjfq6MuZKQBUJpiIvRN9oe8MYt/B0i YsvkStovwT53lmfbLjzsLHHGDtg+9RXXDMdG+LJ9+QdC2ehRaGZ4f35AtNP5UdLeHwQY30 PV427knAt7JJoURr38eCFz6NZ9+IP/xLPCWmIsckS5HDZuvAArDuPC22QJF8iBL2MQ/q87 /fonNqM0l7vOWg7rHpfIQ9ujk6X5BKIw/lk6ljxi5kmswoI0XjVt+/2WgS9ZOjYX7pKXHQ GcfSXO/7tycaZdv33EFgFSdAXhrlNz+gbR9W6S2I2WhQ1gqtIeX8TlvhrTf23g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W16Yv2phlzW74; Fri, 14 Jun 2024 18:02:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45EI2Rix053047; Fri, 14 Jun 2024 18:02:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45EI2RSO053044; Fri, 14 Jun 2024 18:02:27 GMT (envelope-from git) Date: Fri, 14 Jun 2024 18:02:27 GMT Message-Id: <202406141802.45EI2RSO053044@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 134f7b5fa91f - main - riscv: improve commentary around initial stvec List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 134f7b5fa91fa41e3c3c7caeaf1dff72018684e5 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=134f7b5fa91fa41e3c3c7caeaf1dff72018684e5 commit 134f7b5fa91fa41e3c3c7caeaf1dff72018684e5 Author: Mitchell Horne AuthorDate: 2024-06-03 17:24:12 +0000 Commit: Mitchell Horne CommitDate: 2024-06-14 18:02:05 +0000 riscv: improve commentary around initial stvec Make it explicit why we must set the trap vector before enabling virtual memory. Reviewed by: br, jhb, markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45474 --- sys/riscv/riscv/locore.S | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/sys/riscv/riscv/locore.S b/sys/riscv/riscv/locore.S index 5a7e15ba443b..7e885ab8ca89 100644 --- a/sys/riscv/riscv/locore.S +++ b/sys/riscv/riscv/locore.S @@ -197,7 +197,11 @@ pagetables: /* Page tables END */ - /* Setup supervisor trap vector */ + /* + * Set the supervisor trap vector temporarily. Enabling virtual memory + * may generate a page fault. We simply wish to continue onwards, so + * have the trap deliver us to 'va'. + */ 2: lla t0, va sub t0, t0, s9 @@ -221,7 +225,7 @@ va: lla gp, __global_pointer$ .option pop - /* Setup supervisor trap vector */ + /* Set the trap vector to the real handler. */ la t0, cpu_exception_handler csrw stvec, t0 @@ -342,7 +346,11 @@ ENTRY(mpentry) /* Get the kernel's load address */ jal get_physmem - /* Setup supervisor trap vector */ + /* + * Set the supervisor trap vector temporarily. Enabling virtual memory + * may generate a page fault. We simply wish to continue onwards, so + * have the trap deliver us to 'mpva'. + */ lla t0, mpva sub t0, t0, s9 li t1, KERNBASE @@ -365,7 +373,7 @@ mpva: lla gp, __global_pointer$ .option pop - /* Setup supervisor trap vector */ + /* Set the trap vector to the real handler. */ la t0, cpu_exception_handler csrw stvec, t0 From nobody Fri Jun 14 18:09:14 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W16jk5ymrz5PGpG; Fri, 14 Jun 2024 18:09:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W16jk5Qk4z48jB; Fri, 14 Jun 2024 18:09:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718388554; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XURd3LxFV80GE9oMFQBbJUjUnR0IEeD5M26UTUvfBqg=; b=edgcatkhJTQKka5+4WtCZQ0JcotfQJfN0xRZJcr2HMHA9ltEe6126W2D9JMsI8MW66q2uf nVrZetS43oxJFHxQHdPWIUaKGcuCL0dHzCG/jOycgSv0U0fa5/uwOq/ciba/CXMDCzKzQ6 enYsjCz55PjtDg5t5A6cC3ywcHn7qh1HTcP4KrHS9FSNgpPy0dGsgTDlJzuz0svlOr1g6E Fu+PfMr7aiALUbrf7P9ilapjgvokabJQDDDWwSnXig2LGZqelCZQeWmqDt2G8fWCLrriWx 6/RU856NY6C1fkHRJZ/GvEibOAOCZFVZQL24PQBfJsaXG50EIawIhl7BF4gxWg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718388554; a=rsa-sha256; cv=none; b=ij9z/FSAuWIiN28s/NenY1ZX7N34UJE1XbohoqqkrGTgwWpbDjytwDy26n9y8pAqmaFEHY 3AD8IGXJcSiYK2uRosvs+DB/QSxIUSrfr7YBCCcN+AdoMVStXUXFhoq+Yoi8jH4vU9d8zh UVnebInhKtUpiTuTZDGaAROaQElULYTxtXIrFOzUNEhREU/Z0xOU8/GAY5HF3fJr4/jDdi wOU5YzhP0yVwaT7pi6NnfSTSa0FQPB3zAG+f4SAxjuUHD44lb78kfr3zqhirnDh46s8Tcs lgqiDTsdOyaPYBO2ZMnMM7r08nVZJp4Xmf6uWPhBI8O7bT7gSxJskRm88Cr4rA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718388554; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XURd3LxFV80GE9oMFQBbJUjUnR0IEeD5M26UTUvfBqg=; b=uV+lE/IL6shw6c+3G7vXbJSYG4QPK0qZPCPOebvwwoVDCV5TLrIEBa/cM8IKMTvzibMxDr HzxBWU/SPt4PnR9lPL7qTYROsFuW43xERfCUJlhOREjUJIMcNgZhnPkz86pCnjibuMh3WT k8yxtR0Y5Cr2OLTvi9zrnLnCs4DWtORgXAyfp69Vt7ZrETFnqIUhEx5iAM1KjITcHCGl7K 1p/qNLIuQhVBtwE5mbCat7sc8u1aFiu9pYulzGGbRZL2tuXORsfaXskBbfx00eUW240CXF DP9L6U5yQCiHGGOG4TEsgOliUPRAcM6J7Pby84FKYiVKROEygUpNZ2TAolYAbw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W16jk4vztzWRy; Fri, 14 Jun 2024 18:09:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45EI9EHM054094; Fri, 14 Jun 2024 18:09:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45EI9E80054091; Fri, 14 Jun 2024 18:09:14 GMT (envelope-from git) Date: Fri, 14 Jun 2024 18:09:14 GMT Message-Id: <202406141809.45EI9E80054091@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: 2909ddd17cb4 - main - ctld: plug memory leaks List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2909ddd17cb4d750852dc04128e584f93f8c5058 Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=2909ddd17cb4d750852dc04128e584f93f8c5058 commit 2909ddd17cb4d750852dc04128e584f93f8c5058 Author: Alan Somers AuthorDate: 2024-06-12 21:34:05 +0000 Commit: Alan Somers CommitDate: 2024-06-14 18:08:38 +0000 ctld: plug memory leaks MFC after: 2 weeks Reviewed by: mav Sponsored by: Axcient Reported by: valgrind Pull Request: https://github.com/freebsd/freebsd-src/pull/1288 --- usr.sbin/ctld/ctld.c | 1 + usr.sbin/ctld/kernel.c | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/usr.sbin/ctld/ctld.c b/usr.sbin/ctld/ctld.c index c31ac328c84e..bf2791040125 100644 --- a/usr.sbin/ctld/ctld.c +++ b/usr.sbin/ctld/ctld.c @@ -2873,6 +2873,7 @@ main(int argc, char **argv) error = conf_apply(oldconf, newconf); if (error != 0) log_warnx("failed to apply configuration"); + conf_delete(newconf); conf_delete(oldconf); oldconf = NULL; diff --git a/usr.sbin/ctld/kernel.c b/usr.sbin/ctld/kernel.c index dd1c89d0e9b8..ae455e7815f7 100644 --- a/usr.sbin/ctld/kernel.c +++ b/usr.sbin/ctld/kernel.c @@ -614,6 +614,22 @@ retry_port: } cp->p_ctl_port = port->port_id; } + while ((port = STAILQ_FIRST(&devlist.port_list))) { + struct cctl_lun_nv *nv; + + STAILQ_REMOVE_HEAD(&devlist.port_list, links); + free(port->port_frontend); + free(port->port_name); + free(port->cfiscsi_target); + free(port->ctld_portal_group_name); + while ((nv = STAILQ_FIRST(&port->attr_list))) { + STAILQ_REMOVE_HEAD(&port->attr_list, links); + free(nv->value); + free(nv->name); + free(nv); + } + free(port); + } free(name); STAILQ_FOREACH(lun, &devlist.lun_list, links) { @@ -664,6 +680,18 @@ retry_port: cl->l_name); } } + while ((lun = STAILQ_FIRST(&devlist.lun_list))) { + struct cctl_lun_nv *nv; + + STAILQ_REMOVE_HEAD(&devlist.lun_list, links); + while ((nv = STAILQ_FIRST(&lun->attr_list))) { + STAILQ_REMOVE_HEAD(&lun->attr_list, links); + free(nv->value); + free(nv->name); + free(nv); + } + free(lun); + } return (conf); } @@ -741,12 +769,14 @@ kernel_lun_add(struct lun *lun) req.args = nvlist_pack(req.args_nvl, &req.args_len); if (req.args == NULL) { + nvlist_destroy(req.args_nvl); log_warn("error packing nvlist"); return (1); } } error = ioctl(ctl_fd, CTL_LUN_REQ, &req); + free(req.args); nvlist_destroy(req.args_nvl); if (error != 0) { @@ -824,12 +854,14 @@ kernel_lun_modify(struct lun *lun) req.args = nvlist_pack(req.args_nvl, &req.args_len); if (req.args == NULL) { + nvlist_destroy(req.args_nvl); log_warn("error packing nvlist"); return (1); } } error = ioctl(ctl_fd, CTL_LUN_REQ, &req); + free(req.args); nvlist_destroy(req.args_nvl); if (error != 0) { @@ -1052,6 +1084,7 @@ kernel_port_add(struct port *port) req.args = nvlist_pack(req.args_nvl, &req.args_len); if (req.args == NULL) { + nvlist_destroy(req.args_nvl); log_warn("error packing nvlist"); return (1); } @@ -1059,6 +1092,7 @@ kernel_port_add(struct port *port) req.result = result_buf; req.result_len = sizeof(result_buf); error = ioctl(ctl_fd, CTL_PORT_REQ, &req); + free(req.args); nvlist_destroy(req.args_nvl); if (error != 0) { @@ -1202,11 +1236,13 @@ kernel_port_remove(struct port *port) req.args = nvlist_pack(req.args_nvl, &req.args_len); if (req.args == NULL) { + nvlist_destroy(req.args_nvl); log_warn("error packing nvlist"); return (1); } error = ioctl(ctl_fd, CTL_PORT_REQ, &req); + free(req.args); nvlist_destroy(req.args_nvl); if (error != 0) { From nobody Fri Jun 14 18:15:50 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W16sL2LsRz5PHGm; Fri, 14 Jun 2024 18:15:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W16sL1nYvz4CYY; Fri, 14 Jun 2024 18:15:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718388950; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X8wRIYMY4RvyhHAeBkzs7jqUnQBxPbb5Fd5h5zZY6lo=; b=b4BwI13pRsbC6tARR8r/GwLllTHkwyEb+WCCswyAgfBbqE6/k/XAIjOrP3Oua9UMgMNOIK slU3n3FvrTpHaiA+mz3U8MfhAgFnav14OtmVYlBv/FIzv6la7iWfpxQR3DsN6zorVW4SMs ebWg0rhtQ3i0fEmjI8GFbiFeJR3VZ9EaNt7rkkO+gLT224oMkE+lbXov9/wMcuhxqwb+yu 2d9gFvo8Kz6UPCXpTw/OeYM0GBiVXaykQMGPXooB7KI6v7hMhJQ8s/fKn8QRF3Q6ULCZVH 9eNNzj6H5qvgRTRPBC7yanLlHZl7Ya2XYRLfM7HM8ka92ZNEK3MQRAIgdejCsA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718388950; a=rsa-sha256; cv=none; b=rwVtZWS23ObzG/jNeDx+WpIbOII7zzpsystn+uijkurImoZKENh4pAMY6gNQ3uVtc70eBQ PVWNxCli8qINByZJUyQBRHDJOJYGkryrj+uyIKy8oPNRM0yU/CgpAfQRJAnGSDEacMIho9 pPcY/dG549LpUJp47TWEcRbKNs7JEhAiNOvm48r+ceooTZGRDzvQP5tCMR+PhXVdBDFaoW trF0ofIfA9bSiJoDvjrfuJPGAO1dtYC8oapMX7WATlg0XyiZDHAop9oyaEtGIkUDuZrSOK xCnO+oDL9NwrSopVVDVmG2bgzkol0uj4pcY4/3toAbowibZ8Mkmv2oJXimcAiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718388950; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X8wRIYMY4RvyhHAeBkzs7jqUnQBxPbb5Fd5h5zZY6lo=; b=AS8da1LC51ERZWwev0mUvM1g5L9LbbfWlJgym1H7Biqiq2aDkLFgS0vtUU7ZirKK6ZxieQ KVM0Iv4x7O1ZV73mFcVJ+i6YNZoXfC9BQuQZMREkowtJArqdN37yjEOWUDJEsEI/6zWJ/G 5t2XzNARqA6p66m+4AFsDujDY+87WR/7RINceXAwvMNWPmS9MzLx78XFwM2tMlmur8rBM2 /D3Vx3JuB5GsXA6tDOTFrMn/N/wECZ7HJ9Rkt9Wj6DZqKway29A3qSYcSN4zXNI3iGyD9I +TLofSWLJZlOQxezwXzY1ElbalIFTACakpBESmSkkCgxigU6UAVR9OPxIgtJFQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W16sL15SFzX15; Fri, 14 Jun 2024 18:15:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45EIFoO1070407; Fri, 14 Jun 2024 18:15:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45EIFon3070404; Fri, 14 Jun 2024 18:15:50 GMT (envelope-from git) Date: Fri, 14 Jun 2024 18:15:50 GMT Message-Id: <202406141815.45EIFon3070404@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Leidinger Subject: git: a70ecfb11757 - main - rc.subr: add new sysv option for service jails List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: netchild X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a70ecfb11757812cd97b6499dc4b73984c310681 Auto-Submitted: auto-generated The branch main has been updated by netchild: URL: https://cgit.FreeBSD.org/src/commit/?id=a70ecfb11757812cd97b6499dc4b73984c310681 commit a70ecfb11757812cd97b6499dc4b73984c310681 Author: Alexander Leidinger AuthorDate: 2024-06-14 18:05:52 +0000 Commit: Alexander Leidinger CommitDate: 2024-06-14 18:15:45 +0000 rc.subr: add new sysv option for service jails Clarify that the "sysvipc" svcj option inherits from the host / parent. Add "sysvipcnew" which creates a new SysV namespace for the service jail. Sanity check that only one of them is used. --- libexec/rc/rc.subr | 11 +++++++++++ share/man/man5/rc.conf.5 | 8 ++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/libexec/rc/rc.subr b/libexec/rc/rc.subr index 2380d1aeabc3..f9d8bf9a3cc3 100644 --- a/libexec/rc/rc.subr +++ b/libexec/rc/rc.subr @@ -1219,6 +1219,7 @@ run_rc_command() if [ -n "$_svcj_options" ]; then # translate service jail options _svcj_cmd_options="" + _svcj_sysvipc_x=0 for _svcj_option in $_svcj_options; do case "$_svcj_option" in mlock) @@ -1243,8 +1244,13 @@ run_rc_command() _svcj_cmd_options="allow.nfsd enforce_statfs=1 ${_svcj_cmd_options}" ;; sysvipc) + _svcj_sysvipc_x=$((${_svcj_sysvipc_x} + 1)) _svcj_cmd_options="sysvmsg=inherit sysvsem=inherit sysvshm=inherit ${_svcj_cmd_options}" ;; + sysvipcnew) + _svcj_sysvipc_x=$((${_svcj_sysvipc_x} + 1)) + _svcj_cmd_options="sysvmsg=new sysvsem=new sysvshm=new ${_svcj_cmd_options}" + ;; vmm) _svcj_cmd_options="allow.vmm ${_svcj_cmd_options}" ;; @@ -1253,6 +1259,11 @@ run_rc_command() ;; esac done + if [ ${_svcj_sysvipc_x} -gt 1 ]; then + echo -n "ERROR: more than one sysvipc option is " + echo "specified in ${name}_svcj_options: $_svcj_options" + return 1 + fi fi [ -z "$autoboot" ] && eval $_pidcmd # determine the pid if necessary diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5 index 9f32cfa5ab82..3fa20fe3cf0c 100644 --- a/share/man/man5/rc.conf.5 +++ b/share/man/man5/rc.conf.5 @@ -4977,8 +4977,11 @@ to them. .It nfsd Allows to run nfsd and affiliated daemons. .It sysvipc -Allows access to SysV semaphores, SysV shared memory and -SysV messages. +Inherits the SysV semaphores, SysV shared memory and +SysV messages from the host or the parent jail. +.It sysvipcnew +Creates a new namespace for SysV semaphores, SysV shared memory +and SysV messages for this particular service jail. .It vmm Allows access to .Xr vmm 4 . @@ -4988,6 +4991,7 @@ is enabled in the kernel. .El All non-network options can be combined with all other options. +From the SysV options only one option can be specified. If the .Ao Ar name Ac Ns Va _svcj From nobody Fri Jun 14 18:15:51 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W16sM3bFLz5PHGn; Fri, 14 Jun 2024 18:15:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W16sM2VLHz4CjS; Fri, 14 Jun 2024 18:15:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718388951; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XTcO1o798WqwqdUYvcq7Pf59LbE42yRF0yYSaQrtKD8=; b=aNN5T9U2HiB7gQ66va4rrOX/uOFW7vx8jJcQoPdP6uqD+hI6QVTvJ5sYXsGPAvgM7OOUbk eTAscuh8TAcOpIo6HU6gAzQPbdNe4+a8w7Dz5aoTO+/SIYd18Pe/9MpQClaS1TO17M6dEP oZgq6arkZd0MTAIj4ofBEQeZZczlvH6vGzexLVmd4a7iy6x17hg6ZFjRx+5xOauBzXAEwS dvBE37yXdQOTwXwFQukCOJBuH15ZtH+pFt6RGoVIUYtXXE/jKGTex1jZYXQBJ+K7drGSar cnkDsSkwz18DBFr3zi+ZtcIyitgwvDsFBYCfVh0QfnYPFj2B6/aPZbtrltoqAQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718388951; a=rsa-sha256; cv=none; b=rwNBBAyXsvgyO/69ZCWojYVXinmMVihDd+9974//uI+o+KNZ0PjCFN4pAznr82U1jm4g9/ YW3JxTWkXk1ZQ+1ojq6AP9QDnvllsuUvLqlI71qUU+JwrNuHfnvP2vKA2FETFf/U2ltW/s DSb8R9xfGWs6JLMAQCDUwF21Kz3WHiyEv96c/SBE/p/BDZLFKqPa7/86xwbB5gZJDscbo2 IJTousgrH/tQxHs6EAZ+uvJeJTXoJrCQ+RPAPq1xrYX0zgK0ykm2zE9QJqOidqfx+a06+y 2Gd2k1MCzltLjffyw/p+d4rsyA9PwXEVK3ofH8esdJHgwvFrPrgCdDh9cIbksg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718388951; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XTcO1o798WqwqdUYvcq7Pf59LbE42yRF0yYSaQrtKD8=; b=HeBExu7rimAbplqYfivVnlf4lbEcPPDFbVEJ88QaP1qpoGZj19hUFB9hLJUCYZ7B8MI4IJ 2W/EhlDudM26ejb8UMzAUg/ez5OBaGlwAXVGP6BH+74w2udy2197i4h3erZub8y0udGKAM rIw85p9rHpbcTTXGS6+hq/zsSVt0dsPnH0xlI6+qGrPABAg7OGcyw2mcHHXSuThySXO8n+ /GKGqq/BAYItHUScKu4V4J9UDPkIDkgmr6LpMGZUfP2AY04rCrikju4a42p767lnoqQ8PB 1wdCSUeC1lrcGNMwO5cQ/M2NimM12DRQCSI80vRovaB9qVr7hsH+ySOBBzR88g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W16sM2607zX16; Fri, 14 Jun 2024 18:15:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45EIFpQP070458; Fri, 14 Jun 2024 18:15:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45EIFpT0070455; Fri, 14 Jun 2024 18:15:51 GMT (envelope-from git) Date: Fri, 14 Jun 2024 18:15:51 GMT Message-Id: <202406141815.45EIFpT0070455@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Leidinger Subject: git: 2d08f6b577e9 - main - rc.subr: add some sanity checks for service jails List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: netchild X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2d08f6b577e9d58848cd7734dc979e60fe6f0165 Auto-Submitted: auto-generated The branch main has been updated by netchild: URL: https://cgit.FreeBSD.org/src/commit/?id=2d08f6b577e9d58848cd7734dc979e60fe6f0165 commit 2d08f6b577e9d58848cd7734dc979e60fe6f0165 Author: Alexander Leidinger AuthorDate: 2024-06-14 18:10:07 +0000 Commit: Alexander Leidinger CommitDate: 2024-06-14 18:15:46 +0000 rc.subr: add some sanity checks for service jails Add some sanity checks when service jails are used in jails: - children.max > 0 - children.max - children.cur > 0 The nesting is too deep at those places to have a sane formatting, so no line wrapping at the usual column. If someone has a better idea how to format this: feel free to go ahead. --- libexec/rc/rc.subr | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/libexec/rc/rc.subr b/libexec/rc/rc.subr index f9d8bf9a3cc3..e540d8f7d207 100644 --- a/libexec/rc/rc.subr +++ b/libexec/rc/rc.subr @@ -1332,11 +1332,28 @@ run_rc_command() start) if [ "${_rc_svcj}" != jailing ]; then _return=1 - $JAIL_CMD -c $_svcj_generic_params $_svcj_cmd_options \ - exec.start="${SERVICE} -E _rc_svcj=jailing ${name} ${_rc_prefix}start $rc_extra_args" \ - exec.stop="${SERVICE} -E _rc_svcj=jailing ${name} ${_rc_prefix}stop $rc_extra_args" \ - exec.consolelog="/var/log/svcj_${name}_console.log" \ - name=svcj-${name} && _return=0 + _do_jailing=1 + + if check_jail jailed; then + if [ $(${SYSCTL_N} security.jail.children.max) -eq 0 ]; then + echo ERROR: jail parameter children.max is set to 0, can not create a new service jail. + _do_jailing=0 + else + _free_jails=$(($(${SYSCTL_N} security.jail.children.max) - $(${SYSCTL_N} security.jail.children.cur))) + if [ ${_free_jails} -eq 0 ]; then + echo ERROR: max number of jail children reached, can not create a new service jail. + _do_jailing=0 + + fi + fi + fi + if [ ${_do_jailing} -eq 1 ]; then + $JAIL_CMD -c $_svcj_generic_params $_svcj_cmd_options \ + exec.start="${SERVICE} -E _rc_svcj=jailing ${name} ${_rc_prefix}start $rc_extra_args" \ + exec.stop="${SERVICE} -E _rc_svcj=jailing ${name} ${_rc_prefix}stop $rc_extra_args" \ + exec.consolelog="/var/log/svcj_${name}_console.log" \ + name=svcj-${name} && _return=0 + fi else _run_rc_doit "$_cpusetcmd $_cmd $rc_extra_args" || _return=1 fi @@ -1432,6 +1449,18 @@ run_rc_command() if checkyesno ${name}_svcj; then if [ "${_rc_svcj}" != jailing ]; then + if check_jail jailed; then + if [ $(${SYSCTL_N} security.jail.children.max) -eq 0 ]; then + echo ERROR: jail parameter children.max is set to 0, can not create a new service jail. + return 1 + else + _free_jails=$(($(${SYSCTL_N} security.jail.children.max) - $(${SYSCTL_N} security.jail.children.cur))) + if [ ${_free_jails} -eq 0 ]; then + echo ERROR: max number of jail children reached, can not create a new service jail. + return 1 + fi + fi + fi $JAIL_CMD -c $_svcj_generic_params $_svcj_cmd_options\ exec.start="${SERVICE} -E _rc_svcj=jailing ${name} ${_rc_prefix}start $rc_extra_args" \ exec.stop="${SERVICE} -E _rc_svcj=jailing ${name} ${_rc_prefix}stop $rc_extra_args" \ From nobody Fri Jun 14 18:43:01 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W17Sk0r29z5PJyJ; Fri, 14 Jun 2024 18:43:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W17Sk0KTVz4GHx; Fri, 14 Jun 2024 18:43:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718390582; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CHOzPUv1FmD/IuEwdio+RQA4VdB6K2ZIUlF/I+K48d0=; b=uwLiOlNnJjg5CYRmo8J7LSeGOSkb18tB+K8VeNE+w97AtzBJtC8QurEfKPTT3lT/TJqyY+ O134GlmBR3zR7ctiPDb0NmjG7GEz+1Ms+Dyx48WnlJajEYIj1D6XLtJ2t+DBsUyLDD6AWZ 0H1yOojBX1czgxpR6NfVtGl3h8Sdax7/BZI0Ahv+5/OnI1ajHJJAEMNeCMaOvF/kIl9AiY VLGac6aXZ+HOUo/EXgw+qaZxVCM1H5qBHHp5mbQHCFly/4UXNuJiveUBXdRSqtbi7be9K7 In7+IU0dMKgjjgo6pZe33vGzXiIBb4LGOcGqetzK8eiw09D5UhiPhSouhzHMLA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718390582; a=rsa-sha256; cv=none; b=FkBkoo55lKThKsJ87cEtvo5myEL4ldXFtmL+JPzyoguOwjDfc9Cof2IE4HCpTjg4UG9YsW VlKWflukQXT1VXtLZGcfxI84CCJ/mIgGXKRAFlD0F5OQst8GJMz46JMh2/5CowbRWGlBTF Lm78/O6L4werM8eg9Il+rvnN1qcgDVuPDzHAkYrFeUKl3xogW8qcimIgwb27/tifRWDVu0 yGgNpYtzOJFpJYB/9Aq8JbHgM3ZX4ODXkYWO+I0QAo5bTtYmLlYnAJxWTo7RkXS5G36STr TZ3LpC7euhExtYmZfW77WwXrpSRJfVmbBOOCDyyYOS2NYjt2kuunRz+H98U/MQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718390582; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CHOzPUv1FmD/IuEwdio+RQA4VdB6K2ZIUlF/I+K48d0=; b=jccCLAhRiUhO0nDHg7TQNQQlDkYwUKNH40SdQRqWkKUZUAyePhQSHh64vErvlfO4+OZB8c 8oTkNbqvaaadyPbtfMiF6qDhYH3mw0XuW1RD8dW75MtjqXfysceuOqJLfm06SRbmdMvuD4 KWF/RyRQcRTVSTQV1cDTQWMz/3g62w5ofqGvSdvxOOZ1JU+Ht5Kxt/e6GcYldyxBEzwEC6 jWIadACCVG8/DvV8PFEhIIlShkAjbD4XXy/95QSeiB9diGbXRmte9+lYOItRhDSPnBGZYw 0gb/D0RzU2WKgOPUhqgFvHPyJOMq5i1IEuWBVhO+z8bqiY6s3L9xcvd205jdtg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W17Sj72ZRzXqR; Fri, 14 Jun 2024 18:43:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45EIh1qR020432; Fri, 14 Jun 2024 18:43:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45EIh14T020429; Fri, 14 Jun 2024 18:43:01 GMT (envelope-from git) Date: Fri, 14 Jun 2024 18:43:01 GMT Message-Id: <202406141843.45EIh14T020429@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 2a12368e7ced - stable/13 - LinuxKPI: 802.11: implement a deferred RX path List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2a12368e7ced1c103d5be14e545f3e0f25edf947 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=2a12368e7ced1c103d5be14e545f3e0f25edf947 commit 2a12368e7ced1c103d5be14e545f3e0f25edf947 Author: Bjoern A. Zeeb AuthorDate: 2024-02-12 16:03:13 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-14 14:55:15 +0000 LinuxKPI: 802.11: implement a deferred RX path Some calls, e.g., action frames cause us to call through all the way down to firmware from the RX path without any deferral in net80211. For LinuxKPI and iwlwifi this goes (with omissions) like this: lkpi_napi_task -> linuxkpi_ieee80211_rx -> ieee80211_input_mimo -> sta_input -> ht_recv_action_ba_addba_request -> lkpi_ic_ampdu_rx_start -> iwl_mvm_mac_ampdu_action -> iwl_trans_txq_send_hcmd. At that point we are waiting for an interrupt from the firmware but given the lkpi_napi_task has not finished (and may have more to dispatch based on budget and what was received) we will not see the new interrupt/fw response. With no answer from the firmware, the software timeout in the driver kills the command and the firmware and issues a complete restart. Implement the deferred RX path in LinuxKPI for the moment. At a later point we should carefully shift this into net80211. This fixes the hangs for (*ic_ampdu_rx_start)() calls with iwlwifi. PR: 276083 Reviewed by: cc Differential Revision: https://reviews.freebsd.org/D43968 (cherry picked from commit 759a996d610d9354aac5c48a6bdc9cedcba2f48b) --- sys/compat/linuxkpi/common/src/linux_80211.c | 134 ++++++++++++++++++++++++--- sys/compat/linuxkpi/common/src/linux_80211.h | 31 +++++++ 2 files changed, 154 insertions(+), 11 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index df72495e68b6..ef4e22542b0f 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -145,6 +145,7 @@ const struct cfg80211_ops linuxkpi_mac80211cfgops = { static struct lkpi_sta *lkpi_find_lsta_by_ni(struct lkpi_vif *, struct ieee80211_node *); static void lkpi_80211_txq_task(void *, int); +static void lkpi_80211_lhw_rxq_task(void *, int); static void lkpi_ieee80211_free_skb_mbuf(void *); #ifdef LKPI_80211_WME static int lkpi_wme_update(struct lkpi_hw *, struct ieee80211vap *, bool); @@ -4272,6 +4273,12 @@ linuxkpi_ieee80211_alloc_hw(size_t priv_len, const struct ieee80211_ops *ops) TAILQ_INIT(&lhw->scheduled_txqs[ac]); } + /* Deferred RX path. */ + LKPI_80211_LHW_RXQ_LOCK_INIT(lhw); + TASK_INIT(&lhw->rxq_task, 0, lkpi_80211_lhw_rxq_task, lhw); + mbufq_init(&lhw->rxq, IFQ_MAXLEN); + lhw->rxq_stopped = false; + /* * XXX-BZ TODO make sure there is a "_null" function to all ops * not initialized. @@ -4297,11 +4304,42 @@ void linuxkpi_ieee80211_iffree(struct ieee80211_hw *hw) { struct lkpi_hw *lhw; + struct mbuf *m; lhw = HW_TO_LHW(hw); free(lhw->ic, M_LKPI80211); lhw->ic = NULL; + /* + * Drain the deferred RX path. + */ + LKPI_80211_LHW_RXQ_LOCK(lhw); + lhw->rxq_stopped = true; + LKPI_80211_LHW_RXQ_UNLOCK(lhw); + + /* Drain taskq, won't be restarted due to rxq_stopped being set. */ + while (taskqueue_cancel(taskqueue_thread, &lhw->rxq_task, NULL) != 0) + taskqueue_drain(taskqueue_thread, &lhw->rxq_task); + + /* Flush mbufq (make sure to release ni refs!). */ + m = mbufq_dequeue(&lhw->rxq); + while (m != NULL) { + struct m_tag *mtag; + + mtag = m_tag_locate(m, MTAG_ABI_LKPI80211, LKPI80211_TAG_RXNI, NULL); + if (mtag != NULL) { + struct lkpi_80211_tag_rxni *rxni; + + rxni = (struct lkpi_80211_tag_rxni *)(mtag + 1); + ieee80211_free_node(rxni->ni); + } + m_freem(m); + m = mbufq_dequeue(&lhw->rxq); + } + KASSERT(mbufq_empty(&lhw->rxq), ("%s: lhw %p has rxq len %d != 0\n", + __func__, lhw, mbufq_len(&lhw->rxq))); + LKPI_80211_LHW_RXQ_LOCK_DESTROY(lhw); + /* Cleanup more of lhw here or in wiphy_free()? */ LKPI_80211_LHW_TXQ_LOCK_DESTROY(lhw); LKPI_80211_LHW_SCAN_LOCK_DESTROY(lhw); @@ -4796,6 +4834,66 @@ linuxkpi_ieee80211_scan_completed(struct ieee80211_hw *hw, return; } +static void +lkpi_80211_lhw_rxq_rx_one(struct lkpi_hw *lhw, struct mbuf *m) +{ + struct ieee80211_node *ni; + struct m_tag *mtag; + int ok; + + ni = NULL; + mtag = m_tag_locate(m, MTAG_ABI_LKPI80211, LKPI80211_TAG_RXNI, NULL); + if (mtag != NULL) { + struct lkpi_80211_tag_rxni *rxni; + + rxni = (struct lkpi_80211_tag_rxni *)(mtag + 1); + ni = rxni->ni; + } + + if (ni != NULL) { + ok = ieee80211_input_mimo(ni, m); + ieee80211_free_node(ni); /* Release the reference. */ + if (ok < 0) + m_freem(m); + } else { + ok = ieee80211_input_mimo_all(lhw->ic, m); + /* mbuf got consumed. */ + } + +#ifdef LINUXKPI_DEBUG_80211 + if (linuxkpi_debug_80211 & D80211_TRACE_RX) + printf("TRACE %s: handled frame type %#0x\n", __func__, ok); +#endif +} + +static void +lkpi_80211_lhw_rxq_task(void *ctx, int pending) +{ + struct lkpi_hw *lhw; + struct mbufq mq; + struct mbuf *m; + + lhw = ctx; + +#ifdef LINUXKPI_DEBUG_80211 + if (linuxkpi_debug_80211 & D80211_TRACE_RX) + printf("%s:%d lhw %p pending %d mbuf_qlen %d\n", + __func__, __LINE__, lhw, pending, mbufq_len(&lhw->rxq)); +#endif + + mbufq_init(&mq, IFQ_MAXLEN); + + LKPI_80211_LHW_RXQ_LOCK(lhw); + mbufq_concat(&mq, &lhw->rxq); + LKPI_80211_LHW_RXQ_UNLOCK(lhw); + + m = mbufq_dequeue(&mq); + while (m != NULL) { + lkpi_80211_lhw_rxq_rx_one(lhw, m); + m = mbufq_dequeue(&mq); + } +} + /* For %list see comment towards the end of the function. */ void linuxkpi_ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb, @@ -5020,20 +5118,34 @@ skip_device_ts: } #endif + /* + * Attach meta-information to the mbuf for the deferred RX path. + * Currently this is best-effort. Should we need to be hard, + * drop the frame and goto err; + */ if (ni != NULL) { - ok = ieee80211_input_mimo(ni, m); - ieee80211_free_node(ni); - if (ok < 0) - m_freem(m); - } else { - ok = ieee80211_input_mimo_all(ic, m); - /* mbuf got consumed. */ + struct m_tag *mtag; + struct lkpi_80211_tag_rxni *rxni; + + mtag = m_tag_alloc(MTAG_ABI_LKPI80211, LKPI80211_TAG_RXNI, + sizeof(*rxni), IEEE80211_M_NOWAIT); + if (mtag != NULL) { + rxni = (struct lkpi_80211_tag_rxni *)(mtag + 1); + rxni->ni = ni; /* We hold a reference. */ + m_tag_prepend(m, mtag); + } } -#ifdef LINUXKPI_DEBUG_80211 - if (linuxkpi_debug_80211 & D80211_TRACE_RX) - printf("TRACE %s: handled frame type %#0x\n", __func__, ok); -#endif + LKPI_80211_LHW_RXQ_LOCK(lhw); + if (lhw->rxq_stopped) { + LKPI_80211_LHW_RXQ_UNLOCK(lhw); + m_freem(m); + goto err; + } + + mbufq_enqueue(&lhw->rxq, m); + taskqueue_enqueue(taskqueue_thread, &lhw->rxq_task); + LKPI_80211_LHW_RXQ_UNLOCK(lhw); IMPROVE(); diff --git a/sys/compat/linuxkpi/common/src/linux_80211.h b/sys/compat/linuxkpi/common/src/linux_80211.h index d25614de56dc..b0156a5ade3f 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.h +++ b/sys/compat/linuxkpi/common/src/linux_80211.h @@ -76,6 +76,18 @@ if (linuxkpi_debug_80211 & D80211_TRACE_MODE_HT) \ printf("%s:%d: XXX LKPI80211 IMPROVE_HT\n", __func__, __LINE__) +#define MTAG_ABI_LKPI80211 1707696513 /* LinuxKPI 802.11 KBI */ + +/* + * Deferred RX path. + * We need to pass *ni along (and possibly more in the future so + * we use a struct right from the start. + */ +#define LKPI80211_TAG_RXNI 0 /* deferred RX path */ +struct lkpi_80211_tag_rxni { + struct ieee80211_node *ni; /* MUST hold a reference to it. */ +}; + struct lkpi_radiotap_tx_hdr { struct ieee80211_radiotap_header wt_ihdr; uint8_t wt_flags; @@ -192,6 +204,11 @@ struct lkpi_hw { /* name it mac80211_sc? */ uint32_t txq_generation[IEEE80211_NUM_ACS]; TAILQ_HEAD(, lkpi_txq) scheduled_txqs[IEEE80211_NUM_ACS]; + /* Deferred RX path. */ + struct task rxq_task; + struct mbufq rxq; + struct mtx rxq_mtx; + /* Scan functions we overload to handle depending on scan mode. */ void (*ic_scan_curchan)(struct ieee80211_scan_state *, unsigned long); @@ -240,6 +257,7 @@ struct lkpi_hw { /* name it mac80211_sc? */ bool update_mc; bool update_wme; + bool rxq_stopped; /* Must be last! */ struct ieee80211_hw hw __aligned(CACHE_LINE_SIZE); @@ -304,6 +322,19 @@ struct lkpi_wiphy { #define LKPI_80211_LHW_TXQ_UNLOCK_ASSERT(_lhw) \ mtx_assert(&(_lhw)->txq_mtx, MA_NOTOWNED) +#define LKPI_80211_LHW_RXQ_LOCK_INIT(_lhw) \ + mtx_init(&(_lhw)->rxq_mtx, "lhw-rxq", NULL, MTX_DEF | MTX_RECURSE); +#define LKPI_80211_LHW_RXQ_LOCK_DESTROY(_lhw) \ + mtx_destroy(&(_lhw)->rxq_mtx); +#define LKPI_80211_LHW_RXQ_LOCK(_lhw) \ + mtx_lock(&(_lhw)->rxq_mtx) +#define LKPI_80211_LHW_RXQ_UNLOCK(_lhw) \ + mtx_unlock(&(_lhw)->rxq_mtx) +#define LKPI_80211_LHW_RXQ_LOCK_ASSERT(_lhw) \ + mtx_assert(&(_lhw)->rxq_mtx, MA_OWNED) +#define LKPI_80211_LHW_RXQ_UNLOCK_ASSERT(_lhw) \ + mtx_assert(&(_lhw)->rxq_mtx, MA_NOTOWNED) + #define LKPI_80211_LHW_LVIF_LOCK(_lhw) sx_xlock(&(_lhw)->lvif_sx) #define LKPI_80211_LHW_LVIF_UNLOCK(_lhw) sx_xunlock(&(_lhw)->lvif_sx) From nobody Fri Jun 14 18:43:03 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W17Sl1tz1z5PK57; Fri, 14 Jun 2024 18:43:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W17Sl1HYMz4GD5; Fri, 14 Jun 2024 18:43:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718390583; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XnO0hOPl+Ge3td10xH0NUS7HYVzH4ewrsMc/dGfvfRQ=; b=ht0VCWUkH1PpTqWU5QT/52Axj0wcNTnOpwafwdgGR05xS1eIIYRg9TSnBJN6Q9RX4DnJHA yu2TV6+U77fNFgWXLUxa10FOuwXgBNS9ehpL7U5BWEZBBml9zFObhDA0KnHGA7omoYx9ay JTT7eSVcbR/3BkVK7EScJEZOIszuoajlc9+bhlhhx10gW0DwA6bMoWgWqExBfBsHiQjaV+ jHwdX3IMg1YtjOPTTkzRmGFtfYK+Qnc4pINJW4tiBrG/3TUMU0y2tij2s0iT8Po8p8Kmzo 494AR1yEzfNb1oJ4akTyDus/N5cPvdLWrq24hA9ABnyt9eDFml5o+Bs7jkx9dg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718390583; a=rsa-sha256; cv=none; b=LYxxv5AzgdatEeWcWuNkZDsKgw1PiXrG5v4Dn5VXHl2iixdDSb/FuVcAUcp5pG1pctNVXw L0EWvU0X6Dd6o//y5UeL6HSbP0dlmgPvXINy2164fw4MaECaA9p/s4D/gmzsO33dvxSbQI TmheBz6ieBvUUeXNaTFILp8qgi5nxbiF2QYUg2RADNhq4GWSQqlzx7Kzl9/s9aQxpS7WxL Tl2R377CUX4W6pjfyYRmkXdpawpObzZXr/Z/Kssiy56DL3VPKb+GrqWecwq/Xio2DnaA32 ZsyXSx0qwahsI9nwrML2Fw7BvWFEobcn3jfefOG4mrBSX5H7dh84/vh7p2ohSA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718390583; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XnO0hOPl+Ge3td10xH0NUS7HYVzH4ewrsMc/dGfvfRQ=; b=TK/57V21hJozbCAXReBecUkeZX0AX4vkcKJXe5Xbom4CtF/NCOV+6T3tF0jR36GVAGPhwY wMPEIE7k4Iyr3uzDN0q91cmevAcscChjicxv7OanEGCjHCmeFkyvnvLAI0Pw82mcqf/9xM x4aI2tXMMucuZBSGlwpFUAHbeSCT5z3BnmAd/nVnfad0I2rkNHvIitTnPxH6YA62KxtGu4 WZp6/s0ceYNUzCKgE2oQ+xBrjmPSOTdUvFkv99DMNCwnzeljPUVe68zFjuz9qGAQyXXDi9 VbnAjXDvMrrqGLJECiDnvCPzEiUlK04yNr/wghfAVJ02ULMqBhFPhKolyjcL6g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W17Sl0vM1zXn2; Fri, 14 Jun 2024 18:43:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45EIh3bJ020483; Fri, 14 Jun 2024 18:43:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45EIh3SH020480; Fri, 14 Jun 2024 18:43:03 GMT (envelope-from git) Date: Fri, 14 Jun 2024 18:43:03 GMT Message-Id: <202406141843.45EIh3SH020480@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 24cb6fe1589e - stable/13 - LinuxKPI: 802.11: remove unneeded re-lookup in lkpi_80211_txq_tx_one() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 24cb6fe1589e6f74d36792845c9e4fb7eb556aea Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=24cb6fe1589e6f74d36792845c9e4fb7eb556aea commit 24cb6fe1589e6f74d36792845c9e4fb7eb556aea Author: Bjoern A. Zeeb AuthorDate: 2024-02-18 18:07:00 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-14 14:55:16 +0000 LinuxKPI: 802.11: remove unneeded re-lookup in lkpi_80211_txq_tx_one() Given we are passed the lsta in as a function argument there is no need to re-lookup the sta by ni and possibly not find it. We know the sta and ni from the lsta and whether it is uploaded to firmware or not we can check directly from the local lsta flag. Reviewed by: cc Differential Revision: https://reviews.freebsd.org/D43965 (cherry picked from commit ac867c20e67423e5019ab90148c387ea127eeffb) --- sys/compat/linuxkpi/common/src/linux_80211.c | 76 +++++++++++++--------------- 1 file changed, 35 insertions(+), 41 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index ef4e22542b0f..1a5954de0250 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -142,8 +142,10 @@ const struct cfg80211_ops linuxkpi_mac80211cfgops = { */ }; +#if 0 static struct lkpi_sta *lkpi_find_lsta_by_ni(struct lkpi_vif *, struct ieee80211_node *); +#endif static void lkpi_80211_txq_task(void *, int); static void lkpi_80211_lhw_rxq_task(void *, int); static void lkpi_ieee80211_free_skb_mbuf(void *); @@ -3584,6 +3586,7 @@ lkpi_80211_txq_tx_one(struct lkpi_sta *lsta, struct mbuf *m) struct ieee80211_tx_info *info; struct ieee80211_sta *sta; struct ieee80211_hdr *hdr; + struct lkpi_txq *ltxq; void *buf; uint8_t ac, tid; @@ -3694,54 +3697,45 @@ lkpi_80211_txq_tx_one(struct lkpi_sta *lsta, struct mbuf *m) #endif #endif - lsta = lkpi_find_lsta_by_ni(lvif, ni); - if (lsta != NULL) { - sta = LSTA_TO_STA(lsta); + sta = LSTA_TO_STA(lsta); #ifdef LKPI_80211_HW_CRYPTO - info->control.hw_key = lsta->kc; + info->control.hw_key = lsta->kc; #endif - } else { - sta = NULL; - } IMPROVE(); - if (sta != NULL) { - struct lkpi_txq *ltxq; - - ltxq = NULL; - if (!ieee80211_is_data_present(hdr->frame_control)) { - if (vif->type == NL80211_IFTYPE_STATION && - lsta->added_to_drv && - sta->txq[IEEE80211_NUM_TIDS] != NULL) - ltxq = TXQ_TO_LTXQ(sta->txq[IEEE80211_NUM_TIDS]); - } else if (lsta->added_to_drv && - sta->txq[skb->priority] != NULL) { - ltxq = TXQ_TO_LTXQ(sta->txq[skb->priority]); - } - if (ltxq == NULL) - goto ops_tx; + ltxq = NULL; + if (!ieee80211_is_data_present(hdr->frame_control)) { + if (vif->type == NL80211_IFTYPE_STATION && + lsta->added_to_drv && + sta->txq[IEEE80211_NUM_TIDS] != NULL) + ltxq = TXQ_TO_LTXQ(sta->txq[IEEE80211_NUM_TIDS]); + } else if (lsta->added_to_drv && + sta->txq[skb->priority] != NULL) { + ltxq = TXQ_TO_LTXQ(sta->txq[skb->priority]); + } + if (ltxq == NULL) + goto ops_tx; - KASSERT(ltxq != NULL, ("%s: lsta %p sta %p m %p skb %p " - "ltxq %p != NULL\n", __func__, lsta, sta, m, skb, ltxq)); + KASSERT(ltxq != NULL, ("%s: lsta %p sta %p m %p skb %p " + "ltxq %p != NULL\n", __func__, lsta, sta, m, skb, ltxq)); - LKPI_80211_LTXQ_LOCK(ltxq); - skb_queue_tail(<xq->skbq, skb); + LKPI_80211_LTXQ_LOCK(ltxq); + skb_queue_tail(<xq->skbq, skb); #ifdef LINUXKPI_DEBUG_80211 - if (linuxkpi_debug_80211 & D80211_TRACE_TX) - printf("%s:%d mo_wake_tx_queue :: %d %u lsta %p sta %p " - "ni %p %6D skb %p lxtq %p { qlen %u, ac %d tid %u } " - "WAKE_TX_Q ac %d prio %u qmap %u\n", - __func__, __LINE__, - curthread->td_tid, (unsigned int)ticks, - lsta, sta, ni, ni->ni_macaddr, ":", skb, ltxq, - skb_queue_len(<xq->skbq), ltxq->txq.ac, - ltxq->txq.tid, ac, skb->priority, skb->qmap); + if (linuxkpi_debug_80211 & D80211_TRACE_TX) + printf("%s:%d mo_wake_tx_queue :: %d %u lsta %p sta %p " + "ni %p %6D skb %p lxtq %p { qlen %u, ac %d tid %u } " + "WAKE_TX_Q ac %d prio %u qmap %u\n", + __func__, __LINE__, + curthread->td_tid, (unsigned int)ticks, + lsta, sta, ni, ni->ni_macaddr, ":", skb, ltxq, + skb_queue_len(<xq->skbq), ltxq->txq.ac, + ltxq->txq.tid, ac, skb->priority, skb->qmap); #endif - LKPI_80211_LTXQ_UNLOCK(ltxq); - lkpi_80211_mo_wake_tx_queue(hw, <xq->txq); - return; - } + LKPI_80211_LTXQ_UNLOCK(ltxq); + lkpi_80211_mo_wake_tx_queue(hw, <xq->txq); + return; ops_tx: #ifdef LINUXKPI_DEBUG_80211 @@ -3753,9 +3747,7 @@ ops_tx: #endif memset(&control, 0, sizeof(control)); control.sta = sta; - lkpi_80211_mo_tx(hw, &control, skb); - return; } static void @@ -5226,6 +5218,7 @@ linuxkpi_ieee80211_frequency_to_channel(uint32_t freq, uint32_t flags __unused) return (ieee80211_mhz2ieee(freq, 0)); } +#if 0 static struct lkpi_sta * lkpi_find_lsta_by_ni(struct lkpi_vif *lvif, struct ieee80211_node *ni) { @@ -5242,6 +5235,7 @@ lkpi_find_lsta_by_ni(struct lkpi_vif *lvif, struct ieee80211_node *ni) return (NULL); } +#endif struct ieee80211_sta * linuxkpi_ieee80211_find_sta(struct ieee80211_vif *vif, const u8 *peer) From nobody Fri Jun 14 18:43:04 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W17Sm479pz5PK11; Fri, 14 Jun 2024 18:43:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W17Sm26STz4G73; Fri, 14 Jun 2024 18:43:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718390584; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hdSbIrAjVUOZ1t2DtpXmRa2TnfgXvWeny4HY04GCDFI=; b=RjvCFuonSXSmJL+y2F1dmCHesmF79Csl8FpytkLvPiD3SlKPkhmectq6NsgwiMt/DSJixn n7NXmvN31xzTdfVobd/bdwmrspZxRlVSNDOFqpqZZO26w02miQRAuwfyBsEnzZGcMKzcC+ GoZZ/fEfdnM6qXDYeyrz/xtLl6m2eCJ3AvsU5sk/TXkhM18Npd+dKg9zTv8j3A5nBuwrXG 2xH76oN5+u2PLfwBC/SsdccT0Bu6n5nvFsYW9Gxz/R9cjSblMejI7O1PDOYppwNjAo4lTV 4D8UddRjBV+3KBuqENZwBs4K3SoIpVtQFat0/JiLyJ1Mj/YqjzJ/LZjJGwwoxw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718390584; a=rsa-sha256; cv=none; b=u2KnPvZA+zFuJHB3WdZ3rEj7NCyyEO6NZDG5pAh8KJ470aE3MoyPmESCpWP+hzl0EY2QEU icDhjyeilkTBqCgqgoBMVNcYTguCwF1I7JNsgTRQq+7v7mpPrOkymWP+H/TQRf0I7+HvZR NtoiqKRWEzcBtKUvSGaj/UJMwPZgQlrvKw9aT0WlA6eWLYn+jjDiEubrL+vWAZOEPGUaiB nrhCROF/RwP8Q95N62YKnABQhG6qnW0VhvvsJQ7BsL4p1/LHmnEcXax/neq0nHSGQFTP2E +YMaPQdE47C4AiBWcT0gY4+TaLcuwqR05BOAyMTdkMAQlKDgPZOQH3JZqUJvuw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718390584; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hdSbIrAjVUOZ1t2DtpXmRa2TnfgXvWeny4HY04GCDFI=; b=cVpaBaJPe+lk76ZmOgj0/DSbimKWEhobrZH1Ky+hKaaanHcouCBClo4OVfNV9HIDYF1rIT IDp8X8B4uBMY0EfncghQIxNU5tTlFDIs0dWxqpCq+sCOeNSSVdErYjD0Yei5YN+1Mx24Eq n4COvcH2+b45AWkvtdvahiNPg6eggFlImqlDcLnrg+8/V6XupeGEa2UTMolA/E1EpCUKUb +83sRG8o3s/VcOyLm9U0+Pk2elpiWYvspQ89LruUMuxWKflDV+vUcCAh7WroRjp/2uZFB0 PWv7ZxduBeqpWmuQBpKbwPx8mVD0o7UjhWMf0ym1eBmQ4xaw26sfMVDnSKJQYg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W17Sm1XqRzXKG; Fri, 14 Jun 2024 18:43:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45EIh4lq020540; Fri, 14 Jun 2024 18:43:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45EIh4hJ020537; Fri, 14 Jun 2024 18:43:04 GMT (envelope-from git) Date: Fri, 14 Jun 2024 18:43:04 GMT Message-Id: <202406141843.45EIh4hJ020537@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: b5e3a31ac050 - stable/13 - LinuxKPI: 802.11: disable early queue wakeup workaround; better classify List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b5e3a31ac050dd376d19682fe0e595692ec3379f Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=b5e3a31ac050dd376d19682fe0e595692ec3379f commit b5e3a31ac050dd376d19682fe0e595692ec3379f Author: Bjoern A. Zeeb AuthorDate: 2024-02-16 21:14:02 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-14 14:55:16 +0000 LinuxKPI: 802.11: disable early queue wakeup workaround; better classify We used to call lkpi_wake_tx_queues() for all queues early on in order to make sure they are ready. Turns out whatever logic in iwlwifi startup is working correctly these days under LinuxKPI so this is no longer needed. As the comment indicated the "workaround" did not always work. Disable it for now. The second part of the improvement is to properly classify Non-QOS non-data frames (mgmt and ctl frames for now, unless we have to be even more careful in the future about certain sub-types) as TID 7/VO. Contrary to net80211 we must not promote PAE frames. PR: 274382 Reviewed by: cc Differential Revision: https://reviews.freebsd.org/D43944 (cherry picked from commit 1665ef979d3adab05d178480077674ab5978e4f0) --- sys/compat/linuxkpi/common/src/linux_80211.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 1a5954de0250..d90f89cdcbcd 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -1312,6 +1312,7 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_lsta_dump(lsta, ni, __func__, __LINE__); +#if 0 /* * Wakeup all queues now that sta is there so we have as much time to * possibly prepare the queue in the driver to be ready for the 1st @@ -1321,6 +1322,7 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int * for all queues. */ lkpi_wake_tx_queues(hw, LSTA_TO_STA(lsta), false, false); +#endif /* Start mgd_prepare_tx. */ memset(&prep_tx_info, 0, sizeof(prep_tx_info)); @@ -3670,8 +3672,16 @@ lkpi_80211_txq_tx_one(struct lkpi_sta *lsta, struct mbuf *m) hdr = (void *)skb->data; tid = linuxkpi_ieee80211_get_tid(hdr, true); if (tid == IEEE80211_NONQOS_TID) { /* == IEEE80211_NUM_TIDS */ - skb->priority = 0; - ac = IEEE80211_AC_BE; + if (!ieee80211_is_data(hdr->frame_control)) { + /* MGMT and CTRL frames go on TID 7/VO. */ + skb->priority = 7; + ac = IEEE80211_AC_VO; + } else { + /* Other non-QOS traffic goes to BE. */ + /* Contrary to net80211 we MUST NOT promote M_EAPOL. */ + skb->priority = 0; + ac = IEEE80211_AC_BE; + } } else { skb->priority = tid & IEEE80211_QOS_CTL_TID_MASK; ac = ieee80211e_up_to_ac[tid & 7]; From nobody Fri Jun 14 18:43:05 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W17Sn5Lbnz5PKP0; Fri, 14 Jun 2024 18:43:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W17Sn2bfkz4GTp; Fri, 14 Jun 2024 18:43:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718390585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S+aGR2hapBbRPQPk8iRJC4K9/Xdxr0b0huqKORt+Pj0=; b=KVy4FB5DOCK8MqoB3V7adqDvsL9Geo4ABHyki7MKehCCPDaa5wfwVyXw006rlxnaYWCQLM 0z2RwTqlj2/e6JLTFGY6PLOlESF9TNJ7A8PVQXy9QqpkWl8EGcfiC4XDkzpM6yaW4FT5Q/ QR4Mrb/veQuMeFS0fKDtaYsHUpzV024nKuHbge+uD0mtPxRPjvlyM9OlqRmWmtpdxTDMIV hZA5basVpd2JuZbUdLvflznLQOd8hwBRwdzeHY04/i1dVRi/tNAXXeJKzjxU3wuswaDcyK y6v1fSzk+DuEqJuHZF7OC6ZwCzdwrwGRd4NmqHjWN4bfNJf1dp5QR2Na/R1Kfw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718390585; a=rsa-sha256; cv=none; b=qF8aGOcyhaZoNkyqJwG0MTDmJtMeUtNFso2cIPpaTXDbOEW2kskjj8FJOrzw42F4gGo3jS Mg1fcBUNkEduRxT9lEjOwSaC+OP07xKL5NiPBOy5dKzvKAI6C3dr9LfcU+1fjJmPNRbX1P QDbesf7REPErZcS/94mpibmZ+3FZtANXk9r5mn5KHEQQQ8Dt5YkrY23tbRM6zGg/pdUN+5 LwnYr+Xfl9oYdgD3i+Yokad5kWZ9o8l5YWCnR7zQDc6yqm497wIZSgcq0erL8YwTuaziUE 6GJmJ/vhDnwWrA7TGBPEsPdP/MatqA9GVNbq61F21a2KTQNHaihXiph+n1DkQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718390585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S+aGR2hapBbRPQPk8iRJC4K9/Xdxr0b0huqKORt+Pj0=; b=B7g40mCZoNvdv1ZJ8nST/Df8aS/HK8qSaGREZ3WQ6omuxDDH+vjA/yNuuHhjLTHMxoQG1c dCUARORnBxW/h6MHmYUfkP+PmC6cL8anMzfseg8ZxYRkNNm8AOV8/xjxTSDz3Rlp/1L9Cb Q2YAOMHy0qoOy3PcIVvhlf1t737abR1If7SW28LaDxZA8jyM4djGV/PwRFgXmCzp8yH425 yvXj4vg2/SgKXqfbhSCcjx3z34mg87k8yuyLnxQG7vBQxaCYcsNG7g1E626ImBtPPLMPhB CMXivXkBhQcf0vU/L6VlgWFUfpjleAmmJH38aQqhdRNkQp6zEEyYtywo/qrVlg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W17Sn2CFwzXLx; Fri, 14 Jun 2024 18:43:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45EIh5h2020600; Fri, 14 Jun 2024 18:43:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45EIh5LC020597; Fri, 14 Jun 2024 18:43:05 GMT (envelope-from git) Date: Fri, 14 Jun 2024 18:43:05 GMT Message-Id: <202406141843.45EIh5LC020597@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: def43d8a4a3c - stable/13 - LinuxKPI: 802.11: change teardown order to avoid iwlwifi firmware crashes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: def43d8a4a3c0a2868fe74ef6aefe16c435ea19c Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=def43d8a4a3c0a2868fe74ef6aefe16c435ea19c commit def43d8a4a3c0a2868fe74ef6aefe16c435ea19c Author: Bjoern A. Zeeb AuthorDate: 2024-05-22 02:24:51 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-14 14:55:16 +0000 LinuxKPI: 802.11: change teardown order to avoid iwlwifi firmware crashes While the previous order worked well for iwlwifi 22000 and later chipsets (AXxxx, BE200), earlier chipsets had trouble and ran into firmware crashes. Change the teardown order to avoid these problems. The inline comments in lkpi_sta_run_to_init() (and lkpi_disassoc()) try to document the new order and also the old problems we were seeing (too early sta removal or silent non-removal) leading to follow-up problems. There is a possible further problem still lingering but a lot harder to trigger (see comment in review) and likely related to some other doings so we'll track it separately. Sponsored by: The FreeBSD Foundation PR: 275255 Tested with: AX210, 8265 (bz); 9260 (Bakul Shah) Differential Revision: https://reviews.freebsd.org/D45293 (cherry picked from commit 5a4d24610fc6143ac1d570fe2b5160e8ae893c2c) --- sys/compat/linuxkpi/common/src/linux_80211.c | 84 ++++++++++++++++++---------- 1 file changed, 55 insertions(+), 29 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index d90f89cdcbcd..632645a116b2 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -994,33 +994,37 @@ lkpi_hw_conf_idle(struct ieee80211_hw *hw, bool new) } } -static void +static enum ieee80211_bss_changed lkpi_disassoc(struct ieee80211_sta *sta, struct ieee80211_vif *vif, struct lkpi_hw *lhw) { + enum ieee80211_bss_changed changed; + + changed = 0; sta->aid = 0; if (vif->cfg.assoc) { - struct ieee80211_hw *hw; - enum ieee80211_bss_changed changed; lhw->update_mc = true; lkpi_update_mcast_filter(lhw->ic, true); - changed = 0; vif->cfg.assoc = false; vif->cfg.aid = 0; changed |= BSS_CHANGED_ASSOC; - /* - * This will remove the sta from firmware for iwlwifi. - * So confusing that they use state and flags and ... ^%$%#%$^. - */ IMPROVE(); - hw = LHW_TO_HW(lhw); - lkpi_80211_mo_bss_info_changed(hw, vif, &vif->bss_conf, - changed); - lkpi_hw_conf_idle(hw, true); + /* + * Executing the bss_info_changed(BSS_CHANGED_ASSOC) with + * assoc = false right away here will remove the sta from + * firmware for iwlwifi. + * We no longer do this but only return the BSS_CHNAGED value. + * The caller is responsible for removing the sta gong to + * IEEE80211_STA_NOTEXIST and then executing the + * bss_info_changed() update. + * See lkpi_sta_run_to_init() for more detailed comment. + */ } + + return (changed); } static void @@ -1460,6 +1464,8 @@ lkpi_sta_auth_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); /* NB: vif->chanctx_conf is NULL now. */ + lkpi_hw_conf_idle(hw, true); + /* Remove chan ctx. */ lkpi_80211_mo_remove_chanctx(hw, conf); lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); @@ -1743,16 +1749,11 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i goto out; } - lkpi_lsta_dump(lsta, ni, __func__, __LINE__); + /* See comment in lkpi_sta_run_to_init(). */ + bss_changed = 0; + bss_changed |= lkpi_disassoc(sta, vif, lhw); - /* Update bss info (bss_info_changed) (assoc, aid, ..). */ - /* - * We need to do this now, before sta changes to IEEE80211_STA_NOTEXIST - * as otherwise drivers (iwlwifi at least) will silently not remove - * the sta from the firmware and when we will add a new one trigger - * a fw assert. - */ - lkpi_disassoc(sta, vif, lhw); + lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* Adjust sta and change state (from NONE) to NOTEXIST. */ KASSERT(lsta != NULL, ("%s: ni %p lsta is NULL\n", __func__, ni)); @@ -1769,7 +1770,6 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* sta no longer save to use. */ IMPROVE("Any bss_info changes to announce?"); - bss_changed = 0; vif->bss_conf.qos = 0; bss_changed |= BSS_CHANGED_QOS; vif->cfg.ssid_len = 0; @@ -1802,6 +1802,8 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); /* NB: vif->chanctx_conf is NULL now. */ + lkpi_hw_conf_idle(hw, true); + /* Remove chan ctx. */ lkpi_80211_mo_remove_chanctx(hw, conf); lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); @@ -2290,14 +2292,33 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int goto out; } - lkpi_lsta_dump(lsta, ni, __func__, __LINE__); - - /* Update bss info (bss_info_changed) (assoc, aid, ..). */ + bss_changed = 0; /* + * Start updating bss info (bss_info_changed) (assoc, aid, ..). + * * One would expect this to happen when going off AUTHORIZED. - * See comment there; removes the sta from fw. + * See comment there; removes the sta from fw if not careful + * (bss_info_changed() change is executed right away). + * + * We need to do this now, before sta changes to IEEE80211_STA_NOTEXIST + * as otherwise drivers (iwlwifi at least) will silently not remove + * the sta from the firmware and when we will add a new one trigger + * a fw assert. + * + * The order which works best so far avoiding early removal or silent + * non-removal seems to be (for iwlwifi::mld-mac80211.c cases; + * the iwlwifi:mac80211.c case still to be tested): + * 1) lkpi_disassoc(): set vif->cfg.assoc = false (aid=0 side effect here) + * 2) call the last sta_state update -> IEEE80211_STA_NOTEXIST + * (removes the sta given assoc is false) + * 3) add the remaining BSS_CHANGED changes and call bss_info_changed() + * 4) call unassign_vif_chanctx + * 5) call lkpi_hw_conf_idle + * 6) call remove_chanctx */ - lkpi_disassoc(sta, vif, lhw); + bss_changed |= lkpi_disassoc(sta, vif, lhw); + + lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* Adjust sta and change state (from NONE) to NOTEXIST. */ KASSERT(lsta != NULL, ("%s: ni %p lsta is NULL\n", __func__, ni)); @@ -2311,15 +2332,19 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int goto out; } + lkpi_lsta_remove(lsta, lvif); + lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* sta no longer save to use. */ IMPROVE("Any bss_info changes to announce?"); - bss_changed = 0; vif->bss_conf.qos = 0; bss_changed |= BSS_CHANGED_QOS; vif->cfg.ssid_len = 0; memset(vif->cfg.ssid, '\0', sizeof(vif->cfg.ssid)); bss_changed |= BSS_CHANGED_BSSID; + vif->bss_conf.use_short_preamble = false; + vif->bss_conf.qos = false; + /* XXX BSS_CHANGED_???? */ lkpi_80211_mo_bss_info_changed(hw, vif, &vif->bss_conf, bss_changed); LKPI_80211_LVIF_LOCK(lvif); @@ -2327,7 +2352,6 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int lvif->lvif_bss = NULL; lvif->lvif_bss_synched = false; LKPI_80211_LVIF_UNLOCK(lvif); - lkpi_lsta_remove(lsta, lvif); /* * The very last release the reference on the ni for the ni/lsta on * lvif->lvif_bss. Upon return from this both ni and lsta are invalid @@ -2347,6 +2371,8 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); /* NB: vif->chanctx_conf is NULL now. */ + lkpi_hw_conf_idle(hw, true); + /* Remove chan ctx. */ lkpi_80211_mo_remove_chanctx(hw, conf); lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); From nobody Fri Jun 14 18:43:06 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W17Sp52Fmz5PK14; Fri, 14 Jun 2024 18:43:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W17Sp3KCqz4GMN; Fri, 14 Jun 2024 18:43:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718390586; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NhbBz6bk2zNPoPHBWPc6Al13a+ewSLwFFenUzp4Vchw=; b=Yyn8dfawrTsJUm0hC1+zztofzyWrbe4qczYRpuCgQZxxXsvao0OjwMmbbSnst583ksC7IO wN/8KLRWB7nCDjy25D1RaGWIldfIjPaJp9Bu+4QI+iG/S5lKEcUYMuHlUhd414qEox5m1s YgWYqJZXzaWjVOyxkk4Gf0dVVA/DP/Yx1AQQrFIGmTkixVpnbNa6sv20+cuhPw2aKIn8hC 2AB9Dl7ryztOe4F974qlcY3rNzoL1KO94YSfKurXo/iqMTnAjLM6hdVZQp2OQ9BikBQOCZ /FftxdPM6JmTAaEpvACh5g8I9yruRKx5v+CxmoLaXf7SVEuIFL+uS27GJkI31w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718390586; a=rsa-sha256; cv=none; b=N1cZTYXSGdDqMJsXay5CxaFlKsqXZ5i9SeeFiNFMkdz7FxbSjLOcQLJwz6GUr0i4l6UfOe XIElhtUmUb2jXB9mGKhzczCoPNMXe+XXRgtrByiyMRaldzcIE+nftWCnkaPKdc5F/RFi2D 0Nu3KCm9nLqzcfJgpdZH0fZQm3hNPVZxF6SnQh6mHq8n/WpbL4YzJyUeOwG30fQcK7/wMg UPbRqCFBtoWQB+ZV9dLhjwX4fey922x5UWDHYrdl9mG9LA2BLYNpM/VAWI4PXt/c9U/sbN ugF8pyoOD8k29I9b2gy3AtchEvmrpX2X0M2f+/lsnpTC0cm4OiARpW8yJ8Frpw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718390586; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NhbBz6bk2zNPoPHBWPc6Al13a+ewSLwFFenUzp4Vchw=; b=Vgn+fY5y7G5kiDU1qKjl180fxut6E3QMSkTvJmAFoPHHkESrPH/6KDs26BdDmpvioQDjwy gigP4leA8YvLFIioAmbNgk4isE3dSTwEbfZqLeXnazxC/yEh1AeKHRKxVU9q0fcqBoj04q 7XVvR8ETsSQD1hBufCJcCrVjLG6gw3Dn8Vq861xTn3mB69R9ncf2dL5WRdkjSSHdN7Psfe RAhS+kow7WojZNIlrKlDg5shR14iQ2G9XuZJkegoG66kR7Fmy+A+Nh2OP0CLq5cdO9DC/0 p5osE9hc4YsPJrCwLVyuqtsESVKgNjMRNHBJsib3mdWwKiy1uLT9HziWwdYArg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W17Sp2xnQzXh6; Fri, 14 Jun 2024 18:43:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45EIh6IP020655; Fri, 14 Jun 2024 18:43:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45EIh6os020652; Fri, 14 Jun 2024 18:43:06 GMT (envelope-from git) Date: Fri, 14 Jun 2024 18:43:06 GMT Message-Id: <202406141843.45EIh6os020652@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: f70e21e70b1d - stable/13 - LinuxKPI: 802.11: rename chanctx_conf for consistency List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f70e21e70b1d2698b4b22942930c5db2ae603b31 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=f70e21e70b1d2698b4b22942930c5db2ae603b31 commit f70e21e70b1d2698b4b22942930c5db2ae603b31 Author: Bjoern A. Zeeb AuthorDate: 2024-05-13 21:03:31 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-14 14:55:16 +0000 LinuxKPI: 802.11: rename chanctx_conf for consistency We used to call the struct ieee80211_chanctx_conf variable "conf" in some places but that becomes confusing with bss_conf and other "conf" bits. On the vif it is already called chanctx_conf thus also rename it on the internal struct lkpi_chanctx and for our variables in the implementation. This should not have any external visibility. No functional changes intended. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45185 (cherry picked from commit d1af434d99941d32a09c48fb3ef77ef83e203d29) --- sys/compat/linuxkpi/common/src/linux_80211.c | 88 ++++++++++++++-------------- sys/compat/linuxkpi/common/src/linux_80211.h | 6 +- 2 files changed, 47 insertions(+), 47 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 632645a116b2..870c3414f19e 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -1079,7 +1079,7 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int { struct linuxkpi_ieee80211_channel *chan; struct lkpi_chanctx *lchanctx; - struct ieee80211_chanctx_conf *conf; + struct ieee80211_chanctx_conf *chanctx_conf; struct lkpi_hw *lhw; struct ieee80211_hw *hw; struct lkpi_vif *lvif; @@ -1145,54 +1145,54 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int /* Add chanctx (or if exists, change it). */ if (vif->chanctx_conf != NULL) { - conf = vif->chanctx_conf; - lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + chanctx_conf = vif->chanctx_conf; + lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); IMPROVE("diff changes for changed, working on live copy, rcu"); } else { /* Keep separate alloc as in Linux this is rcu managed? */ lchanctx = malloc(sizeof(*lchanctx) + hw->chanctx_data_size, M_LKPI80211, M_WAITOK | M_ZERO); - conf = &lchanctx->conf; + chanctx_conf = &lchanctx->chanctx_conf; } - conf->rx_chains_dynamic = 1; - conf->rx_chains_static = 1; - conf->radar_enabled = + chanctx_conf->rx_chains_dynamic = 1; + chanctx_conf->rx_chains_static = 1; + chanctx_conf->radar_enabled = (chan->flags & IEEE80211_CHAN_RADAR) ? true : false; - conf->def.chan = chan; - conf->def.width = NL80211_CHAN_WIDTH_20_NOHT; - conf->def.center_freq1 = chan->center_freq; - conf->def.center_freq2 = 0; + chanctx_conf->def.chan = chan; + chanctx_conf->def.width = NL80211_CHAN_WIDTH_20_NOHT; + chanctx_conf->def.center_freq1 = chan->center_freq; + chanctx_conf->def.center_freq2 = 0; IMPROVE("Check vht_cap from band not just chan?"); KASSERT(ni->ni_chan != NULL && ni->ni_chan != IEEE80211_CHAN_ANYC, ("%s:%d: ni %p ni_chan %p\n", __func__, __LINE__, ni, ni->ni_chan)); #ifdef LKPI_80211_HT if (IEEE80211_IS_CHAN_HT(ni->ni_chan)) { if (IEEE80211_IS_CHAN_HT40(ni->ni_chan)) { - conf->def.width = NL80211_CHAN_WIDTH_40; + chanctx_conf->def.width = NL80211_CHAN_WIDTH_40; } else - conf->def.width = NL80211_CHAN_WIDTH_20; + chanctx_conf->def.width = NL80211_CHAN_WIDTH_20; } #endif #ifdef LKPI_80211_VHT if (IEEE80211_IS_CHAN_VHT(ni->ni_chan)) { #ifdef __notyet__ if (IEEE80211_IS_CHAN_VHT80P80(ni->ni_chan)) { - conf->def.width = NL80211_CHAN_WIDTH_80P80; - conf->def.center_freq2 = 0; /* XXX */ + chanctx_conf->def.width = NL80211_CHAN_WIDTH_80P80; + chanctx_conf->def.center_freq2 = 0; /* XXX */ } else #endif if (IEEE80211_IS_CHAN_VHT160(ni->ni_chan)) - conf->def.width = NL80211_CHAN_WIDTH_160; + chanctx_conf->def.width = NL80211_CHAN_WIDTH_160; else if (IEEE80211_IS_CHAN_VHT80(ni->ni_chan)) - conf->def.width = NL80211_CHAN_WIDTH_80; + chanctx_conf->def.width = NL80211_CHAN_WIDTH_80; } #endif /* Responder ... */ - conf->min_def.chan = chan; - conf->min_def.width = NL80211_CHAN_WIDTH_20_NOHT; - conf->min_def.center_freq1 = chan->center_freq; - conf->min_def.center_freq2 = 0; + chanctx_conf->min_def.chan = chan; + chanctx_conf->min_def.width = NL80211_CHAN_WIDTH_20_NOHT; + chanctx_conf->min_def.center_freq1 = chan->center_freq; + chanctx_conf->min_def.center_freq2 = 0; IMPROVE("currently 20_NOHT min_def only"); /* Set bss info (bss_info_changed). */ @@ -1218,14 +1218,14 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int changed |= IEEE80211_CHANCTX_CHANGE_RADAR; changed |= IEEE80211_CHANCTX_CHANGE_RX_CHAINS; changed |= IEEE80211_CHANCTX_CHANGE_WIDTH; - lkpi_80211_mo_change_chanctx(hw, conf, changed); + lkpi_80211_mo_change_chanctx(hw, chanctx_conf, changed); } else { - error = lkpi_80211_mo_add_chanctx(hw, conf); + error = lkpi_80211_mo_add_chanctx(hw, chanctx_conf); if (error == 0 || error == EOPNOTSUPP) { - vif->bss_conf.chandef.chan = conf->def.chan; - vif->bss_conf.chandef.width = conf->def.width; + vif->bss_conf.chandef.chan = chanctx_conf->def.chan; + vif->bss_conf.chandef.width = chanctx_conf->def.width; vif->bss_conf.chandef.center_freq1 = - conf->def.center_freq1; + chanctx_conf->def.center_freq1; #ifdef LKPI_80211_HT if (vif->bss_conf.chandef.width == NL80211_CHAN_WIDTH_40) { /* Note: it is 10 not 20. */ @@ -1236,26 +1236,26 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int } #endif vif->bss_conf.chandef.center_freq2 = - conf->def.center_freq2; + chanctx_conf->def.center_freq2; } else { ic_printf(vap->iv_ic, "%s:%d: mo_add_chanctx " "failed: %d\n", __func__, __LINE__, error); goto out; } - vif->bss_conf.chanctx_conf = conf; + vif->bss_conf.chanctx_conf = chanctx_conf; /* Assign vif chanctx. */ if (error == 0) error = lkpi_80211_mo_assign_vif_chanctx(hw, vif, - &vif->bss_conf, conf); + &vif->bss_conf, chanctx_conf); if (error == EOPNOTSUPP) error = 0; if (error != 0) { ic_printf(vap->iv_ic, "%s:%d: mo_assign_vif_chanctx " "failed: %d\n", __func__, __LINE__, error); - lkpi_80211_mo_remove_chanctx(hw, conf); - lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + lkpi_80211_mo_remove_chanctx(hw, chanctx_conf); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); free(lchanctx, M_LKPI80211); goto out; } @@ -1457,9 +1457,9 @@ lkpi_sta_auth_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int /* Take the chan ctx down. */ if (vif->chanctx_conf != NULL) { struct lkpi_chanctx *lchanctx; - struct ieee80211_chanctx_conf *conf; + struct ieee80211_chanctx_conf *chanctx_conf; - conf = vif->chanctx_conf; + chanctx_conf = vif->chanctx_conf; /* Remove vif context. */ lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); /* NB: vif->chanctx_conf is NULL now. */ @@ -1467,8 +1467,8 @@ lkpi_sta_auth_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_hw_conf_idle(hw, true); /* Remove chan ctx. */ - lkpi_80211_mo_remove_chanctx(hw, conf); - lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + lkpi_80211_mo_remove_chanctx(hw, chanctx_conf); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); free(lchanctx, M_LKPI80211); } @@ -1795,9 +1795,9 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i /* Take the chan ctx down. */ if (vif->chanctx_conf != NULL) { struct lkpi_chanctx *lchanctx; - struct ieee80211_chanctx_conf *conf; + struct ieee80211_chanctx_conf *chanctx_conf; - conf = vif->chanctx_conf; + chanctx_conf = vif->chanctx_conf; /* Remove vif context. */ lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); /* NB: vif->chanctx_conf is NULL now. */ @@ -1805,8 +1805,8 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i lkpi_hw_conf_idle(hw, true); /* Remove chan ctx. */ - lkpi_80211_mo_remove_chanctx(hw, conf); - lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + lkpi_80211_mo_remove_chanctx(hw, chanctx_conf); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); free(lchanctx, M_LKPI80211); } @@ -2364,9 +2364,9 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int /* Take the chan ctx down. */ if (vif->chanctx_conf != NULL) { struct lkpi_chanctx *lchanctx; - struct ieee80211_chanctx_conf *conf; + struct ieee80211_chanctx_conf *chanctx_conf; - conf = vif->chanctx_conf; + chanctx_conf = vif->chanctx_conf; /* Remove vif context. */ lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); /* NB: vif->chanctx_conf is NULL now. */ @@ -2374,8 +2374,8 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_hw_conf_idle(hw, true); /* Remove chan ctx. */ - lkpi_80211_mo_remove_chanctx(hw, conf); - lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + lkpi_80211_mo_remove_chanctx(hw, chanctx_conf); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); free(lchanctx, M_LKPI80211); } @@ -4771,7 +4771,7 @@ linuxkpi_ieee80211_iterate_chan_contexts(struct ieee80211_hw *hw, if (!lchanctx->added_to_drv) continue; - iterfunc(hw, &lchanctx->conf, arg); + iterfunc(hw, &lchanctx->chanctx_conf, arg); } LKPI_80211_LHW_LVIF_UNLOCK(lhw); } diff --git a/sys/compat/linuxkpi/common/src/linux_80211.h b/sys/compat/linuxkpi/common/src/linux_80211.h index b0156a5ade3f..a48cf719c693 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.h +++ b/sys/compat/linuxkpi/common/src/linux_80211.h @@ -267,12 +267,12 @@ struct lkpi_hw { /* name it mac80211_sc? */ struct lkpi_chanctx { bool added_to_drv; /* Managed by MO */ - struct ieee80211_chanctx_conf conf __aligned(CACHE_LINE_SIZE); + struct ieee80211_chanctx_conf chanctx_conf __aligned(CACHE_LINE_SIZE); }; #define LCHANCTX_TO_CHANCTX_CONF(_lchanctx) \ - (&(_lchanctx)->conf) + (&(_lchanctx)->chanctx_conf) #define CHANCTX_CONF_TO_LCHANCTX(_conf) \ - container_of(_conf, struct lkpi_chanctx, conf) + container_of(_conf, struct lkpi_chanctx, chanctx_conf) struct lkpi_wiphy { const struct cfg80211_ops *ops; From nobody Fri Jun 14 18:43:07 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W17Sq5kMmz5PKB6; Fri, 14 Jun 2024 18:43:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W17Sq4QFlz4GPq; Fri, 14 Jun 2024 18:43:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718390587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PYdtql7e5GT7FXwe3D3MMoEMzGUV1dG60ZvhufyGaz4=; b=PYB8BkZlurnYQCN9toJclsaLjsTm4ps3gA5nK164HbccXDSbQ7WlBuS/GghA46eVgXpo3x Zoe/pkbS6yJdDMDVQmfTVHMiFTxul2bQF9Ds0R6iRFOQGF84QWkbIyv1RNmJ1xwcRWRUGY U05CHp8YBTltR5qvKNPRrfu8bLdb7uYPOaOnGMIcvDQ+4xt1M09sVfuTquIPvrrhPgJO/u SNkLVRpC+P77WOBQLfjLY/tFWC3KBATgK9cdvlkjdVIXt54PJJj+BHb3vjQ9hkTv0IoqAS m5Ov6VwufFWcNTr78Jev8VolYoYMg1kTqovu4013w4GiP+KbmUXgck28GDPcKA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718390587; a=rsa-sha256; cv=none; b=SSJ9K/qIdxxtHuOt8x0j3oHVeERnyZB1EwCXovfOtVb2ROrF7QM0mhVMe4Ya+wox3BrpBH tBwd4qO89iIRlR6T4+mxy7L2+Q2c8G0EWHQxoBzKK0EelUhe1ILZUF1JBEAOYGCmkkT9n/ SqfapvwtPJgLXlavmKVXtOlbpdxG1jMHzzriEus/w1YPUL7vxHAA7qkIcUpRpvLb99Xa3F 9mCwEnAP+5ghoyUWFWGCi0vTPdS6a6OpOEwemlyyEGsh0R+IgGdf51vxfq5xtJhjICT7iB 5ofJpvERlAbpNvlkK+s51lJV70rUadyKQ02/qxTr495QNHhe3tBa72SXJmzBlg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718390587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PYdtql7e5GT7FXwe3D3MMoEMzGUV1dG60ZvhufyGaz4=; b=Y9GYoV+rcpflkF5j8V2deYMfGen6KV4kGDOoSGrXeyidkEjGY/KjzDh1JjKMRGBvQPLnPC KeduCUOjmHO3tUa3Q8xfI+JvcoHXtHc2zZukLiNZ06JHx5gtm+hNOQJhNtnVy2P2V1x6Tq 9c4PQsfIm7hN91Wb9Ej23Wy8zPBco7u3eAhQy7JZBefouumB9bbbXMwdg45Sbu5Szshq3/ YzIg4DES8xo+AhOjwdG8IP4uXuyAJ9g/Ea3Y2OozgaO8It+U7bbydUDRMK7wG5gbdx9Fg/ aoAV25zrt4c6HBa090ueWCqIK0gCskzVnrhyc30qpcOHZoATUAvOhteaSC3lqQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W17Sq40yszXKH; Fri, 14 Jun 2024 18:43:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45EIh7us020703; Fri, 14 Jun 2024 18:43:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45EIh7HY020700; Fri, 14 Jun 2024 18:43:07 GMT (envelope-from git) Date: Fri, 14 Jun 2024 18:43:07 GMT Message-Id: <202406141843.45EIh7HY020700@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 66627e5c1345 - stable/13 - LinuxKPI: 802.11: lock MO tx/wake_tx_queue() downcalls List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 66627e5c1345aa46d0ea4cafb0280b942bbe86b4 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=66627e5c1345aa46d0ea4cafb0280b942bbe86b4 commit 66627e5c1345aa46d0ea4cafb0280b942bbe86b4 Author: Bjoern A. Zeeb AuthorDate: 2024-02-18 21:07:08 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-14 14:55:16 +0000 LinuxKPI: 802.11: lock MO tx/wake_tx_queue() downcalls Lock the two TX MO downcalls into driver/firmware in lkpi_80211_txq_tx_one() to make sure they cannot happen in the middle of other (net80211 triggered) updates calling down into the driver/firmware. Sponsored by: The FreeBSD Foundation (commit) Reviewed by: cc Differential Revision: https://reviews.freebsd.org/D43966 (cherry picked from commit 45bce6fa306fc3a211949f63c9bbb7932fe5a3bd) --- sys/compat/linuxkpi/common/src/linux_80211.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 870c3414f19e..9a28e637c9fe 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -3770,7 +3770,9 @@ lkpi_80211_txq_tx_one(struct lkpi_sta *lsta, struct mbuf *m) ltxq->txq.tid, ac, skb->priority, skb->qmap); #endif LKPI_80211_LTXQ_UNLOCK(ltxq); + LKPI_80211_LHW_LOCK(lhw); lkpi_80211_mo_wake_tx_queue(hw, <xq->txq); + LKPI_80211_LHW_UNLOCK(lhw); return; ops_tx: @@ -3783,7 +3785,9 @@ ops_tx: #endif memset(&control, 0, sizeof(control)); control.sta = sta; + LKPI_80211_LHW_LOCK(lhw); lkpi_80211_mo_tx(hw, &control, skb); + LKPI_80211_LHW_UNLOCK(lhw); } static void From nobody Fri Jun 14 18:43:08 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W17Ss005yz5PKDY; Fri, 14 Jun 2024 18:43:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W17Sr5qLHz4GK0; Fri, 14 Jun 2024 18:43:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718390588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A1yk3mCsabgVWbSIchfZzEmcJLLJimJcJnkODbZF/5I=; b=Xfy2Mf4U3IlRQTnySKT5HhVyyOM7EolhayCpFKS5FGu6C9mZmNCt3H7BpXkIKG647ffzXi TXc0yRurzsGR7t0lOhzH9f7oUFviqkHIGkSJsgQEFLWA1sjEmQjTkFm71kpFM4FCjUIuJU tdvkLa8aOqeXyrQPYxwfD2Zk8vbfu3SmUIC6ILY0P8v96TxYCp9n81RUitXSHv+DQ36Tea dgPqUdznCPfYX7ZNOtD12/mouiHQW5Y5AtN6UCX/Rhe4DuBNf6dxYXAYQKbNVTyuB2+QAu vjgA9/A3E2K1HtkOpru7hMh6KMFcg33hkygUrzM7esWg83HyNRTdlmmfbE24OQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718390588; a=rsa-sha256; cv=none; b=jhk+xcn1zdKRK+VENjk/UroG016b7/ww0sRx+gzEA6UFSIr1MVK99EfX1KrnkDNqZyijKJ SoaN5D6H5MOgnaMqAJ2K3UfyEr5H7Q4Y6+i0JoDmmf1+Dd9ipJRGWlRsmqNszhf3ufEVrh y5uOzR87NNQZS92PBte+Gdya0ITyXqnI1Wrdk6ykvJu1MvR6kLdOcpTawT1qN1S/YJQrbd eMxzBF2DR9H8Git2TXOTchmtAi3UEOIfPCH8SZLkM0tuZpgxGUqiXL6z72BqV4JKG3NSzq qCCEmoKSL2Z4T4aLBkTd3SfSdsXY8L3SDK/vmKWroqoXgC/lXqvyY3zzoWBenw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718390588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A1yk3mCsabgVWbSIchfZzEmcJLLJimJcJnkODbZF/5I=; b=WCa35Djl5DI+Suczp3CHUU21UWYhBEiEDNngaeM+ZKTmyx7/BBtvg32Ud2xj/Pcz8RrQNb 7Xm58yyf5eRT9UFqRssPXjCEoau5xmtlhsjXfbrQ2I6VaFKSikMfCn2FlOrVEr99mGT5KU hxStgOX4527Tfb6eWDfLEmPnrrmFQbTzAper64KsymJEZPeQFr99CAPa1t7NYk5Yn5KUbO XdZnkzAPanreCKbKtO9l1MnUKRMY0+43HxAjI4m5CtsW9khvgfZWreyyo1QT4vT8NFF6Zd 2DwsEHk3RA6HQbu0A6pk6twBmGZusu7Q8qoIzXF6xBEaPe+fEJgtcOkUOftvag== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W17Sr5MFXzY1X; Fri, 14 Jun 2024 18:43:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45EIh8Zc020748; Fri, 14 Jun 2024 18:43:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45EIh8XY020745; Fri, 14 Jun 2024 18:43:08 GMT (envelope-from git) Date: Fri, 14 Jun 2024 18:43:08 GMT Message-Id: <202406141843.45EIh8XY020745@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: cafefba48125 - stable/13 - LinuxKPI: 802.11: close race lkpi_sta_scan_to_auth()/(*iv_update_bss)() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: cafefba481250d7b270bb9fa54a0aa255fea0289 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=cafefba481250d7b270bb9fa54a0aa255fea0289 commit cafefba481250d7b270bb9fa54a0aa255fea0289 Author: Bjoern A. Zeeb AuthorDate: 2024-02-18 20:57:51 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-14 14:55:16 +0000 LinuxKPI: 802.11: close race lkpi_sta_scan_to_auth()/(*iv_update_bss)() We have to unlock the net80211 ic lock in order to be able to call sleepable downcalls to the driver/firmware; a 2nd thread may go through net80211::join1() and (*iv_update_bss)() after we checked and unlocked. Re-check status at the end of the function under the ic lock so that we do not accidentally set lvif_bss_synched to true again despite it no longer being true. This should fix a race where we lost the (*iv_update_bss)() state during startup where one SCAN->AUTH is followed by a (then) AUTH->AUTH and lkpi_sta_a_to_a() did the wrong thing. Once we re-consider net80211 state and allowing a second join on a different node or iv_bss update without previously tearing down the older node we can likely undo a lot of these extra checks and workarounds. Sponsored by: The FreeBSD Foundation (updated version) Tested by: emaste (on and off) Reviewd by: cc Differential Revision: https://reviews.freebsd.org/D43967 (cherry picked from commit 105b9df26ee0286f3a5a7d191075e068dee1c4a2) --- sys/compat/linuxkpi/common/src/linux_80211.c | 66 +++++++++++++++++++--------- 1 file changed, 46 insertions(+), 20 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 9a28e637c9fe..7d3e70dea325 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -1276,25 +1276,6 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int lsta = ni->ni_drv_data; LKPI_80211_LVIF_LOCK(lvif); - /* Re-check given (*iv_update_bss) could have happened. */ - /* XXX-BZ KASSERT later? or deal as error? */ - if (lvif->lvif_bss_synched || lvif->lvif_bss != NULL) - ic_printf(vap->iv_ic, "%s:%d: lvif %p vap %p iv_bss %p lvif_bss %p " - "lvif_bss->ni %p synched %d, ni %p lsta %p\n", __func__, __LINE__, - lvif, vap, vap->iv_bss, lvif->lvif_bss, - (lvif->lvif_bss != NULL) ? lvif->lvif_bss->ni : NULL, - lvif->lvif_bss_synched, ni, lsta); - - /* - * Reference the ni for this cache of lsta/ni on lvif->lvif_bss - * essentially out lsta version of the iv_bss. - * Do NOT use iv_bss here anymore as that may have diverged from our - * function local ni already and would lead to inconsistencies. - */ - ieee80211_ref_node(ni); - lvif->lvif_bss = lsta; - lvif->lvif_bss_synched = true; - /* Insert the [l]sta into the list of known stations. */ TAILQ_INSERT_TAIL(&lvif->lsta_head, lsta, lsta_entry); LKPI_80211_LVIF_UNLOCK(lvif); @@ -1343,11 +1324,56 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int * (ideally we'd do that on a callback for something else ...) */ + LKPI_80211_LHW_UNLOCK(lhw); + IEEE80211_LOCK(vap->iv_ic); + + LKPI_80211_LVIF_LOCK(lvif); + /* Re-check given (*iv_update_bss) could have happened while we were unlocked. */ + if (lvif->lvif_bss_synched || lvif->lvif_bss != NULL || + lsta->ni != vap->iv_bss) + ic_printf(vap->iv_ic, "%s:%d: lvif %p vap %p iv_bss %p lvif_bss %p " + "lvif_bss->ni %p synched %d, ni %p lsta %p\n", __func__, __LINE__, + lvif, vap, vap->iv_bss, lvif->lvif_bss, + (lvif->lvif_bss != NULL) ? lvif->lvif_bss->ni : NULL, + lvif->lvif_bss_synched, ni, lsta); + + /* + * Reference the "ni" for caching the lsta/ni in lvif->lvif_bss. + * Given we cache lsta we use lsta->ni instead of ni here (even though + * lsta->ni == ni) to be distinct from the rest of the code where we do + * assume that ni == vap->iv_bss which it may or may not be. + * So do NOT use iv_bss here anymore as that may have diverged from our + * function local ni already while ic was unlocked and would lead to + * inconsistencies. Go and see if we lost a race and do not update + * lvif_bss_synched in that case. + */ + ieee80211_ref_node(lsta->ni); + lvif->lvif_bss = lsta; + if (lsta->ni == vap->iv_bss) { + lvif->lvif_bss_synched = true; + } else { + /* Set to un-synched no matter what. */ + lvif->lvif_bss_synched = false; + /* + * We do not error as someone has to take us down. + * If we are followed by a 2nd, new net80211::join1() going to + * AUTH lkpi_sta_a_to_a() will error, lkpi_sta_auth_to_{scan,init}() + * will take the lvif->lvif_bss node down eventually. + * What happens with the vap->iv_bss node will entirely be up + * to net80211 as we never used the node beyond alloc()/free() + * and we do not hold an extra reference for that anymore given + * ni : lsta == 1:1. + */ + } + LKPI_80211_LVIF_UNLOCK(lvif); + goto out_relocked; + out: LKPI_80211_LHW_UNLOCK(lhw); IEEE80211_LOCK(vap->iv_ic); +out_relocked: /* - * Release the reference that keop the ni stable locally + * Release the reference that kept the ni stable locally * during the work of this function. */ if (ni != NULL) From nobody Fri Jun 14 18:43:09 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W17St0h6Lz5PK7n; Fri, 14 Jun 2024 18:43:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W17Ss6XJNz4G7t; Fri, 14 Jun 2024 18:43:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718390589; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uxE/xf68GvBjniKLNAxlaY9CU5IAwuTyACvF2QO1fg8=; b=JTLRkdgN15QQsHDqppEGqLiQuLNu61LTVdV5/dHCnoeQQMfyiFZT/jVtFIJS9vT6VAnoTm jwr2j5jTRZWCnFkrm3DjOaEU9Lmc5ux+nm88zXEHKKQo98SKONaBVnRrb2Q6fVa2/c7/O7 cnhfhAGyKp38nWNH+dEo6rzwcHFSrLbH55Dgcf6zF3LWjoFd1NtiYmYI9kI+ZG/aXtT4ER Jo/CuehDT0Q+mLbQhgdFoQ7v4fOOXKOWEV8Qn0CP43TiMrlg2wzeMUrK9qBm6IdnAIg4hi LN8+pcjQ+0h5paV89GRbjfL4tZWFPW9I3I6CBad2E3w5B6TC/XXxRhdK1ACpdg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718390589; a=rsa-sha256; cv=none; b=kwg120M6SzTzJ9uQCX4yEAkZV4LAQGw+p+4Dn5HQDYGO4lWIs3hhI7x03fOTpuywOCRzog 6e1TOMMeyOB3msme9T5q7OuJTw9Ohx9bGFHsUr7H0b/+9lgjT5UBdL7PRr7b7bab4BOFOK Am94a2xleEXnOkQ2o2J2lA7U/ByqHMLZgBYEllGNtX38Zpz0NRXrX8Ccl1TsQeh8lcRdNY 1SgGQOAOqaEUPw1ci6wzbismtyRAaSIU1GMe9pDg8c97+stakZNM+yFsiT4o6KzSkCKIE1 UfUfXoYZOg4w6bnZ0HHrO0gSbuUCnbc9HA/9osX0G8zHarXgXUbG/WpmclJogw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718390589; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uxE/xf68GvBjniKLNAxlaY9CU5IAwuTyACvF2QO1fg8=; b=TBawBqhIMhLQIiQJMUwB8IhWi2tSpUzrcF+jqbjBjXFADkne57vGz14H5N2bZfM0bilHk3 6V0jjfVe2cXA3OJW8Pbe0bzbQMpgbBIV7Rbs2H07+ZT9ZDe68rbu3TwDI49DpyX7ZPOepW V1/6VwrxIWENYVnNrDE6F1BE8HF6grnf4G2Q7C7IhfozMhj8zx0/Zlka6FKb0m+k2/CsCf igCM7UItqyRRyrD8ji0wGBqG5b88kGkI0EZaZaJIdlzsxEXsmKEoQzz/5rGpzxJtS1std3 obfcZ6o6k+Q1OA5W0dslUeg1nzeKXIr5edH8xdm7AM1lk/h2yySvGKzINTrOdA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W17Ss68KJzY1Y; Fri, 14 Jun 2024 18:43:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45EIh9mJ020811; Fri, 14 Jun 2024 18:43:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45EIh99d020808; Fri, 14 Jun 2024 18:43:09 GMT (envelope-from git) Date: Fri, 14 Jun 2024 18:43:09 GMT Message-Id: <202406141843.45EIh99d020808@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 07da0ad63aa5 - stable/13 - LinuxKPI: 802.11: make sure we can send DISASSOC or DEAUTH frames List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 07da0ad63aa52999c0a381440104122a770decb5 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=07da0ad63aa52999c0a381440104122a770decb5 commit 07da0ad63aa52999c0a381440104122a770decb5 Author: Bjoern A. Zeeb AuthorDate: 2024-06-05 22:54:36 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-14 14:55:16 +0000 LinuxKPI: 802.11: make sure we can send DISASSOC or DEAUTH frames The "Invalid TXQ" error from iwlwifi seems to be triggered by a frame being sent for a sta which is no longer known to the driver/fw. While we make sure to trigger the sending of the frame in net80211 early enough (by calling (*iv_newstate)() early on rather than at the end), TX in LinuxKPI is run in a deferred task. When we drop the net80211 ic lock again and re-acquire the LHW lock the packet may not yet have made it to the driver. Work around this between the (ic and lhw) locks by making sure (a) no new packets get queued after we return from (*iv_newstate)(), and (b) the TX task has run or gets cancelled and we manually push any remaining packets out (or let lsta_free() clean them up). The disabled packet queuing now also needs to be re-enabled in scan_to_auth() in case an lsta is staying in service or gets re-used. Also make sure that any following lkpi_wake_tx_queues() calls no longer ignore queues which have not seen a prior dequeue. This former workaround "feature" (ltxq->seen_dequeue) should be fully garbage collected in a later change on its own. Sponsored by: The FreeBSD Foundation PR: 274382 Tested by: emaste, lwhsu, thj, rkoberman at gmail.com Accepted by: adrian Differential Revision: https://reviews.freebsd.org/D45508 (cherry picked from commit 886653492945f7e945eb9bdaf5bc2ae26df96236) --- sys/compat/linuxkpi/common/src/linux_80211.c | 95 +++++++++++++++++++++++++--- 1 file changed, 86 insertions(+), 9 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 7d3e70dea325..a33149353c75 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -146,6 +146,7 @@ const struct cfg80211_ops linuxkpi_mac80211cfgops = { static struct lkpi_sta *lkpi_find_lsta_by_ni(struct lkpi_vif *, struct ieee80211_node *); #endif +static void lkpi_80211_txq_tx_one(struct lkpi_sta *, struct mbuf *); static void lkpi_80211_txq_task(void *, int); static void lkpi_80211_lhw_rxq_task(void *, int); static void lkpi_ieee80211_free_skb_mbuf(void *); @@ -1062,6 +1063,51 @@ lkpi_wake_tx_queues(struct ieee80211_hw *hw, struct ieee80211_sta *sta, } } +/* + * On the way down from RUN -> ASSOC -> AUTH we may send a DISASSOC or DEAUTH + * packet. The problem is that the state machine functions tend to hold the + * LHW lock which will prevent lkpi_80211_txq_tx_one() from sending the packet. + * We call this after dropping the ic lock and before acquiring the LHW lock. + * we make sure no further packets are queued and if they are queued the task + * will finish or be cancelled. At the end if a packet is left we manually + * send it. scan_to_auth() would re-enable sending if the lsta would be + * re-used. + */ +static void +lkpi_80211_flush_tx(struct lkpi_hw *lhw, struct lkpi_sta *lsta) +{ + struct mbufq mq; + struct mbuf *m; + int len; + + LKPI_80211_LHW_UNLOCK_ASSERT(lhw); + + /* Do not accept any new packets until scan_to_auth or lsta_free(). */ + LKPI_80211_LSTA_TXQ_LOCK(lsta); + lsta->txq_ready = false; + LKPI_80211_LSTA_TXQ_UNLOCK(lsta); + + while (taskqueue_cancel(taskqueue_thread, &lsta->txq_task, NULL) != 0) + taskqueue_drain(taskqueue_thread, &lsta->txq_task); + + LKPI_80211_LSTA_TXQ_LOCK(lsta); + len = mbufq_len(&lsta->txq); + if (len <= 0) { + LKPI_80211_LSTA_TXQ_UNLOCK(lsta); + return; + } + + mbufq_init(&mq, IFQ_MAXLEN); + mbufq_concat(&mq, &lsta->txq); + LKPI_80211_LSTA_TXQ_UNLOCK(lsta); + + m = mbufq_dequeue(&mq); + while (m != NULL) { + lkpi_80211_txq_tx_one(lsta, m); + m = mbufq_dequeue(&mq); + } +} + /* -------------------------------------------------------------------------- */ static int @@ -1275,6 +1321,14 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int __func__, ni, ni->ni_drv_data)); lsta = ni->ni_drv_data; + /* + * Make sure in case the sta did not change and we re-add it, + * that we can tx again. + */ + LKPI_80211_LSTA_TXQ_LOCK(lsta); + lsta->txq_ready = true; + LKPI_80211_LSTA_TXQ_UNLOCK(lsta); + LKPI_80211_LVIF_LOCK(lvif); /* Insert the [l]sta into the list of known stations. */ TAILQ_INSERT_TAIL(&lvif->lsta_head, lsta, lsta_entry); @@ -1427,7 +1481,7 @@ lkpi_sta_auth_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_80211_mo_flush(hw, vif, nitems(sta->txq), true); /* Wake tx queues to get packet(s) out. */ - lkpi_wake_tx_queues(hw, sta, true, true); + lkpi_wake_tx_queues(hw, sta, false, true); /* flush, no drop */ lkpi_80211_mo_flush(hw, vif, nitems(sta->txq), false); @@ -1585,7 +1639,7 @@ lkpi_sta_auth_to_assoc(struct ieee80211vap *vap, enum ieee80211_state nstate, in } /* Wake tx queue to get packet out. */ - lkpi_wake_tx_queues(hw, LSTA_TO_STA(lsta), true, true); + lkpi_wake_tx_queues(hw, LSTA_TO_STA(lsta), false, true); /* * .. we end up in "assoc_to_run" @@ -1729,7 +1783,7 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i LKPI_80211_LHW_UNLOCK(lhw); IEEE80211_LOCK(vap->iv_ic); - /* Call iv_newstate first so we get potential DISASSOC packet out. */ + /* Call iv_newstate first so we get potential DEAUTH packet out. */ error = lvif->iv_newstate(vap, nstate, arg); if (error != 0) { ic_printf(vap->iv_ic, "%s:%d: iv_newstate(%p, %d, %d) " @@ -1738,12 +1792,16 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i } IEEE80211_UNLOCK(vap->iv_ic); + + /* Ensure the packets get out. */ + lkpi_80211_flush_tx(lhw, lsta); + LKPI_80211_LHW_LOCK(lhw); lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* Wake tx queues to get packet(s) out. */ - lkpi_wake_tx_queues(hw, sta, true, true); + lkpi_wake_tx_queues(hw, sta, false, true); /* flush, no drop */ lkpi_80211_mo_flush(hw, vif, nitems(sta->txq), false); @@ -2121,12 +2179,16 @@ lkpi_sta_run_to_assoc(struct ieee80211vap *vap, enum ieee80211_state nstate, int } IEEE80211_UNLOCK(vap->iv_ic); + + /* Ensure the packets get out. */ + lkpi_80211_flush_tx(lhw, lsta); + LKPI_80211_LHW_LOCK(lhw); lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* Wake tx queues to get packet(s) out. */ - lkpi_wake_tx_queues(hw, sta, true, true); + lkpi_wake_tx_queues(hw, sta, false, true); /* flush, no drop */ lkpi_80211_mo_flush(hw, vif, nitems(sta->txq), false); @@ -2255,12 +2317,16 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int } IEEE80211_UNLOCK(vap->iv_ic); + + /* Ensure the packets get out. */ + lkpi_80211_flush_tx(lhw, lsta); + LKPI_80211_LHW_LOCK(lhw); lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* Wake tx queues to get packet(s) out. */ - lkpi_wake_tx_queues(hw, sta, true, true); + lkpi_wake_tx_queues(hw, sta, false, true); /* flush, no drop */ lkpi_80211_mo_flush(hw, vif, nitems(sta->txq), false); @@ -3596,7 +3662,7 @@ lkpi_ic_raw_xmit(struct ieee80211_node *ni, struct mbuf *m, lsta = ni->ni_drv_data; LKPI_80211_LSTA_TXQ_LOCK(lsta); - if (!lsta->txq_ready) { + if (!lsta->added_to_drv || !lsta->txq_ready) { LKPI_80211_LSTA_TXQ_UNLOCK(lsta); /* * Free the mbuf (do NOT release ni ref for the m_pkthdr.rcvif! @@ -3822,6 +3888,7 @@ lkpi_80211_txq_task(void *ctx, int pending) struct lkpi_sta *lsta; struct mbufq mq; struct mbuf *m; + bool shall_tx; lsta = ctx; @@ -3837,9 +3904,19 @@ lkpi_80211_txq_task(void *ctx, int pending) LKPI_80211_LSTA_TXQ_LOCK(lsta); /* * Do not re-check lsta->txq_ready here; we may have a pending - * disassoc frame still. + * disassoc/deauth frame still. On the contrary if txq_ready is + * false we do not have a valid sta anymore in the firmware so no + * point to try to TX. + * We also use txq_ready as a semaphore and will drain the txq manually + * if needed on our way towards SCAN/INIT in the state machine. + */ + shall_tx = lsta->added_to_drv && lsta->txq_ready; + if (__predict_true(shall_tx)) + mbufq_concat(&mq, &lsta->txq); + /* + * else a state change will push the packets out manually or + * lkpi_lsta_free() will drain the lsta->txq and free the mbufs. */ - mbufq_concat(&mq, &lsta->txq); LKPI_80211_LSTA_TXQ_UNLOCK(lsta); m = mbufq_dequeue(&mq); From nobody Fri Jun 14 19:33:40 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W18b86FsMz5PNcc; Fri, 14 Jun 2024 19:33:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W18b85gwVz4NZl; Fri, 14 Jun 2024 19:33:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718393620; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lPNkom6noheerE0y2EDzp+AiKMH0ZtLcZLfCBnLyLs8=; b=hV7RU2y04uks6BwmJR3X0D6klNowscFjLwFWH0ySXrpeLgz7wV9e9ZmQDYKUMwd4cAHfwa e97vwe/+LTWtfIrWAYhLiL5do8a+L4sM1xBwfiyHUOIHfUFuOerkSZzrcXSQDlCL8mb0XW fMOO1s74aLk3oGiOMAWpJRuwmzKRkYZc+2ghSQp8T/gTmJLzH1gD+DAQ+wDTmFHJqOwKiJ L1WSj/3LXzHmZpT4XIHH2qoAzOhKt3tZvw1mCNaApmNGxCJE8hpNI3QpccJiSzsT3XTJhN yt3EN0k2zb6B6p7XdXp9hDC1AeuJ55Usbuq1JldskmLrNPClgl8RVunEr5wJTw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718393620; a=rsa-sha256; cv=none; b=ZrTgWLIG200/AzXteu3aHBbqM5t2kZsZmLzv8LHbnXVQ62BrZY1ydNzyYVfVNQihwA1XLy 1yCHScaKfKNYCAYaBy4o1c5Y0JmZTuYIKL/0fyVMfyA0+RZHXRK1E5o2Xf50jXf/da2PTK AVRA0arSPQnc49CHFldzt8tE53ZvX8X5dkHn9DvbFly5Ye91RmVKo7xWQXNAZM6JJcNZ6V xBuOT71PvQ/mNlie3YxH8EgV0OH6h9XqjwmHeiomG9JB/9/XYas2eIeL6qIbjGgXbjIBUV BEJRgwZSpvY2KXXOrVCXOs0+2ENwbJquZXw7VMPRVtMpLM3vDSOcWptOY8lHSQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718393620; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lPNkom6noheerE0y2EDzp+AiKMH0ZtLcZLfCBnLyLs8=; b=TMY1aJ71H0wFi72nVovSn63zpEl2mlhutMPaM/k6b1VOU6PSrxgSejtaMe0nlzTtqk2Xsj Dblj+FohFEA5nUHrq9AEhW7y2KR3b8vC6r3O2dyVjctDqMQW3ctpw+A3Y6Cot+bpQv8Eo+ zf+cqZqFWsAF9+4UMlWDTmxzWsAusvQJms18+C3ujlNJ7vf90W0aHi264EcZpta/si7lbb DXchc58wPPFQUFzdjpvFZRCso+CpKgq6iJtRgnpcPJcpvHXf09jlaBvPXvQ/uTljUvnlux O/mqr3AzFnacgqTs+/LjLExYmALzb2VzgwKL6qpRih/z9f1jWmPFDmyNG0X40Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W18b85HlHzZ1k; Fri, 14 Jun 2024 19:33:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45EJXeaB005088; Fri, 14 Jun 2024 19:33:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45EJXeOl005085; Fri, 14 Jun 2024 19:33:40 GMT (envelope-from git) Date: Fri, 14 Jun 2024 19:33:40 GMT Message-Id: <202406141933.45EJXeOl005085@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: 80b42329248a - main - nvme: Fix panic on detach after ce75bfcac9cfe List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 80b42329248a7473f79eebf7850ee8e4116c17dd Auto-Submitted: auto-generated The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=80b42329248a7473f79eebf7850ee8e4116c17dd commit 80b42329248a7473f79eebf7850ee8e4116c17dd Author: Alexander Motin AuthorDate: 2024-06-14 19:32:10 +0000 Commit: Alexander Motin CommitDate: 2024-06-14 19:32:10 +0000 nvme: Fix panic on detach after ce75bfcac9cfe MFC after: 2 weeks --- sys/dev/nvme/nvme_ns.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/dev/nvme/nvme_ns.c b/sys/dev/nvme/nvme_ns.c index b19fc8664407..4c65e2c49e64 100644 --- a/sys/dev/nvme/nvme_ns.c +++ b/sys/dev/nvme/nvme_ns.c @@ -620,8 +620,9 @@ void nvme_ns_destruct(struct nvme_namespace *ns) { - if (ns->cdev->si_drv2 != NULL) - destroy_dev(ns->cdev->si_drv2); - if (ns->cdev != NULL) + if (ns->cdev != NULL) { + if (ns->cdev->si_drv2 != NULL) + destroy_dev(ns->cdev->si_drv2); destroy_dev(ns->cdev); + } } From nobody Fri Jun 14 19:55:28 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W194J6k5Fz5PQ4f; Fri, 14 Jun 2024 19:55:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W194J65rbz4PbM; Fri, 14 Jun 2024 19:55:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718394928; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OrJzS7h+QLVGza6XVyS4PQkhbMNjXclfm3Z2JujTmfs=; b=qz3pM0BcMTqmuvouaN2vd75jH8WPXsGQVIQlFdqA7ww6tz9qGUb5E0xCjLPU6+ln/jdLDp jWywp0GyfndZi0cIKhdCLJNZhajtAJifhmVxZy+qNVCWH1d421Eoke4Oz0Lxy1nqmkeASg EFA0mcDRw/mxv0BC/eEJe8NfRsKIRZGwOUOAm5xol05/EiBhiWm1VIz8CatvH0EkMVH7Is EhYbNJ77Pg2s8oC+qV7hjxpvTFe08cv+/Ts2xEGK9vf0AELPU9/fHO/RSWx0vVr4zWnp4q FZXcqsUrCgFm+N22n0Xr/a7qDV8KbSQAtjEXA1SOUnpFoPfzhsMHM0vg3tw5mQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718394928; a=rsa-sha256; cv=none; b=nC4LEfuuBYEScjB1y89yeVVU0VCF+0UtHIieRPdfPlI4k//uujGBDS8XXhFyEo5qfy6TnZ rDzC6BR3kTNhEko1qo/7gIvtsa60bqiPZh8dPCvOiPoy/OYfchIVJhaHdVW/Luj+78qg20 SuPJJWAQNhvq5+c1lf62MYKMrj5ZDei0iZlhHr4g7VMkwPAXVqzDMFj15vjnRjSv9T1f6q i/xzp5NeSMXk9MV6uS2TTv7EscwOOFIzsutmEuYn5aokoOebB6Tp9VLnrbl9A3KU8FZVBA r0FD4shZAz/hbCbYWA6ok2JZq7ikzYhsP/xAJ/MeztFzDgEibJR3UrCV/REqXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718394928; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OrJzS7h+QLVGza6XVyS4PQkhbMNjXclfm3Z2JujTmfs=; b=bHqfzMZf4hi8RyW4B9UHYF8w3x+8sgN1NlskdTP2g+ndcwGUTUVf6hL12xB13S6lleKOn7 abLX+sPmrdacdVBFE7tVGrmvsFVqYYXNoKxKgjwQ63YvtL3u+qHpYOsER7fn98BHxmjplz sjPYoI3yIM96FGQVV5mt5gxFRYAwtPEEPZCVAGkgVAnvUuqVs/zGi5cXj2425WRHwSzbYE hx63ieOX1BM2SPhI5xDbAHkyQAXQw6k84Elt8gNKCrzDooVnanrA+bSbgUHnjiHhDJb0aO 5Ms31DdL3ohAbIcJciGrQi+wX8vgSidPmAHG4eDaN15RSF0GwjQEIuec2v8/uA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W194J5Z8NzZTg; Fri, 14 Jun 2024 19:55:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45EJtSH0039040; Fri, 14 Jun 2024 19:55:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45EJtS7N039037; Fri, 14 Jun 2024 19:55:28 GMT (envelope-from git) Date: Fri, 14 Jun 2024 19:55:28 GMT Message-Id: <202406141955.45EJtS7N039037@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 517c5854588e - main - vm_phys: Make sure that vm_phys_enq_chunk() stays in bounds List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 517c5854588eaa7c2248d97cd750b8b8bad9d69f Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=517c5854588eaa7c2248d97cd750b8b8bad9d69f commit 517c5854588eaa7c2248d97cd750b8b8bad9d69f Author: Mark Johnston AuthorDate: 2024-06-14 14:45:02 +0000 Commit: Mark Johnston CommitDate: 2024-06-14 19:55:02 +0000 vm_phys: Make sure that vm_phys_enq_chunk() stays in bounds vm_phys_enq_chunk() inserts a run of pages into the buddy queues. When lazy initialization is enabled, only the first page of each run is initialized; vm_phys_enq_chunk() thus initializes the page following the just-inserted run. This fails to account for the possibility that the page following the run doesn't belong to the segment. Handle that in vm_phys_enq_chunk(). Reported by: KASAN Reported by: syzbot+1097ef4cee8dfb240e31@syzkaller.appspotmail.com Fixes: b16b4c22d2d1 ("vm_page: Implement lazy page initialization") --- sys/vm/vm_phys.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/vm/vm_phys.c b/sys/vm/vm_phys.c index 53e58283eb9f..59ab7d13c55d 100644 --- a/sys/vm/vm_phys.c +++ b/sys/vm/vm_phys.c @@ -711,12 +711,16 @@ vm_phys_enq_chunk(struct vm_freelist *fl, vm_page_t m, int order, int tail) #ifdef VM_FREEPOOL_LAZYINIT if (__predict_false(m->pool == VM_FREEPOOL_LAZYINIT)) { vm_page_t m_next; + vm_paddr_t pa; int npages; npages = 1 << order; m_next = m + npages; - vm_page_init_page(m_next, m->phys_addr + ptoa(npages), m->segind, - VM_FREEPOOL_LAZYINIT); + pa = m->phys_addr + ptoa(npages); + if (pa < vm_phys_segs[m->segind].end) { + vm_page_init_page(m_next, pa, m->segind, + VM_FREEPOOL_LAZYINIT); + } } #endif } From nobody Fri Jun 14 22:40:08 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W1DkK1bBYz5PdlJ; Fri, 14 Jun 2024 22:40:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W1DkK0pYmz4hNZ; Fri, 14 Jun 2024 22:40:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718404809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TGuonx+cfEnukKpvBIDttjErOh2TfLm+4ckQdW+fNkU=; b=jSCME/P8Aei96U7zBT+UfWOtFRdGp/9VEleQk1llEQbPOTYDPO++hGwRji79ok6W4j66hZ LFkFhjXhsfDgckSnI9Lztlz99FZSog1CTnrJGMMKtoEdrxlKwpvp7jjn1K8BCxJG7+Ci9w alMk+x6J76HZE7NGwaWcg9pdyMQWxQmF71yD6Mdp/EVow4IqVhNJG2Zg7K8HOJif8svbmD GVMpqQUyNEezZlneOlfQq+BIPpmJF6oc+VMv9u7F7QF9I2JDCCt3HJ4btj2BV0fZbzUQCH O8JeqOJwhff1ZEYoMArVkSkKlVsIcBH1MdJhiNi5e4qU0pZO+hcfp0s0J+gQPQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718404809; a=rsa-sha256; cv=none; b=KB6ebginIs0nXhh0y1Jp4SB7jCukqoJVY3Jiv00L6YeOLTbhDRyoRKrdOR4K8mY2VGexBT bNVlEXs2lJFqAzuxVPPFVduP7Urxsj0BvtsoxrR4Zu2ZxQI1uRVSTGZtb5VY5jJyHMd3jL mjiKB7FIjfh0Ja+MBouOvIV/IgL2kM3RgOw+7B4dLXkYiDqjbTPY8MpIZ9FySeVUqMVGnf 4vUSo3Gg73edvo52Qw/6x4Fl0gXnoh/IaDdpsFDXjDzT/K/4JKr1oNdeJMTFhP+T/urSVj qRKcpVL8+Ed/eIEteXY7QWMOVqIgXSWSOg1suaGklDKTjFsNyUooVp2+zxItyQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718404809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TGuonx+cfEnukKpvBIDttjErOh2TfLm+4ckQdW+fNkU=; b=wI+W4tO3zVbsxw/8jSeVoV1r696FZQ00rROsGdqNtuY/umjMNK+aC7myYD9VV/ixRwPCVU e0TARMWRziqGXicKll5RkKgoTmIcMicRoe6/e2mE7sXztZMd790uxeMhwT96WzlRpdWwyz IgvQ2Iepv8gTt6JFwIxng3KbsNpP+uyMJt1gYq7JL21X04OYH3ZXjMbXRNvkbZuCWpA3Nk rLCriDPVyotsku5SH/MZyxtQnW2vhCryMQ2kaWBoFs0NFVrhdusjFUOlsLM8V7BHju9+LN QhHlh7dmiFH56VeasLhBUp0e/MDwO4j6E9d5ogaGg0Drx9Ee0XdUZziFOg0rVA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W1DkK0GmJzfJr; Fri, 14 Jun 2024 22:40:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45EMe8EO013128; Fri, 14 Jun 2024 22:40:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45EMe8UL013118; Fri, 14 Jun 2024 22:40:08 GMT (envelope-from git) Date: Fri, 14 Jun 2024 22:40:08 GMT Message-Id: <202406142240.45EMe8UL013118@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 5198178f3eb6 - main - cdefs.h: Add POSIX.1-2024 values List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5198178f3eb6f9d1eae68adf00ac4aef62b2bb1d Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=5198178f3eb6f9d1eae68adf00ac4aef62b2bb1d commit 5198178f3eb6f9d1eae68adf00ac4aef62b2bb1d Author: Warner Losh AuthorDate: 2024-06-14 21:06:53 +0000 Commit: Warner Losh CommitDate: 2024-06-14 22:38:55 +0000 cdefs.h: Add POSIX.1-2024 values Sponsored by: Netflix --- sys/sys/cdefs.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index c3268791787f..476c89d1dddb 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -639,10 +639,13 @@ * and the omnibus ISO/IEC 9945-1: 1996 * (1003.1 Issue 5, Single Unix Spec v2, Unix 95) * _POSIX_C_SOURCE == 200112 1003.1-2001 (1003.1 Issue 6, Unix 03) + * with _XOPEN_SOURCE=600 * _POSIX_C_SOURCE == 200809 1003.1-2008 (1003.1 Issue 7) * IEEE Std 1003.1-2017 (Rev of 1003.1-2008) is - * 1003.1-2008 with two TCs applied with - * _POSIX_C_SOURCE=200809 and _XOPEN_SOURCE=700 + * 1003.1-2008 with two TCs applied and + * _XOPEN_SOURCE=700 + * _POSIX_C_SOURCE == 202405 1003.1-2004 (1003.1 Issue 8), IEEE Std 1003.1-2024 + * with _XOPEN_SOURCE=800 * * In addition, the X/Open Portability Guide, which is now the Single UNIX * Specification, defines a feature-test macro which indicates the version of From nobody Fri Jun 14 22:40:09 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W1DkL1sxlz5MB7G; Fri, 14 Jun 2024 22:40:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W1DkL0zxPz4h8q; Fri, 14 Jun 2024 22:40:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718404810; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NivKcoWR9P4/gu/Ab5qIH+uWGBSjAHcK/dC87r70BBw=; b=tl+rlY4QHa4+jjZx01hL4bFmRkJrDL7aa5Q60w9RbYyrI/HKk+lySKjTVtCApMMbsiZsC4 MtF9KvRnUDwU5N3MfVxDFZZ4CL4BW3YVvYpjY/R/6tUNtSj5pSeThE8qoieu9/o/CwmIQq rcqy3GTUa1sw2xvbffS43GDP9suk92N+DpQtZKW3oZTttk0wFpuTaqztPXdJxr7xYuGf+A BjgJDhQdoyMT14RTSr4XSelrkGFeGcBVq3bg0SwOqsvpaSZs0GJDKhN7N7+xpDuxuthemu Q22fx72BWZwq8s112XbRuLUPPfmxWB3zrkjTv0bUlTduE27MpvYngBqquDYuiw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718404810; a=rsa-sha256; cv=none; b=m64cy7XZ1WMDgAVRL8PaGVg47Qts+YCHnC71FUF0oj+rdtahVDocDHxby52rVjT8YeoAPR Sp7jaTYDtG1kJ841jDVbqqjmIWOk03RxgaX+DQ8GsxPFIJaTW2yioESD8Ea/3e8N3Y+1g3 XDNxpzy/yewyml0aoSaW5PThPv6IrIm+uz7gmOqRccr3j1uPB+Ex3XyvKe14IFe7s7j24y G4wW3NLOgyygrCDXcy6uW6yO9XcVk6LBsxGF/x8aBdn6ZG/AHRiATnXYObTJbLiUOl++Zj 0dzORkjSZhgUvCZzB5ONc15YyDH6Ql63YPrttAo4Gqyp99ed8EW+G6h5O9Va8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718404810; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NivKcoWR9P4/gu/Ab5qIH+uWGBSjAHcK/dC87r70BBw=; b=saSFAVtzJIb1854iLQ1UQ5TZJ9NDN/CtjeVQ+dbj+MraK43MmUpq2HOYNyHcaRg0Z33V7S 6pjDZD5XcF9mmKP7Ix1EqMqdghqRyFST3mgr992AgwVz2y0RGdMhsawaVzalNnOuTnASse 8YKQ8LS5LD+TP87k7+6Jy7diiLYcJAr3P4Z7uoWhp0z+6/VFbXIhvxmA14OHnGSF0fmWv5 as41sFC/DRC7jjAvrbIyQHMFpaOfRzYV9WithZ+CIW8ZrkGgixe0n8hajjCWKnJJ7BEzVL jBnwxww4gihjuuGz8fSkdltNP21YukBr7Jh7jP6NIQDW+SWvj4ETF/AAlO92SQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W1DkL0c0jzfJs; Fri, 14 Jun 2024 22:40:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45EMe9J0013735; Fri, 14 Jun 2024 22:40:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45EMe9gU013729; Fri, 14 Jun 2024 22:40:09 GMT (envelope-from git) Date: Fri, 14 Jun 2024 22:40:09 GMT Message-Id: <202406142240.45EMe9gU013729@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 1bce7cd885e7 - main - nvme: Add Linux copatible ioctls List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1bce7cd885e7e5b376a60367629a0f76ff7f0167 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=1bce7cd885e7e5b376a60367629a0f76ff7f0167 commit 1bce7cd885e7e5b376a60367629a0f76ff7f0167 Author: Warner Losh AuthorDate: 2024-06-14 22:40:08 +0000 Commit: Warner Losh CommitDate: 2024-06-14 22:40:08 +0000 nvme: Add Linux copatible ioctls Add the NVME_IOCTL_ID, NVME_IOCTL_ADMIN_CMD, and NVME_IOCTL_IO_CMD Linux compatible ioctls. These may be run on either an I/O (ns) dev or a nvme (admin) dev. Linux allows both on either device, and programs use this and aren't careful about having the right device open. Emulate this feature, and implement these ioctls. The data is passed in into the kernel in host byte order (not converted to le). Results are returned in host order. The timeout field is ignore, and the metadata and metadata_len fields must be zero. The addr field can be null, even when the data_len is non zero (FreeBSD's ioctl interface prohibits this, Linux's just ignores the inconsistency). Only the cdw10 is returned from the command: the status is not returned in 'result' field. XXX need to verify that this is what Linux does on an error signaled from the drive. No external include file is yet available for this: most programs that call this interface either use a linux-specific path or have their own private copy of the data. It's unclear the best thing to do. Also, create a /dev/nvmeXnY as an alias for /dev/nvmeXnsY. These changes allow a native build of nvme-cli to work for everything that doesn't depend on sysfs entries in /sys, calls that use metadata, send / receive drive data and sed functionality not in our nvme driver. Sponsored by: Netflix Co-Authored-by: Chuck Tuffli Reviewed by: chuck Differential Revision: https://reviews.freebsd.org/D45415 --- sys/dev/nvme/nvme.h | 6 +++ sys/dev/nvme/nvme_ctrlr.c | 114 +++++++++++++++++++++++++++++++++++++++++++++- sys/dev/nvme/nvme_linux.h | 58 +++++++++++++++++++++++ sys/dev/nvme/nvme_ns.c | 14 +++++- 4 files changed, 190 insertions(+), 2 deletions(-) diff --git a/sys/dev/nvme/nvme.h b/sys/dev/nvme/nvme.h index a389fc443743..1db50d24c259 100644 --- a/sys/dev/nvme/nvme.h +++ b/sys/dev/nvme/nvme.h @@ -1902,6 +1902,7 @@ struct thread; struct nvme_namespace; struct nvme_controller; struct nvme_consumer; +struct nvme_passthru_cmd; typedef void (*nvme_cb_fn_t)(void *, const struct nvme_completion *); @@ -1921,6 +1922,11 @@ int nvme_ctrlr_passthrough_cmd(struct nvme_controller *ctrlr, uint32_t nsid, int is_user_buffer, int is_admin_cmd); +int nvme_ctrlr_linux_passthru_cmd(struct nvme_controller *ctrlr, + struct nvme_passthru_cmd *npc, + uint32_t nsid, bool is_user, + bool is_admin); + /* Admin functions */ void nvme_ctrlr_cmd_set_feature(struct nvme_controller *ctrlr, uint8_t feature, uint32_t cdw11, diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c index 155aedf2f31a..f058a4e33b9f 100644 --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -43,6 +43,7 @@ #include #include "nvme_private.h" +#include "nvme_linux.h" #define B4_CHK_RDY_DELAY_MS 2300 /* work around controller bug */ @@ -1269,7 +1270,7 @@ nvme_ctrlr_passthrough_cmd(struct nvme_controller *ctrlr, ret = EFAULT; goto err; } - req = nvme_allocate_request_vaddr(buf->b_data, pt->len, + req = nvme_allocate_request_vaddr(buf->b_data, pt->len, nvme_pt_done, pt); } else req = nvme_allocate_request_vaddr(pt->buf, pt->len, @@ -1314,6 +1315,103 @@ err: return (ret); } +static void +nvme_npc_done(void *arg, const struct nvme_completion *cpl) +{ + struct nvme_passthru_cmd *npc = arg; + struct mtx *mtx = (void *)(uintptr_t)npc->metadata; + + npc->result = cpl->cdw0; /* cpl in host order by now */ + mtx_lock(mtx); + npc->metadata = 0; + wakeup(npc); + mtx_unlock(mtx); +} + +/* XXX refactor? */ + +int +nvme_ctrlr_linux_passthru_cmd(struct nvme_controller *ctrlr, + struct nvme_passthru_cmd *npc, uint32_t nsid, bool is_user, bool is_admin) +{ + struct nvme_request *req; + struct mtx *mtx; + struct buf *buf = NULL; + int ret = 0; + + /* + * We don't support metadata. + */ + if (npc->metadata != 0 || npc->metadata_len != 0) + return (EIO); + + if (npc->data_len > 0 && npc->addr != 0) { + if (npc->data_len > ctrlr->max_xfer_size) { + nvme_printf(ctrlr, + "npc->data_len (%d) exceeds max_xfer_size (%d)\n", + npc->data_len, ctrlr->max_xfer_size); + return (EIO); + } + /* We only support data out or data in commands, but not both at once. */ + if ((npc->opcode & 0x3) == 0 || (npc->opcode & 0x3) == 3) + return (EINVAL); + if (is_user) { + /* + * Ensure the user buffer is wired for the duration of + * this pass-through command. + */ + PHOLD(curproc); + buf = uma_zalloc(pbuf_zone, M_WAITOK); + buf->b_iocmd = npc->opcode & 1 ? BIO_WRITE : BIO_READ; + if (vmapbuf(buf, (void *)npc->addr, npc->data_len, 1) < 0) { + ret = EFAULT; + goto err; + } + req = nvme_allocate_request_vaddr(buf->b_data, npc->data_len, + nvme_npc_done, npc); + } else + req = nvme_allocate_request_vaddr((void *)npc->addr, npc->data_len, + nvme_npc_done, npc); + } else + req = nvme_allocate_request_null(nvme_npc_done, npc); + + req->cmd.opc = npc->opcode; + req->cmd.fuse = npc->flags; + req->cmd.rsvd2 = htole16(npc->cdw2); + req->cmd.rsvd3 = htole16(npc->cdw3); + req->cmd.cdw10 = htole32(npc->cdw10); + req->cmd.cdw11 = htole32(npc->cdw11); + req->cmd.cdw12 = htole32(npc->cdw12); + req->cmd.cdw13 = htole32(npc->cdw13); + req->cmd.cdw14 = htole32(npc->cdw14); + req->cmd.cdw15 = htole32(npc->cdw15); + + req->cmd.nsid = htole32(nsid); + + mtx = mtx_pool_find(mtxpool_sleep, npc); + npc->metadata = (uintptr_t) mtx; + + /* XXX no timeout passed down */ + if (is_admin) + nvme_ctrlr_submit_admin_request(ctrlr, req); + else + nvme_ctrlr_submit_io_request(ctrlr, req); + + mtx_lock(mtx); + while (npc->metadata != 0) + mtx_sleep(npc, mtx, PRIBIO, "nvme_npc", 0); + mtx_unlock(mtx); + + if (buf != NULL) { + vunmapbuf(buf); +err: + uma_zfree(pbuf_zone, buf); + PRELE(curproc); + } + + return (ret); +} + static int nvme_ctrlr_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int flag, struct thread *td) @@ -1324,6 +1422,7 @@ nvme_ctrlr_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int flag, ctrlr = cdev->si_drv1; switch (cmd) { + case NVME_IOCTL_RESET: /* Linux compat */ case NVME_RESET_CONTROLLER: nvme_ctrlr_reset(ctrlr); break; @@ -1342,6 +1441,19 @@ nvme_ctrlr_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int flag, case NVME_GET_MAX_XFER_SIZE: *(uint64_t *)arg = ctrlr->max_xfer_size; break; + /* Linux Compatible (see nvme_linux.h) */ + case NVME_IOCTL_ID: + td->td_retval[0] = 0xfffffffful; + return (0); + + case NVME_IOCTL_ADMIN_CMD: + case NVME_IOCTL_IO_CMD: { + struct nvme_passthru_cmd *npc = (struct nvme_passthru_cmd *)arg; + + return (nvme_ctrlr_linux_passthru_cmd(ctrlr, npc, npc->nsid, true, + cmd == NVME_IOCTL_ADMIN_CMD)); + } + default: return (ENOTTY); } diff --git a/sys/dev/nvme/nvme_linux.h b/sys/dev/nvme/nvme_linux.h new file mode 100644 index 000000000000..aaa68e1d34f8 --- /dev/null +++ b/sys/dev/nvme/nvme_linux.h @@ -0,0 +1,58 @@ +/*- + * Copyright (c) 2024, Netflix Inc. + * Written by Warner Losh + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +/* + * Linux compatible NVME ioctls. So far we just support ID, ADMIN_CMD and + * IO_CMD. The rest are not supported. + */ + + +#include +#include + +struct nvme_passthru_cmd { + __uint8_t opcode; + __uint8_t flags; + __uint16_t rsvd1; + __uint32_t nsid; + __uint32_t cdw2; + __uint32_t cdw3; + __uint64_t metadata; + __uint64_t addr; + __uint32_t metadata_len; + __uint32_t data_len; + __uint32_t cdw10; + __uint32_t cdw11; + __uint32_t cdw12; + __uint32_t cdw13; + __uint32_t cdw14; + __uint32_t cdw15; + __uint32_t timeout_ms; + __uint32_t result; +}; + +#define nvme_admin_cmd nvme_passthru_cmd + +/* + * Linux nvme ioctls, commented out ones are not supported + */ +#define NVME_IOCTL_ID _IO('N', 0x40) +#define NVME_IOCTL_ADMIN_CMD _IOWR('N', 0x41, struct nvme_admin_cmd) +/* #define NVME_IOCTL_SUBMIT_IO _IOW('N', 0x42, struct nvme_user_io) */ +#define NVME_IOCTL_IO_CMD _IOWR('N', 0x43, struct nvme_passthru_cmd) +#define NVME_IOCTL_RESET _IO('N', 0x44) +/* #define NVME_IOCTL_SUBSYS_RESET _IO('N', 0x45) */ +/* #define NVME_IOCTL_RESCAN _IO('N', 0x46) */ +/* #define NVME_IOCTL_ADMIN64_CMD _IOWR('N', 0x47, struct nvme_passthru_cmd64) */ +/* #define NVME_IOCTL_IO64_CMD _IOWR('N', 0x48, struct nvme_passthru_cmd64) */ +/* #define NVME_IOCTL_IO64_CMD_VEC _IOWR('N', 0x49, struct nvme_passthru_cmd64) */ + +/* io_uring async commands: */ +/* #define NVME_URING_CMD_IO _IOWR('N', 0x80, struct nvme_uring_cmd) */ +/* #define NVME_URING_CMD_IO_VEC _IOWR('N', 0x81, struct nvme_uring_cmd) */ +/* #define NVME_URING_CMD_ADMIN _IOWR('N', 0x82, struct nvme_uring_cmd) */ +/* #define NVME_URING_CMD_ADMIN_VEC _IOWR('N', 0x83, struct nvme_uring_cmd) */ diff --git a/sys/dev/nvme/nvme_ns.c b/sys/dev/nvme/nvme_ns.c index 4c65e2c49e64..3f29382fe42f 100644 --- a/sys/dev/nvme/nvme_ns.c +++ b/sys/dev/nvme/nvme_ns.c @@ -43,6 +43,7 @@ #include #include "nvme_private.h" +#include "nvme_linux.h" static void nvme_bio_child_inbed(struct bio *parent, int bio_error); static void nvme_bio_child_done(void *arg, @@ -93,6 +94,18 @@ nvme_ns_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int flag, case DIOCGSECTORSIZE: *(u_int *)arg = nvme_ns_get_sector_size(ns); break; + /* Linux Compatible (see nvme_linux.h) */ + case NVME_IOCTL_ID: + td->td_retval[0] = ns->id; + return (0); + + case NVME_IOCTL_ADMIN_CMD: + case NVME_IOCTL_IO_CMD: { + struct nvme_passthru_cmd *npc = (struct nvme_passthru_cmd *)arg; + + return (nvme_ctrlr_linux_passthru_cmd(ctrlr, npc, ns->id, true, + cmd == NVME_IOCTL_ADMIN_CMD)); + } default: return (ENOTTY); } @@ -610,7 +623,6 @@ nvme_ns_construct(struct nvme_namespace *ns, uint32_t id, return (ENXIO); ns->cdev->si_drv2 = make_dev_alias(ns->cdev, "%sns%d", device_get_nameunit(ctrlr->dev), ns->id); - ns->cdev->si_flags |= SI_UNMAPPED; return (0); From nobody Fri Jun 14 22:40:11 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W1DkM3yVhz5PdyZ; Fri, 14 Jun 2024 22:40:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W1DkM1fwKz4hCJ; Fri, 14 Jun 2024 22:40:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718404811; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lhLsBcpaAKyxCg5lTMx/u0i0N9Sj9AKntjW2ymMD5vU=; b=IRnfuSyYjZWaIXV7oT1I7efuMUZdWWdw4BtDZdx2WXERSPBw1X9PO6wFxw73oAtvWz+PFG pXanT3v6BHJ0UOdOLWFVZQlTRBtW6ILV3cIdFQVIf34P3K1r+Js80BA8Q1DBsX6zjk2vkV wokYW4uPFCaNwAyWYfiZq7x2OaeP3gTjSzL8xPo7OXNUMeER/Uj6yLxaQGkLEl/eZJ5CYi RTU1PKCKx+V/6fspFRs9IhjS55dOHST/fvxfQnXY2WRNzz/bGQoDhNrC7JrU/KnazVtENF OUDkz3LvOdqsvNCpckJuwhJ0uEF/IZRNL2Up+qVlCpzifgkMCah7R30/Uh1Mag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718404811; a=rsa-sha256; cv=none; b=b+bsAJx1FrZ+7xYoS5SpkhzvFwaGc/tgXZs3RMxsFsXxEJq/xyExduzOUHibHvBzx9Vq3M jkTucuYpYNbrL/J4WI/VrWVLvMchPVX75hJfscTPB36deKi7as2D29kb5G3ZNpoR3Tw5Nd E1evYkmPx4w8lpqUwv3HRos2BUIiX3ibZY/1BMscma7g4W9NPqanIpQBJS0q57u+cPGNN2 8M/r8R5mMSUduRc9BRSUQIAYE4GeIpp+NfqaElA6V56DSL+yQfSrO6LGsND6vnSaMUrSNu PWBGi+dkedyriKB8bniALVVRBWy0IpyneSJ73aei5R+Ct4pU9Kykxos40I7h/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718404811; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lhLsBcpaAKyxCg5lTMx/u0i0N9Sj9AKntjW2ymMD5vU=; b=u3st3lnFmhcxoYoO1KVXswaWENBAazND6+8USD927FqTIquSdYHCcXmLcrvAT213cvCng0 V0svilj4H2D4P6sy2bSGFkQbsnl0FbDnDIJRJwR9UhfDPgzv0P917IOlfI2MmIhDOJVzoR 0BSOHFbeRsRjtbbkSDVDIb0KQG7Dy4myZPan5Fv3Q+EYFL9tPCkoaITY+cft0wQzZ0Y8hP afOJ1me9UqXjqUE1cFlLuheL1lwK2hmQJngKLwiWaU92ZqAE1FFeDs/WoPdfZpduvl4/Pb lzI+icAZOosbVJaTymOYL3IqpUnFZSf4gq7od6R5uc0XycxdN6dnqFDvg+NT6g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W1DkM1FNhzfT7; Fri, 14 Jun 2024 22:40:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45EMeBcT014412; Fri, 14 Jun 2024 22:40:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45EMeBKe014403; Fri, 14 Jun 2024 22:40:11 GMT (envelope-from git) Date: Fri, 14 Jun 2024 22:40:11 GMT Message-Id: <202406142240.45EMeBKe014403@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: ad9cc86bf60c - main - linux: Translate Linux NVME ioctls to the lower layers. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ad9cc86bf60cee2b35e804b348840a096f66561d Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=ad9cc86bf60cee2b35e804b348840a096f66561d commit ad9cc86bf60cee2b35e804b348840a096f66561d Author: Chuck Tuffli AuthorDate: 2024-06-14 22:40:20 +0000 Commit: Warner Losh CommitDate: 2024-06-14 22:40:20 +0000 linux: Translate Linux NVME ioctls to the lower layers. The lower layers implement a ABI compatible Linux ioctl for a few of the Linux IOCTLs. Translate them and pass them down. Since they are ABI compatible, just use the nvme ioctl name. Co-Authored-by: Warner Losh Reviewed by: chuck Differential Revision: https://reviews.freebsd.org/D45416 --- sys/compat/linux/linux_ioctl.c | 35 +++++++++++++++++++++++++++++++++++ sys/compat/linux/linux_ioctl.h | 14 ++++++++++++++ 2 files changed, 49 insertions(+) diff --git a/sys/compat/linux/linux_ioctl.c b/sys/compat/linux/linux_ioctl.c index 41c43f1ef8e6..aa2c9ce7f273 100644 --- a/sys/compat/linux/linux_ioctl.c +++ b/sys/compat/linux/linux_ioctl.c @@ -83,6 +83,8 @@ #include +#include + #define DEFINE_LINUX_IOCTL_SET(shortname, SHORTNAME) \ static linux_ioctl_function_t linux_ioctl_ ## shortname; \ static struct linux_ioctl_handler shortname ## _handler = { \ @@ -108,6 +110,9 @@ DEFINE_LINUX_IOCTL_SET(v4l2, VIDEO2); DEFINE_LINUX_IOCTL_SET(fbsd_usb, FBSD_LUSB); DEFINE_LINUX_IOCTL_SET(evdev, EVDEV); DEFINE_LINUX_IOCTL_SET(kcov, KCOV); +#ifndef COMPAT_LINUX32 +DEFINE_LINUX_IOCTL_SET(nvme, NVME); +#endif #undef DEFINE_LINUX_IOCTL_SET @@ -3531,6 +3536,36 @@ linux_ioctl_kcov(struct thread *td, struct linux_ioctl_args *args) return (error); } +#ifndef COMPAT_LINUX32 +static int +linux_ioctl_nvme(struct thread *td, struct linux_ioctl_args *args) +{ + + /* + * The NVMe drivers for namespace and controller implement these + * commands using their native format. All the others are not + * implemented yet. + */ + switch (args->cmd & 0xffff) { + case LINUX_NVME_IOCTL_ID: + args->cmd = NVME_IOCTL_ID; + break; + case LINUX_NVME_IOCTL_RESET: + args->cmd = NVME_IOCTL_RESET; + break; + case LINUX_NVME_IOCTL_ADMIN_CMD: + args->cmd = NVME_IOCTL_ADMIN_CMD; + break; + case LINUX_NVME_IOCTL_IO_CMD: + args->cmd = NVME_IOCTL_IO_CMD; + break; + default: + return (ENODEV); + } + return (sys_ioctl(td, (struct ioctl_args *)args)); +} +#endif + /* * main ioctl syscall function */ diff --git a/sys/compat/linux/linux_ioctl.h b/sys/compat/linux/linux_ioctl.h index 8a56e35d10c6..4ef6d4f40830 100644 --- a/sys/compat/linux/linux_ioctl.h +++ b/sys/compat/linux/linux_ioctl.h @@ -781,6 +781,20 @@ #define LINUX_KCOV_DISABLE 0x6365 #define LINUX_KCOV_REMOTE_ENABLE 0x6366 +/* + * NVMe IOCTLs defined by Linux + */ +#define LINUX_NVME_IOCTL_ID 0x4e40 +#define LINUX_NVME_IOCTL_ADMIN_CMD 0x4e41 +#define LINUX_NVME_IOCTL_SUBMIT_IO 0x4e42 +#define LINUX_NVME_IOCTL_IO_CMD 0x4e43 +#define LINUX_NVME_IOCTL_RESET 0x4e44 +#define LINUX_NVME_IOCTL_SUBSYS_RESET 0x4e45 +#define LINUX_NVME_IOCTL_RESCAN 0x4e46 + +#define LINUX_IOCTL_NVME_MIN LINUX_NVME_IOCTL_ID +#define LINUX_IOCTL_NVME_MAX LINUX_NVME_IOCTL_RESCAN + /* * Pluggable ioctl handlers */ From nobody Sat Jun 15 06:36:23 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W1RHr0L7zz5NRfJ; Sat, 15 Jun 2024 06:36:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W1RHq6kX6z4V4C; Sat, 15 Jun 2024 06:36:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718433383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G0JnlERiXUSrAIQp9qJACAePPwniRUyOt2RTbzj4TOA=; b=WYma5Ag9na8C2DJEJOEeOftvfvhiyJ4phxRdQ23G3xrEfW7cSyjfB5PvMlUU9qhiE+HHVs v+N6Jg0j8ZtEgiQLPmwjZGQvyhml5CjoJhEyPDVDpKwm2xmhGE/2OtHmx9OW6RFzpr+qKQ 8qHCXxIbEA4XjDgZPlVN5CU5SAamDL4bBy0NpFI4txVdTz2QgC40w2tcbHdeX5FK2zVrE2 VQKX6IoIyN3PhpPALM34DM8jvC5qdRX1BsVxmp7uwB7SIKSI+6HRgn+O1X30eUgyF26Ris jV7hlEdCzvXvjcXB5lzkcYVuU79CaKoZz5df1JY7d3mw5sHYjLDBfygFcNSe9g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718433383; a=rsa-sha256; cv=none; b=ktt/kz/vbg96cW6RwKjlFeziH4CpAXcdvv5uMfib6vI5cAAywbRfOAApnKL0VZ4tOZDbEL G5oVZPO0O8rE9ier5VB9kwg29uirkXqmnMK5EY92UCnuVowMQvloDjoO4LZzQbxbCl/rUF t7qmfCsSS99zISZX9hoXc1ZS5UbyzV+sH9TXF92pZEdNRE36Y00keUSDFuzISAnMost5cO s9IE2HHZjA9tpBX1P/LAXBrDgLjChJkvZ/8KVMkQAlFKHuEat+j87ywWWlRUBmgv5m5gV8 R5eGLuzs10r+DV14GUDWqYMDRw+ACmE1Qk/24/Loawg+aIgSpyI44mQ6ptTsKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718433383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G0JnlERiXUSrAIQp9qJACAePPwniRUyOt2RTbzj4TOA=; b=N36z+bXiBPHOmeG/d9bYFJpx5CznIJa9gfmAZ3nqRhCPr98MqicHivU3HkNk9+plv6Igee 0yymSZg1GD0BruuPRIxExcHbJaRroBqCqouKo2xtTs85WE/Erz1RwQkk5GEORHoTWR6THY 5pbCgZdiDWOa4ja98UedGLtOtNmHZvNRvvSNsSEgjw+2RYKsQuKW8YJZ9rlIIOM5mbDjn6 O3hbS9yaZ3WtnuHct+aY9LLXPQ6sqrdvrT5PTqdqKej2pjjk/+ERN5BJP0p0R4L0fgPPzL cXMP/XSOKdF7ErjNjIB7jHVEgMu+marb/2+kCco4Nq6AHPscvw0gCdzOUS/t8A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W1RHq66sqztXd; Sat, 15 Jun 2024 06:36:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45F6aNv5021281; Sat, 15 Jun 2024 06:36:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45F6aNhp021278; Sat, 15 Jun 2024 06:36:23 GMT (envelope-from git) Date: Sat, 15 Jun 2024 06:36:23 GMT Message-Id: <202406150636.45F6aNhp021278@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: d26c565597b8 - main - stress2: Revert change accidentally added in ff4a72c159e0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d26c565597b88eb5c6000dbba9e348debe7095e3 Auto-Submitted: auto-generated The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=d26c565597b88eb5c6000dbba9e348debe7095e3 commit d26c565597b88eb5c6000dbba9e348debe7095e3 Author: Peter Holm AuthorDate: 2024-06-15 06:33:14 +0000 Commit: Peter Holm CommitDate: 2024-06-15 06:33:14 +0000 stress2: Revert change accidentally added in ff4a72c159e0 --- tools/test/stress2/misc/umountf2.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/test/stress2/misc/umountf2.sh b/tools/test/stress2/misc/umountf2.sh index cd5b53616f97..5018a804c403 100755 --- a/tools/test/stress2/misc/umountf2.sh +++ b/tools/test/stress2/misc/umountf2.sh @@ -886,12 +886,11 @@ test(void) { unsigned long offset; unsigned long size = maxoplen; - unsigned long rv; + unsigned long rv = random(); unsigned long op = rv % (3 + !lite + mapped_writes); /* turn off the map read if necessary */ - arc4random_buf(&rv, sizeof(rv)); if (op == 2 && !mapped_reads) op = 0; From nobody Sat Jun 15 12:40:31 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W1bN60Bxpz5NksD; Sat, 15 Jun 2024 12:40:38 +0000 (UTC) (envelope-from peterj@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W1bN56qglz46wr; Sat, 15 Jun 2024 12:40:37 +0000 (UTC) (envelope-from peterj@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718455238; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=odVyxW0oqlb0tJZ7YROIqf6OngVIKLM9hE68bhaRWjw=; b=GmFoN4pbg9LT3zNbMw0zQVlGnGG2P6CtkB0+vwHVTvt220aUMKFVKkMZb1SY0x3j8dutoc +OL83zyLQ4VdnDQ5v5o7Uh07vWlXzXaFvS4V1YSFFPATucAvA7Rz/W/4alHaC9X19saByB S/6A7DJmygqjfk7okWy4Mj+haZygAvZXuQRXGKqFaRdnxAqLk8A6YpldKUnk5OXY9GUHxQ GyBjAmNjz+dwYFW39TJPCIQjALNKDSMNUgm+rco/NJr3VaFr2v38yBunFoL/l0/otrJyGZ QnkM3jMuqiykbdczI4pVa0riksovNVKGSl43ce2Ul1GTt+hYgsD1jPWFT0qYZA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718455238; a=rsa-sha256; cv=none; b=FhHScvn03Qf77Gw0kXogWCJwxEN4nuWzmfxYv8epXifUXPJTmQZg0V8MpQAgjGY0D9L3xG s2/pDPBooouR/Y8ticR/KO2+QhY5uUPdKLmrKmtsCdGUbp7FNwnZaaV1NBoCY87vh9DNUY OfWGp9FT0S53w7M+w5KupaOgBtHUtjtTs0BUSOHmDl+CaqkRzbZvwUwt9TLWHR5xx7JNPT t8UQzVpwtfGBEH15gWUNczM2wukS8IAk3VKn1UxvKBNk0LdnapQtwsW0w9l5iBWXaNpW+a ++j0tG1tLgVolRp7YUyzYyDtBy8zsc+N5NQV84qiFXLq/gDxfsj9Ev0FVjjh/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718455238; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=odVyxW0oqlb0tJZ7YROIqf6OngVIKLM9hE68bhaRWjw=; b=NZ993xF0njNmqHjNpRqLogawYzRjme1DGyMNhm5uRjmMgqKAigGwQZ94gPiU7fwMhwxbLv 9epaHZvhPOIxkMGWAra6xv1R+TpVxR0+IDPGaMZUP5PvTOrG8eaMbzLe+dqvZ8EgvYMNMO AGszVIpb2BXpCtjedL8Hzo8iP0buKC5zsPDOVqU+jcI06N5mtebFcGFIQhfFe89JMpr1oy y0ECIyVyA9S75sSpEorMfV7hHmtGe2f3nZ7OMCSwmniK1QEwWhyG4qKy+FJronu2mspsJu jZ4SRdS3kD3jgVCOvDPOUGoCTHt+P7XruRP737v1p+tGfD+L3ssxbJRmazAwWg== Received: from server.rulingia.com (ppp239-208.static.internode.on.net [59.167.239.208]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA512) (Client did not present a certificate) (Authenticated sender: peterj) by smtp.freebsd.org (Postfix) with ESMTPSA id 4W1bN43PbXzPNY; Sat, 15 Jun 2024 12:40:36 +0000 (UTC) (envelope-from peterj@freebsd.org) Date: Sat, 15 Jun 2024 22:40:31 +1000 From: Peter Jeremy To: Mark Johnston Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: bf454ca88bdf - main - wg: Add netmap support Message-ID: References: <202404201605.43KG564E080220@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="VKAYPSKkzu5Qsqrn" Content-Disposition: inline In-Reply-To: <202404201605.43KG564E080220@gitrepo.freebsd.org> X-PGP-Key: http://www.rulingia.com/keys/peter.pgp --VKAYPSKkzu5Qsqrn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2024-Apr-20 16:05:06 +0000, Mark Johnston wrote: >URL: https://cgit.FreeBSD.org/src/commit/?id=3Dbf454ca88bdf4acfa873386e876= ff5e772e6a830 > > wg: Add netmap support =2E.. >--- a/sys/dev/wg/if_wg.c >+++ b/sys/dev/wg/if_wg.c =2E.. >@@ -2206,6 +2341,11 @@ wg_output(if_t ifp, struct mbuf *m, const struct so= ckaddr *dst, struct route *ro > return (EAFNOSUPPORT); > } >=20 >+#ifdef DEV_NETMAP >+ if ((if_getcapenable(ifp) & IFCAP_NETMAP) !=3D 0) >+ return (wg_xmit_netmap(ifp, m, af)); >+#endif >+ > defragged =3D m_defrag(m, M_NOWAIT); > if (defragged) > m =3D defragged; >@@ -2781,7 +2921,10 @@ wg_clone_create(struct if_clone *ifc, char *name, s= ize_t len, > if_setinitfn(ifp, wg_init); > if_setreassignfn(ifp, wg_reassign); > if_setqflushfn(ifp, wg_qflush); >+#ifdef DEV_NETMAP > if_settransmitfn(ifp, wg_transmit); >+ if_setinputfn(ifp, wg_if_input); >+#endif > if_setoutputfn(ifp, wg_output); > if_setioctlfn(ifp, wg_ioctl); > if_attach(ifp); sys/net/if.c:if_attach_internal() (called from if_attach()) requires that both transmit and qflush must either be NULL or set but if DEV_NETMAP is undefined, this code only sets qflush, guaranteeing a panic() as soon as a wg is attached. Unfortunately, I don't understand the code well enough to offer a fix. --=20 Peter Jeremy --VKAYPSKkzu5Qsqrn Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEE7rKYbDBnHnTmXCJ+FqWXoOSiCzQFAmZti7FfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEVF QjI5ODZDMzA2NzFFNzRFNjVDMjI3RTE2QTU5N0EwRTRBMjBCMzQACgkQFqWXoOSi CzSEiA//TFPoTUzp7D01ospWUU3p+6hGfx+PPdQK93abCk483I2yfc8EGONTpDs2 P7KLi0Vd7tlL/EHKKEUThaVwTSXlLPKpgwek1EMyzTILWm+ho6iJhCvJ2gIdP+Ax sFwCz8NivbHSmL74I9CI1Cm8Q6BThDMkdG8FFb1XsSx5oPnRvq7uJEdi/3PfI0SS s0DKbHWg6Fsn62m24qYD6J+wuvMXZ5J4PtVSqo2yE7NhPbGcbc826E9YqgBPb/bL il6LiLx0gVIttQk1J7ct3slH+1kIHazTiXHA0Le00Dtn/3xWAfyHOqYWdPXnpmL3 NmYWIPLqpUJizBAWLDqWMevGGruAdGIIUVDH0SuASY6VXV+i2O77TM0hipvmRYv8 AEZxmORYnZdsi1smzsmqfweZkWh0OK0G5qElkj606nHAIsFLlIA0arNFlfAxz0wm 4MuivBfMcVECzzUjDHK/eqdMP/2hM2EtOFt8ezL0r7VkeAYaGRpn55e+n4nPoQ2G EndWPLi2yha0SUH5fsGChULY2ljHS3t+eZ2V5ILtWC/R1aDOSNBaT4IN7blTdbDS cCyLlEpkElmJKNa/jqSowE/s8NR4lX5wQ7VLj+/m2sHzLwaTU8Qcj1uTokHa8oXj +Dw9upt9j7jP6ztQjHGoACn3gZJrqmHShSoApMNHYa8akvDakbA= =q27h -----END PGP SIGNATURE----- --VKAYPSKkzu5Qsqrn-- From nobody Sat Jun 15 13:03:34 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W1btb0n2Gz5NmWj; Sat, 15 Jun 2024 13:03:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W1btb0DJRz4BN9; Sat, 15 Jun 2024 13:03:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718456615; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j0MBCcQk1TWb7tR0K7i+RWKm1ocXqHqDrAGbnjtmOBk=; b=euhJjmDqA/Gsq1zgvdfSngurz+zZSjMhmxR9xC9rHh8oH0M6jwGSf8VazAE6yjOmNSxrdu OQa6AnW1PSXgAkIdzYb5I57QpYiJjQpJaLXJlkBf4qzGIMDGsUzHJaSc8sfK72zWPDINyN q/sI76j4ZFJOrp8EqrEdKEXimvcyeQWTLRroERw8424x3ZzAGvBIoLgQi4Q8ZZ+5A53cfo ExZ0r6YVtuR344haIYSRm2GVJMM0y/A66Fhb5d5lHEL9TznqSkPPVTl3ZT+IgjI/IOvlMv Zz0X5hjtDBV5FRiyqCGREq8OQlsx6wfzsOXZQRlkpbCktfOMznsy1Ih4i+j4LQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718456615; a=rsa-sha256; cv=none; b=MxPW8xBTCR6Ew2GV6m2I2MV1lw0ngMqAxyQyJtoRLER5Ik/xq4rxYx5scZl3bOSS5OcR6m 2mfbmM50ZNDR1LePoV6HDr+phtkMrDAYaR76rPUmgUgkt2f3ar+B5T0bn85Ds1PLFjKWVF agv0N4G49ID9SDges1VluoJiEOy665CndaT07gYeQPDHaj1KKwKbB5eTlfouwcF+aCwZzV Xyf1+HuF3OWv/q1WD11Buwlb61pw0u14zIg7vF/v1et5iwhQVJmEdVedXyiE4BTPE8jKTT 96N3ZQ7dYUjs7qsSMjdybPchTQ973gyymMvAdNOJrZ9Pfze45cwpuEEHbu5DYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718456615; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j0MBCcQk1TWb7tR0K7i+RWKm1ocXqHqDrAGbnjtmOBk=; b=w5LzM2I3+EV2Z5Aswd4lmqf1Sgs/ZlREXT6DED67aKb5lY0M7a7MA+KT0IAwYxuqdwOXFT +G29/rUvQxKDhChPZB/sEnUWJIuD9zA/RTSiuJCRVgkSzbIW7PMz3bWULrleAUjFx/azpJ z73MYIeJH9vVBwknCM4Dmx0V2RlM+4NmbXRgDbAS0tVsq2JMox7KXf4h6Zwaju1EDXnQkC KLKIwdV7tMiB71M1Iz77y0MFbEfX60SeHg9YAruzSmHViBkRJe50Z2IoakkRNoIZT5l/0/ q5i4Jqo86bgku3HvkXX8drv7np9XPi5bjpkIPnIz2AN6kjA0lWInR5vRes9alQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W1btZ6vFWz14v1; Sat, 15 Jun 2024 13:03:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45FD3YZN083691; Sat, 15 Jun 2024 13:03:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45FD3YBZ083688; Sat, 15 Jun 2024 13:03:34 GMT (envelope-from git) Date: Sat, 15 Jun 2024 13:03:34 GMT Message-Id: <202406151303.45FD3YBZ083688@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 35e983028356 - stable/14 - md: round-trip the MUSTDEALLOC and RESERVE options List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 35e9830283561820a1fcb21b46b6f01e87700dec Auto-Submitted: auto-generated The branch stable/14 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=35e9830283561820a1fcb21b46b6f01e87700dec commit 35e9830283561820a1fcb21b46b6f01e87700dec Author: Alan Somers AuthorDate: 2024-06-01 18:00:03 +0000 Commit: Alan Somers CommitDate: 2024-06-15 13:03:23 +0000 md: round-trip the MUSTDEALLOC and RESERVE options If those options are requested when the device is created, ensure that they will be reported by MDIOCQUERY. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1270 (cherry picked from commit 9d449caddd4f442ba4ebfd2edafa1aef4fcba4c8) --- sys/dev/md/md.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c index a6f015962a24..1d531b88193f 100644 --- a/sys/dev/md/md.c +++ b/sys/dev/md/md.c @@ -1351,7 +1351,7 @@ mdcreate_malloc(struct md_s *sc, struct md_req *mdr) sc->fwsectors = mdr->md_fwsectors; if (mdr->md_fwheads != 0) sc->fwheads = mdr->md_fwheads; - sc->flags = mdr->md_options & (MD_COMPRESS | MD_FORCE); + sc->flags = mdr->md_options & (MD_COMPRESS | MD_FORCE | MD_RESERVE); sc->indir = dimension(sc->mediasize / sc->sectorsize); sc->uma = uma_zcreate(sc->name, sc->sectorsize, NULL, NULL, NULL, NULL, 0x1ff, 0); @@ -1476,7 +1476,7 @@ mdcreate_vnode(struct md_s *sc, struct md_req *mdr, struct thread *td) snprintf(sc->ident, sizeof(sc->ident), "MD-DEV%ju-INO%ju", (uintmax_t)vattr.va_fsid, (uintmax_t)vattr.va_fileid); sc->flags = mdr->md_options & (MD_ASYNC | MD_CACHE | MD_FORCE | - MD_VERIFY); + MD_VERIFY | MD_MUSTDEALLOC); if (!(flags & FWRITE)) sc->flags |= MD_READONLY; sc->vnode = nd.ni_vp; From nobody Sat Jun 15 14:24:53 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W1dhQ0B7Kz5NtMF; Sat, 15 Jun 2024 14:24:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W1dhP6kvqz4K2y; Sat, 15 Jun 2024 14:24:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718461493; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z/8TxbtssQf5tZkQ2KSUzxaYQO0A3Ykr5xmPKshGBgM=; b=wOtk1MeMAfF8pr8II0h67OsLPuv08tS6S/48XxtIvtng+VIdY1Zq7gAj8ffiXDNs3USaW2 Ij68WClZUn9QBRXX9ozr+lcfe/q4f6I6gp/rhBbbgDrDuB2SI3RkN5XlVJjzZHNcFaT9CJ 2DkhvXE2ci6EMCijv5ptlRYX6TqQGoQArCBLCK/NdJk5m+eLKHdfibHSmrTgCWqY5MxVad quNzf74R7tob192tL/VrPK25UlsK4wz+p+iPAwiPmgn1lCftsS1eyciTnEHCLDtY48PUFD Yzr9Yr+NdslF/R52Waq8ZUxc0aYfWO9dNUOjYjcBPNdPXtg6PthKflcfAWkBkQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718461493; a=rsa-sha256; cv=none; b=LWHhIFsSiEBDcy0TZfo3CnBVdLnHzAy60tDFBV2KVmis5RviRehlQ9QByV/SzN26s1KKI1 hO8vwV0IZvHKVnTvxOMLjzYWDIoqzTnMQsamLFZR6dsWVKnlx5rmujkJIXfJoKCCSqoaud cE7PPFTuEDcBI00SS78wJUMzfO1ZROI+HAZIF3d75SDVPDmZGUYOtdfISS3KHebGwkquE0 b2EzrMZDHvYaWqz8zQcpR9ZDn1ziUNgGOwfLd4DWSWmUN65OW/ixbp8k1zohDg1nL/vvTQ 6wdw0PGkDKeu9uYf0LRdnD9PijLkjX7+0rNNvjCxj5nE1YhA+HFJcU3WaTOXBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718461493; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z/8TxbtssQf5tZkQ2KSUzxaYQO0A3Ykr5xmPKshGBgM=; b=RfMDIK1ZqHxhcruED/XwRoV+DK35K8mZ7SzkfZoPL120r48YYaKoHWTK4cmjlNdDef+FpZ ljBt3SF7juP5w66C+ms8SENSBh9PEMQ9yhmZD8QFQ5T/CFy+rlmZfLqpUY4BBAXseig/XW hKk5CsdG/4J1Z7/e1qTQx9O26s3UP6kNocIwQ1C76zpkwxLZU8olohrBNMGJArAAF6Pb3Y p2k0MAmFrBI5kpCpOGJmToMbJ+X6r8PRLFG+ttmJ13RgPUP/TUdRkeJiKql48x85vxXWr1 YLjrUHPpCx12QRVJoR+ONbCGTaGBrtmF5OzdZWqRNFOA5eYz9ytKSG/fvRVZSQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W1dhP6FKLz17Pp; Sat, 15 Jun 2024 14:24:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45FEOrLM018294; Sat, 15 Jun 2024 14:24:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45FEOrCw018291; Sat, 15 Jun 2024 14:24:53 GMT (envelope-from git) Date: Sat, 15 Jun 2024 14:24:53 GMT Message-Id: <202406151424.45FEOrCw018291@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wei Hu Subject: git: d0cb4674df97 - main - Hyper-V: move memory alloc call for tlb hypercall out of smp_rendezvous List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: whu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d0cb4674df97aa638d5d17861c364b1625f79401 Auto-Submitted: auto-generated The branch main has been updated by whu: URL: https://cgit.FreeBSD.org/src/commit/?id=d0cb4674df97aa638d5d17861c364b1625f79401 commit d0cb4674df97aa638d5d17861c364b1625f79401 Author: Wei Hu AuthorDate: 2024-06-15 14:07:58 +0000 Commit: Wei Hu CommitDate: 2024-06-15 14:07:58 +0000 Hyper-V: move memory alloc call for tlb hypercall out of smp_rendezvous The allocation call could result in sleep lock violation if it is in smp_rendezvous. Move it out. Also move the pcpu memory pointer to vmbus_pcpu_data since it is only used on Hyper-V. PR: 279738 Reported by: gbe Fixes: 2b887687edc25bb4553f0d8a1183f454a85d413d MFC after: 2 weeks Sponsored by: Microsoft --- sys/dev/hyperv/vmbus/hyperv_mmu.c | 6 +-- sys/dev/hyperv/vmbus/vmbus.c | 88 +++++++++++++++++++++++++++++---------- sys/dev/hyperv/vmbus/vmbus_var.h | 5 ++- 3 files changed, 71 insertions(+), 28 deletions(-) diff --git a/sys/dev/hyperv/vmbus/hyperv_mmu.c b/sys/dev/hyperv/vmbus/hyperv_mmu.c index 13b1f52fa1f6..7c29fe294093 100644 --- a/sys/dev/hyperv/vmbus/hyperv_mmu.c +++ b/sys/dev/hyperv/vmbus/hyperv_mmu.c @@ -144,7 +144,7 @@ hv_vm_tlb_flush(pmap_t pmap, vm_offset_t addr1, vm_offset_t addr2, return smp_targeted_tlb_shootdown_native(pmap, addr1, addr2, curcpu_cb, op); - flush = *DPCPU_PTR(hv_pcpu_mem); + flush = *VMBUS_PCPU_PTR(sc, cpu_mem, curcpu); if (flush == NULL) return smp_targeted_tlb_shootdown_native(pmap, addr1, addr2, curcpu_cb, op); @@ -253,9 +253,9 @@ hv_flush_tlb_others_ex(pmap_t pmap, vm_offset_t addr1, vm_offset_t addr2, { int nr_bank = 0, max_gvas, gva_n; struct hv_tlb_flush_ex *flush; - if(*DPCPU_PTR(hv_pcpu_mem) == NULL) + if(*VMBUS_PCPU_PTR(sc, cpu_mem, curcpu) == NULL) return EINVAL; - flush = *DPCPU_PTR(hv_pcpu_mem); + flush = *VMBUS_PCPU_PTR(sc, cpu_mem, curcpu); uint64_t status = 0; uint64_t cr3; diff --git a/sys/dev/hyperv/vmbus/vmbus.c b/sys/dev/hyperv/vmbus/vmbus.c index f55f0329b017..dee738f6e373 100644 --- a/sys/dev/hyperv/vmbus/vmbus.c +++ b/sys/dev/hyperv/vmbus/vmbus.c @@ -139,7 +139,10 @@ static void vmbus_event_proc_dummy(struct vmbus_softc *, int); static bus_dma_tag_t vmbus_get_dma_tag(device_t parent, device_t child); static struct vmbus_softc *vmbus_sc; -static void free_pcpu_ptr(void); +#if defined(__x86_64__) +static int vmbus_alloc_cpu_mem(struct vmbus_softc *sc); +static void vmbus_free_cpu_mem(struct vmbus_softc *sc); +#endif SYSCTL_NODE(_hw, OID_AUTO, vmbus, CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "Hyper-V vmbus"); @@ -217,7 +220,6 @@ static driver_t vmbus_driver = { }; uint32_t hv_max_vp_index; -DPCPU_DEFINE(void *, hv_pcpu_mem); DRIVER_MODULE(vmbus, pcib, vmbus_driver, NULL, NULL); DRIVER_MODULE(vmbus, acpi_syscontainer, vmbus_driver, NULL, NULL); @@ -750,7 +752,6 @@ vmbus_synic_setup(void *xsc) int cpu = curcpu; uint64_t val, orig; uint32_t sint; - void **hv_cpu_mem; if (hyperv_features & CPUID_HV_MSR_VP_INDEX) { /* Save virtual processor id. */ @@ -762,19 +763,6 @@ vmbus_synic_setup(void *xsc) if (VMBUS_PCPU_GET(sc, vcpuid, cpu) > hv_max_vp_index) hv_max_vp_index = VMBUS_PCPU_GET(sc, vcpuid, cpu); - hv_cpu_mem = DPCPU_ID_PTR(cpu, hv_pcpu_mem); - *hv_cpu_mem = contigmalloc(PAGE_SIZE, M_DEVBUF, M_NOWAIT | M_ZERO, - 0ul, ~0ul, PAGE_SIZE, 0); - -#if defined(__x86_64__) - if (*hv_cpu_mem == NULL && hv_tlb_hcall) { - hv_tlb_hcall = 0; - if (bootverbose && sc) - device_printf(sc->vmbus_dev, - "cannot alloc contig memory for hv_pcpu_mem, " - "use system provided tlb flush call.\n"); - } -#endif /* * Setup the SynIC message. @@ -858,7 +846,6 @@ vmbus_synic_teardown(void *arg) */ orig = RDMSR(MSR_HV_SIEFP); WRMSR(MSR_HV_SIEFP, (orig & MSR_HV_SIEFP_RSVD_MASK)); - free_pcpu_ptr(); } static int @@ -1412,15 +1399,41 @@ vmbus_probe(device_t dev) return (BUS_PROBE_DEFAULT); } +#if defined(__x86_64__) +static int +vmbus_alloc_cpu_mem(struct vmbus_softc *sc) +{ + int cpu; -static void free_pcpu_ptr(void) + CPU_FOREACH(cpu) { + void **hv_cpu_mem; + + hv_cpu_mem = VMBUS_PCPU_PTR(sc, cpu_mem, cpu); + *hv_cpu_mem = contigmalloc(PAGE_SIZE, M_DEVBUF, + M_NOWAIT | M_ZERO, 0ul, ~0ul, PAGE_SIZE, 0); + + if (*hv_cpu_mem == NULL) + return ENOMEM; + } + + return 0; +} + +static void +vmbus_free_cpu_mem(struct vmbus_softc *sc) { - int cpu = curcpu; - void **hv_cpu_mem; - hv_cpu_mem = DPCPU_ID_PTR(cpu, hv_pcpu_mem); - if(*hv_cpu_mem) - contigfree(*hv_cpu_mem, PAGE_SIZE, M_DEVBUF); + int cpu; + + CPU_FOREACH(cpu) { + void **hv_cpu_mem; + hv_cpu_mem = VMBUS_PCPU_PTR(sc, cpu_mem, cpu); + if(*hv_cpu_mem != NULL) { + contigfree(*hv_cpu_mem, PAGE_SIZE, M_DEVBUF); + *hv_cpu_mem = NULL; + } + } } +#endif /** * @brief Main vmbus driver initialization routine. @@ -1511,6 +1524,25 @@ vmbus_doattach(struct vmbus_softc *sc) if (ret != 0) goto cleanup; +#if defined(__x86_64__) + /* + * Alloc per cpu memory for tlb flush hypercall + */ + if (hv_tlb_hcall) { + ret = vmbus_alloc_cpu_mem(sc); + if (ret != 0) { + hv_tlb_hcall = 0; + if (bootverbose) + device_printf(sc->vmbus_dev, + "cannot alloc contig memory for " + "cpu_mem, use system provided " + "tlb flush call.\n"); + + vmbus_free_cpu_mem(sc); + } + } +#endif + /* * Setup SynIC. */ @@ -1627,6 +1659,16 @@ vmbus_detach(device_t dev) smp_rendezvous(NULL, vmbus_synic_teardown, NULL, NULL); } +#if defined(__x86_64__) + /* + * Restore the tlb flush to native call + */ + if (hv_tlb_hcall) { + smp_targeted_tlb_shootdown = &smp_targeted_tlb_shootdown_native; + vmbus_free_cpu_mem(sc); + } +#endif + vmbus_intr_teardown(sc); vmbus_dma_free(sc); diff --git a/sys/dev/hyperv/vmbus/vmbus_var.h b/sys/dev/hyperv/vmbus/vmbus_var.h index 4f0668476716..4e0a769402d5 100644 --- a/sys/dev/hyperv/vmbus/vmbus_var.h +++ b/sys/dev/hyperv/vmbus/vmbus_var.h @@ -74,6 +74,9 @@ struct vmbus_pcpu_data { uint32_t vcpuid; /* virtual cpuid */ int event_flags_cnt;/* # of event flags */ struct vmbus_evtflags *event_flags; /* event flags from host */ +#if defined(__x86_64__) + void *cpu_mem; /* For Hyper-V tlb hypercall */ +#endif /* Rarely used fields */ struct taskqueue *event_tq; /* event taskq */ @@ -216,8 +219,6 @@ void vmbus_synic_teardown1(void); int vmbus_setup_intr1(struct vmbus_softc *sc); void vmbus_intr_teardown1(struct vmbus_softc *sc); -DPCPU_DECLARE(void *, hv_pcpu_mem); - extern uint32_t hv_max_vp_index; From nobody Sat Jun 15 15:26:17 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W1g3F5XWFz5NyYC; Sat, 15 Jun 2024 15:26:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W1g3F51Twz4Q1T; Sat, 15 Jun 2024 15:26:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718465177; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FeuWwHJQPMS66L0P5a6sELY60q7jaOwzDkr9vVaFX0E=; b=xhUqMYtSh8wxwK0wLPjSgHhSzTmxr/5Joh4SCSnho29HRashOOgXyt34czb0V/YklyTig6 yvx7tPDeMP2g2GUCm8lp1vDvfEurEHgrBRaJ3tpgyd/1LyBSGAByw0LvHFcqOsy7zziKs+ Nh/SMUhpKJ0mT+5JhJkm3g4rfgnmldZfbX3DNsj6gNYj/u8gZc2BfWO3KB4JlAEVw/0lxy QX12RFZjHHaVzN+Jnh1lbiTuzBI9rVXWOKYCuhx7bc2apzwgx5w4cZi3uZ9c2L92mO/riH oaxyi6wNDWYdje49pjqYZqnd0IIcVZibDJab6QUSeosGxmDwwmXnRIGCSoCH1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718465177; a=rsa-sha256; cv=none; b=PCaNz63a3HheJIuNWw/v8rb//qperA7yRg5ycDuVBbRfpdYe8rHfMpj5EvRXvAcTuoF+jB gFdmUQ8Ym4kkOkz9GNvTP6Vxq7Wxlkk0KzC/LAk+qFaiDxuKjqn/EY/yuYmZWHsNJwzren 3sUfKqIyTwsEByDpC25ffx0NQvF4O9DA8FoX4nsfHemQn+TIWDLAonCtD//8StOGW0WIYb PP7xWX7fbZ/nu0SBp2WmtaVz8kMnoa5Yg/t+rhEe4Q1PoS5JKj5HUDdpwCr6cbPjJGpuIk 68zAip0CQHYMWZJLMuLS3fOEzvO2VNToHR5QgFHmZ/XBXQJdTCpxT9nn6VtksQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718465177; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FeuWwHJQPMS66L0P5a6sELY60q7jaOwzDkr9vVaFX0E=; b=R74zWuKhQ6Ttr0bL2htGcp7TnFVWcDnSVV/cvRfzG8a8763wi82xZgW9y21m+Eu9nnIo0R gSlsC/pPq8Zje7vEOIL7F40plxkMyv6S9UycioU90XC71r6WIVdvvpwhPZwV0F6ZUDAvWn Od0nf0kpL+OT57yxVOzBsV4EltK7CtGB2bLmkuIwbkRz4c14xGLOBa8cMXv1UwF4f5OEHA eqN97PALSqqfG5Zm3eiAbAGIuMg8Mahtpo/UhrnLj+P9Ut7dmsr4pFXI1GojRtacL9Sei3 BZ34srPNexxOU8E3pVzJgvUaE75eLyr0qWuu+L6z6/893HuJLSR/iRXMrC/vFA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W1g3F4GQPz18hs; Sat, 15 Jun 2024 15:26:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45FFQHxE020533; Sat, 15 Jun 2024 15:26:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45FFQHcQ020530; Sat, 15 Jun 2024 15:26:17 GMT (envelope-from git) Date: Sat, 15 Jun 2024 15:26:17 GMT Message-Id: <202406151526.45FFQHcQ020530@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Gmelin Subject: git: 048ad7a9ef9f - stable/14 - ifconfig: Fix default netmask calculation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: grembo X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 048ad7a9ef9fe15368ff287db5c705c8163f4e1c Auto-Submitted: auto-generated The branch stable/14 has been updated by grembo: URL: https://cgit.FreeBSD.org/src/commit/?id=048ad7a9ef9fe15368ff287db5c705c8163f4e1c commit 048ad7a9ef9fe15368ff287db5c705c8163f4e1c Author: Michael Gmelin AuthorDate: 2024-06-12 16:11:52 +0000 Commit: Michael Gmelin CommitDate: 2024-06-15 15:24:59 +0000 ifconfig: Fix default netmask calculation Reported by: phk Reviewed by: emaste, kp MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D45570 (cherry picked from commit 8a9f0fa42b1c6cffd45459bb552e138083b00369) --- sbin/ifconfig/af_inet.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sbin/ifconfig/af_inet.c b/sbin/ifconfig/af_inet.c index 5e3084165b33..e21956cfc4fd 100644 --- a/sbin/ifconfig/af_inet.c +++ b/sbin/ifconfig/af_inet.c @@ -440,7 +440,7 @@ in_exec_nl(if_ctx *ctx, unsigned long action, void *data) static void in_setdefaultmask_nl(void) { - struct in_px *px = sintab_nl[ADDR]; + struct in_px *px = sintab_nl[ADDR]; in_addr_t i = ntohl(px->addr.s_addr); @@ -451,11 +451,11 @@ in_setdefaultmask_nl(void) * we should return an error rather than warning. */ if (IN_CLASSA(i)) - px->plen = IN_CLASSA_NSHIFT; + px->plen = 32 - IN_CLASSA_NSHIFT; else if (IN_CLASSB(i)) - px->plen = IN_CLASSB_NSHIFT; + px->plen = 32 - IN_CLASSB_NSHIFT; else - px->plen = IN_CLASSC_NSHIFT; + px->plen = 32 - IN_CLASSC_NSHIFT; px->maskset = true; } #endif From nobody Sat Jun 15 20:32:52 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W1ns052PZz5PPC9; Sat, 15 Jun 2024 20:32:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W1ns04Bxrz4qcR; Sat, 15 Jun 2024 20:32:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718483572; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fxqInYue9zkyBZIH0veKupr+CU9HM6l1nIGW1VllFmc=; b=xB/o0Hpx/9+TkwvYqAGHq54Oji/M8hu6B88et7+e+9XoI9Chl7+P7Y1Bpsx31b8cBxyeQt KKdInQTEqfzFB8r7kjhXRWAnwl1KrPcH4yi0tzEj+eC9wlIleR/xy19BkY85urWdFvHmms rTFwsnARBN8zYshF+rwHWkIZncdknVF/BYHN4YZgBvOkhGgfiTrvrR9bscmOgkkqKFzhzl 2yf4LG2e1LlJqFCnuWqdUjeJEVGK/oZO9Rl6Ckf/CPuIXymxXjGpdCgJs87Vqx+kQ0j7k/ 17q+73Jp3rDUPsXjjI7BuH7TUYMED0Os5Ai5CNRjsfs2x9l6LSRPOD2mwB3o5A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718483572; a=rsa-sha256; cv=none; b=KrOwdjoEo3Aoqb+jACX84Q+UXI3cQaRuXSydmx9OuGxzVsRiMpguyzvMVVe6piBky7tHML aFXjHhOSJLpFDIUE2zIpwdEE3KX8a8q4qEONEX+FN2xKrU5JrQjUxgZSJ9AiXqAzh28eAZ dsAYhq9Beat36RMwfFC4YyhcIdMk//exMfBvjZjZH4jqCu1KUNzyf7mBXzXbwyRpJ/uvfv viRAWE7z4i9JwUPAKNN6Aowl6jyWmbejDz12jobvJhYhgf904EADSznB1I0MTvxSZkG0bs SOZw3aPFt3Lch4+hbziHOeB9uONJmjsnFeR167bVDpMzSrNdoWHO48QDEFEIGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718483572; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fxqInYue9zkyBZIH0veKupr+CU9HM6l1nIGW1VllFmc=; b=AKjhQsrbViBEqKre8sVmdzlWEnVpTQI3tIBYdeSk39eDSUjfPtA2k6wN46vJPeTLdycOnY k2dfYfCsvZlXODwfaHO/fJcBYM0cglAdrSJxdnpHe4Fb7AUs+vcWvpHZ6/1QmA9RKEBc23 gCSbIwBMfBxn5MkkZRavxq+/9+WtuDISzBRfMmGHpi6ftH6NHCKeh0CMi0aWVCRNgIZ4aB xwvcIDhbWDHwNMPIAjahRlhjRRg1Yd3EqPcMXsGsQ4F+PdRC2RrN06pPdKz/QTCqZnLl63 M562iJ6s3jLFnyD2VFuK/T4cvzu0OJ7JOx+Vrb4qxqcmndoEYGdk36JdWr5PfA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W1ns03m82zK06; Sat, 15 Jun 2024 20:32:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45FKWqcn047169; Sat, 15 Jun 2024 20:32:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45FKWqGu047166; Sat, 15 Jun 2024 20:32:52 GMT (envelope-from git) Date: Sat, 15 Jun 2024 20:32:52 GMT Message-Id: <202406152032.45FKWqGu047166@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Pedro F. Giffuni" Subject: git: 1a968da448b0 - main - fparseln: Update NetBSD version strings List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pfg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1a968da448b0795184884ffe428fb24d7e695628 Auto-Submitted: auto-generated The branch main has been updated by pfg: URL: https://cgit.FreeBSD.org/src/commit/?id=1a968da448b0795184884ffe428fb24d7e695628 commit 1a968da448b0795184884ffe428fb24d7e695628 Author: Pedro F. Giffuni AuthorDate: 2024-06-15 20:32:06 +0000 Commit: Pedro F. Giffuni CommitDate: 2024-06-15 20:32:06 +0000 fparseln: Update NetBSD version strings The correponding changes (mostly ANSIfication) were done long ago locally. No functional change. Obtained from: NetBSD (libutil CVS Attic) --- lib/libutil/fparseln.3 | 2 +- lib/libutil/fparseln.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libutil/fparseln.3 b/lib/libutil/fparseln.3 index 7ddfaefcc943..49b504ffc9b4 100644 --- a/lib/libutil/fparseln.3 +++ b/lib/libutil/fparseln.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: fparseln.3,v 1.7 1999/07/02 15:49:12 simonb Exp $ +.\" $NetBSD: fparseln.3,v 1.8 2001/08/20 12:00:49 wiz Exp $ .\" .\" Copyright (c) 1997 Christos Zoulas. All rights reserved. .\" diff --git a/lib/libutil/fparseln.c b/lib/libutil/fparseln.c index c9290230c126..f817860f2e57 100644 --- a/lib/libutil/fparseln.c +++ b/lib/libutil/fparseln.c @@ -1,4 +1,4 @@ -/* $NetBSD: fparseln.c,v 1.7 2007/03/08 19:57:53 drochner Exp $ */ +/* $NetBSD: fparseln.c,v 1.10 2000/07/05 11:46:40 ad Exp $ */ /*- * SPDX-License-Identifier: BSD-4-Clause From nobody Sat Jun 15 22:51:04 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W1rwT191Fz5PZhn; Sat, 15 Jun 2024 22:51:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W1rwS6HbHz51G3; Sat, 15 Jun 2024 22:51:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718491864; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FFoqwTen/OT2A3SLwoYz7d2+z/+b8AWA07noPz66X58=; b=Z/5L/mBEF9rYqd8/0t23TEA45gTXuKFlYZPYXhJC735TZ66sbySP+DQ7UBc/VZh3zP/Ki4 u1QoarHGgYZhcY1bnY15HtrgyZ44J0PPz/GfV0ki7aa9Ps0c+ooaReUV+KIh/tHsNQIRHH fut8O50fTP2Zi1BGN91wwGXFOpVwCFWJzjGdexbnTFkYNUojJak6A5+TRR98fVIcC6egKH gD3S24IzygO7R3OyiY0Bskfb7FZVGH7bBffjHkIyt61JA7s3VxhX7oCX9K3GD3QM34TC/K EJtQOH9NfVwvMIUkJswwFNMWsOwTPhqDFTqj5W0TE2sOvFuwi+OD5q+i+reAVg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718491864; a=rsa-sha256; cv=none; b=A1Sixr8+0EiOT2Ka+Zq5tuXrKegdM5N3sP145SwCIBjCiUXK58Bpd0j0iw71mmJOgeRLQX tX0stV+ulLgEe0SpMabROL7GaWs5+RFm+8ei4t8FwvjezL472axFam+0pKgh6WAysbL4d8 oJpCSIC9pntnnB373Ijl5K55o5OimzIf9K3YZvAP5VNb4XK/u8kUrqTbVa0PpIYw3poNjq 5bTPgh01alBa4HXKmTSGk629xL7/I2+2kgvcLmdFTOw3Z16+NaXO38AOC985Rwkpm7VNOK AbCVORiFZXAX7bOYXcLkDx3U+uExMQojGITA6/cQM9dbhQ/BE//PD4/Uje+7ww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718491864; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FFoqwTen/OT2A3SLwoYz7d2+z/+b8AWA07noPz66X58=; b=KJO47zoDXRMxRRi5cXFcqAoVtiswmbYr3mYMBTl5YCPcdgzsEF4fj7z6O66YTx7ZeY+4G4 i7oRmIAm/VbPbmLrEm0yM7mXb2lxN4HfenfSUJfTsaFuJ0558D1zLoM/u7iYjuwYleyW7A 1DVfEJLin4iSXHGx7ZzrfL7Hegt9Yjjb0zUXx8oQENxbNZU+8iJ94OHg88BsZxykc3PZYp ZZygqyG7bFSsiqxPC+gxoRei78i7+ZegIVZ9sKJX1qp1026UihjICOOoSHmbNN7XK0u46R f9enEUvyKjDQAA0P/XeEI11cQ8ZWg8qsMoTl1MwQogu0UL9v0YPCgyISJG4H5w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W1rwS5vvXzNST; Sat, 15 Jun 2024 22:51:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45FMp4XD080419; Sat, 15 Jun 2024 22:51:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45FMp4lR080416; Sat, 15 Jun 2024 22:51:04 GMT (envelope-from git) Date: Sat, 15 Jun 2024 22:51:04 GMT Message-Id: <202406152251.45FMp4lR080416@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Pedro F. Giffuni" Subject: git: 9a39435c0b66 - main - Revert "fparseln: Update NetBSD version strings" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pfg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9a39435c0b661e05a55bf817e724c1c80e431c8c Auto-Submitted: auto-generated The branch main has been updated by pfg: URL: https://cgit.FreeBSD.org/src/commit/?id=9a39435c0b661e05a55bf817e724c1c80e431c8c commit 9a39435c0b661e05a55bf817e724c1c80e431c8c Author: Pedro F. Giffuni AuthorDate: 2024-06-15 22:46:56 +0000 Commit: Pedro F. Giffuni CommitDate: 2024-06-15 22:46:56 +0000 Revert "fparseln: Update NetBSD version strings" This reverts commit 1a968da448b0795184884ffe428fb24d7e695628. I was mistakenly looking at the version strings in the CVS attic but the function was moved to libc/stdio where it matches the current string. --- lib/libutil/fparseln.3 | 2 +- lib/libutil/fparseln.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libutil/fparseln.3 b/lib/libutil/fparseln.3 index 49b504ffc9b4..7ddfaefcc943 100644 --- a/lib/libutil/fparseln.3 +++ b/lib/libutil/fparseln.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: fparseln.3,v 1.8 2001/08/20 12:00:49 wiz Exp $ +.\" $NetBSD: fparseln.3,v 1.7 1999/07/02 15:49:12 simonb Exp $ .\" .\" Copyright (c) 1997 Christos Zoulas. All rights reserved. .\" diff --git a/lib/libutil/fparseln.c b/lib/libutil/fparseln.c index f817860f2e57..c9290230c126 100644 --- a/lib/libutil/fparseln.c +++ b/lib/libutil/fparseln.c @@ -1,4 +1,4 @@ -/* $NetBSD: fparseln.c,v 1.10 2000/07/05 11:46:40 ad Exp $ */ +/* $NetBSD: fparseln.c,v 1.7 2007/03/08 19:57:53 drochner Exp $ */ /*- * SPDX-License-Identifier: BSD-4-Clause From nobody Sat Jun 15 23:36:12 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W1swX3htHz5Pdqs; Sat, 15 Jun 2024 23:36:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W1swX3BSvz544j; Sat, 15 Jun 2024 23:36:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718494572; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ncbm6PgDZ0nMptvn/I2uGhxEtq9KL4dDDYbqtOfmZ9c=; b=XiIN37CqNP0g9p9gI86zgUpTMDKoeJQvnX9HEv/xuYKVqkhNOBJ60loZ3CqMW6TAI4QOcG g7BjFGF+zvRLkvbu7mLpVSlairjKoeQBMZRH2eRDbHX/BjAd79qd4KCrHt/YXBIKCfDYM+ 9DSsLjDj8Yu6U+vaFlWdBJb32mRu+00CLd69G7eatL1Oegm1l1EUepttIbtNSBxhTiC6C3 GgELGTmoXmN1qZmROEi92BRWStFaBvKoWKGnrOmHBecYXRaPv3TAUNJVx9dt3vC6eOGt5O pT1gwiO6EUeSsOZrUObd8ERScbdPf/agNAOtarYCuyyyC59fZ6PxZ2+Hib4Xng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718494572; a=rsa-sha256; cv=none; b=w/THQw8R3CdERvNyhlFozyuMQtL9VRceCoTHzPjhMsaNkdr6E6+166hDGR1lLqQ1aRWfdj +HlQwFAfQ6D5W18WbQvk6ZyvDaj4Bsjx9CCVKpA54NmZdsTMAtSCWHDqPz3w+rI6MCoZK8 knVCzRhxcTL8X/hzCun3Yspu4t7k3iu9bQV97NLw26gMMEOqFeT6mMJEM8fT6wkuYLXVmA lyI/eOJhhAb9ZVYOmU5AUHOUdEMKQ/612+jTbJl9I0caYs0RXfvue2uqH23ekakuWQpK1o yjB0pG7mUh0XA/Ozv7H9OvYzAlV3GLX+SBqRTyuG6Cc8j7UPZoY5Ebt+GKz52Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718494572; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ncbm6PgDZ0nMptvn/I2uGhxEtq9KL4dDDYbqtOfmZ9c=; b=Pa2U15sKaiJTfR4C73YMrAjtt0P1JFrRbvQPgb/T8xQ9seFXoIjQ4OwsZLJlPQvLNDziyy 6WzH1PGAyVE1jigLieJJOTY0X48WEu3dKkFdNlBGnBgAI1Kih0W2r4dqHtar/ROSnKSgpx /d8kXNaCsxMQAkrxOjG2uLEkEvBgAVNzoT1uh5wQjQxpaG493oV9PVkz6e99Cc6e+uvkdf InaIdPCgB3GXKdqpteGWMvBHnRSfa7lv9CayE5yK0IaqHA2wjzb0cDapxXmH1k29hLBMN3 gJMZrBoSd1XWcVcNPe/RifFlyhJuFEojc1098chChaozLqH28xFU+5Iq3jqwJQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W1swX2kZNzPXw; Sat, 15 Jun 2024 23:36:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45FNaCcx049807; Sat, 15 Jun 2024 23:36:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45FNaCvU049804; Sat, 15 Jun 2024 23:36:12 GMT (envelope-from git) Date: Sat, 15 Jun 2024 23:36:12 GMT Message-Id: <202406152336.45FNaCvU049804@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Pedro F. Giffuni" Subject: git: fc3907ce001e - main - fparseln: Update license List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pfg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fc3907ce001ec95ff4f32861bfa84f81c268d179 Auto-Submitted: auto-generated The branch main has been updated by pfg: URL: https://cgit.FreeBSD.org/src/commit/?id=fc3907ce001ec95ff4f32861bfa84f81c268d179 commit fc3907ce001ec95ff4f32861bfa84f81c268d179 Author: Pedro F. Giffuni AuthorDate: 2024-06-15 23:30:27 +0000 Commit: Pedro F. Giffuni CommitDate: 2024-06-15 23:30:27 +0000 fparseln: Update license Remove 3rd and 4th clauses in christos' license. OK christos. Obtained from: NetBSD --- lib/libutil/fparseln.3 | 10 ++-------- lib/libutil/fparseln.c | 9 ++------- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/lib/libutil/fparseln.3 b/lib/libutil/fparseln.3 index 7ddfaefcc943..2f7ebcbf4d68 100644 --- a/lib/libutil/fparseln.3 +++ b/lib/libutil/fparseln.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: fparseln.3,v 1.7 1999/07/02 15:49:12 simonb Exp $ +.\" $NetBSD: fparseln.3,v 1.4 2009/10/21 01:07:45 snj Exp $ .\" .\" Copyright (c) 1997 Christos Zoulas. All rights reserved. .\" @@ -10,11 +10,6 @@ .\" 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. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by Christos Zoulas. -.\" 4. The name of the author may not be used to endorse or promote products -.\" derived from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES @@ -52,8 +47,7 @@ returns a pointer to the next logical line from the stream referenced by This string is .Dv NUL terminated and it is dynamically allocated on each invocation. -It is the -responsibility of the caller to free the pointer. +It is the responsibility of the caller to free the pointer. .Pp By default, if a character is escaped, both it and the preceding escape character will be present in the returned string. diff --git a/lib/libutil/fparseln.c b/lib/libutil/fparseln.c index c9290230c126..256ee5b04cea 100644 --- a/lib/libutil/fparseln.c +++ b/lib/libutil/fparseln.c @@ -1,7 +1,7 @@ -/* $NetBSD: fparseln.c,v 1.7 2007/03/08 19:57:53 drochner Exp $ */ +/* $NetBSD: fparseln.c,v 1.10 2009/10/21 01:07:45 snj Exp $ */ /*- - * SPDX-License-Identifier: BSD-4-Clause + * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 1997 Christos Zoulas. All rights reserved. * @@ -13,11 +13,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Christos Zoulas. - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES From nobody Sun Jun 16 12:13:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W2Bky35T9z5NhH1; Sun, 16 Jun 2024 12:14:02 +0000 (UTC) (envelope-from peter@holm.cc) Received: from kaskal.pair.com (kaskal.pair.com [209.68.5.173]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2Bkx0y1Nz3xRr; Sun, 16 Jun 2024 12:14:00 +0000 (UTC) (envelope-from peter@holm.cc) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of peter@holm.cc designates 209.68.5.173 as permitted sender) smtp.mailfrom=peter@holm.cc Received: from kaskal.pair.com (localhost [127.0.0.1]) by kaskal.pair.com (Postfix) with ESMTP id B5ACCD656D1; Sun, 16 Jun 2024 08:13:59 -0400 (EDT) Received: from Peters-Air (c-x5996a268.customers.hiper-net.dk [89.150.162.104]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by kaskal.pair.com (Postfix) with ESMTPSA id EAD09D8DA5B; Sun, 16 Jun 2024 08:13:58 -0400 (EDT) Date: Sun, 16 Jun 2024 14:13:56 +0200 From: Peter Holm To: Doug Moore Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: dd0e5c02ab13 - main - swap_pager: small improvement to find_least Message-ID: References: <202406111638.45BGcnhX099470@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202406111638.45BGcnhX099470@gitrepo.freebsd.org> X-Scanned-By: mailmunge 3.11 on 209.68.5.173 X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.86 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.96)[-0.962]; MID_RHS_NOT_FQDN(0.50)[]; R_SPF_ALLOW(-0.20)[+a:kaskal.pair.com]; RCVD_IN_DNSWL_LOW(-0.10)[209.68.5.173:from]; MIME_GOOD(-0.10)[text/plain]; FREEFALL_USER(0.00)[peter]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ASN(0.00)[asn:7859, ipnet:209.68.0.0/18, country:US]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; MISSING_XM_UA(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DMARC_NA(0.00)[holm.cc]; RCVD_TLS_LAST(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@FreeBSD.org,dev-commits-src-main@FreeBSD.org]; RCPT_COUNT_THREE(0.00)[4] X-Rspamd-Queue-Id: 4W2Bkx0y1Nz3xRr On Tue, Jun 11, 2024 at 04:38:49PM +0000, Doug Moore wrote: > The branch main has been updated by dougm: > > URL: https://cgit.FreeBSD.org/src/commit/?id=dd0e5c02ab13b9eb240d42a71a8f41a8b036bd33 > > commit dd0e5c02ab13b9eb240d42a71a8f41a8b036bd33 > Author: Doug Moore > AuthorDate: 2024-06-11 16:36:23 +0000 > Commit: Doug Moore > CommitDate: 2024-06-11 16:36:23 +0000 > > swap_pager: small improvement to find_least > > Drop an unneeded test, a branch and a needless computation to save a > few instructions. > > Reviewed by: kib > Differential Revision: https://reviews.freebsd.org/D45558 > --- > sys/vm/swap_pager.c | 19 +++++++------------ > 1 file changed, 7 insertions(+), 12 deletions(-) > > diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c > index a07a38481490..15f227457bba 100644 > --- a/sys/vm/swap_pager.c Doug, Here's an easy way to reproduce the issue: 12:43 ~ $ sort /dev/zero & [1] 3650 12:43 ~ $ sort /dev/zero & [2] 3651 12:43 ~ $ sort /dev/zero & [3] 3652 12:43 ~ $ panic: Negative index: -16 cpuid = 8 time = 1718534645 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe010855fa50 vpanic() at vpanic+0x13f/frame 0xfffffe010855fb80 panic() at panic+0x43/frame 0xfffffe010855fbe0 swap_pager_find_least() at swap_pager_find_least+0x105/frame 0xfffffe010855fc20 vm_object_collapse() at vm_object_collapse+0x68b/frame 0xfffffe010855fca0 vmspace_fork() at vmspace_fork+0xb68/frame 0xfffffe010855fd30 fork1() at fork1+0x4f8/frame 0xfffffe010855fda0 sys_fork() at sys_fork+0x54/frame 0xfffffe010855fe00 amd64_syscall() at amd64_syscall+0x158/frame 0xfffffe010855ff30 fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe010855ff30 --- syscall (2, FreeBSD ELF64, fork), rip = 0xaba1c31565a, rsp = 0xaba1b0cecb8, rbp = 0xaba1b0cf220 --- KDB: enter: panic [ thread pid 3653 tid 100349 ] Stopped at $0,0x104d5c2(%rip) db> x/s version version: FreeBSD 15.0-CURRENT #2 main-n270778-d26c565597b8-dirty: Sun Jun 16 12:32:39 CEST 2024\012 pho@mercat1.netperf.freebsd.org:/usr/src/sys/amd64/compile/PHO\012 db> --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -2303,6 +2303,7 @@ swap_pager_find_least(vm_object_t object, vm_pindex_t pindex) if (sb == NULL) return (object->size); for (i = pindex - sb->p; i < SWAP_META_PAGES; i++) { + KASSERT((i >= 0), ("Negative index: %d", i)); if (sb->d[i] != SWAPBLK_NONE) return (sb->p + i); } - Peter From nobody Sun Jun 16 14:55:46 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W2GKr4cmsz5NwZ7; Sun, 16 Jun 2024 14:56:00 +0000 (UTC) (envelope-from ctuffli@gmail.com) Received: from mail-oo1-xc2f.google.com (mail-oo1-xc2f.google.com [IPv6:2607:f8b0:4864:20::c2f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2GKp6Bfbz4Fpq; Sun, 16 Jun 2024 14:55:58 +0000 (UTC) (envelope-from ctuffli@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b="Ka/285Ec"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of ctuffli@gmail.com designates 2607:f8b0:4864:20::c2f as permitted sender) smtp.mailfrom=ctuffli@gmail.com Received: by mail-oo1-xc2f.google.com with SMTP id 006d021491bc7-5bfa5f18ab0so265915eaf.3; Sun, 16 Jun 2024 07:55:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718549757; x=1719154557; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=WWpATYBdIWIZHU/ysgQzrQNGSuhbL/Y2u3Gc5XsJP3E=; b=Ka/285Ecmal6uhwuJQ7l1PcUiM3ChiL3UX23Ri2tes/BlHeEcegj/yzD/tFMAzijeD Q/FUKjHQvXHeGvhEZFxpp/TopTYjyjrsrN219A4Hr8mWBtxi4Cok8MRvEg9YUKO3B/Hk tHiekWw/EjdVYEH39Zbhc9d5gvZLKKbFdQfidrNEbi7gUEO9RbIqPQ2X4DhvE0U4Z22l 555EBwf5sdgtYaudaRvaqXFHjx9anpWEoY2fviPg65A2RkGDN1H9O40bp4SdNXYqMrA8 BOSEnovPRNZQq7nYvKAkMGQaqWV62y2z79ui8hyvJs3AOp9ZDqMQfNRaVoGtGgWEEESb Fafg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718549757; x=1719154557; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WWpATYBdIWIZHU/ysgQzrQNGSuhbL/Y2u3Gc5XsJP3E=; b=k/eewsHoodzGfPjqGt8Caaql+ruBkQJULv4NUD0zUDIOgqzf9mWJElfggSKObz3i5K nISgu3Ez/GrBHF8RSji+M99tCNnPmZ0N9Yk/q3/ebORc6iQig+3pkDzbwVWj9icYKoMy j7ObFboMFzjCc/stu/m5mYTiChQFHleDpSuTQBzZO5BrQmSB0hA/o3Sb6BUrNAM9ZWqm ITqwIZR7c68pmh8rODkcMzS8P5U9gDXbc3St8NFWraO974vj19f7dAlj3u1jGYAG5VlF aO1tTqM+L10E8LiyHqZhc61ipfjqZAZt9zz4y563XhaKR1/RUcq6FtsG0CRZGdKFEvi3 fWWg== X-Forwarded-Encrypted: i=1; AJvYcCUa+dndtdxB96LVF6bObXn56VXk9A+paC6JnPhESCR7ja5dqt93XKC6tj93hjtUnV5gj7SYyXd2IL3eSY9AgLwMDL3Ce75VK4Aj9RxkJvQ6goc1kYvD7V3Ksviu29N1ueFVwwJj7QvAsybpant+QoYFyw== X-Gm-Message-State: AOJu0YxEZMwB/tyskSnhFkhXjbGwZQ1tnxpWzDroWBKjoazKcRa6iCEd lSjXQ9gjebXugPfNdHDs+DANe7UDYokTQ6X5jm2zwS2v+BcExuYIY0YpGttdz6a/NmbaajvVldd SeoFJCP+PZ3L/Xon7aE50SiHHbBrnkg== X-Google-Smtp-Source: AGHT+IE3Qu40quhBPkJmXskqgR9fbaq8CvlfUc4P1/uMtE9FG2unW0v/bIwqWh9C/+AMV5yNPaPsg7UuMWFVstcgNO8= X-Received: by 2002:a05:6359:3502:b0:1a0:bb4c:7079 with SMTP id e5c5f4694b2df-1a0bb4c7159mr455302755d.0.1718549757314; Sun, 16 Jun 2024 07:55:57 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <202406141933.45EJXeOl005085@gitrepo.freebsd.org> In-Reply-To: <202406141933.45EJXeOl005085@gitrepo.freebsd.org> From: Chuck Tuffli Date: Sun, 16 Jun 2024 07:55:46 -0700 Message-ID: Subject: Re: git: 80b42329248a - main - nvme: Fix panic on detach after ce75bfcac9cfe To: Alexander Motin Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.36 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-0.36)[-0.357]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; MIME_GOOD(-0.10)[text/plain]; MISSING_XM_UA(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::c2f:from]; RCPT_COUNT_THREE(0.00)[4]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; RCVD_TLS_LAST(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; DKIM_TRACE(0.00)[gmail.com:+] X-Rspamd-Queue-Id: 4W2GKp6Bfbz4Fpq On Fri, Jun 14, 2024 at 12:33=E2=80=AFPM Alexander Motin = wrote: > > The branch main has been updated by mav: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D80b42329248a7473f79eebf785= 0ee8e4116c17dd > > commit 80b42329248a7473f79eebf7850ee8e4116c17dd > Author: Alexander Motin > AuthorDate: 2024-06-14 19:32:10 +0000 > Commit: Alexander Motin > CommitDate: 2024-06-14 19:32:10 +0000 > > nvme: Fix panic on detach after ce75bfcac9cfe Sorry about that. I had a review up for it and was going to commit today. Pointy hat, me. --chuck From nobody Sun Jun 16 15:37:43 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W2HFz59Fnz5P0yx; Sun, 16 Jun 2024 15:37:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2HFz4gf7z4Jt6; Sun, 16 Jun 2024 15:37:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718552263; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jUn77Q4g0uV6gxadftMew6+wcXqy5q0wfg1lUBrPwSQ=; b=P83XoiJkqQHEvXkLCvzV/+pjbuEkaw/vBAbJGjruoomaFPyYmPJJglznunc02QDBxA5nCV J5M2NfyYcTnSb/jSUUZDGvW9aA1CrA+2+/9Ulrw/PzH8/BlE/RaZoz0ya7l9rtPzEapGCY 82ZS/eimEqK2hNTEdCtGJWFmj5Iz9bssFoecSkuHqIA8ZYG2YcZMQjNzl88y4v1lK3tqGf SdNsR7zFhKeax44+d1CI/Uuq+oZQKOd59pPLEMn0g32V0YHK+J658ksSb1fYujBf8Tl+aL 8QujTAoNQYJwGBFG1e8oO9CCRe7I6Je4e/WIif3UpVC/Gc6l3XBlpdKsclGi/g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718552263; a=rsa-sha256; cv=none; b=rd80SVABOCwg9wVDsxFYbXLjupLBVlEAxMDk/K3cfcrOj9Jaf8jS/vFhvAmMIVvxxcWiry cJu+AfOksziKuZ0a0zDrbruGKEwnssKBqFFe4V/AnZUcQ2+N5oiWx0kjzwdpMElxp1e1bt f8ZGUR1jOD7C48QYxndwOhmwzrd5XgQ1aX7VXsbrHiZ5vTUhWe6Dsjzxq9w7h9ZjoB2dQ7 Y5ILxWJzKA5AM7oSzKi8yuvTc453u3UrAQViMNU3Dncc01DwljS3HCTB2ujlagmSg6bLMT nzokj/I1DyoH5Ggwds9zGGkacXgAamH5SF4d2GD9P6kNij8HtnvFS7L/4YeRiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718552263; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jUn77Q4g0uV6gxadftMew6+wcXqy5q0wfg1lUBrPwSQ=; b=friufQqE3ClJp5H/kCdofvvJMXy92H2885mo4Vn7h3nI405rvS0xuw0JJ2Fm8JRzqTkS2S GqbDDBUbgz07V2ckgdT1pzGT49s0SycqFY3uVDvRaTEXcH5sh43crTHFYwg8rAseC4o7R7 nrULQ8v12eWBCRzz4qKJW4oU7qwjp34Q1azU0erMxJ4zjKOXKy00lXlqPW+ZwOgJqTUgmS 2U14BRbAXumQ8xdlNinjvZCSK7VgNoD3JQUBXtNWT41Rj7Vogq9mjtBuTaCB+8P3gYQU/0 ohFISDlUMOie8mO52XNLFlPQRQ8dFIOBHHXIYs0YFYn0D51ZRG4VEu3yZBcDBg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W2HFz4HC3zsVQ; Sun, 16 Jun 2024 15:37:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45GFbhxt070203; Sun, 16 Jun 2024 15:37:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45GFbhc1070200; Sun, 16 Jun 2024 15:37:43 GMT (envelope-from git) Date: Sun, 16 Jun 2024 15:37:43 GMT Message-Id: <202406161537.45GFbhc1070200@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: 28af3eb62b73 - main - Revert "swap_pager: small improvement to find_least" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 28af3eb62b733ce4d7e01e9ba30b7a18c8cf5369 Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=28af3eb62b733ce4d7e01e9ba30b7a18c8cf5369 commit 28af3eb62b733ce4d7e01e9ba30b7a18c8cf5369 Author: Doug Moore AuthorDate: 2024-06-16 15:37:16 +0000 Commit: Doug Moore CommitDate: 2024-06-16 15:37:16 +0000 Revert "swap_pager: small improvement to find_least" This reverts commit dd0e5c02ab13b9eb240d42a71a8f41a8b036bd33. --- sys/vm/swap_pager.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index 455c39ab6fd7..8d9236a2eb1a 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -2298,17 +2298,22 @@ swap_pager_find_least(vm_object_t object, vm_pindex_t pindex) VM_OBJECT_ASSERT_LOCKED(object); MPASS((object->flags & OBJ_SWAP) != 0); + if (pctrie_is_empty(&object->un_pager.swp.swp_blks)) + return (object->size); sb = SWAP_PCTRIE_LOOKUP_GE(&object->un_pager.swp.swp_blks, rounddown(pindex, SWAP_META_PAGES)); if (sb == NULL) return (object->size); - for (i = pindex - sb->p; i < SWAP_META_PAGES; i++) { - if (sb->d[i] != SWAPBLK_NONE) - return (sb->p + i); + if (sb->p < pindex) { + for (i = pindex % SWAP_META_PAGES; i < SWAP_META_PAGES; i++) { + if (sb->d[i] != SWAPBLK_NONE) + return (sb->p + i); + } + sb = SWAP_PCTRIE_LOOKUP_GE(&object->un_pager.swp.swp_blks, + roundup(pindex, SWAP_META_PAGES)); + if (sb == NULL) + return (object->size); } - sb = SWAP_PCTRIE_LOOKUP_GE(&object->un_pager.swp.swp_blks, pindex); - if (sb == NULL) - return (object->size); for (i = 0; i < SWAP_META_PAGES; i++) { if (sb->d[i] != SWAPBLK_NONE) return (sb->p + i); @@ -2318,7 +2323,7 @@ swap_pager_find_least(vm_object_t object, vm_pindex_t pindex) * We get here if a swblk is present in the trie but it * doesn't map any blocks. */ - __unreachable(); + MPASS(0); return (object->size); } From nobody Sun Jun 16 16:02:17 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W2HpK6Xcbz5P2yV; Sun, 16 Jun 2024 16:02:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2HpK65JHz4MY3; Sun, 16 Jun 2024 16:02:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718553737; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iPb13Ck3rCVKVcLSnYAhsi6iOmQSufoy7tq9Kmk5PAU=; b=rbf+MLsCIVjyHue16tLh1fI+kJCt7eDGhjLoGLxeg2lhE2IHI0dFldu691ub2T6weTOX/4 +ZWy0bqzuGuKnjJyi0pwkoBsoyropMgiZpkuDKYqt0IHBIjXDoq7XV+oW0yM501qDzEnAF 5wL7QeNedpxvePjq2HUH1W8BRoRi+jKVIGEGmnRed2k0uMETrjYec82jmyvIzyhW5VgeUQ TisucyoRdT61b4NSg60AP3lLvIAKD6CmwqLNnuIJx4ut/tzoTbCLRfIhAWEr7NXH7gOj0J ve2ohozawuxB4KbQ9vhqm6InKzNQagAqA7oLVTvAiEfj1T4sEBRvZCfyFjooSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718553737; a=rsa-sha256; cv=none; b=Mr4R3xUcHr+0zNaCYYMpAl4uXKwwBZBl/pTGs5IFnEKkY9bbvWn8svOdvf0Ykmhgp5J7hA 1eSE+riHe77eTLAlKIKcm8TVwcm8IsBYDwmG7pd68YlZ6MUuJ8Vm5/Bcx8xiXdGeffBEtY cIhCb0BPSo2rOrcZqhak2OjmbK3IapyV9Cqhfem7+wCPp6cftQGJ+/fR0r8CBXNxOvPW1x G10SfsmopCI1/T6r2zQpMUbjm/54g6Q/9Cwa1U6BhAIYsqs7U8znnxKSZl2cKHUiH4nCr1 ciX4787NL8FoISheNQ24EuSz8o/ArWflpgoEkwiL7og8KNV80pEAm8DGiBNaxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718553737; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iPb13Ck3rCVKVcLSnYAhsi6iOmQSufoy7tq9Kmk5PAU=; b=qzCbYiqs4BXKLqnh89QE6tuMMBA/6fb5IQMkCrf1me0/9w9v8quOpdNxv4o/Clf0jVxQdI vjsU7Zsaijep4MzdybD/sd9rCgNnplu4HZwVOXGoFnPqv0xXcGSvNPIqqSGE752SDTAAyh RrAE2hTrKaDNFa5mCeP5tBaJ8BILcd+AgkBsN9VBBP4N064tPEs45Q82s9+S7mlTVx7NbD A119plVNkYBmfAf6b52h/I78G7VLqsCWh1N/Yp1TJmdpxaGEmKYp6tF7CHHkEBGrKXd+Va zQmN1OZW/IHxgbghtfoVMoV+OQ5tEK8+RsHPQ6E89lt7/3WNNUUTluS4UK3S4w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W2HpK5jHvzv5t; Sun, 16 Jun 2024 16:02:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45GG2HsJ020770; Sun, 16 Jun 2024 16:02:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45GG2HNs020767; Sun, 16 Jun 2024 16:02:17 GMT (envelope-from git) Date: Sun, 16 Jun 2024 16:02:17 GMT Message-Id: <202406161602.45GG2HNs020767@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: d1e652bf04bd - main - camcontrol.8: Fix a typo in the manual page List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d1e652bf04bd94ed3469a5a2fcb6938b3f4dcbc0 Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=d1e652bf04bd94ed3469a5a2fcb6938b3f4dcbc0 commit d1e652bf04bd94ed3469a5a2fcb6938b3f4dcbc0 Author: Gordon Bergling AuthorDate: 2024-06-16 16:01:12 +0000 Commit: Gordon Bergling CommitDate: 2024-06-16 16:01:12 +0000 camcontrol.8: Fix a typo in the manual page - s/emtpy/empty/ MFC after: 3 days --- sbin/camcontrol/camcontrol.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/camcontrol/camcontrol.8 b/sbin/camcontrol/camcontrol.8 index bb206bf6ad85..bdda1828abf5 100644 --- a/sbin/camcontrol/camcontrol.8 +++ b/sbin/camcontrol/camcontrol.8 @@ -2330,7 +2330,7 @@ For the Report Zones command, specify a subset of zones to report. .It all Report all zones. This is the default. -.It emtpy +.It empty Report only empty zones. .It imp_open Report zones that are implicitly open. From nobody Sun Jun 16 16:03:42 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W2Hqy6x9Hz5P2qF; Sun, 16 Jun 2024 16:03:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2Hqy68qNz4MjW; Sun, 16 Jun 2024 16:03:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718553822; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bKxa6IJ2ej0ysVHcGNaT/ycolEc7MjpPmhCaxDdSLM8=; b=khR/oS2ZRvdlrcpAqCXOT9ndP2UQOQxNGNMW59ER1W82gVLo3qK+clxCeqchQX9gLtFag5 JimGWI2XkCgdDCC5y2EUNHU5FlbF8ukDDgW+JV4GG6Xa3BPuFAqFFqWz96PXCn2GV4rryQ 60gItQHoRGKfArtuo2vz80DGgiF7n53L1Kyaa2psmGsJlFGYyawhWLHedoGFcdg/CRiQaC ezXw9m9D3rsDxfTLyyELQo3+nGkv9N59yj1wsFyXbeGM17yR0wDmqmOuQNEGTYJ99MzGEH XrNGD8yPH+9h+ROKlPHNCJ3iJReegGFZVr796O4eOMkE3Yssj6375Nr6OdKUiA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718553822; a=rsa-sha256; cv=none; b=yHun74tOAPaP5C5yZ96fR5C55F+IqMVE07Ay3Nqqo9wU3Qx4EXaeRgUOusjs/zoEPxgGpV dyyPRIYvu1o9UR5Xsiy3pWu8wd1IYQLgGuLeoG0zKJ8gYQoOr4fQb5R6VJRKa+BrHrmEhQ rp6l+Frl5/TB30LFBb2ifn+J717ktwyWd+3tjcVfHo/tLy2HUWr52WNkf6raFvst03EyC7 qJa1y7Cssee4bcHbdEMBri6nGNp/1HpEWrACAmmqBy7th35dghxb1qPtzIjuxR0/SSJvuS BcnMRwX6PBSFaA+NGLbFYtRtN9Ttybf0U/XQydtPcDv0FbVADsR+EdTBq5/rbQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718553822; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bKxa6IJ2ej0ysVHcGNaT/ycolEc7MjpPmhCaxDdSLM8=; b=e0CSzcnyEIfZrJ8igPFFPZ6/Xu4uTbmqzxhJm+eqUKJvWiWiDayTZAvtw8DKlbmX8FJimN wub9sKVGN8haYVrVKyF6gCZQvAP4z6+7mYdoVuej5iLZM/ZtRucL8rj9L3M1GtWHDjHed/ Ft11cN5NpXYR/3/GgJSmYd9qvW/zl8QJLidBFnqdECb/GzaQRJ9Z4tO08nv67B/mMqwrt2 1F+eU6ZE2A3JeuJz6RJtwTTOncN3qMxNkqnNDL9xoRq3+lxAaF9XCu6E7dYXASBqxuoaCB Fr+TCP/5Hk46r3aSoAhbyKp9KgU+s1irnofReGC1jxIBbvqW7MFlDq1DJCddIQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W2Hqy5hP7ztxN; Sun, 16 Jun 2024 16:03:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45GG3gVP021114; Sun, 16 Jun 2024 16:03:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45GG3gU1021111; Sun, 16 Jun 2024 16:03:42 GMT (envelope-from git) Date: Sun, 16 Jun 2024 16:03:42 GMT Message-Id: <202406161603.45GG3gU1021111@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 018a361f8902 - main - virtio(4): Fix two typos in KASSERT messages List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 018a361f8902d629fca64be372ef9b266fee53ba Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=018a361f8902d629fca64be372ef9b266fee53ba commit 018a361f8902d629fca64be372ef9b266fee53ba Author: Gordon Bergling AuthorDate: 2024-06-16 16:02:46 +0000 Commit: Gordon Bergling CommitDate: 2024-06-16 16:02:46 +0000 virtio(4): Fix two typos in KASSERT messages - s/emtpy/empty/ MFC after: 5 days --- sys/dev/virtio/console/virtio_console.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/virtio/console/virtio_console.c b/sys/dev/virtio/console/virtio_console.c index 4a3fb1e97e57..66433565ce25 100644 --- a/sys/dev/virtio/console/virtio_console.c +++ b/sys/dev/virtio/console/virtio_console.c @@ -978,7 +978,7 @@ vtcon_ctrl_poll(struct vtcon_softc *sc, */ VTCON_CTRL_TX_LOCK(sc); KASSERT(virtqueue_empty(vq), - ("%s: virtqueue is not emtpy", __func__)); + ("%s: virtqueue is not empty", __func__)); error = virtqueue_enqueue(vq, control, &sg, sg.sg_nseg, 0); if (error == 0) { virtqueue_notify(vq); @@ -1366,7 +1366,7 @@ vtcon_port_out(struct vtcon_port *port, void *buf, int bufsize) vq = port->vtcport_outvq; KASSERT(virtqueue_empty(vq), - ("%s: port %p out virtqueue not emtpy", __func__, port)); + ("%s: port %p out virtqueue not empty", __func__, port)); sglist_init(&sg, 2, segs); error = sglist_append(&sg, buf, bufsize); From nobody Sun Jun 16 16:20:04 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W2JBr6vcGz5P43V; Sun, 16 Jun 2024 16:20:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2JBr6976z4P7M; Sun, 16 Jun 2024 16:20:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718554804; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4kdDWYp5S77udd3eb0rCb1SI2L5Zbkj7sBaY8TxAXRU=; b=xnHjp37ULe/NzcjO9zvhRgba0qcA/yyvEvjnio4H2moAYwZzsCbbIG0U4D1T1y9l7c0zND DTHqsy2HCJ8rmCiRIK8Cf5O2MJ3d4WPKltoI38oEWgDpBx+7+kH2TtJouIhqfE9tAMvgva hrpfHbb6yzSvFNAAPfQW9jGt124bikynpjenI4YUlB38EzApnEakVd1WJBmoRCNYA0fwn9 atbl7mBdXMU0NEpXStSydl6TaqP1+VzD8Z9S0aG3yA18sGVv1jsjTXkS9mdFCD2OqcVoH6 D1D8abCa3kL7HFcT1Np67c+yfowWFg91atpwk+iEbEvQMl2zNHXgplc6OdayaA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718554804; a=rsa-sha256; cv=none; b=ypdakv+hLFMzI91IgZWn2mXCW6rXi0CySwAf6qKecD2uVv890090GyGao8VJJFwfiG7AAb etO5EKBKFJdgzNSF17e9K9r6u4GOYXZg8R4+mdIAIgJ8L6PRoGsbU88XwXcrCl4SIPbWU2 y2jcEtJXYAoS+mYgODeHoEW3Di+ucgteccJpfzZNcAxpX1hN8TGC33OYuf99FadknZN2Kp mIjjHyXi9o7xymfwzU/JK720KCP2IxwWWlEMrN406OzFFnnNmG4kQqW4S2S8mC7IMB+BT3 MdsLM5OJxu4ejsPOq9mXdQVFujm9x2974M4bUCMsdcs4zhPVt3L/EDXjF624Mw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718554804; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4kdDWYp5S77udd3eb0rCb1SI2L5Zbkj7sBaY8TxAXRU=; b=I5q5WHYUq8OGQyfgW6LxRnczfvRqhJVkXs9g4N7Y6csFaDMOdGJV0/FX+fCrcQQCn7miBr BraDNz8kisFLnlkBESgX3SZrLvl0pFGNJuZ97K4bXAJoogxnaqwiDQj9Zn+LIef2vZFUNp EdIcI7soqsgAUkED1MRgQtABLwHLAolkTXDH7MsJzH+8br5I+SAo15W0qy90rxHobUfyZA AumCYqSRNlbxgvGKbqjPYNWN8WU/H/1AHZP6l/jzlK9Tc5lKHBSmfIHOzHi2Ro/lvbdrvh ooXqMMKwrIWvqSRGGDpvwAh/Yy6IzhaP7aVSSwFvqsLpShwNwgQXKoqFB4gouw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W2JBr5m42zvHj; Sun, 16 Jun 2024 16:20:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45GGK41b041113; Sun, 16 Jun 2024 16:20:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45GGK4Dq041106; Sun, 16 Jun 2024 16:20:04 GMT (envelope-from git) Date: Sun, 16 Jun 2024 16:20:04 GMT Message-Id: <202406161620.45GGK4Dq041106@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bojan =?utf-8?Q?Novkovi=C4=87?= Subject: git: b53b21e8f81a - main - amd64 pmap: Release PTP reference on leaf ptpage allocation failure List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bnovkov X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b53b21e8f81a8d2d233b99cee6426c2f64765a3c Auto-Submitted: auto-generated The branch main has been updated by bnovkov: URL: https://cgit.FreeBSD.org/src/commit/?id=b53b21e8f81a8d2d233b99cee6426c2f64765a3c commit b53b21e8f81a8d2d233b99cee6426c2f64765a3c Author: Bojan Novković AuthorDate: 2024-06-13 15:58:49 +0000 Commit: Bojan Novković CommitDate: 2024-06-16 16:19:26 +0000 amd64 pmap: Release PTP reference on leaf ptpage allocation failure aa3bcaa fixed an edge case invloving mlock() and superpage creation by creating and inserting a leaf pagetable page for mlock'd superpages. However, the code does not properly release the reference to the pagetable page in the error handling path. This commit fixes the issue by adding calls to 'pmap_abort_ptp' in the error handling path. Reported by: alc Approved by: markj (mentor) Fixes: aa3bcaa Differential Revision: https://reviews.freebsd.org/D45577 --- sys/amd64/amd64/pmap.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 4d4ecc8ea4e2..dee208fc9145 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -7595,10 +7595,13 @@ pmap_enter_pde(pmap_t pmap, vm_offset_t va, pd_entry_t newpde, u_int flags, if ((newpde & PG_W) != 0 && pmap != kernel_pmap) { uwptpg = pmap_alloc_pt_page(pmap, pmap_pde_pindex(va), VM_ALLOC_WIRED); - if (uwptpg == NULL) + if (uwptpg == NULL) { + pmap_abort_ptp(pmap, va, pdpg); return (KERN_RESOURCE_SHORTAGE); + } if (pmap_insert_pt_page(pmap, uwptpg, true, false)) { pmap_free_pt_page(pmap, uwptpg, false); + pmap_abort_ptp(pmap, va, pdpg); return (KERN_RESOURCE_SHORTAGE); } From nobody Sun Jun 16 16:20:05 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W2JBt0GXBz5P3mS; Sun, 16 Jun 2024 16:20:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2JBs6rN2z4P1c; Sun, 16 Jun 2024 16:20:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718554806; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r+yjclsVDdZ1STV0vGNJvLCeLz2GGxTx1xHEYS+k760=; b=RW1lqpGnEvsmq5ghSsbyVr/pM1YnCqzrXOcQ/lZ4FOIgVawbt2RYz7S30Bpa+3oPPesT/F 5YisGoKfGK3QXnqRwrB6XC5xWQ3dClyomQgQDqFx/Rr4SN/eVdQggbdf/+xPCOj9p4iSxd nvWyVw+GcmOF7ZwXFd60cMO31WvFiiZuAQo+hcvywCOrh5hQjzOsLrbhJbY8MkJvaFjSyL 3+NRYAaEhWgatTuMbtVKIN+A8T4l1+mUpK7GrrZUxhQ/h5tuHb/Hn9n8kJAhCBbSPBVGON ddOer4l+uHCrJkuWDXG/Tfq489Nk3u99AScdvQNRhvf/J3bxtrdVJmNu3irl4w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718554806; a=rsa-sha256; cv=none; b=bKfYm24K7BUcuUj4UYwxduBoE9dQ+Gznong9nRdqXN87hHnecwRPa4tvQaXTP7CQGe/+zw 2XcriU01ZC0MQwLL20NT1G+6y8L87DpWcP9JrontAdxN/AhthYjXGa3nC1V2bJ7T0sboSP Eq1LLWACFZtR8xGhInrIdW+zQjwNGW28i80ealohF8/JOG0mBtPYAtmihfxrwZOAu+2x1F 1LU/3kUK5eOZ1NAYH4hEuY4A8lH8ybyjft+KeXWZOYg7jYSfXkBoooX3Q7GTHnrAIWPE// 22uzg96zaGItUzWk6axo8s2b7vcPCl1lHMerIIYz1ujrnpuMcAUppTJQ+0S/fQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718554806; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r+yjclsVDdZ1STV0vGNJvLCeLz2GGxTx1xHEYS+k760=; b=Gy9oqplGP4VoAzjuODTLyugQxXsGHCRdSy7a7FbvOgRGJX8RU6hZieR+WxbRHTw38JUxUg g03EgV/e3dgJdsVjoP6kFozu4YLu4dQgsW+TJFA6Chk2CVeLTRJvNEH7SQBQSpO8XK2R7R /wB/gppOeFqgoJKJXF+Z77yTafExe2Wm0pcTwKNkRovUgW5rNHKaJwkRBQsgLOX8j07CdF efNxRJFWT4wW0IBW/UPZpQHCfSX3+8kudgIM+kJukl4geN5nLtsEA/2vqEJgszVB5Z20ri Kzg9vTHDcLZ3V7NEzOkns1d64DAQ2fMDMnCscXhdH590JCee3AIl8TZRLCTq5Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W2JBs6Prszv6d; Sun, 16 Jun 2024 16:20:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45GGK523041410; Sun, 16 Jun 2024 16:20:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45GGK5JU041404; Sun, 16 Jun 2024 16:20:05 GMT (envelope-from git) Date: Sun, 16 Jun 2024 16:20:05 GMT Message-Id: <202406161620.45GGK5JU041404@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bojan =?utf-8?Q?Novkovi=C4=87?= Subject: git: 5d4545a2270e - main - arm64 pmap: Release PTP reference on leaf ptpage allocation failure List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bnovkov X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5d4545a2270e9d6c37c0a580c010c579ccdfa129 Auto-Submitted: auto-generated The branch main has been updated by bnovkov: URL: https://cgit.FreeBSD.org/src/commit/?id=5d4545a2270e9d6c37c0a580c010c579ccdfa129 commit 5d4545a2270e9d6c37c0a580c010c579ccdfa129 Author: Bojan Novković AuthorDate: 2024-06-13 15:59:29 +0000 Commit: Bojan Novković CommitDate: 2024-06-16 16:19:26 +0000 arm64 pmap: Release PTP reference on leaf ptpage allocation failure 808f5ac fixed an edge case invloving mlock() and superpage creation by creating and inserting a leaf pagetable page for mlock'd superpages. However, the code does not properly release the reference to the pagetable page in the error handling path. This commit fixes the issue by adding calls to 'pmap_abort_ptp' in the error handling path. Reported by: alc Approved by: markj (mentor) Fixes: 808f5ac Differential Revision: https://reviews.freebsd.org/D45578 --- sys/arm64/arm64/pmap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 7b30b2a6ae37..e8991ae706f9 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -5545,12 +5545,14 @@ pmap_enter_l2(pmap_t pmap, vm_offset_t va, pd_entry_t new_l2, u_int flags, if ((new_l2 & ATTR_SW_WIRED) != 0 && pmap != kernel_pmap) { uwptpg = vm_page_alloc_noobj(VM_ALLOC_WIRED); if (uwptpg == NULL) { + pmap_abort_ptp(pmap, va, l2pg); return (KERN_RESOURCE_SHORTAGE); } uwptpg->pindex = pmap_l2_pindex(va); if (pmap_insert_pt_page(pmap, uwptpg, true, false)) { vm_page_unwire_noq(uwptpg); vm_page_free(uwptpg); + pmap_abort_ptp(pmap, va, l2pg); return (KERN_RESOURCE_SHORTAGE); } pmap_resident_count_inc(pmap, 1); From nobody Sun Jun 16 16:20:06 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W2JBv16k4z5P43Z; Sun, 16 Jun 2024 16:20:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2JBv0P8yz4P7R; Sun, 16 Jun 2024 16:20:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718554807; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Gt/HBUY3N6vgFsXlAPMaVBlXYsXfbO5IeyQLRalf6Yo=; b=pBJc1zxDTldmHsVgVuI4lsSp2OW+iZxjU2Oxw9Uhr0vu87XRDvXpMGV10hqI9q/TrHraY5 RIsndaSmV26ZjyKSzccbehuh3BVU546nqPEqYrtN4R+7p8SbHMKNKntTTsTRrzvN+/EKw2 1bLHAnZQVaS5uJqAQqQ9KiN5PLQ79U8iqSyS8X33gfvu483Q7jLDuC+CAUJq0ZZlxz5goY fgOSmIRvI+VWWqegGKotxgOhOBr8ZsqeYZZiIa40ah7+PQcVc1QlvzhHkUMSYuHadMl2Qf gy1hT280Ywpid1/9y2Du+kf1amoPUYoLxgP0O5eN3079mBt5c1MvdSB5p7VhbA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718554807; a=rsa-sha256; cv=none; b=QCfjy8hLtxfufAgHIfJa0JGLQfH2iwsTrQbX7X0bJL5QycMi+SlOpnHLafoy5/6zQk6Iv2 6eyu3q6PH9No2KEU2OsxKdfHed6U8d2akVG7+rYVj23GFguES8d0Orm7swh/a6/MRx+sSs VgRRzTIkH7+HxzUM6csnFrR4WPuCPg3DQvTSkwV1rjKtpR6oIp+xjrgHq8iL4jprs/ekpV ZYibO4lFBICyc1YQp5KMoH+wCFafKRmzbYaNRdcIynsnQ39XkrP+YDz030j35hO/zf1QHS TSRP7xOrms+lqs/WpYc94bVRaL9YWJ/m2crP5En45Q63ZVkiItlYS16D8pZMYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718554807; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Gt/HBUY3N6vgFsXlAPMaVBlXYsXfbO5IeyQLRalf6Yo=; b=EzjhxBBzL0n0/khcMtfCI/jdJzZYAIcD1ai9HH5VKHMgpq5uM4r1ESSwX+qKJ4Fg8ZR20r w1U+L9lIn8/oZDeOCtpsPP5YaYicQN6uUhDg099DPuXXvy4gmIDdbg1n57eHOQNCjU1tNV tt1MZM/MZJpg/NVH2fwx5OkUO4HznHTJDgPaGmo5J4wiAVN17KM8DD2ssYgY0/nw8YiEoa 5FBV3HnnjY4kuyjWH+RG042QPUkWnASFn3v3cmuoRfWz+ObJ+z0b2B5x6XMhmqH2G1EYWf pJ1DS+ClbcKB0ilSgfz+WZwW+rtbPvP2kEOxR7HUTEu3ErAWOJo8Rhfp93OfZg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W2JBt72Ptzvcn; Sun, 16 Jun 2024 16:20:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45GGK6TI041682; Sun, 16 Jun 2024 16:20:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45GGK6no041677; Sun, 16 Jun 2024 16:20:06 GMT (envelope-from git) Date: Sun, 16 Jun 2024 16:20:06 GMT Message-Id: <202406161620.45GGK6no041677@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bojan =?utf-8?Q?Novkovi=C4=87?= Subject: git: 200de4dc0716 - main - powerpc_mmu_radix: Introduce 'pmap_abort_ptp' List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bnovkov X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 200de4dc0716ae2cc2b0995ccb6eee555d14c751 Auto-Submitted: auto-generated The branch main has been updated by bnovkov: URL: https://cgit.FreeBSD.org/src/commit/?id=200de4dc0716ae2cc2b0995ccb6eee555d14c751 commit 200de4dc0716ae2cc2b0995ccb6eee555d14c751 Author: Bojan Novković AuthorDate: 2024-06-13 16:03:31 +0000 Commit: Bojan Novković CommitDate: 2024-06-16 16:19:26 +0000 powerpc_mmu_radix: Introduce 'pmap_abort_ptp' This commit moves code for releasing pagetable page references into a separate function. No functional change intended. Approved by: markj (mentor) Differential Revision: https://reviews.freebsd.org/D45581 --- sys/powerpc/aim/mmu_radix.c | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/sys/powerpc/aim/mmu_radix.c b/sys/powerpc/aim/mmu_radix.c index 0a534e3f9d3f..746b1ef49a99 100644 --- a/sys/powerpc/aim/mmu_radix.c +++ b/sys/powerpc/aim/mmu_radix.c @@ -3137,6 +3137,28 @@ out: return (rv); } +/* + * Release a page table page reference after a failed attempt to create a + * mapping. + */ +static void +pmap_abort_ptp(pmap_t pmap, vm_offset_t va, vm_page_t pdpg) +{ + struct spglist free; + + SLIST_INIT(&free); + if (pmap_unwire_ptp(pmap, va, pdpg, &free)) { + /* + * Although "va" is not mapped, paging- + * structure caches could nonetheless have + * entries that refer to the freed page table + * pages. Invalidate those entries. + */ + pmap_invalidate_page(pmap, va); + vm_page_free_pages_toq(&free, true); + } +} + /* * Tries to create a read- and/or execute-only 2MB page mapping. Returns true * if successful. Returns false if (1) a page table page cannot be allocated @@ -3264,17 +3286,7 @@ pmap_enter_l3e(pmap_t pmap, vm_offset_t va, pml3_entry_t newpde, u_int flags, * Abort this mapping if its PV entry could not be created. */ if (!pmap_pv_insert_l3e(pmap, va, newpde, flags, lockp)) { - SLIST_INIT(&free); - if (pmap_unwire_ptp(pmap, va, pdpg, &free)) { - /* - * Although "va" is not mapped, paging- - * structure caches could nonetheless have - * entries that refer to the freed page table - * pages. Invalidate those entries. - */ - pmap_invalidate_page(pmap, va); - vm_page_free_pages_toq(&free, true); - } + pmap_abort_ptp(pmap, va, pdpg); if (uwptpg != NULL) { mt = pmap_remove_pt_page(pmap, va); KASSERT(mt == uwptpg, From nobody Sun Jun 16 16:20:07 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W2JBw45z3z5P41r; Sun, 16 Jun 2024 16:20:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2JBw0wM8z4P5J; Sun, 16 Jun 2024 16:20:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718554808; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I228+A+kSbOkphE1mEqEw9vNx6gPl8Eg4pk/sygj24A=; b=Z+JnDubiEBIkk4jg1j1rAo1Nr86xx9PQHd9Nn03hZQoKKClaUQGfy6O2YhBfxDEPNBSlrs qx0lU3G02aD6PQ+6n/MLZBqZVb4aWJhB2UD+HPyHYcEnwEta9jCIxXUcleNcR4YwSzsXQB V/3qH13LCh8bpRRcaWqBLzJctv9cNiJQNgwDgpoz0mkZvUB3UCoGwudt6bGzHJUJ+Q2Z4l 3ZWCHVgQRrmlDlYIfABGqdUUEzVMJYp1ekO1O37AqUaToDTymelMZUFSp+wmlnlGgmQbfg TLEnQdQOPLWQ4fUPo5Kp+L7Ix6qhcGiuAcucbz7mryGlRE5i+dl1qdWMsMmLsg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718554808; a=rsa-sha256; cv=none; b=Z2n5Da7r4CO1IOZdjLuxDkspcBHqlWNkWxYhfqHzcCfDSZbRPurtPhI8lUVQxmbQKTlZcx K+xTn3xKWBVVa3pd6Oi6zDOoXwL/dlX3iNw4uvgVOgCTS8KMf+KfbV14xLDeHs+PxQsZiP p6Q7VvdeQ4CkLL/YW4Xl+LMQJ72KdWXj629vY2Xun9g8fGpMo6hjAbRWIB4116fzWCo4tJ vzLQ6AvSMYmD7VAOtXeEH/OfjYBaBpmBGbBGsJB63skkeJaXvSgWnEirSZYBc3HWdK/AfK ELZH8XKeTg7/RdvcV3cS7PJMlEi021vVg6PJNFoZGy+502KCJxJ4sXUpGUH2Ww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718554808; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I228+A+kSbOkphE1mEqEw9vNx6gPl8Eg4pk/sygj24A=; b=k4QBcGb68kFzpRZCAqPGIXkL2d0q5p0mOmP/9WO48idZnwB/pyWdLXfHqUMYYX97+Y18p+ 9la9YMfrzU3VxZnlDyv+KF1eUBQmj75ssPQ/Tk+8XuaY5GUEPFaUBYjAyPbRcDdN/9NlLY FovkoAns78F+vovp8jdw0KpAxbVbS3B9FWNiQaaIctg+aJ+DL/aKXEHf9M+DfbaG5tyVSi 0WsZyUIqZ0lZvhTLN9jVkbkzZjgb8rYwhpWwIT3BflNzWbcBqGBm55qaukLtaMy9cy4pTd lGkaBFxqhJ2yVrbdAmWS9878njZkGen+wjZ42g54SJUD4xLQ1qM8Zo9rJ/KZ+w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W2JBw0WMWzvcp; Sun, 16 Jun 2024 16:20:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45GGK7oq041976; Sun, 16 Jun 2024 16:20:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45GGK7MB041972; Sun, 16 Jun 2024 16:20:07 GMT (envelope-from git) Date: Sun, 16 Jun 2024 16:20:07 GMT Message-Id: <202406161620.45GGK7MB041972@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bojan =?utf-8?Q?Novkovi=C4=87?= Subject: git: 858ead4bcefb - main - powerpc_mmu_radix: Release PTP reference on leaf ptpage allocation failure List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bnovkov X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 858ead4bcefb4657629cba29b0e4507db509ee36 Auto-Submitted: auto-generated The branch main has been updated by bnovkov: URL: https://cgit.FreeBSD.org/src/commit/?id=858ead4bcefb4657629cba29b0e4507db509ee36 commit 858ead4bcefb4657629cba29b0e4507db509ee36 Author: Bojan Novković AuthorDate: 2024-06-13 16:11:12 +0000 Commit: Bojan Novković CommitDate: 2024-06-16 16:19:27 +0000 powerpc_mmu_radix: Release PTP reference on leaf ptpage allocation failure 0013741 fixed an edge case invloving mlock() and superpage creation by creating and inserting a leaf pagetable page for mlock'd superpages. However, the code does not properly release the reference to the pagetable page in the error handling path. This commit fixes the issue by adding calls to 'pmap_abort_ptp' in the error handling path. Reported by: alc Approved by: markj (mentor) Fixes: 0013741 Differential Revision: https://reviews.freebsd.org/D45582 --- sys/powerpc/aim/mmu_radix.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/powerpc/aim/mmu_radix.c b/sys/powerpc/aim/mmu_radix.c index 746b1ef49a99..ae6e4d116e87 100644 --- a/sys/powerpc/aim/mmu_radix.c +++ b/sys/powerpc/aim/mmu_radix.c @@ -3268,12 +3268,15 @@ pmap_enter_l3e(pmap_t pmap, vm_offset_t va, pml3_entry_t newpde, u_int flags, uwptpg = NULL; if ((newpde & PG_W) != 0 && pmap != kernel_pmap) { uwptpg = vm_page_alloc_noobj(VM_ALLOC_WIRED); - if (uwptpg == NULL) + if (uwptpg == NULL) { + pmap_abort_ptp(pmap, va, pdpg); return (KERN_RESOURCE_SHORTAGE); + } uwptpg->pindex = pmap_l3e_pindex(va); if (pmap_insert_pt_page(pmap, uwptpg)) { vm_page_unwire_noq(uwptpg); vm_page_free(uwptpg); + pmap_abort_ptp(pmap, va, pdpg); return (KERN_RESOURCE_SHORTAGE); } pmap_resident_count_inc(pmap, 1); From nobody Sun Jun 16 16:20:09 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W2JBx5LRxz5P3mX; Sun, 16 Jun 2024 16:20:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2JBx1lhfz4PH1; Sun, 16 Jun 2024 16:20:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718554809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W8IW7SCRqmQ5FcAC4ozfMlg4eXsLOFhxcnSqs7iFSmU=; b=R0g63UITdI6y8Jijn2MFwqATc+m6sGDuTg0mwxOpOEWwA2LlBLqynzd5YgKuXLUqUub+Sl zHzInP2r7MEiv1FU2sG9ZKmoWW1O0CHeZq2DwU7hPqvjvN275pQpB3Qu3WT4QWVC+vygIw f+CWpgY8fJxSb9fPTVSN75ICEbj2yBu8TzGELi/6Ebp81xOQzpywCi0WcJ2WKaKdwaO5r3 ciXOhYvUTIlByHMEcvk9TFSLb1bscn5G3/yXsOoocEvkG7HU2TInJ+NH4oZUTa98WHE01T P9mjgYn3wYZabdsghjUvPgG/ehGzJU0a+bYOdgqYMegKbMIQDXq8xCXRN7bkcQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718554809; a=rsa-sha256; cv=none; b=C1w3tGcYAAyVmpxj8qEpkvAIwq1Qecwjqs2Dt/JLKNTEjpBKQ++QSAimXdYiQUtDYQsBn+ yXzPLdnIjS8qpDdOuwNC46zz13yspMQ3xUOIMqnN7XB65ZTOnvvh4fAs6x8Kis/eUA+807 mnLNk6l1XrYm8qy0F6dfXUk41/bIKye4IsghQjQhOe27gRmcg5cPKVm7BsPXHgN9/m4E7l tmepC2aQ923fKYSgjyGppMuKdFTm3iBgcJU1tpPEoKN+kmJm8v0X0xLZCm+j+UuEFvqXNa flNQ0Ot9+0Qo91fxaUh5JgWnJak03t2a1S+pD+iUwRt69uIdgKDH0YueR06fgg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718554809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W8IW7SCRqmQ5FcAC4ozfMlg4eXsLOFhxcnSqs7iFSmU=; b=ToxIHr0aNoVtOuxS1dkTq5wg1BSDJtGp1Li9tzvrtL3w7QpHIsXeMpwHEuJefSRu/FzrIk ArlP/a+caux+C7LMaIOo8WqvyfqoQUii0t/UaY86A+SbAVPDlP9xEVZudoeypespjm39Yz LgIPtDO6z2tqBXNnQ4X85oNzass5xZpP6gwLwEvNKK6R9nGKokkPBdWUtqQwN+DAI3zkR0 bosfu9wbEtcsJkzqraNYo88saquxDRU3M5Md85xQOg+3DqLjoMMt7j31HhA7WSCWz/HLRD tWlXLrGaOV5RS1Vzm81nzNe0o6vZnEC4Rn8vXHn6Yzwy5+dHzwbzUvdqjrYLOw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W2JBx12Y8zvcq; Sun, 16 Jun 2024 16:20:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45GGK9aN042249; Sun, 16 Jun 2024 16:20:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45GGK9bu042244; Sun, 16 Jun 2024 16:20:09 GMT (envelope-from git) Date: Sun, 16 Jun 2024 16:20:09 GMT Message-Id: <202406161620.45GGK9bu042244@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bojan =?utf-8?Q?Novkovi=C4=87?= Subject: git: e8816b4b66ad - main - riscv pmap: Introduce 'pmap_abort_ptp' List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bnovkov X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e8816b4b66adf2e6052803cd0eb609ee63fbb3ed Auto-Submitted: auto-generated The branch main has been updated by bnovkov: URL: https://cgit.FreeBSD.org/src/commit/?id=e8816b4b66adf2e6052803cd0eb609ee63fbb3ed commit e8816b4b66adf2e6052803cd0eb609ee63fbb3ed Author: Bojan Novković AuthorDate: 2024-06-13 16:13:53 +0000 Commit: Bojan Novković CommitDate: 2024-06-16 16:19:27 +0000 riscv pmap: Introduce 'pmap_abort_ptp' This commit moves code for releasing pagetable page references into a separate function. No functional change intended. Approved by: markj (mentor) Differential Revision: https://reviews.freebsd.org/D45579 --- sys/riscv/riscv/pmap.c | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/sys/riscv/riscv/pmap.c b/sys/riscv/riscv/pmap.c index 1902f1f4009b..4f6305ed651d 100644 --- a/sys/riscv/riscv/pmap.c +++ b/sys/riscv/riscv/pmap.c @@ -3137,6 +3137,28 @@ out: return (rv); } +/* + * Release a page table page reference after a failed attempt to create a + * mapping. + */ +static void +pmap_abort_ptp(pmap_t pmap, vm_offset_t va, vm_page_t l2pg) +{ + struct spglist free; + + SLIST_INIT(&free); + if (pmap_unwire_ptp(pmap, va, l2pg, &free)) { + /* + * Although "va" is not mapped, paging-structure + * caches could nonetheless have entries that + * refer to the freed page table pages. + * Invalidate those entries. + */ + pmap_invalidate_page(pmap, va); + vm_page_free_pages_toq(&free, true); + } +} + /* * Tries to create a read- and/or execute-only 2MB page mapping. Returns * KERN_SUCCESS if the mapping was created. Otherwise, returns an error @@ -3285,17 +3307,7 @@ pmap_enter_l2(pmap_t pmap, vm_offset_t va, pd_entry_t new_l2, u_int flags, * Abort this mapping if its PV entry could not be created. */ if (!pmap_pv_insert_l2(pmap, va, new_l2, flags, lockp)) { - SLIST_INIT(&free); - if (pmap_unwire_ptp(pmap, va, l2pg, &free)) { - /* - * Although "va" is not mapped, paging-structure - * caches could nonetheless have entries that - * refer to the freed page table pages. - * Invalidate those entries. - */ - pmap_invalidate_page(pmap, va); - vm_page_free_pages_toq(&free, true); - } + pmap_abort_ptp(pmap, va, l2pg); if (uwptpg != NULL) { mt = pmap_remove_pt_page(pmap, va); KASSERT(mt == uwptpg, From nobody Sun Jun 16 16:20:10 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W2JBy3lLxz5P43c; Sun, 16 Jun 2024 16:20:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2JBy22zxz4PBh; Sun, 16 Jun 2024 16:20:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718554810; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=alHLw9Xl7r5Zulusvkd7BBIV3EkJlY2kzU5TB+5WKyQ=; b=WJzv4Gevdnwr6UEUgGM7uRiPScVpMnfcJqFehOj+lsOdmUj+qJfx8zNTbFlX/LMHVb2h+A dWmvT8TZ0TUOBx3JLR6TXzQQpEboxppTjlwZcu4ZZaE4d++upg3Zk101Y8z70z/lItGFYf yVIVlvc7dXek8A0tCtirCjK815bKJMgmqDXWk08r11qU0WupX4XM4FG3O+rSeLh7kxqnRQ 0mqSegT9MGnIqj5BCMENpUgytj6P/gWWvsxJhMwY1qS+WIbqCzx5uzZim0zSMJwcbxpX5F tidRx6v/iJbJa++hrUL6Zv7yoQ8oVTrCydSRnmQUc27GeluD8J3WOO0AH0whOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718554810; a=rsa-sha256; cv=none; b=VB3NF+OhiY7SW4zcLL55Ju7kLXxi5MyzU5nFDfw01NGOlwgO8oGQlpQEOPIIdPsDgLRzf8 IpmUZhdm0fq5VJQ3cgZZD8blOSdW7KM33jNoWFrN8HSsblmXFSSw8y7xnl8G64F5SGyIxz WY+9HfilxxBEaiB/fzl9xo1Ydj3QJyR0++NXS+7cDDz/lVZ99X8JDeRKXcbdUvoQqNJDGU xdxRmNphvmLVn+1ZeFJlNi0te225Ce3OOs8gmqTd1gGbld944683oBpMRX5C+WaDTLWpwY xVHr6PdvsVsZODpD+QSC0UBYZOTVs8GLFE0Ag2Q7EgGri28kxpvWqbAOca3gBg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718554810; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=alHLw9Xl7r5Zulusvkd7BBIV3EkJlY2kzU5TB+5WKyQ=; b=yeDwQszowgCEngWr9QRmB458YIiEMqt6LtquS/T1c7P04isoGfu+fwhhUkJGqC7r73+Lai eFPALSGf8M5qlW0t9l+JyjF7odUwhdDXJvrTOPFdkQ71GXZUU17ZoSc23y3N6+uF0cw704 MJvL8G/h8bJjERsK8oMwnpm5HbDpf5yzqXqzBYjavRkCiJEobQSIuOnSXziLlz6wkp0drq h9jyW+aWhLaW81QyZCr4vkoaJASw86bP32CHqfOaNhkFjafsqwryIsuK/QrnKD2/LNfSze JUF5n01NR+iAKKYRJ0CSKCi2bZ4w7wle0im+DC+wIUCBMeyt2cJ/M7sbhdiXDA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W2JBy1gTRzvcr; Sun, 16 Jun 2024 16:20:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45GGKA1k042807; Sun, 16 Jun 2024 16:20:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45GGKAnr042801; Sun, 16 Jun 2024 16:20:10 GMT (envelope-from git) Date: Sun, 16 Jun 2024 16:20:10 GMT Message-Id: <202406161620.45GGKAnr042801@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bojan =?utf-8?Q?Novkovi=C4=87?= Subject: git: 774549fe06ac - main - riscv pmap: Release PTP reference on leaf ptpage allocation failure List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bnovkov X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 774549fe06ac0f45a5a5a661a7fb4107a8695d4c Auto-Submitted: auto-generated The branch main has been updated by bnovkov: URL: https://cgit.FreeBSD.org/src/commit/?id=774549fe06ac0f45a5a5a661a7fb4107a8695d4c commit 774549fe06ac0f45a5a5a661a7fb4107a8695d4c Author: Bojan Novković AuthorDate: 2024-06-13 16:14:21 +0000 Commit: Bojan Novković CommitDate: 2024-06-16 16:19:27 +0000 riscv pmap: Release PTP reference on leaf ptpage allocation failure d0941ed fixed an edge case invloving mlock() and superpage creation by creating and inserting a leaf pagetable page for mlock'd superpages. However, the code does not properly release the reference to the pagetable page in the error handling path. This commit fixes the issue by adding calls to 'pmap_abort_ptp' in the error handling path. Reported by: alc Approved by: markj (mentor) Fixes: d0941ed Differential Revision: https://reviews.freebsd.org/D45580 --- sys/riscv/riscv/pmap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/riscv/riscv/pmap.c b/sys/riscv/riscv/pmap.c index 4f6305ed651d..1e4061935ca0 100644 --- a/sys/riscv/riscv/pmap.c +++ b/sys/riscv/riscv/pmap.c @@ -3291,12 +3291,14 @@ pmap_enter_l2(pmap_t pmap, vm_offset_t va, pd_entry_t new_l2, u_int flags, if ((new_l2 & PTE_SW_WIRED) != 0 && pmap != kernel_pmap) { uwptpg = vm_page_alloc_noobj(VM_ALLOC_WIRED); if (uwptpg == NULL) { + pmap_abort_ptp(pmap, va, l2pg); return (KERN_RESOURCE_SHORTAGE); } uwptpg->pindex = pmap_l2_pindex(va); if (pmap_insert_pt_page(pmap, uwptpg, true, false)) { vm_page_unwire_noq(uwptpg); vm_page_free(uwptpg); + pmap_abort_ptp(pmap, va, l2pg); return (KERN_RESOURCE_SHORTAGE); } pmap_resident_count_inc(pmap, 1); From nobody Sun Jun 16 16:55:48 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W2K084BRJz5P71G; Sun, 16 Jun 2024 16:55:52 +0000 (UTC) (envelope-from unkadoug@gmail.com) Received: from mail-ot1-x32c.google.com (mail-ot1-x32c.google.com [IPv6:2607:f8b0:4864:20::32c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2K081gPGz4Vnb; Sun, 16 Jun 2024 16:55:52 +0000 (UTC) (envelope-from unkadoug@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ot1-x32c.google.com with SMTP id 46e09a7af769-6f9923df5dbso2163154a34.2; Sun, 16 Jun 2024 09:55:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718556950; x=1719161750; darn=freebsd.org; h=content-transfer-encoding:in-reply-to:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=Z+CtyinDJ2ytkxC6eXJ8EBxYx3gd46UfYjmeEIirlXU=; b=ck1ZsHMJ90tRoGxj9hheV+fG8wGcUlyO4U2UZ73uGqrsZXBO6Lpw/0jT0Zqaf0c4Bi StMwqsrwrAOe2wByarTX0/rDHSCns/1k5KT8mZhj2EyOnhSEZDIrm6wGcvzaoXq58s9x 0P03VXNnyYvSAqUGjkG+Z6rhKXvYdzKAEljdVVLEQbF5a+m11lebNdsp/3Z1Jjpddrmy Yoiuz8+pV9O4bADsraKJAKhhwgY3p4efgswZ3uKZEFhBKN9z+TVtJb1gnD16ktjInC2i kIEwc8ahHciHgsc8EzCg2BcxAQLHBk5s8R0cFNksbU7CGSBg/9033x9iKrKAEqiyZ0Ew zPbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718556950; x=1719161750; h=content-transfer-encoding:in-reply-to:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Z+CtyinDJ2ytkxC6eXJ8EBxYx3gd46UfYjmeEIirlXU=; b=mONij5TpgYardOxl7yAMECgW06HY/czBr+eUemYT5X+9Q1nT626GSM6thiSeTqiJCk HtfrVqOgrf6pr0JVFMx7mA6VP/1HTE4FEmXibO3SM1npSv+A1i1Qr9wkv4MYELRS6KHk 6PD6GPMnV/0BQIK1ogTeHRAKmK+o2M8KSKBPYZlA7ClfmyddU4+rULw+NnaT6YlkNE/2 HZsnOLJ+D/f5chfnGgWHEEAiM2Gg8jeJ0SqHLXx0YSr2e/EQuGXAChmg/nhdjMMqw5gS j/ZKlYVPHv74P3pdrT2Objcp475JRA/TuCn2eKiQ8WFPQ489e2el9PLks8gul9EsVB0A g4Sw== X-Forwarded-Encrypted: i=1; AJvYcCU9sGc27XS1pJDC2OrY3B9S3BxkOUwFNPEddAXUpH3xiSJ72hM7sZ31/hLMv0YHiHV26S1UQpyZwr7SNUEJNekrDGtz+thYP05TNkCY6hjNFlP0aaz6gFshHQpdLQgMjOKlVGgJi1FMtZ3jgHMKMriXLA== X-Gm-Message-State: AOJu0Yw++0ITkEAv+pfqHNg2N5NAjmrS1FyrdUkcEMM+wDOgdhDrIvP0 21dkelKZ3qVTEVTVMtcROLmu1nJej8TiTzy8bhFGcWulGInao4sRE3BfEdIT X-Google-Smtp-Source: AGHT+IGLeSTzv+8DOETvcP/5AT+WMYk71/tTgefL9Q/Mo+LMk3Va/o2p5eto3PISS/pYmxEyrIuhjg== X-Received: by 2002:a05:6830:1682:b0:6f9:7fb1:b6f6 with SMTP id 46e09a7af769-6fb93b1b142mr8918491a34.32.1718556950490; Sun, 16 Jun 2024 09:55:50 -0700 (PDT) Received: from [108.254.203.202] (108-254-203-202.lightspeed.hstntx.sbcglobal.net. [108.254.203.202]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-6fb5b1f57a1sm1292995a34.46.2024.06.16.09.55.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 16 Jun 2024 09:55:49 -0700 (PDT) From: Doug Moore X-Google-Original-From: Doug Moore Message-ID: <29240b1e-6a8a-0bd5-f16f-322623d4b778@freebsd.org> Date: Sun, 16 Jun 2024 11:55:48 -0500 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: git: dd0e5c02ab13 - main - swap_pager: small improvement to find_least Content-Language: en-US To: Peter Holm Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202406111638.45BGcnhX099470@gitrepo.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4W2K081gPGz4Vnb Thank you, Peter.  That was a stupid mistake and I have now undone it. Doug On 6/16/24 07:13, Peter Holm wrote: > On Tue, Jun 11, 2024 at 04:38:49PM +0000, Doug Moore wrote: >> The branch main has been updated by dougm: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=dd0e5c02ab13b9eb240d42a71a8f41a8b036bd33 >> >> commit dd0e5c02ab13b9eb240d42a71a8f41a8b036bd33 >> Author: Doug Moore >> AuthorDate: 2024-06-11 16:36:23 +0000 >> Commit: Doug Moore >> CommitDate: 2024-06-11 16:36:23 +0000 >> >> swap_pager: small improvement to find_least >> >> Drop an unneeded test, a branch and a needless computation to save a >> few instructions. >> >> Reviewed by: kib >> Differential Revision: https://reviews.freebsd.org/D45558 >> --- >> sys/vm/swap_pager.c | 19 +++++++------------ >> 1 file changed, 7 insertions(+), 12 deletions(-) >> >> diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c >> index a07a38481490..15f227457bba 100644 >> --- a/sys/vm/swap_pager.c > Doug, > > Here's an easy way to reproduce the issue: > > 12:43 ~ $ sort /dev/zero & > [1] 3650 > 12:43 ~ $ sort /dev/zero & > [2] 3651 > 12:43 ~ $ sort /dev/zero & > [3] 3652 > 12:43 ~ $ panic: Negative index: -16 > cpuid = 8 > time = 1718534645 > KDB: stack backtrace: > db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe010855fa50 > vpanic() at vpanic+0x13f/frame 0xfffffe010855fb80 > panic() at panic+0x43/frame 0xfffffe010855fbe0 > swap_pager_find_least() at swap_pager_find_least+0x105/frame 0xfffffe010855fc20 > vm_object_collapse() at vm_object_collapse+0x68b/frame 0xfffffe010855fca0 > vmspace_fork() at vmspace_fork+0xb68/frame 0xfffffe010855fd30 > fork1() at fork1+0x4f8/frame 0xfffffe010855fda0 > sys_fork() at sys_fork+0x54/frame 0xfffffe010855fe00 > amd64_syscall() at amd64_syscall+0x158/frame 0xfffffe010855ff30 > fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe010855ff30 > --- syscall (2, FreeBSD ELF64, fork), rip = 0xaba1c31565a, rsp = 0xaba1b0cecb8, rbp = 0xaba1b0cf220 --- > KDB: enter: panic > [ thread pid 3653 tid 100349 ] > Stopped at $0,0x104d5c2(%rip) > db> x/s version > version: FreeBSD 15.0-CURRENT #2 main-n270778-d26c565597b8-dirty: Sun Jun 16 12:32:39 CEST 2024\012 pho@mercat1.netperf.freebsd.org:/usr/src/sys/amd64/compile/PHO\012 > db> > > --- a/sys/vm/swap_pager.c > +++ b/sys/vm/swap_pager.c > @@ -2303,6 +2303,7 @@ swap_pager_find_least(vm_object_t object, vm_pindex_t pindex) > if (sb == NULL) > return (object->size); > for (i = pindex - sb->p; i < SWAP_META_PAGES; i++) { > + KASSERT((i >= 0), ("Negative index: %d", i)); > if (sb->d[i] != SWAPBLK_NONE) > return (sb->p + i); > } > > - Peter From nobody Sun Jun 16 17:11:10 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W2KLS6jTFz5P87g; Sun, 16 Jun 2024 17:11:44 +0000 (UTC) (envelope-from freebsd@walstatt-de.de) Received: from smtp052.goneo.de (smtp5.goneo.de [IPv6:2001:1640:5::8:30]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2KLR50g5z4Ycw; Sun, 16 Jun 2024 17:11:43 +0000 (UTC) (envelope-from freebsd@walstatt-de.de) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=walstatt-de.de header.s=DKIM001 header.b=jQ2lVpTN; dmarc=none; spf=pass (mx1.freebsd.org: domain of freebsd@walstatt-de.de designates 2001:1640:5::8:30 as permitted sender) smtp.mailfrom=freebsd@walstatt-de.de Received: from hub2.goneo.de (hub2.goneo.de [IPv6:2001:1640:5::8:53]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp5.goneo.de (Postfix) with ESMTPS id 779CA240454; Sun, 16 Jun 2024 19:11:40 +0200 (CEST) Received: from hub2.goneo.de (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by hub2.goneo.de (Postfix) with ESMTPS id 9A38E240308; Sun, 16 Jun 2024 19:11:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walstatt-de.de; s=DKIM001; t=1718557898; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0n0+RjHXOQT6iCXHLVRRPam81H2YLYG1M5ZIyI+EeD4=; b=jQ2lVpTNMM1FIgAbmqcGxKg6xAPo5cQJBvQVIK4XpwM3qqjcDjD+PNq/OM7npOJlsUG9hW nWoheFtx+dIAcK6hLrdZEhPl/8SCWQHVtqoALU2rQTeZ5osaOA/1swKvcT9WonIXlvrAZ1 fhrh0kxces7U8H9XnHgSjldbEreEawAEsIJ2Udq+26tzAKS4PiPd6fP8EFJu9xvECdKDkz 3LXnwcWGJjbbO8wr4BWjaTLrTlshrfYmk/fbh5jAsLaRlqKEY/ICuQHBjG7T1PpHLPY9af py1gq06KDldE28KsVsAe9bYhNg6GtAXxU7FFDWctsEZArTC6GsI4eeY/E3hZWg== Received: from thor.intern.walstatt.dynvpn.de (dynamic-077-191-020-207.77.191.pool.telefonica.de [77.191.20.207]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by hub2.goneo.de (Postfix) with ESMTPSA id 494D024021E; Sun, 16 Jun 2024 19:11:38 +0200 (CEST) Date: Sun, 16 Jun 2024 19:11:10 +0200 From: FreeBSD User To: Sumit Saxena Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org, FreeBSD CURRENT Subject: Re: git: 8d3c3b52423f - main - mpi3mr: Track IO per target counter during queue poll with local variable Message-ID: <20240616191137.7f7d6a30@thor.intern.walstatt.dynvpn.de> In-Reply-To: <202406061039.456AdXZ4090138@gitrepo.freebsd.org> References: <202406061039.456AdXZ4090138@gitrepo.freebsd.org> Organization: walstatt-de.de List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-UID: 9d34ec X-Rspamd-UID: f4f0bd X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.60 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; R_SPF_ALLOW(-0.20)[+ip6:2001:1640:5::8:0/112]; R_DKIM_ALLOW(-0.20)[walstatt-de.de:s=DKIM001]; RCVD_IN_DNSWL_LOW(-0.10)[2001:1640:5::8:30:from]; MIME_GOOD(-0.10)[text/plain]; ASN(0.00)[asn:25394, ipnet:2001:1640::/32, country:DE]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; HAS_ORG_HEADER(0.00)[]; MISSING_XM_UA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; DMARC_NA(0.00)[walstatt-de.de]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@FreeBSD.org,dev-commits-src-main@FreeBSD.org,freebsd-current@freebsd.org]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[walstatt-de.de:+] X-Rspamd-Queue-Id: 4W2KLR50g5z4Ycw Am Thu, 6 Jun 2024 10:39:33 GMT Sumit Saxena schrieb: > The branch main has been updated by ssaxena: > > URL: https://cgit.FreeBSD.org/src/commit/?id=8d3c3b52423f9740da424aa6dd73a20e694a9e08 > > commit 8d3c3b52423f9740da424aa6dd73a20e694a9e08 > Author: Chandrakanth patil > AuthorDate: 2024-06-06 10:28:38 +0000 > Commit: Sumit Saxena > CommitDate: 2024-06-06 10:39:16 +0000 > > mpi3mr: Track IO per target counter during queue poll with local variable > > Reviewed by: imp > Approved by: imp > Differential revision: https://reviews.freebsd.org/D44494 > --- > sys/dev/mpi3mr/mpi3mr_cam.c | 22 ++++++++++++---------- > 1 file changed, 12 insertions(+), 10 deletions(-) > > diff --git a/sys/dev/mpi3mr/mpi3mr_cam.c b/sys/dev/mpi3mr/mpi3mr_cam.c > index e3958ed8daf2..e00d61073d96 100644 > --- a/sys/dev/mpi3mr/mpi3mr_cam.c > +++ b/sys/dev/mpi3mr/mpi3mr_cam.c > @@ -1839,6 +1839,7 @@ int mpi3mr_remove_device_from_os(struct mpi3mr_softc *sc, U16 handle) > { > int retval = 0; > struct mpi3mr_target *target; > + unsigned int target_outstanding; > > mpi3mr_dprint(sc, MPI3MR_EVENT, > "Removing Device (dev_handle: %d)\n", handle); > @@ -1856,16 +1857,17 @@ int mpi3mr_remove_device_from_os(struct mpi3mr_softc *sc, U16 handle) > > target->flags |= MPI3MRSAS_TARGET_INREMOVAL; > > - if (mpi3mr_atomic_read(&target->outstanding)) { > - mpi3mr_dprint(sc, MPI3MR_ERROR, "there are [%2d] outstanding IOs on target: > %d" > - "Poll reply queue once\n", > mpi3mr_atomic_read(&target->outstanding), > - target->per_id); > - mpi3mr_poll_pend_io_completions(sc); > - if (mpi3mr_atomic_read(&target->outstanding)) > - mpi3mr_dprint(sc, MPI3MR_ERROR, "[%2d] outstanding IOs present on > target: %d" > - "despite poll\n", > mpi3mr_atomic_read(&target->outstanding), > - target->per_id); > - } > + target_outstanding = mpi3mr_atomic_read(&target->outstanding); > + if (target_outstanding) { > + mpi3mr_dprint(sc, MPI3MR_ERROR, "there are [%2d] outstanding IOs on target: > %d " > + "Poll reply queue once\n", target_outstanding, > target->per_id); > + mpi3mr_poll_pend_io_completions(sc); > + target_outstanding = mpi3mr_atomic_read(&target->outstanding); > + if (target_outstanding) > + target_outstanding = mpi3mr_atomic_read(&target->outstanding); > + mpi3mr_dprint(sc, MPI3MR_ERROR, "[%2d] outstanding IOs present on > target: %d " > + "despite poll\n", target_outstanding, target->per_id); > + } > > if (target->exposed_to_os && !sc->reset_in_progress) { > mpi3mr_rescan_target(sc, target); > On recent CURRENT (FreeBSD 15.0-CURRENT #6 main-n270784-d1e652bf04b: Sun Jun 16 18:19:49 CEST 2024 amd64) "make installkernel" fails with: [...] --- realinstall_subdir_mpi3mr --- install -T release -o root -g wheel -m 444 mpi3mr.ko /boot/kernel/ install -T dbg -o root -g wheel -m 444 mpi3mr.ko.debug /usr/lib/debug/boot/kernel/ install: /usr/lib/debug/boot/kernel/INS@QhWCmf: No such file or directory *** [_kmodinstall] Error code 71 make[4]: stopped in /usr/src/sys/modules/mpi3mr make[4]: 1 error [...] The problem occurs when diabling makeoptions DEBUG=... in kernel configuration and including: # Debugging support. Always need this: #options KDB # Enable kernel debugger support. #options KDB_TRACE # Print a stack trace for a panic. # For full debugger support use (turn off in stable branch): include "std.nodebug" On another host with the same CURRENT and mostly same configs, the problem does not occur! The differenc between both is: tha failing host hasn't been updated for tha last 20 days, the other one has been updated almost every day. On the failing host, "make cleanworld" has been issued before building world/kernel. /etc/src.conf is also the same on both checked hosts. GENERIC compiles flawless. -- O. Hartmann From nobody Sun Jun 16 17:13:18 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W2KNK0RzHz5P8Rl; Sun, 16 Jun 2024 17:13:21 +0000 (UTC) (envelope-from unkadoug@gmail.com) Received: from mail-oi1-x22c.google.com (mail-oi1-x22c.google.com [IPv6:2607:f8b0:4864:20::22c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2KNJ5ZBqz4bCk; Sun, 16 Jun 2024 17:13:20 +0000 (UTC) (envelope-from unkadoug@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-oi1-x22c.google.com with SMTP id 5614622812f47-3c9c36db8eeso2079909b6e.0; Sun, 16 Jun 2024 10:13:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718557999; x=1719162799; darn=freebsd.org; h=content-transfer-encoding:in-reply-to:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=MtjM9GSl4/eJw41CI/xjSisQ4Z8l5MncP90gE4DhqxA=; b=dvbsjY3XxiIUMFL9h0KetrhcQg0hJLt/kWhZ3NoZKU5UCdEJipUZT6CIxHcnBPX9V4 +WNQ5/zXZ2JM+oF8HI7f1VRZt9oyE5v/AayPvPDZXp2vtRDTUJu7BMTsfeLANK0dwPB4 IyKfSrONAoQ+QMo3PukIbggG6HLvuiKO9cCTyYLCUTc0j0YbtWcXzrVeKdOeagQgSUDW OzxZDRZYqrNtiugvkXP9FoZY8kHqbiBpn79lGGvvkiFPw1YMcO7woQLt5iE0T2ftmqUz EM0adcVHMhpQzW8dGScoeDURhaeIS9NrCfp2hT0mnAXGH7xtQQU01rougG4gfiN/oz4Y nJwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718557999; x=1719162799; h=content-transfer-encoding:in-reply-to:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=MtjM9GSl4/eJw41CI/xjSisQ4Z8l5MncP90gE4DhqxA=; b=MAGG8CvW0E0nnRTxAu7jC24VLTJyC9n7X4Z5qc7kHQ3uWfRpZTKA+LquInl1pBkago NkLrYXmG19/nLMOAU3HgqZSUkk6ETc3Hy6pIB6UoN39I94y/M5WeUak0aELAHcwoTYEm k2GY58LH/CH63qOQzwShV6X7XbfYQ+HhIRiL8N0Vyu61WuBgAGldwCE+zOlz0g5LcMDf YRAQUGnYvujPA7ujUnL7hP1hkmNoaEP6BTtz19PDpeLMpAAkUsltudP65DSuGY6i3Eh4 bIoWy8BYVsV0pz+Vbr9iCehfdsYKzlTqFK0Ss1b1Wa4Tr7cdehCnIBoyCMex676ZDzjy sl4g== X-Forwarded-Encrypted: i=1; AJvYcCXWR8uaGlG3m/wpEzD9gzXgPxE0z3q/nFYzIoQIgIEs+z1Sm3QfSWSYP47OPEbH+rzzwHRkbJ+moeKS4x3A/3sqsND7bBv6oKyGEswsyz1GAULaWkd6dODkKQJAzFuLc7wwHsAm7V1MyWRYC+qIph6EcQ== X-Gm-Message-State: AOJu0Yxd9btPmPixIcN4nl8O23fJDgpOqqVbPsnPSkU28ZYQIOUPa9J9 MsC1wlVgRbpEB/3dBPaJVS+/EKz1dhPwSV6mMlhjhN0feYIzey/9JplxDi7e X-Google-Smtp-Source: AGHT+IHBQoVjnW2dtRIOf+XciHLgJ+EtolhlN88GvUG3o5+6juUDPAv17O2eoBxeIoLu4nLQEdBl3A== X-Received: by 2002:a05:6808:148e:b0:3d2:3811:bc78 with SMTP id 5614622812f47-3d24e8f8a44mr8970329b6e.28.1718557999442; Sun, 16 Jun 2024 10:13:19 -0700 (PDT) Received: from [108.254.203.202] (108-254-203-202.lightspeed.hstntx.sbcglobal.net. [108.254.203.202]) by smtp.gmail.com with ESMTPSA id 5614622812f47-3d2475e49absm1249751b6e.12.2024.06.16.10.13.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 16 Jun 2024 10:13:18 -0700 (PDT) From: Doug Moore X-Google-Original-From: Doug Moore Message-ID: <0fbfd389-21e8-d1df-b640-46c283124888@freebsd.org> Date: Sun, 16 Jun 2024 12:13:18 -0500 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: git: dd0e5c02ab13 - main - swap_pager: small improvement to find_least Content-Language: en-US To: Peter Holm Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202406111638.45BGcnhX099470@gitrepo.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4W2KNJ5ZBqz4bCk Thank you, Peter.  That was a stupid mistake and I have now undone it. On 6/16/24 07:13, Peter Holm wrote: > On Tue, Jun 11, 2024 at 04:38:49PM +0000, Doug Moore wrote: >> The branch main has been updated by dougm: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=dd0e5c02ab13b9eb240d42a71a8f41a8b036bd33 >> >> commit dd0e5c02ab13b9eb240d42a71a8f41a8b036bd33 >> Author: Doug Moore >> AuthorDate: 2024-06-11 16:36:23 +0000 >> Commit: Doug Moore >> CommitDate: 2024-06-11 16:36:23 +0000 >> >> swap_pager: small improvement to find_least >> >> Drop an unneeded test, a branch and a needless computation to save a >> few instructions. >> >> Reviewed by: kib >> Differential Revision: https://reviews.freebsd.org/D45558 >> --- >> sys/vm/swap_pager.c | 19 +++++++------------ >> 1 file changed, 7 insertions(+), 12 deletions(-) >> >> diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c >> index a07a38481490..15f227457bba 100644 >> --- a/sys/vm/swap_pager.c > Doug, > > Here's an easy way to reproduce the issue: > > 12:43 ~ $ sort /dev/zero & > [1] 3650 > 12:43 ~ $ sort /dev/zero & > [2] 3651 > 12:43 ~ $ sort /dev/zero & > [3] 3652 > 12:43 ~ $ panic: Negative index: -16 > cpuid = 8 > time = 1718534645 > KDB: stack backtrace: > db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe010855fa50 > vpanic() at vpanic+0x13f/frame 0xfffffe010855fb80 > panic() at panic+0x43/frame 0xfffffe010855fbe0 > swap_pager_find_least() at swap_pager_find_least+0x105/frame 0xfffffe010855fc20 > vm_object_collapse() at vm_object_collapse+0x68b/frame 0xfffffe010855fca0 > vmspace_fork() at vmspace_fork+0xb68/frame 0xfffffe010855fd30 > fork1() at fork1+0x4f8/frame 0xfffffe010855fda0 > sys_fork() at sys_fork+0x54/frame 0xfffffe010855fe00 > amd64_syscall() at amd64_syscall+0x158/frame 0xfffffe010855ff30 > fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe010855ff30 > --- syscall (2, FreeBSD ELF64, fork), rip = 0xaba1c31565a, rsp = 0xaba1b0cecb8, rbp = 0xaba1b0cf220 --- > KDB: enter: panic > [ thread pid 3653 tid 100349 ] > Stopped at $0,0x104d5c2(%rip) > db> x/s version > version: FreeBSD 15.0-CURRENT #2 main-n270778-d26c565597b8-dirty: Sun Jun 16 12:32:39 CEST 2024\012 pho@mercat1.netperf.freebsd.org:/usr/src/sys/amd64/compile/PHO\012 > db> > > --- a/sys/vm/swap_pager.c > +++ b/sys/vm/swap_pager.c > @@ -2303,6 +2303,7 @@ swap_pager_find_least(vm_object_t object, vm_pindex_t pindex) > if (sb == NULL) > return (object->size); > for (i = pindex - sb->p; i < SWAP_META_PAGES; i++) { > + KASSERT((i >= 0), ("Negative index: %d", i)); > if (sb->d[i] != SWAPBLK_NONE) > return (sb->p + i); > } > > - Peter From nobody Sun Jun 16 17:14:10 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W2KPP2l2Hz5P8dD; Sun, 16 Jun 2024 17:14:17 +0000 (UTC) (envelope-from peter@holm.cc) Received: from kaskal.pair.com (kaskal.pair.com [209.68.5.173]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2KPN60Mxz4bhR; Sun, 16 Jun 2024 17:14:16 +0000 (UTC) (envelope-from peter@holm.cc) Authentication-Results: mx1.freebsd.org; none Received: from kaskal.pair.com (localhost [127.0.0.1]) by kaskal.pair.com (Postfix) with ESMTP id 7A370D656AF; Sun, 16 Jun 2024 13:14:15 -0400 (EDT) Received: from Peters-Air (c-x5996a268.customers.hiper-net.dk [89.150.162.104]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by kaskal.pair.com (Postfix) with ESMTPSA id AFDEED8D1AA; Sun, 16 Jun 2024 13:14:14 -0400 (EDT) Date: Sun, 16 Jun 2024 19:14:10 +0200 From: Peter Holm To: Doug Moore Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: dd0e5c02ab13 - main - swap_pager: small improvement to find_least Message-ID: References: <202406111638.45BGcnhX099470@gitrepo.freebsd.org> <29240b1e-6a8a-0bd5-f16f-322623d4b778@freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <29240b1e-6a8a-0bd5-f16f-322623d4b778@freebsd.org> X-Scanned-By: mailmunge 3.11 on 209.68.5.173 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:7859, ipnet:209.68.0.0/18, country:US] X-Rspamd-Queue-Id: 4W2KPN60Mxz4bhR On Sun, Jun 16, 2024 at 11:55:48AM -0500, Doug Moore wrote: > Thank you, Peter.  That was a stupid mistake and I have now undone it. > > Doug > Happy to help. It was a KASAN build that found the issue. - Peter > On 6/16/24 07:13, Peter Holm wrote: > > On Tue, Jun 11, 2024 at 04:38:49PM +0000, Doug Moore wrote: > > > The branch main has been updated by dougm: > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=dd0e5c02ab13b9eb240d42a71a8f41a8b036bd33 > > > > > > commit dd0e5c02ab13b9eb240d42a71a8f41a8b036bd33 > > > Author: Doug Moore > > > AuthorDate: 2024-06-11 16:36:23 +0000 > > > Commit: Doug Moore > > > CommitDate: 2024-06-11 16:36:23 +0000 > > > > > > swap_pager: small improvement to find_least > > > Drop an unneeded test, a branch and a needless computation to save a > > > few instructions. > > > Reviewed by: kib > > > Differential Revision: https://reviews.freebsd.org/D45558 > > > --- > > > sys/vm/swap_pager.c | 19 +++++++------------ > > > 1 file changed, 7 insertions(+), 12 deletions(-) > > > > > > diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c > > > index a07a38481490..15f227457bba 100644 > > > --- a/sys/vm/swap_pager.c > > Doug, > > > > Here's an easy way to reproduce the issue: > > > > 12:43 ~ $ sort /dev/zero & > > [1] 3650 > > 12:43 ~ $ sort /dev/zero & > > [2] 3651 > > 12:43 ~ $ sort /dev/zero & > > [3] 3652 > > 12:43 ~ $ panic: Negative index: -16 > > cpuid = 8 > > time = 1718534645 > > KDB: stack backtrace: > > db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe010855fa50 > > vpanic() at vpanic+0x13f/frame 0xfffffe010855fb80 > > panic() at panic+0x43/frame 0xfffffe010855fbe0 > > swap_pager_find_least() at swap_pager_find_least+0x105/frame 0xfffffe010855fc20 > > vm_object_collapse() at vm_object_collapse+0x68b/frame 0xfffffe010855fca0 > > vmspace_fork() at vmspace_fork+0xb68/frame 0xfffffe010855fd30 > > fork1() at fork1+0x4f8/frame 0xfffffe010855fda0 > > sys_fork() at sys_fork+0x54/frame 0xfffffe010855fe00 > > amd64_syscall() at amd64_syscall+0x158/frame 0xfffffe010855ff30 > > fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe010855ff30 > > --- syscall (2, FreeBSD ELF64, fork), rip = 0xaba1c31565a, rsp = 0xaba1b0cecb8, rbp = 0xaba1b0cf220 --- > > KDB: enter: panic > > [ thread pid 3653 tid 100349 ] > > Stopped at $0,0x104d5c2(%rip) > > db> x/s version > > version: FreeBSD 15.0-CURRENT #2 main-n270778-d26c565597b8-dirty: Sun Jun 16 12:32:39 CEST 2024\012 pho@mercat1.netperf.freebsd.org:/usr/src/sys/amd64/compile/PHO\012 > > db> > > > > --- a/sys/vm/swap_pager.c > > +++ b/sys/vm/swap_pager.c > > @@ -2303,6 +2303,7 @@ swap_pager_find_least(vm_object_t object, vm_pindex_t pindex) > > if (sb == NULL) > > return (object->size); > > for (i = pindex - sb->p; i < SWAP_META_PAGES; i++) { > > + KASSERT((i >= 0), ("Negative index: %d", i)); > > if (sb->d[i] != SWAPBLK_NONE) > > return (sb->p + i); > > } > > > > - Peter From nobody Sun Jun 16 18:11:16 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W2Lg91z7rz5PDg5; Sun, 16 Jun 2024 18:11:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2Lg828F1z4gj1; Sun, 16 Jun 2024 18:11:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718561476; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jp4TtnkQe/2tk7glYCdPMCvCjTS0FVOrWb35VteFwKE=; b=GUimD7Rw5bBq0x27Ru0pPJd5EGAzzooL+aVmo8dQHgu8OnntVyOBlbKFxAM8bI8zdcP530 64UExDXZKKGnGItstVfJbqtYF2OgEAy0o6eokpC/ueq+jmoEyfZYKX2eBfdt52kBIMPxz1 zYKzhqQc2KY4pbVDacLGlEmm31nO1AT13FlzBH7PDh7GmCZimI1ZVGWi+mAvdfNS9roSZU 1/lL+A7FQPsyi7GSTefXcSgQHvOLIwyov0jMCo+YyYPrOPXYyxLbTnF/zCza2TnbxCAemW MkI71TK8/rWne4ZbNLIj/TBEXVetm+UNJtEOXTO4Y+z/YDNNgq7QJa6dmJKpsQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718561476; a=rsa-sha256; cv=none; b=eP1s6rlLhndjksoDzX6Z3an/0HUQhfPZuLgiPqFm8ZkQwU1BKeFOMVbv/+1FSBvuro2skk Q5DEA0bSV/4Opg/OmTL59Tp+SU4kKygdW+2db5lPAPo32bXvkg8DHNCjs9Nth3M/McWizd XVfgLJ+u+AByrZ1zOOFg571laWg5nlQC2bKYA0PlvUzgLO1BIoJKSYAFrw/oFUZZhsANcW uQ5hynU6DrEVqyzCAZwE/qrTWBHkLZfoFmJ9EKQehjWHz1noaIPMDWBylrr7T+YszIVr3c D4Iyw0+EwTT6jZfqjFxCgv8f9Zb8THDNtvaCzQhLe6Jv7sS6gLf/trnu9Hcatw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718561476; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jp4TtnkQe/2tk7glYCdPMCvCjTS0FVOrWb35VteFwKE=; b=OS9rDRiz04bWvUH+M7Ibwt8Vh8QTsfASnAWWap/nJuBFuqbW2sA95NTDyzNq4x8/Gg8kyu j82jNfbCnLr7OD92tITWO4f9j2q/xf/qDwJ06t87eUgyOgRtUJbwRV50GxZLZ0h15JPLp1 D6n116y01S0XhgQZJqvjb+s43YrBRxcbRMXUqrES3Ugbx7iWf1oh+wcpHHzn3W++ZQmIAj S6h83KyhWCXiazYf/Gnb/8nFw+n23MIPx9EnI+O6i2aWwEVqqppqqMaiy8ez+6lINP7ajm 3EEnTAokwLuMFhokESHL3rEVK15aobpau6vdQdXZ7Li9D8h64SMazb2I6KqN7w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W2Lg81lh0zxvq; Sun, 16 Jun 2024 18:11:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45GIBGUd039450; Sun, 16 Jun 2024 18:11:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45GIBGnV039447; Sun, 16 Jun 2024 18:11:16 GMT (envelope-from git) Date: Sun, 16 Jun 2024 18:11:16 GMT Message-Id: <202406161811.45GIBGnV039447@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 4441dd4094e1 - main - vm_phys: Fix a typo List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4441dd4094e1e1863d9973e4a064d620f7cd2976 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4441dd4094e1e1863d9973e4a064d620f7cd2976 commit 4441dd4094e1e1863d9973e4a064d620f7cd2976 Author: Mark Johnston AuthorDate: 2024-06-15 14:54:23 +0000 Commit: Mark Johnston CommitDate: 2024-06-16 17:33:00 +0000 vm_phys: Fix a typo Fixes: b16b4c22d2d1 ("vm_page: Implement lazy page initialization") Reported by: Steffen Nurpmeso --- sys/amd64/include/vmparam.h | 2 +- sys/arm64/include/vmparam.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/amd64/include/vmparam.h b/sys/amd64/include/vmparam.h index 2ffa51d9021c..ad6bf28f1c3b 100644 --- a/sys/amd64/include/vmparam.h +++ b/sys/amd64/include/vmparam.h @@ -97,7 +97,7 @@ * Create three free page pools: VM_FREEPOOL_DEFAULT is the default pool from * which physical pages are allocated and VM_FREEPOOL_DIRECT is the pool from * which physical pages for page tables and small UMA objects are allocated. - * VM_FREEPOOL_LAZINIT is a special-purpose pool that is populated only during + * VM_FREEPOOL_LAZYINIT is a special-purpose pool that is populated only during * boot and is used to implement deferred initialization of page structures. */ #define VM_NFREEPOOL 3 diff --git a/sys/arm64/include/vmparam.h b/sys/arm64/include/vmparam.h index 08a3b18da64e..28b8380fc7c1 100644 --- a/sys/arm64/include/vmparam.h +++ b/sys/arm64/include/vmparam.h @@ -76,7 +76,7 @@ * Create three free page pools: VM_FREEPOOL_DEFAULT is the default pool from * which physical pages are allocated and VM_FREEPOOL_DIRECT is the pool from * which physical pages for page tables and small UMA objects are allocated. - * VM_FREEPOOL_LAZINIT is a special-purpose pool that is populated only during + * VM_FREEPOOL_LAZYINIT is a special-purpose pool that is populated only during * boot and is used to implement deferred initialization of page structures. */ #define VM_NFREEPOOL 3 From nobody Sun Jun 16 18:11:17 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W2LgC0LyYz5PDd6; Sun, 16 Jun 2024 18:11:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2Lg93CQKz4gXC; Sun, 16 Jun 2024 18:11:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718561477; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0OF6UbOfebkiHJG+B9mqKQDcRZ3j3+v6aa9eXMJIbvQ=; b=OvhBJdMgB+ExspiQr0/777D7R3luiY1bJ9tHRsvGOEONL3whpYU198YgAVwVeX4KActMO+ Sp62FLUeHR0wmT1NruQjIJANnvy6ONg1QqEC8CUDuFpzT0Cb53Amwk0un7oKAkscJNZo7J 5F4gZ+E/zNxH0eoI7sIiI0pADGMMwM3Se0v1eskAs4f2fgoBMHyPLnNL+nCrs5/cO0LorS pn3/L1JQctNylUQ2Z9Q/khx83y+F+MmSnDg7oWSjpKsWUIk0gsRjAQ2K3aY54sY3KtrUsM 8mdp+pE4S9X4ErhOSK2LmMaQCi6Zm9jPLXvm5GiRFdtXjdAh0rR0ZcbwKlrw7w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718561477; a=rsa-sha256; cv=none; b=ftT+qKe/YfHUIEaAEiwwvwkjjIEcCmUX+QwQGa49PS6LJq/AINgmCyNWu9maAFB0AUNtPF w4X6wITSHnsedFw+iSNFgpqQhE0VWvxzPUzoSaxuku1mkpL3KGuIQs/0fWRBeHiNnZEhef ygaCutrmfL2Z2ZtJutLTNVwNpIYv//si8/Mjej3szvP7y69zd+3oCkapqP9TvmCFfGEJqJ 64NqozccGxZb/XFX4Sl9gx0/YNpvGjSPfTH0fKOoX5SokhozEmpaf7Dwts42aUkTO4JwT6 vUThHbPKKisK8VISfL5qBUGoP4/Eyj0VcQDYTzjyWIfpIAlH+DVNKfQC8Ymyhw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718561477; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0OF6UbOfebkiHJG+B9mqKQDcRZ3j3+v6aa9eXMJIbvQ=; b=mNc8+Pb79kg7R1dfDXNh+fL8q75tG2NEGczJhxfhMCvMTj+0kO4fw1kB50SOd2Zga+ypa5 /lFKb5e5HSSCmaxsqxRbNG6LW3EFoUSmxH4n4AsgNBIfxyfF0vUORUoritxpCe4wFK8xAZ uQzR1uqlGTbDF6RJrYnwTq5pbjJW805giWwjHIaNpPNWHNCH0ChE1XBkOBZKK+63WfMLNx TiBpFDVe10zu8NGgoevI8vEmTi5L2JjNCg2/zaklxKpef+LBYvJ1jqrhX/aSXKuSxEJM94 mraowea9IUjIXtOAOL+y2Hi8Fwpia99VJ3rxWQA2Pd7zfsag9m3TT9iOF72XGQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W2Lg92pQxzxBm; Sun, 16 Jun 2024 18:11:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45GIBH20039504; Sun, 16 Jun 2024 18:11:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45GIBHoN039501; Sun, 16 Jun 2024 18:11:17 GMT (envelope-from git) Date: Sun, 16 Jun 2024 18:11:17 GMT Message-Id: <202406161811.45GIBHoN039501@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 46bb2dca534a - main - kasan: Increase the size of the bootstrap PTP reservation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 46bb2dca534ae1dfe95ea11c915b441e4867a310 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=46bb2dca534ae1dfe95ea11c915b441e4867a310 commit 46bb2dca534ae1dfe95ea11c915b441e4867a310 Author: Mark Johnston AuthorDate: 2024-06-16 17:33:13 +0000 Commit: Mark Johnston CommitDate: 2024-06-16 17:33:13 +0000 kasan: Increase the size of the bootstrap PTP reservation We were undercounting in the case where the boot stack crosses a 2MB boundary, resulting in a panic during locore execution. MFC after: 1 week Fixes: 756bc3adc578 ("kasan: Create a shadow for the bootstack prior to hammer_time()") --- sys/amd64/amd64/pmap.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index dee208fc9145..57943e815b5b 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -11671,15 +11671,16 @@ pmap_pkru_clear(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) * Reserve enough memory to: * 1) allocate PDP pages for the shadow map(s), * 2) shadow the boot stack of KSTACK_PAGES pages, - * so we need one PD page, one or two PT pages, and KSTACK_PAGES shadow pages - * per shadow map. + * 3) assuming that the kernel stack does not cross a 1GB boundary, + * so we need one or two PD pages, one or two PT pages, and KSTACK_PAGES shadow + * pages per shadow map. */ #ifdef KASAN #define SAN_EARLY_PAGES \ - (NKASANPML4E + 1 + 2 + howmany(KSTACK_PAGES, KASAN_SHADOW_SCALE)) + (NKASANPML4E + 2 + 2 + howmany(KSTACK_PAGES, KASAN_SHADOW_SCALE)) #else #define SAN_EARLY_PAGES \ - (NKMSANSHADPML4E + NKMSANORIGPML4E + 2 * (1 + 2 + KSTACK_PAGES)) + (NKMSANSHADPML4E + NKMSANORIGPML4E + 2 * (2 + 2 + KSTACK_PAGES)) #endif static uint64_t __nosanitizeaddress __nosanitizememory From nobody Sun Jun 16 18:11:18 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W2LgD3NZgz5PDkx; Sun, 16 Jun 2024 18:11:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2LgC0lrsz4gyR; Sun, 16 Jun 2024 18:11:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718561479; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TmjW8dJRwz5ep9Tb5m7YuriUWyiWnkYC4G36PnMkaxU=; b=Xz4HunZIgGX5oAj8mdhLPmNLvVb7SHFBLRA03ijloE3qBrS2uVGX3okkZ7unYnprGcM0/m p+j+RlPmb1ckgJE7ao1YX79LT65++qxELAcAOAdJycZmyCi3aZ1O1YK2NXRq7qvOz4JkVL EVvKNW9llFuv7Cf8C/gbJzBGZw4eqokWn0zZLr8r4ir4mai9sXvM+OkmEkFyg5hsJITdKg b5Z3ekjDVjyjegYLBBZbqR3l+AfoTpDN8paAkI8y/lWEkWmJmZzr8LG8GKG4TI/thjSzrH k+/8jX9HWyLyTb5qgmDfaYTTCx66zCSOhygfVbMBXTPeZQ7vRhXuqkzu8QBgUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718561479; a=rsa-sha256; cv=none; b=muK1p6luoXyAcxhK14YVu1PODGzmP1B4/iHGn2boQPmZeyC5XLbmSPZMFTHM4MbZ1RQhk9 LkUpAOXzjZK9QGCkKUfPxqwSfXqjjuyuuVkRfTd29tNiUAJw1ehRdf/qGN+ARrQdUwzaQs HVI11loXvaybG6maJgpv0fzm6qJvVdvB/sWVH3NNU+T5rrGXp1CeltSqtLXZeQvDHfEDto uTpEVGpqE8rFovt/esKIrrV55mALj50DzCbwBlvh7O4ukVB4zEjag/LyxtIvNx8iOX5IwH HAqldrnxZo6f47l5KvbWgzmGS8EzAwGn5IogFAIBI32zdDuizPNbtz4VSagOJQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718561479; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TmjW8dJRwz5ep9Tb5m7YuriUWyiWnkYC4G36PnMkaxU=; b=xSf7757x+obgG0OGl16ZGE9fwgLE1obfnozvEcqyLfI4cOMrTlrpIU6kdchZGNcBDt8pFN QkTJ0mgJuzp7brhHp8HnnkhzeqKwbmKiyaZP6kcOEo87gfqKqFEDTwPQIEjJOEIUWxsfUr cJzucBFynE52RCjohV9y/rswclMDsDqOo8WNgqM/O1W1Py9YhOsBBsWQpdaJZ6nFyG6iiV jvwiJLxRNUfNzg3u2OPZKiL9i37WIEr6oKsF0m0Mar/8l5RTF26RA3wPRG/Bok1NPLGUCl BjiFD8/psJPJaBDSMqN1PyCVH7PHsZCql3DNZlDmYNvajq+y1lT0IcKCGIR+Cw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W2LgB3yVKzxpn; Sun, 16 Jun 2024 18:11:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45GIBIOp039543; Sun, 16 Jun 2024 18:11:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45GIBIWX039540; Sun, 16 Jun 2024 18:11:18 GMT (envelope-from git) Date: Sun, 16 Jun 2024 18:11:18 GMT Message-Id: <202406161811.45GIBIWX039540@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 5515e8874a8d - main - wg: Implement if_transmit unconditionally List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5515e8874a8d85a8d961fca64c494dfc1bea4bd0 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=5515e8874a8d85a8d961fca64c494dfc1bea4bd0 commit 5515e8874a8d85a8d961fca64c494dfc1bea4bd0 Author: Mark Johnston AuthorDate: 2024-06-16 17:33:45 +0000 Commit: Mark Johnston CommitDate: 2024-06-16 17:33:45 +0000 wg: Implement if_transmit unconditionally Commit bf454ca88bdf made wg_transmit() defined only when "device netmap" is configured, as if_wg's if_transmit implementation should never be called otherwise, but this breaks a requirement that interfaces implement both or neither of if_transmit and if_qflush. Restore the old behaviour of unconditionally defining wg_transmit(). It contains an assertion that the interface is in netmap mode. Reported by: peterj MFC after: 2 weeks Fixes: bf454ca88bdf ("wg: Add netmap support") --- sys/dev/wg/if_wg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/wg/if_wg.c b/sys/dev/wg/if_wg.c index d0b75d5cbf4b..6683d0505b26 100644 --- a/sys/dev/wg/if_wg.c +++ b/sys/dev/wg/if_wg.c @@ -2196,7 +2196,6 @@ determine_af_and_pullup(struct mbuf **m, sa_family_t *af) return (0); } -#ifdef DEV_NETMAP static int determine_ethertype_and_pullup(struct mbuf **m, int *etp) { @@ -2258,6 +2257,7 @@ wg_transmit(if_t ifp, struct mbuf *m) return (0); } +#ifdef DEV_NETMAP /* * This should only be invoked by netmap, via nm_os_send_up(), to process * packets from the host TX ring. @@ -2921,8 +2921,8 @@ wg_clone_create(struct if_clone *ifc, char *name, size_t len, if_setinitfn(ifp, wg_init); if_setreassignfn(ifp, wg_reassign); if_setqflushfn(ifp, wg_qflush); -#ifdef DEV_NETMAP if_settransmitfn(ifp, wg_transmit); +#ifdef DEV_NETMAP if_setinputfn(ifp, wg_if_input); #endif if_setoutputfn(ifp, wg_output); From nobody Sun Jun 16 18:12:04 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W2LhB6xF3z5PDTw; Sun, 16 Jun 2024 18:12:10 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk1-x72d.google.com (mail-qk1-x72d.google.com [IPv6:2607:f8b0:4864:20::72d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2Lh95Z93z4hqT; Sun, 16 Jun 2024 18:12:09 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=cgWXHBVd; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=freebsd.org (policy=none); spf=pass (mx1.freebsd.org: domain of markjdb@gmail.com designates 2607:f8b0:4864:20::72d as permitted sender) smtp.mailfrom=markjdb@gmail.com Received: by mail-qk1-x72d.google.com with SMTP id af79cd13be357-797a7f9b52eso289548485a.2; Sun, 16 Jun 2024 11:12:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718561528; x=1719166328; darn=freebsd.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=7yEeCBQlRh6WcxkmiXqb7bmQbhTuh9tXzaXp7CwqRXc=; b=cgWXHBVdsESostcLrIDyreK/fDhbrplha5Aj6fdwj1CHn/OYULl2riZiaXqtX4EWdG RihVQgewdmEPLFItIhLUmH/bofz0IUz+Xv11SHy1QvrSXIY2rEIJlIZoithaHThtg+O+ kx0nigubVZxQtPfpaMeWLZhnL5sNl6M5P2TNj1rdBfc4xd5NQl5uh1Y7jueBaVTBR0xT iEi4+DuJzSYEfYJddZvxybir9qpd4Ffi4tUOQrgMItSM1sIwpbp8tbvfO648aaYq158k hO+1Oj3h6Z9jyriFBwcobGrDfgVQbMdSNRDTH3ZfKC2ky+UNzTPELhw4UXcdIFARY+Vq 5Ofg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718561528; x=1719166328; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7yEeCBQlRh6WcxkmiXqb7bmQbhTuh9tXzaXp7CwqRXc=; b=PCu6s7+//GizWUci5w9itcqLR9HML/P66keOpZ+igN2w5yaAbZ9rfr+vGS+4hESORY waHh3upEKwUJ5lWFRH40+4+mTs2AE2/cffxIK7W6ZcrvhKiUx0kNn93UiU0Epd/DLwTL 9LXSGarzQfuqYrWgwjete4S81+JVnNakwVF8Lhw4zQ0GAWc27bsirMe084KMMKBpCsFa 5Bn+gJDKnNo9lh5XcQUY9KQjlAoAEsEdO+wikREa6ayDXxH/8Alqv9nsTG+ANedeuKxl c6u7N00XH+e1dhPmgn5QVnvmIJgG71SfwGz45ssXC+1ygNdPzP8qDSuAuQG9sZ+7RUks Odrg== X-Forwarded-Encrypted: i=1; AJvYcCUlJUIv7j1jdsfDQloX5HT1Bvd06MC8mWxBL7gssXSGOPF6wZSimHrw03lBWwYMKmFMp8vIalWMQ5Qzt+lUlUMDErNd1k5x5j5UX2RG95za1QhxrKW72oM3RXzffnkZzSyFaEmALDtRgEdDm6t8QNRFwQ== X-Gm-Message-State: AOJu0YwtOQ6YTY9xG58y7nTEcEYhsxz2I2uIBvsSuSdGg9yoc6vn6hUz 8rP3CS2kX/nHWXZjMTiVSCqPF0jW89WlFXRnu2l/W4LX3LqXZDdYZi7lbqLY X-Google-Smtp-Source: AGHT+IGKK2D79l8Tvp4ah9lPgpX4l9naN2Qt5pPG5R7SNFRlxETmAOwiwPNEw8usGDfXO33b+FzsbQ== X-Received: by 2002:ac8:7fd6:0:b0:441:1536:2faf with SMTP id d75a77b69052e-442168aac8dmr95760831cf.19.1718561527572; Sun, 16 Jun 2024 11:12:07 -0700 (PDT) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-4448f5719c7sm4174661cf.34.2024.06.16.11.12.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Jun 2024 11:12:06 -0700 (PDT) Date: Sun, 16 Jun 2024 14:12:04 -0400 From: Mark Johnston To: Peter Jeremy Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: bf454ca88bdf - main - wg: Add netmap support Message-ID: References: <202404201605.43KG564E080220@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.60 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MID_RHS_NOT_FQDN(0.50)[]; FORGED_SENDER(0.30)[markj@freebsd.org,markjdb@gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), DKIM not aligned (relaxed),none]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; DKIM_TRACE(0.00)[gmail.com:+]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; RCVD_COUNT_TWO(0.00)[2]; FROM_NEQ_ENVFROM(0.00)[markj@freebsd.org,markjdb@gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MISSING_XM_UA(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::72d:from]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] X-Rspamd-Queue-Id: 4W2Lh95Z93z4hqT On Sat, Jun 15, 2024 at 10:40:31PM +1000, Peter Jeremy wrote: > On 2024-Apr-20 16:05:06 +0000, Mark Johnston wrote: > >URL: https://cgit.FreeBSD.org/src/commit/?id=bf454ca88bdf4acfa873386e876ff5e772e6a830 > > > > wg: Add netmap support > ... > >--- a/sys/dev/wg/if_wg.c > >+++ b/sys/dev/wg/if_wg.c > ... > >@@ -2206,6 +2341,11 @@ wg_output(if_t ifp, struct mbuf *m, const struct sockaddr *dst, struct route *ro > > return (EAFNOSUPPORT); > > } > > > >+#ifdef DEV_NETMAP > >+ if ((if_getcapenable(ifp) & IFCAP_NETMAP) != 0) > >+ return (wg_xmit_netmap(ifp, m, af)); > >+#endif > >+ > > defragged = m_defrag(m, M_NOWAIT); > > if (defragged) > > m = defragged; > >@@ -2781,7 +2921,10 @@ wg_clone_create(struct if_clone *ifc, char *name, size_t len, > > if_setinitfn(ifp, wg_init); > > if_setreassignfn(ifp, wg_reassign); > > if_setqflushfn(ifp, wg_qflush); > >+#ifdef DEV_NETMAP > > if_settransmitfn(ifp, wg_transmit); > >+ if_setinputfn(ifp, wg_if_input); > >+#endif > > if_setoutputfn(ifp, wg_output); > > if_setioctlfn(ifp, wg_ioctl); > > if_attach(ifp); > > sys/net/if.c:if_attach_internal() (called from if_attach()) requires that > both transmit and qflush must either be NULL or set but if DEV_NETMAP is > undefined, this code only sets qflush, guaranteeing a panic() as soon as a > wg is attached. Unfortunately, I don't understand the code well enough to > offer a fix. I've pushed a commit which fixes this problem. Thanks for the report. From nobody Sun Jun 16 20:37:45 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W2Pw95MCSz5PRTW; Sun, 16 Jun 2024 20:37:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2Pw94tQrz3wrC; Sun, 16 Jun 2024 20:37:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718570265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=otc8G82DHxfmrBQyF7oZsTE3R7UnCn5f+sJP0/2Ql/I=; b=n2MNFmrUB/v0h1hJStvgYhe75s/BkuwmtysBMKc0oXZdWpwK09aFejMl3YvA26FZECh39U kmx1DrW10Tk+DlXIdCEPbX9gyCjkdg0okpLwR6+lc8bwTdiWTIOmtxRYGtepS6FAR5p9Dp okp9lAQgBxmobqHGD7j/gvQt111Dt3r8FgvXwXIr3PITmgPjDAOqgT8mTLrMst2gPRFqMh P8LpbDXrYkBm5OCwvBSkg9EuzD1sAzwi6C5lul417q88VmeGB1KsZMegY8zVfG1sjzid40 iSDx0giyrnNbY51JMij5cqnDf04TJ6gqcA4jjb/+u0xVGJY/YnHQFKN7I2erWg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718570265; a=rsa-sha256; cv=none; b=E0/OPallFpeRJznCuuUbvsWgIP+WuF38sYrWjTiqNNaUht5xz00W05bIcXrTK7i8uDc9Wq 8bPWT0RLSuqzQ2fy/DvdM1MJg3XoUbt+QsbM0T7X3QmmHenfI14yn76xqL+QBSD3u1phHd jwtRGY9X5HMcFvXWXRwLH1/1F9PZptdRNLcDQqo31/h5tN5/TBKxphlPSpNw1az+wBsdWz niYUrXqxb0zgWdz0eiefW7cJ127ZyBPgIzO/MY0jrbuWlk5+pmr8fSbt5YB/niNyTpcOlQ Ik1VzNhk++bpsI5Sh8hzMvTuBxeAPEa4qM9nlLUxsLviAwYCl7tizmyRW/qlYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718570265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=otc8G82DHxfmrBQyF7oZsTE3R7UnCn5f+sJP0/2Ql/I=; b=e8BuhEd8ysPM534BprMDnfBl6RaMGc3gKB4lEV5j4kwdmStfPbbwEd/733TfzqqKt0/Bc2 VY95njJMXd48gzLM/WPz2ggvveaEt44FodFI2zBTvIfdBEXxGsFsvT78cl5h1JB4rs+XRy gv5RyDTcaUxSaPoEXBrEiWl/E7F+BZnlivo29m6b32ADg6vkfd3vu5uXuSHBD9lm4YXnTc T6P2s/q3yqvHiqucgY54BfksBZEHVYHIbSNM7oqMc5iNe3sqh2orZ1rPimbV9YiULMw0jv x+rA/DCGh2cAmpJSEB/HnuIrWCcGXGn/W6WX5oCO1yzxH7WWVs6Uctln2tlSvQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W2Pw94Mlyz12Gj; Sun, 16 Jun 2024 20:37:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45GKbjlX079091; Sun, 16 Jun 2024 20:37:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45GKbjYB079088; Sun, 16 Jun 2024 20:37:45 GMT (envelope-from git) Date: Sun, 16 Jun 2024 20:37:45 GMT Message-Id: <202406162037.45GKbjYB079088@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 4f0ff49fee00 - main - arcmsr: Use device_set_descf() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4f0ff49fee00dee624e13b2d305cf9dfee395b7d Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4f0ff49fee00dee624e13b2d305cf9dfee395b7d commit 4f0ff49fee00dee624e13b2d305cf9dfee395b7d Author: Mark Johnston AuthorDate: 2024-06-05 14:13:26 +0000 Commit: Mark Johnston CommitDate: 2024-06-16 20:37:25 +0000 arcmsr: Use device_set_descf() No functional change intended. MFC after: 1 week --- sys/dev/arcmsr/arcmsr.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/dev/arcmsr/arcmsr.c b/sys/dev/arcmsr/arcmsr.c index ea37da30db93..6de4372a67ea 100644 --- a/sys/dev/arcmsr/arcmsr.c +++ b/sys/dev/arcmsr/arcmsr.c @@ -5238,7 +5238,6 @@ static int arcmsr_probe(device_t dev) { u_int32_t id; u_int16_t sub_device_id; - static char buf[256]; char x_type[]={"unknown"}; char *type; int raid6 = 1; @@ -5313,9 +5312,8 @@ static int arcmsr_probe(device_t dev) } if(type == x_type) return(ENXIO); - sprintf(buf, "Areca %s Host Adapter RAID Controller %s\n%s\n", - type, raid6 ? "(RAID6 capable)" : "", ARCMSR_DRIVER_VERSION); - device_set_desc_copy(dev, buf); + device_set_descf(dev, "Areca %s Host Adapter RAID Controller %s\n%s\n", + type, raid6 ? "(RAID6 capable)" : "", ARCMSR_DRIVER_VERSION); return (BUS_PROBE_DEFAULT); } /* From nobody Sun Jun 16 20:37:46 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W2PwB6gC0z5PRRD; Sun, 16 Jun 2024 20:37:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2PwB4f62z3wqH; Sun, 16 Jun 2024 20:37:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718570266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I0f81DuPM1RNcyeWVJHF8NATopLU5VYKUhvhigVzyY4=; b=u0a5z3SIAeM1ssLBKn2+K7VarT6F3xXvivWMgw+lNbeoRy+3HVqc9jO0UNhO8W0h5qTIZO 7tuWulK6tWkaHUcdfXjNFcDHu5Y/0EvVib0Gllf3lFJhHHi8xYkXkRTGH/3sTYs5NwGMoJ +5k8y9EofGWI6u4P/UkBv95fEMgjIDtgVL4EE5/aX4iI/9a999zYYVyZ+BexdyUUXVHj4A nVs86EyXI/fTcdut+JBl9ndWXbQAFeE5LR8XtwfBrPp+4haqZGpt07LH9QBbvHtjsI74E+ OKMez2XgCyWowMHUdLcLO6QcIKZVLxMgDbt2wdZMAKg73CYQRkrT6Cmvb1v2Pg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718570266; a=rsa-sha256; cv=none; b=Y088lZSMVkIvJYkwuWyDcBqzlWHrNxbKIH67/2dzRoHCkZPJMAP+1ikLr/d+4PqfnKW1QM x0Y35Hx3dDHmwdomWivNtS5snVJc09tnIKTxRHZFafX/e3uWlGf+KN9UrwKdwoQqQ0KJf4 /o1ZogG/ysi8/k/yEFKb55zNxStpTRdYxeq7Ct2yZ0Nu2shhfFW/UFAw5s/5xupUNZnkkq pxc5VJiiun+YPtMxwWCRK7VUCH0qCy0ne1eB0YGG4EBwtG/oDB1STMAKkDIfFYppBcE1Wi nJ/6uQ4G7HgYRvjNlNS8ViiVZL5IEwrAlkb+byfH+rdaDyZiVJzdv9jJEfQdvQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718570266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I0f81DuPM1RNcyeWVJHF8NATopLU5VYKUhvhigVzyY4=; b=mOO/ZNPfd4ybBQAEsCkch7aU1J5RI8sH9dtrROLIJY/SM5ayOV7Tb5Xuzya58W0sVMtV45 vO1alqnQ/dhijhncf5STIch/3j6eNYUrY60OdOdJS/8w33f8G51EKqMdwyS/0W+mAqkVSq 9NOCbA21FdicA46BFpwGovwFtUkEQSI7PjqSjP88NccBydLEd371WziV/FfBhHGnfA2Yjd IQ1XFyTn7fy0hb3mWZF2+zVRJPCGfHz9Oibgh5OrlOKExsmVmDONTFJzOqRE1p6ySLPw4i t/3+wlAAwAXmEdZrqRO9mj9VujgPURmWShd2YACRNYiEMQ+GgMnbaDwn6qwaiw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W2PwB4FThz12Gk; Sun, 16 Jun 2024 20:37:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45GKbkeY079127; Sun, 16 Jun 2024 20:37:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45GKbk9k079124; Sun, 16 Jun 2024 20:37:46 GMT (envelope-from git) Date: Sun, 16 Jun 2024 20:37:46 GMT Message-Id: <202406162037.45GKbk9k079124@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 5823a09f7949 - main - cavium/thunder: Use device_set_desc() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5823a09f79499d426f9f57131be756ddc9be3ff9 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=5823a09f79499d426f9f57131be756ddc9be3ff9 commit 5823a09f79499d426f9f57131be756ddc9be3ff9 Author: Mark Johnston AuthorDate: 2024-06-05 14:14:00 +0000 Commit: Mark Johnston CommitDate: 2024-06-16 20:37:25 +0000 cavium/thunder: Use device_set_desc() No functional change intended. MFC after: 1 week --- sys/arm64/cavium/thunder_pcie_pem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm64/cavium/thunder_pcie_pem.c b/sys/arm64/cavium/thunder_pcie_pem.c index dd6ef14f1a6e..a27ed810c618 100644 --- a/sys/arm64/cavium/thunder_pcie_pem.c +++ b/sys/arm64/cavium/thunder_pcie_pem.c @@ -766,7 +766,7 @@ thunder_pem_probe(device_t dev) if ((pci_vendor_id == THUNDER_PEM_VENDOR_ID) && (pci_device_id == THUNDER_PEM_DEVICE_ID)) { - device_set_desc_copy(dev, THUNDER_PEM_DESC); + device_set_desc(dev, THUNDER_PEM_DESC); return (0); } From nobody Sun Jun 16 20:37:47 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W2PwD2VHlz5PRNq; Sun, 16 Jun 2024 20:37:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2PwC6YFtz3wqM; Sun, 16 Jun 2024 20:37:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718570267; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fcFcVRy9C4QwXIURG71WM4sODD3vscJO0+/yyitMYiM=; b=ysf/ALD7XneEjrQvUEUXSp3BoMUulmivAGu+0+sYP3w8ewloxoWenApOnOn53cRd7MZZKE 0ff3l14Fg5SIwzpkmCa6AvSCC1dIViNvBLN3YzD4wCtZS3GyeGIQVUbU4MKD3U9OqI0d3O +xW9gygR7XNWVQxWTgc8pjB3VO//5+SWCqmohEDRHwsnTSJIY8VYbgBVZlgxOscWA2JMWz 8hSgYQoS8aSk6lFBjwVMHegifGGHoam4GMJdYJImri6sP8Q3B5AnS3jv5qs46HQxKNGutk eP8MAoqxDi3J8YVnwMcmCi9q0SWknKrkIc1emjriZmXhKQjC2UOh/nEq65pjqw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718570267; a=rsa-sha256; cv=none; b=O4HgHTgEVl++VCZ9HTTDRXpP1fcqqyI7carWfB5elIMqv0XERn10d+eHWEvz4Lvb+WvRyU ojx9751KjoaIdFbTqyiyn9jLW+BwWfcE5sKMV9B8rcS3V4DDWArOq9mNu7tl2KMRh8PQTH RfJj8sVl7Jc5tMWOZC34wrtI97LJ+lJii2Uy2YmxtHYssRDhct5qGQTvLedssvPz51zS8H bo1xLNbJjnLIGa1ihakSsFe2eIqw8ErZ4ycx5OMk3EFnOLR5E1E7nsUk90IysaqlR1amlR m8R+AyJu3ve51xw8bV2zwBs85OrQJ+PM4O3NT71s5JHzIf5xgaYmIVdnYJKc/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718570267; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fcFcVRy9C4QwXIURG71WM4sODD3vscJO0+/yyitMYiM=; b=Q1OCY/Ph6+PavGN1dW4B6MFHrP5B21z7oASLpvuC5SS4HwnN3DGEdGfTMN2zbTKsSOV/2t G0zqFyIwWwdXmyOLdlc2WQqGlnwQniHtblxxcWS7+B72sbkdgsXOJlfok71DAq+nK19wkc n6Gj1+biudMylgh59KjkDSypv03exheYCLjD8Y2dqa+RzYpkyaTvpzzgM1laPqThbxtZWn K4UyvBAfd51pWRV2aP5PgYussbK++XrXeVJpvTqd4NnGeueYHmemqdNm9p6tncVluJ0EVO LJ+zME/3SAkLGZywc3tMiQoFGtrj9FuhyLqnzMgQvFX9LVQRDUWx1C6zEUExqw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W2PwC5Q0xz12KS; Sun, 16 Jun 2024 20:37:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45GKblOP079171; Sun, 16 Jun 2024 20:37:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45GKbl1J079169; Sun, 16 Jun 2024 20:37:47 GMT (envelope-from git) Date: Sun, 16 Jun 2024 20:37:47 GMT Message-Id: <202406162037.45GKbl1J079169@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 1878529d2fc8 - main - amdsbwd: Use device_set_descf() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1878529d2fc861ba2f14ec3c15bf373221883e41 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1878529d2fc861ba2f14ec3c15bf373221883e41 commit 1878529d2fc861ba2f14ec3c15bf373221883e41 Author: Mark Johnston AuthorDate: 2024-06-05 14:15:36 +0000 Commit: Mark Johnston CommitDate: 2024-06-16 20:37:26 +0000 amdsbwd: Use device_set_descf() No functional change intended. MFC after: 1 week --- sys/dev/amdsbwd/amdsbwd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/dev/amdsbwd/amdsbwd.c b/sys/dev/amdsbwd/amdsbwd.c index b04aa8564ccd..1dfe6c1b11bf 100644 --- a/sys/dev/amdsbwd/amdsbwd.c +++ b/sys/dev/amdsbwd/amdsbwd.c @@ -376,7 +376,6 @@ static void amdsbwd_probe_fch41(device_t dev, struct resource *pmres, uint32_t *addr) { uint8_t val; - char buf[36]; /* * Enable decoding of watchdog MMIO address. @@ -414,9 +413,8 @@ amdsbwd_probe_fch41(device_t dev, struct resource *pmres, uint32_t *addr) amdsbwd_verbose_printf(dev, "AMDFCH41_PM_DECODE_EN3 value = %#04x\n", val); #endif - snprintf(buf, sizeof(buf), "%s FCH Rev 41h+ Watchdog Timer", + device_set_descf(dev, "%s FCH Rev 41h+ Watchdog Timer", cpu_vendor_id == CPU_VENDOR_HYGON ? "Hygon" : "AMD"); - device_set_desc_copy(dev, buf); } static int From nobody Sun Jun 16 20:37:48 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W2PwF1L2Zz5PRJk; Sun, 16 Jun 2024 20:37:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2PwD6s1pz3whb; Sun, 16 Jun 2024 20:37:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718570269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GsuzNpPsGUO8asibOlA8ZEyqmY2ZXRUhN4eqLhzL67A=; b=t1GggTeXcwcP3vJ+Mraqc1ca/Q5Tg9WSUnNdg4YMRHJKHnPNapxivWOt4U8/TItP1s1+f4 245f3r/tzXE1HSAMod5/Hqjyq6IZt/vPSkHR6q4Iq7vTpOCyAY/uc428yQQitw3u1wCZ9O wEmWj+zDmvUfweZ13UO0KIl81xSvDJ8pt3ntM9wlT1l8Rtg2TFzZjAdF7ngdPkmoXmHdFX yTdXBREx+jDYzWpu9RKYslQqn2xxY6qFhwOTbtq+xRYQwh5oHLCeu2x1Ki7Y4oVkhdBPVM AHW4mZxMEDjmNFfC+ZUkGd76oytN5MNbxUEV2d+tfkS98JZmJlLBfx9LWSDjyA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718570269; a=rsa-sha256; cv=none; b=qILBwl15DX2B+1v7XsqrMUHa89pGqiW8vYJjEQXcw6yu74cKm6GSLYDukwDZt8TUcvwPUv VlaV1YCujRhev5Q4kSUbou1Igbf8s41d6nOW2G2eM6/X9aKkMcYcSlbBSz3beTI/KLOxA7 L8nx5PQdpHHapJJ70fHPZqJKt/VsBbWFM00eVfSsGYHemPekVcYhDWChpgm78LkCFXQ8r/ avimlsGKUJ4EMGRuE6DLEv1RMNfXLoAFAUP0OnRObT/avruzq3s+h9cscktHx0QoF4VHpr pq3hXsKMwGBE6GHf7XYoawYOzXeVFhXIZhfUXfBpO6pds6K11lWEknonFxRfuA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718570269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GsuzNpPsGUO8asibOlA8ZEyqmY2ZXRUhN4eqLhzL67A=; b=mRqhxLPHItZxoSQC6drqWs8tOkQbxGBFPPpyY44mVsKK4eku04lZzD/CIbouq+52H/o5rD NNRWVTpVKYVWXJg600/JvduLLf6f0RQUfwOuiBdzlyi+ynXKhzaa3HOeRHvAyBAiWvMZ4o MrDLSMlgf5LKI9otMizjG6hfLNzuleJ0ajRB0ZUwHCPBUtguFpiU8s3mdDCjM5JJ3ihL/M z9xK8J0AZs/00z+lqyDzyK2aopUj0ubuGuBdTj2O26Iqutwf6jNW3bRDkzK9HaUe0V5xR3 V8S2sNJBCzASN+H0OMEkP8gziRE6/Hk9/TMBr6+4OuQDaZWkJFPaiQ4vUdqDWg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W2PwD6QL2z131x; Sun, 16 Jun 2024 20:37:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45GKbmOd079213; Sun, 16 Jun 2024 20:37:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45GKbm4h079210; Sun, 16 Jun 2024 20:37:48 GMT (envelope-from git) Date: Sun, 16 Jun 2024 20:37:48 GMT Message-Id: <202406162037.45GKbm4h079210@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 48ef9cff9c29 - main - amdsmn: Use device_set_descf() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 48ef9cff9c2934d8a13eb8624c02050cd8f00595 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=48ef9cff9c2934d8a13eb8624c02050cd8f00595 commit 48ef9cff9c2934d8a13eb8624c02050cd8f00595 Author: Mark Johnston AuthorDate: 2024-06-05 14:16:22 +0000 Commit: Mark Johnston CommitDate: 2024-06-16 20:37:26 +0000 amdsmn: Use device_set_descf() No functional change intended. MFC after: 1 week --- sys/dev/amdsmn/amdsmn.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/dev/amdsmn/amdsmn.c b/sys/dev/amdsmn/amdsmn.c index ddb5be4c2c3c..d657ab84924a 100644 --- a/sys/dev/amdsmn/amdsmn.c +++ b/sys/dev/amdsmn/amdsmn.c @@ -185,7 +185,6 @@ static int amdsmn_probe(device_t dev) { uint32_t family; - char buf[64]; if (resource_disabled("amdsmn", 0)) return (ENXIO); @@ -202,9 +201,8 @@ amdsmn_probe(device_t dev) default: return (ENXIO); } - snprintf(buf, sizeof(buf), "AMD Family %xh System Management Network", + device_set_descf(dev, "AMD Family %xh System Management Network", family); - device_set_desc_copy(dev, buf); return (BUS_PROBE_GENERIC); } From nobody Sun Jun 16 20:37:51 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W2PwH3LYfz5PRRL; Sun, 16 Jun 2024 20:37:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2PwH1fHkz3wvK; Sun, 16 Jun 2024 20:37:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718570271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fpFxjERr/rhmxi9qbOfXTDZaFjwqQ9AZzF03nBakCJc=; b=Z3HgVrIAwNbUbAwi0SXfglE8xYS1BwOUtFI1sGDfDI0ZIyWRtoXhcIinzCT+ERZ7GcgwuF k4YuOEArIf0rPmMQS6uu40ao/QaneLrFAo+4q0T7KNvM0pO7GfR+pJgTAaC27Zn/ahNKmf KGGrmCw9M0HvRWZl4mgSVzo2yFNVjkx1iqCAwA3QZ8mOrizOleGidS0gfhZ4YcXpPTWzSJ k65UWzzjG7jNRYuFb/7qxtwlzPHakeysREm9b9vowYkgaTwVDO9FopBIXJjgE2rLBRx77S MaiOOEh8HbV/aayR5s4Z7+sgQOL5Dzgs74sGtFwpgihr5XfMs8WMaqvRLKLDbg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718570271; a=rsa-sha256; cv=none; b=ufwstUmalFxPUbl1XiKRlxl/ND2PruqCn0Mi5ET0x7ZSRf0FpGd6a4TrrkgoVGHG+dk2cU AxMIII+qOZ3Plc7V7v6zJgMn1VAVRoMReHe0aO4zJEdtcHXu4149XrXNpTIGeMoUB7Tb/h lutUcdgreyHWbUrcsAzfjj7jop54iWLqseVl4CFr3a3ho9PD5joZPSYp29SpM0STGN3FoZ 25VMr9oE3I5Tm4laUnGiDdvz4Ma06vpuHt5hqvlMljcMZeal0KAPg/2GgZ1/Q5MzrCRFQJ UEQKoGG1LkAROz3rPCyTNmtWDq01RIqaoYA2c4N2jYxcKpnjwBtY+05+aoH6sg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718570271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fpFxjERr/rhmxi9qbOfXTDZaFjwqQ9AZzF03nBakCJc=; b=nRr9Brkh07j1pUH9DBGiy9ql547q8k6wn1Z58Fx8vwM5HhazIzrJZRWrFeRATJlU+By1if 8OMDhFXyoAEGCbmu4Xgk0piMUlh77gmAHNGcBpAkqfQumbcvyWAT6iyqw5CIZjxRLyZaBR bBrujoDdXdZcmFp17XxZ5AvdsRJUo7zRuDhUOi2kVb2lbU0mjexyA5lrYAH5jCZNWEFpNR BrhKfaJNOh9UKwnRwwsgJCM3JmviqV4vJUgbzXRr0xAQGEduD5DK9VPJH0lyvv6dMnEHnx 2W9xEYcpWMccIuSurh5STETygwloA11mdFDJylhNrEpYaRL0PQmP/FqidBiVZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W2PwH18Ksz12yY; Sun, 16 Jun 2024 20:37:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45GKbphv079290; Sun, 16 Jun 2024 20:37:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45GKbpKC079287; Sun, 16 Jun 2024 20:37:51 GMT (envelope-from git) Date: Sun, 16 Jun 2024 20:37:51 GMT Message-Id: <202406162037.45GKbpKC079287@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: b67f24852378 - main - nvmf: Use device_set_descf() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b67f2485237815b6bdb130e7e9beff7043491dd3 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b67f2485237815b6bdb130e7e9beff7043491dd3 commit b67f2485237815b6bdb130e7e9beff7043491dd3 Author: Mark Johnston AuthorDate: 2024-06-05 14:17:50 +0000 Commit: Mark Johnston CommitDate: 2024-06-16 20:37:26 +0000 nvmf: Use device_set_descf() No functional change intended. MFC after: 1 week --- sys/dev/nvmf/host/nvmf.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/dev/nvmf/host/nvmf.c b/sys/dev/nvmf/host/nvmf.c index 47cdbe7e47fd..623c76954720 100644 --- a/sys/dev/nvmf/host/nvmf.c +++ b/sys/dev/nvmf/host/nvmf.c @@ -251,13 +251,11 @@ static int nvmf_probe(device_t dev) { struct nvmf_ivars *ivars = device_get_ivars(dev); - char desc[260]; if (ivars == NULL) return (ENXIO); - snprintf(desc, sizeof(desc), "Fabrics: %.256s", ivars->cdata->subnqn); - device_set_desc_copy(dev, desc); + device_set_descf(dev, "Fabrics: %.256s", ivars->cdata->subnqn); return (BUS_PROBE_DEFAULT); } From nobody Sun Jun 16 20:37:49 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W2PwG1vHZz5PRRK; Sun, 16 Jun 2024 20:37:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2PwG0ycdz3wxY; Sun, 16 Jun 2024 20:37:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718570270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p2h+/G85YFP7BxA87gYj6/+IZKXmLOHTnsRTk6Xc2DM=; b=M7nP1m5pU8cjTuCYPBWBrVzKuitXHaxA13lchUAtjLLjTKP7sJUE1tikjYJxAK7Ep1d+o6 IZ+c+Un+XxkRw56uFgFok8FddpQuDnHrBnQuXNjbJaGWJT74MaabKTnyZlg9tRqdnkob3D ftUg1PGJ6atCdrZXGATaA3VgDfFnTFr2nOJLqRO56/hacrgmVoSub14b6ZK5rDcGO2ZPeN bDAV19IXejEwkMNkDA1tY+XfWGL9+gj6AFVB733cd+vca1yuNPudjpjaiCRI3/7XIKf9/X TqHbCfuvR57mLGNEMuRzUkKyjqOOwqfR/0MPMxkXHnrWbSL+UN6jsniJq5WynQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718570270; a=rsa-sha256; cv=none; b=p3cwe/bNeJz1qrppdlmw1Vwdbdex9rcuxYUEGI8RdDOOYokz2nPzd37uKHfHvr4yOGYnTQ 3scskvfzt20xfYsh4ze8WNAoxK4exWVDy27quPxVWMwKVemJ7SvFofDiLygyhzAHZeiGxo AuA4sP0TFTy4zltBBss9/4QVz2AbQg8EFlFlZLkHMuV7EkK4wIRL716SehRuSVE9evsTEl 2cM9Y9dd74TNHeLZA198AjzW9IdJT9kObFEVcbGu1dKYEdguhIy0gQGI4nOgKLsJviSsEW s4N04hQeiIOYks5Gvl0CcYL6fMZkZtQtsQliJJagQiTqBc2NwV3A2/CWQB0JtA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718570270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p2h+/G85YFP7BxA87gYj6/+IZKXmLOHTnsRTk6Xc2DM=; b=TQXAZCAfjm1sgHXlQdv8RLA04gNncS46Gm+dWxysfQ3i3NOeTKhyE6Z71xPx98stO5dmRV HNBJJIFWDHgivqXrdPi3X/41G3bVeZObP7CyKLGZPkA2An6k0w337qDQAK3xGJCOz31RNz KyGTVjD41KhXwrbkGWGVbbzQr73qq8mBH36sXt/fwcNpCXfC1YSfNYJdjlUPA1rZU6AFZg rip80d7REf9xuXv5+X5WOUst6fiTTRyI5xDZFiAXc4oJ5E76lqzuiqjFnUpTkUAYe/jXKN GuM2V4YR0fZ5WFvv17XIoLl6Gw9Bo8QLKYKaFFmN3MkvX20FwAzvdnNoLjYZVg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W2PwG0GHPz12h8; Sun, 16 Jun 2024 20:37:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45GKbnC6079250; Sun, 16 Jun 2024 20:37:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45GKbnr2079247; Sun, 16 Jun 2024 20:37:49 GMT (envelope-from git) Date: Sun, 16 Jun 2024 20:37:49 GMT Message-Id: <202406162037.45GKbnr2079247@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 44d36c9731c1 - main - netmap: Use device_set_descf() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 44d36c9731c172977ad8a95a09c0d6fbddcc9b2f Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=44d36c9731c172977ad8a95a09c0d6fbddcc9b2f commit 44d36c9731c172977ad8a95a09c0d6fbddcc9b2f Author: Mark Johnston AuthorDate: 2024-06-05 14:17:14 +0000 Commit: Mark Johnston CommitDate: 2024-06-16 20:37:26 +0000 netmap: Use device_set_descf() No functional change intended. MFC after: 1 week --- sys/dev/netmap/netmap_freebsd.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sys/dev/netmap/netmap_freebsd.c b/sys/dev/netmap/netmap_freebsd.c index a4a0124471c0..cf3578ddc7fe 100644 --- a/sys/dev/netmap/netmap_freebsd.c +++ b/sys/dev/netmap/netmap_freebsd.c @@ -864,16 +864,12 @@ nm_os_pt_memdev_iounmap(struct ptnetmap_memdev *ptn_dev) static int ptn_memdev_probe(device_t dev) { - char desc[256]; - if (pci_get_vendor(dev) != PTNETMAP_PCI_VENDOR_ID) return (ENXIO); if (pci_get_device(dev) != PTNETMAP_PCI_DEVICE_ID) return (ENXIO); - snprintf(desc, sizeof(desc), "%s PCI adapter", - PTNETMAP_MEMDEV_NAME); - device_set_desc_copy(dev, desc); + device_set_descf(dev, "%s PCI adapter", PTNETMAP_MEMDEV_NAME); return (BUS_PROBE_DEFAULT); } From nobody Sun Jun 16 20:37:52 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W2PwJ4Z2Gz5PRTZ; Sun, 16 Jun 2024 20:37:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2PwJ2fq3z3x1L; Sun, 16 Jun 2024 20:37:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718570272; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z7BLuOMFEmV5ihoDl5AqKoBtp2tGXOprYQRe4QsfqcA=; b=nVNXCRGq4Jeeys9fK/ZvXcFnayWMMlEfWEMtnguTEUYyVQlFDgiGWZpqmBGaLh9MOpdwl7 60W0xS6DhPxq7Avje2WYnJln3QGsrCAwyNO0hSsoTZsivLWuSbOer6zzLg0mjwf8q+g9Dt 36zcpxXl9rcKtEbK98HgYnwbkk/mqYJrxr/00S4WUKPy7Iq4d+Uwfd9uEFPtwwRKcHqy82 0IaJGZAxkGRqSFFYQXShsxL3/OgEkrjoTRbZcL75rp1Uzy5MGgtaltErEUXokb7JzJbE1z Zk1IDy/v9k0RjlLLKTq62PoAPQnFjkFIwYTtZuLrcXEiivkwU0RWqlKffhwVdw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718570272; a=rsa-sha256; cv=none; b=wd9h+O/uc9XKTECKQbGm86s1IJNgEohFRo972utvE1oGZDBY9JZkyEyPPBvq196sLSUsOi Qk56SjYox4bXhSJpXdHW5yGmiygvZRZjEGcLQXND7J89HIVAMMgjKyXBNdoRfv6xVa3n2E d0ePWFxpSib2ZpDdltegtHKzw9wKGOsGUaV0Jr+AA3m8U3qyU3gMLe/V/KsODZtRsaol4q 5xA3sYZhkrLjLQZr0snscfw1XrOtyvTfaEU3ne56oNBmYlCzonJP+5Dx9zHQ5tOFw2et/0 lk7Qo1MK5bNvCxBeC9lNITc5IuL7dWchJGSEGLW/GXWZoOlqDhfcMiiLz3wpfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718570272; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z7BLuOMFEmV5ihoDl5AqKoBtp2tGXOprYQRe4QsfqcA=; b=Aw+b3A1mBTBjwz5eso90ygj34XZAtdfQhjMOQl75xQ4jrm/qxfgy9gKIy/QG5xX1nFF6ID ehCVQXZLRjlAtVm8L1ZA+iOEnZI3KxEkHtAdbGFkaKdOlNqWm86vg56MZ9l2Po24xNkulD JtoyETv9QrgvVhbavM2bylsQ8DVBtG6gMLaVKFC7oEVEXUJVOsYQ3GZBS+fsL/ba/0ff0g XOHr2MDuLSFxXBhsGsa8VBowEU0dhEb4uKrwt9JjCwAVQ/YlRE3vdRN4IMCdj0EpWPsdeI GTO3fhOP3WeZpyX7KTdQiJmDT8klqnTbqzwu3rLlUzYyGq/NOZ9pNSbXgH2jCQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W2PwJ2FZ0z12km; Sun, 16 Jun 2024 20:37:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45GKbqAE079335; Sun, 16 Jun 2024 20:37:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45GKbqVl079332; Sun, 16 Jun 2024 20:37:52 GMT (envelope-from git) Date: Sun, 16 Jun 2024 20:37:52 GMT Message-Id: <202406162037.45GKbqVl079332@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 48f5a429c955 - main - iicbus: Use device_set_descf() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 48f5a429c95513465327f722a8df52cb48eeb473 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=48f5a429c95513465327f722a8df52cb48eeb473 commit 48f5a429c95513465327f722a8df52cb48eeb473 Author: Mark Johnston AuthorDate: 2024-06-05 14:19:06 +0000 Commit: Mark Johnston CommitDate: 2024-06-16 20:37:26 +0000 iicbus: Use device_set_descf() No functional change intended. MFC after: 1 week --- sys/dev/iicbus/iichid.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sys/dev/iicbus/iichid.c b/sys/dev/iicbus/iichid.c index ff443afbf30a..222f20842a04 100644 --- a/sys/dev/iicbus/iichid.c +++ b/sys/dev/iicbus/iichid.c @@ -1037,7 +1037,6 @@ iichid_probe(device_t dev) { struct iichid_softc *sc; ACPI_HANDLE handle; - char buf[80]; uint16_t config_reg; int error, reg; @@ -1097,10 +1096,8 @@ iichid_probe(device_t dev) sc->probe_result = BUS_PROBE_DEFAULT; done: - if (sc->probe_result <= BUS_PROBE_SPECIFIC) { - snprintf(buf, sizeof(buf), "%s I2C HID device", sc->hw.name); - device_set_desc_copy(dev, buf); - } + if (sc->probe_result <= BUS_PROBE_SPECIFIC) + device_set_descf(dev, "%s I2C HID device", sc->hw.name); return (sc->probe_result); } From nobody Sun Jun 16 20:37:53 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W2PwK53d4z5PR3x; Sun, 16 Jun 2024 20:37:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2PwK3WGJz3wyP; Sun, 16 Jun 2024 20:37:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718570273; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dREyFybktpPeDu2Wim7KIC1kybhLdGqxn0hvnF526v8=; b=aNQC5XSTGyRu6A10+cCUeFlSQTl8LyxQooE8TD1QLz564b5bFUOKsh6j15x/Vcq4ubgld0 TNwYuRdOb7IkvDYt4SC+4F2Sz8tVq1SjJJaDFLS2cx17wbBPaqG9Lp7vbSpp3omV3qJjea HHVkelX+QydZEWeBruXxBqq2seO/3mM1LeOw2DI/Wj7l88/b2owyBU7RKiMg+bBa5zC0hH liHD5x0cnRVLab39AWeFIRz4OV/fVQqzdwdsVoTLDcUvuZwakmcZtevzblL9CJdC21sOpn pwdyqimtycQZ3NA4554Zc5Tzz38a8KtCLh5TntrdOo7kiH5Qf/x1Aex0SKopEw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718570273; a=rsa-sha256; cv=none; b=K8cwU48ZVvL0qwSoZL/8G+Fu/J7eJpLaS9MZj3tnmfnWKyF/Xa9IoavMrH32FSpHVfOKf1 IS8pA98EROw8jpa/15DDvraNZZITbe1z2pQqPiXpuGoeDw4XtYyV6XgpYb8C+zrlRcnnQU s7CKUZnFXjFmoG5m74GqcZAKKud2yq/43GAY46A70V3c7clEPXWyNwQGjmTff4WQb8TyaS POh8zTZJ145WmScGwRX+PmTUiqUp90eRX0nN3Hbux/8hCOEAsUWuON59gtyNYTRF31bvtX nXV5rRiMUiB2iXFqc/yqrOaZW7/GrEp3KHehOYrQ9iu/56W9nW6x8PTHt4uLMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718570273; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dREyFybktpPeDu2Wim7KIC1kybhLdGqxn0hvnF526v8=; b=AuLUBtFgRNpLduGRJ2c1Wk/7uofE3hZBEsWPmoBul/4/QibW+6WfZPrTJ/EAgD8C5qLyll 7iTs0rww/tseeVUgdNUuR39ol8ynwqKYmXqmJNrx6CUoG4G1WvUVLdqYYALaxlVI/fTrV7 4LQBLbyuirR30R2b7j50kTUtTsUTUBcikkQTTLjYl49cspRFCZHXug30hxMz65WOSw9/G5 Kl8dJltFuGc4JxqGX4C8mQNhvHiGKiAkM9CUkWmnFjFmxKjklubpWgrbKL+rxKnqm55tU2 PxtJO7aPax26thmBh5fsXcym819uVFdBzJFw2ebc05ChUWacJfSlPqRpUT+tFg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W2PwK35FLz131y; Sun, 16 Jun 2024 20:37:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45GKbrET079371; Sun, 16 Jun 2024 20:37:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45GKbrGn079368; Sun, 16 Jun 2024 20:37:53 GMT (envelope-from git) Date: Sun, 16 Jun 2024 20:37:53 GMT Message-Id: <202406162037.45GKbrGn079368@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: eb634b9f4f48 - main - wbwd: Use device_set_descf() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: eb634b9f4f48c29753e177f3340d03f73a75dbe5 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=eb634b9f4f48c29753e177f3340d03f73a75dbe5 commit eb634b9f4f48c29753e177f3340d03f73a75dbe5 Author: Mark Johnston AuthorDate: 2024-06-05 14:19:51 +0000 Commit: Mark Johnston CommitDate: 2024-06-16 20:37:26 +0000 wbwd: Use device_set_descf() No functional change intended. --- sys/dev/wbwd/wbwd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/dev/wbwd/wbwd.c b/sys/dev/wbwd/wbwd.c index 56b3f8adcd90..e19a60de14a2 100644 --- a/sys/dev/wbwd/wbwd.c +++ b/sys/dev/wbwd/wbwd.c @@ -461,7 +461,6 @@ wb_watchdog_fn(void *private, u_int cmd, int *error) static int wb_probe(device_t dev) { - char buf[128]; struct wb_softc *sc; int j; uint8_t devid; @@ -478,10 +477,9 @@ wb_probe(device_t dev) for (j = 0; j < nitems(wb_devs); j++) { if (wb_devs[j].device_id == devid) { sc->chip = wb_devs[j].chip; - snprintf(buf, sizeof(buf), + device_set_descf(dev, "%s (0x%02x/0x%02x) Watchdog Timer", wb_devs[j].descr, devid, revid); - device_set_desc_copy(dev, buf); return (BUS_PROBE_SPECIFIC); } } From nobody Sun Jun 16 20:37:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W2PwM6KyHz5PRRW; Sun, 16 Jun 2024 20:37:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2PwM541gz3x23; Sun, 16 Jun 2024 20:37:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718570275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HwTnbv07N4BqWDoQDje4brh10xwqROR7Mca/qs/UjWo=; b=IKQjEXLQ2Rln/H43ItRUZuloHbN7uAUqYMDbK4cotSl/s2wzxohWZnlat2giuJVPsbQRQc iJ4497D8tVtm1LcMOmvXqk/j6i5hGuHzVWHKVUi2v1e7AIY9c/Hl/ZOL8c/3eOo0KXuERu a6H4nwIhziTOx0j8uWWBo+bqOD8NhILLk4GK9lPIFm+YY3Cgde71kPiiJlrKHC3hdf/F8i 0KldgRKtaVh68Wp8yVaZdZIEIolYgRjCzEfcbzzDtBWg3j5mKHqgU0rIOU5HOGisAKyImN phA3JtJr3UIHYSJ9B8wIOaF3bVsajxSdJgk4VSnQr97tt6WibGjpN3mBRYas9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718570275; a=rsa-sha256; cv=none; b=OVfHMr9rBRRqTCAW1zsQ7QJfhwJxsLHkIE37f8AAca4rgmcaTUKQ8O4aMC2z18/a4I9Nmz W8/4ZsOFg5blCwUzSUh88C762aeBBfIq6T3Sz52gEwOf6REzrXfEjxa6GGBPzZ9cqVBp79 BmUp46qwrC97nLX4/Ths5YSi7rNhjvlcGYiJxORtSqtUenEtqH6GFZHa48whZDyLx+cje8 NYVBmlkNWxSojI7FZnBRHSZe8E+k/zyudXx8g8HKaFOFzaMCTEaiuZi6lnjI/F1WEgoNkX ndKYuL9Zuhg7vIB8VpInjq+uhBMntqnsCcJu2/izfNBbVUkcObjeTWgrQUQxiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718570275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HwTnbv07N4BqWDoQDje4brh10xwqROR7Mca/qs/UjWo=; b=ui7tB9d9zk9nXcAjCW49rJzgK1+mpawo1PF/Ce0HF7WXo8xbZJujntURLjbh9WZl2JdFhq RHznv3tgC2ECo6sLIH1Qdu0v9DTtsGKGx/Gc4/ybsMUr95UFLkRRmHPnyJ3DxGtd5L0ieT zHcBQtLIB/LEMnkfg/wJNydDN6sVYzVGD1F0FwCw2Q86eUzabLm5BUkeBk6TzKne4QdB2p ccB6VSuy8hI+yodLurzOEwz7Da587uXbD7F3W21BoFW7h17L5vLYE+oO1zDM/tUPd1224r V/hLkIn/10trxfV5bOCdxu6Xb9Z4B4pCWBj77KgWyTyDshItg/c96VMqOGjABg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W2PwM4hJLz1320; Sun, 16 Jun 2024 20:37:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45GKbt6L079459; Sun, 16 Jun 2024 20:37:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45GKbt4V079456; Sun, 16 Jun 2024 20:37:55 GMT (envelope-from git) Date: Sun, 16 Jun 2024 20:37:55 GMT Message-Id: <202406162037.45GKbt4V079456@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 443f33481e46 - main - msk: Use device_set_descf() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 443f33481e461ae1f36e0110537131b972ec6a37 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=443f33481e461ae1f36e0110537131b972ec6a37 commit 443f33481e461ae1f36e0110537131b972ec6a37 Author: Mark Johnston AuthorDate: 2024-06-05 14:20:58 +0000 Commit: Mark Johnston CommitDate: 2024-06-16 20:37:26 +0000 msk: Use device_set_descf() No functional change intended. MFC after: 1 week --- sys/dev/msk/if_msk.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/dev/msk/if_msk.c b/sys/dev/msk/if_msk.c index bb00ffc7ae34..2165cb73f7cd 100644 --- a/sys/dev/msk/if_msk.c +++ b/sys/dev/msk/if_msk.c @@ -1564,7 +1564,6 @@ static int msk_probe(device_t dev) { struct msk_softc *sc; - char desc[100]; sc = device_get_softc(device_get_parent(dev)); /* @@ -1573,11 +1572,10 @@ msk_probe(device_t dev) * mskc_attach() will create a second device instance * for us. */ - snprintf(desc, sizeof(desc), + device_set_descf(dev, "Marvell Technology Group Ltd. %s Id 0x%02x Rev 0x%02x", model_name[sc->msk_hw_id - CHIP_ID_YUKON_XL], sc->msk_hw_id, sc->msk_hw_rev); - device_set_desc_copy(dev, desc); return (BUS_PROBE_DEFAULT); } From nobody Sun Jun 16 20:37:54 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W2PwM0Lv5z5PRRT; Sun, 16 Jun 2024 20:37:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2PwL44v9z3wsx; Sun, 16 Jun 2024 20:37:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718570274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4Ie/ZbTmMJHbk2kLkQVKamUvh3q5LparEStv1pVgWqY=; b=VC473DxriweB7Pod+GOQp8F71GgU53BdDidv0wFfNOpFwMoGl8ZMBvWQbYV+QkZcu4pqr5 /itELawRhhkzTDVcCSmDIS+hovwhteeVN3Gca0PW/LUzFNFhSEPDhwfcdknalbjy0OIV6r pXfXixN/eN0vjoQrnbOGexZIyrmXi2siVMWkR/jiY16lAueM820FHlpJZpIPXaOFhBGvXv oWuENHv3AXe++zEmxiIpwYTBKsGLUNu8qi730TrcgIeFwH/+DikOTm84Jrxr1iDjoESYex XC1Y4HpcbhqIGJynL9XznnhOm1u/6W3LEGopH/cOaZsMwu8m7S0egvWJOVYp7Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718570274; a=rsa-sha256; cv=none; b=O/YgdPasteZpTtWdNF8mKTDAERblKK22cnRdtGSXqP+4tGReWV9x31yJJN57g6iF51COjS 8/xmkJCwTpYbaUJZvN2ArzvTbENrlDHoHppFZcc5Req0gWspqV9D1u3MyODD+Or6HIuctU gr49/DCXQZ9QDhh9fVO/NL/a0jKJrRDN+9/rlMaRBkJabCJDpoQMvMeR8k3RKoBtlIjMus sjXCCkpJZtXLeUrQRDGG9I/wzT8/ehI+339xcgpYPfBi3Q119vr2Aw8eN2siYwM9hG9STy /bvkCwB4Pf2e4P03IJpfcOVbS7XGub4Pag9HbsLhsutrtyWkq1IQwEIcCLErYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718570274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4Ie/ZbTmMJHbk2kLkQVKamUvh3q5LparEStv1pVgWqY=; b=upRMy/2kA5tzmbICk6VWU7drLYH5WpZ2F7ucXHwmIV0ZXMBaow81nkvvEomI4M4M3aoUWg RZlJrPEq9ESpDRfbBWVezCno5tXMCn3hpLL6RJ1uZSJUCr6zvHBVVAH6ykciGdftPgjwZh 6dtGse7sjiYRo7Hy3NRRMEOaRX6MP2SFvzk8kNzZYkU4AsOGFw9gMiPzq7reDG3Zpu1+nT /LRRdeR+nhOnDxMEkWr53/KuEk+98Qjs5k5U+a3YYznUO1BwY+xARg3bQ3KioejIDG5E0n 9fH7MM18YrYX2+DBYPU1ImpkpBT7t26zm301ubqfU+sTg6VHCf3xej76skszCA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W2PwL3hK0z12Xc; Sun, 16 Jun 2024 20:37:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45GKbsuu079412; Sun, 16 Jun 2024 20:37:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45GKbs6m079409; Sun, 16 Jun 2024 20:37:54 GMT (envelope-from git) Date: Sun, 16 Jun 2024 20:37:54 GMT Message-Id: <202406162037.45GKbs6m079409@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: aaa878e95676 - main - mpc85xx: Use device_set_desc() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aaa878e956761167f8115a32698c8b424fd341c6 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=aaa878e956761167f8115a32698c8b424fd341c6 commit aaa878e956761167f8115a32698c8b424fd341c6 Author: Mark Johnston AuthorDate: 2024-06-05 14:20:12 +0000 Commit: Mark Johnston CommitDate: 2024-06-16 20:37:26 +0000 mpc85xx: Use device_set_desc() No functional change intended. MFC after: 1 week --- sys/powerpc/mpc85xx/fsl_sata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/powerpc/mpc85xx/fsl_sata.c b/sys/powerpc/mpc85xx/fsl_sata.c index 74fc40053fdc..18fd8e438cd4 100644 --- a/sys/powerpc/mpc85xx/fsl_sata.c +++ b/sys/powerpc/mpc85xx/fsl_sata.c @@ -316,7 +316,7 @@ fsl_sata_probe(device_t dev) !ofw_bus_is_compatible(dev, "fsl,pq-sata")) return (ENXIO); - device_set_desc_copy(dev, "Freescale Integrated SATA Controller"); + device_set_desc(dev, "Freescale Integrated SATA Controller"); return (BUS_PROBE_DEFAULT); } From nobody Sun Jun 16 20:37:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W2PwP37V0z5PRP5; Sun, 16 Jun 2024 20:37:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2PwN63nSz3xCQ; Sun, 16 Jun 2024 20:37:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718570276; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yLuzjR2v+chykjQw1NeMcot5B+iL8zgSNNvo3Qox4nY=; b=FcFwolC9wnPrn5xixnXirP7GwiX7IFYjuqej8kOqzUnjU4JnNNTt1Pekd30YpGh0uDh6V4 ztuF6+3l0JEU3oBovKiqZVfhLIPox86IkCX0+p79HdWTG+/JejWqC9hThTbGDbxdsdjXLF cPUPci1YJKCwfTaVY6LXYMZoHQ1xLFmSpiTkqCAE39impvJeavoPyDbFWQIJh7krAO+UV9 Y7Klzh8PSQJPpm8MDvU83xFGc+9NOzr9GEOTFVDlbKhxEEGFUb7l6golsVFMJZ80kj9x5n SgitmrFfYaRR9rsXRBp5xzx7EWpgzYCEk7IskY8YZnGABSHfMBLtLCLTqrfxiQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718570276; a=rsa-sha256; cv=none; b=Qp1qbvuJ3Nnw0usFtUrdMUuC93Uk0y1a2w0L1OcSAxATtEt1nIX2W6i0SCVaZdrkuIjEq+ YQ86E3basiqEebjKOgmlC+cCs924uZxfthjOihw39UX3vXaGryYLXYrHbRcTBSoybCcNUz 1HvvxhicRwxdj70Zde93zUtKbcC7+AOc6akb/rwCGA2qCssuaCtCa/7Kv6vMmnJNJqzoYQ bFA1s4r01HkJGgpNz93T6DXWzQEt9xlIGEZ0S0vlDGAG7VhfOBlTqLyL89PkHBLhTpSiSO V6gF3b1suS7QcuNetWdNdgrB/AaNNR2YM9I/21fM+Rv/GxGbf/P/YI4EXAcprg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718570276; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yLuzjR2v+chykjQw1NeMcot5B+iL8zgSNNvo3Qox4nY=; b=Aj3bVa9sMjxwJPT3LkJiMpq8+PMHiWSAR/rZ30pLIu4c8rGGVGwPNVPmQ5IawHJCHKfkep 82t1a16M5LvxtSy+M970bUgFDD2Zk/lgdRN0ZUy/FOMZP+SwGgX8nISF+U5CsVbQPd4iF3 Cb7fywW4KEqJf51jYnDn1uOyZH4ouCanuNbY8su/S/Chdvte54TbP9ivoYIyTFGISh+4jk Mq4pRam9+E994Vmx0Zc9i90IVohNBiPwaMbGjzrEu5i9VpVtAmpcFnCAi2oc61zwLqG2h/ o476IbbMbjAJxmOmB4u9UHggFJZRZDohO79TFvDqkDTiOZwXCpWpmj+zwD2cqQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W2PwN5dxsz12Gl; Sun, 16 Jun 2024 20:37:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45GKbu2t079495; Sun, 16 Jun 2024 20:37:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45GKburl079492; Sun, 16 Jun 2024 20:37:56 GMT (envelope-from git) Date: Sun, 16 Jun 2024 20:37:56 GMT Message-Id: <202406162037.45GKburl079492@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 1794a0a87e0c - main - liquidio: Use device_set_descf() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1794a0a87e0cecee1ef63fcf4f0a8a6cf6945dc8 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1794a0a87e0cecee1ef63fcf4f0a8a6cf6945dc8 commit 1794a0a87e0cecee1ef63fcf4f0a8a6cf6945dc8 Author: Mark Johnston AuthorDate: 2024-06-05 14:26:22 +0000 Commit: Mark Johnston CommitDate: 2024-06-16 20:37:26 +0000 liquidio: Use device_set_descf() No functional change intended. MFC after: 1 week --- sys/dev/liquidio/lio_main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/dev/liquidio/lio_main.c b/sys/dev/liquidio/lio_main.c index bec510af0c65..aa52612dda04 100644 --- a/sys/dev/liquidio/lio_main.c +++ b/sys/dev/liquidio/lio_main.c @@ -200,7 +200,6 @@ lio_probe(device_t dev) uint16_t device_id; uint16_t subdevice_id; uint8_t revision_id; - char device_ver[256]; vendor_id = pci_get_vendor(dev); if (vendor_id != PCI_VENDOR_ID_CAVIUM) @@ -216,9 +215,8 @@ lio_probe(device_t dev) (device_id == tbl->device_id) && (subdevice_id == tbl->subdevice_id) && (revision_id == tbl->revision_id)) { - sprintf(device_ver, "%s, Version - %s", - lio_strings[tbl->index], LIO_VERSION); - device_set_desc_copy(dev, device_ver); + device_set_descf(dev, "%s, Version - %s", + lio_strings[tbl->index], LIO_VERSION); return (BUS_PROBE_DEFAULT); } From nobody Sun Jun 16 20:37:57 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W2PwQ1CBLz5PRRb; Sun, 16 Jun 2024 20:37:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2PwP6yjvz3x4g; Sun, 16 Jun 2024 20:37:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718570278; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MnYFSjT4BxfsQK8ZI6FPJb1pjwy8yCC0QKyjW/yZGwY=; b=WC76b2pMRU59K0q5WAWmgrYehYdvrOFjRT3DfYXJ3AX79pSBiS7s/4+lkYc1NddZVKWaqx /kIw3dxaiHfDB89AOxJbepVLqHciueLMrfG9m2NUjNxXKUlyrAkENFZkbLv34Ox+N4vCu5 1O6HHwQtvlxXLPjre/kPuyK1hev1kiDeQ+UJubbf4SwDRe8c3FwmxGEkT6zG88TIq41Rtz 0ZpmdiNzIvon7IPo717z9WW7Dna+rR2oH6DJumXjbzPPoew9urowNSk0cXpatVNDEOshUC I8zaxrTApqOsj9Ey/5SSA5B8o8qzuRGgv3dOVQkRZtVq8XnB/1WYKrqMtHb9pg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718570278; a=rsa-sha256; cv=none; b=AWUlJ6LMOQJ+5RCZ1NQcy1cmgGMMxuxor5HNfLOEtaxbthxSsAJpNTGtBRprF0nKD4rbBg WRfI2XZAgUsFrIr3A8VYrwFW95LARBfPQigc7mJt4lfXxeyEj8pUQ28lffDsVcOzuBQ9JT 69ODZgOl8xbIuuE+U5sWdRyZwP/o9gh4xoFELnXFjTwm1aZj7rKD5Ztu+qGI+Z5BGG4JHY 0dpQWr2JNEUEIJBQkXrrZdFPh8reP92pJC2rwCIw2GPQXseBprvhlz6Y2fJw7CcE7u8vVE Vd51I+2JIU676DxsK1knAoDurxqFehrCUFCRIJwwU8x4jBfl8IDvkXQtmg78iw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718570278; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MnYFSjT4BxfsQK8ZI6FPJb1pjwy8yCC0QKyjW/yZGwY=; b=Os3OAtFe+Hk8Z4BnAvaa6xHf3tmgXtdxeFcHsITAkYndX+QtcxHcm7rs15aO6kq6R4b4dT W8CKjvKfZWyOMk1osPXK1ujL0U/MaM57tHwSwN8LkfMqkx9ZnYjSrr5Q4C1vZurpkRQIC8 ewJdXH22NGG6eNf4NqJwx+xhkDT6Xbw8Kav0pu9AisU9c01BAn10KDtDEx7Tkzima+KxpG qVuYV0kmDeCzCB8uCE9sTvSbAkc+coGE34BtieLix5w+KD5he4roEKSlaewrEGnhMJiLYs RU2KXja9Dk7wZt61oMvIRKNMS4UXzEcb2fzaq+Eg7qEV8tglDN9UVIuGxEGXdw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W2PwP6bClz12kn; Sun, 16 Jun 2024 20:37:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45GKbvMU079531; Sun, 16 Jun 2024 20:37:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45GKbvqR079528; Sun, 16 Jun 2024 20:37:57 GMT (envelope-from git) Date: Sun, 16 Jun 2024 20:37:57 GMT Message-Id: <202406162037.45GKbvqR079528@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: c0bd6ec3bb24 - main - bce: Use device_set_descf() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c0bd6ec3bb2414d23f3013766b79eed51b31f696 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c0bd6ec3bb2414d23f3013766b79eed51b31f696 commit c0bd6ec3bb2414d23f3013766b79eed51b31f696 Author: Mark Johnston AuthorDate: 2024-06-05 19:22:32 +0000 Commit: Mark Johnston CommitDate: 2024-06-16 20:37:26 +0000 bce: Use device_set_descf() No functional change intended. MFC after: 1 week --- sys/dev/bce/if_bce.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/sys/dev/bce/if_bce.c b/sys/dev/bce/if_bce.c index 33158b75486c..2564d0c1dac6 100644 --- a/sys/dev/bce/if_bce.c +++ b/sys/dev/bce/if_bce.c @@ -671,7 +671,6 @@ bce_probe(device_t dev) { const struct bce_type *t; struct bce_softc *sc; - char *descbuf; u16 vid = 0, did = 0, svid = 0, sdid = 0; t = bce_devs; @@ -695,19 +694,10 @@ bce_probe(device_t dev) if ((vid == t->bce_vid) && (did == t->bce_did) && ((svid == t->bce_svid) || (t->bce_svid == PCI_ANY_ID)) && ((sdid == t->bce_sdid) || (t->bce_sdid == PCI_ANY_ID))) { - descbuf = malloc(BCE_DEVDESC_MAX, M_TEMP, M_NOWAIT); - - if (descbuf == NULL) - return(ENOMEM); - - /* Print out the device identity. */ - snprintf(descbuf, BCE_DEVDESC_MAX, "%s (%c%d)", + device_set_descf(dev, "%s (%c%d)", t->bce_name, (((pci_read_config(dev, PCIR_REVID, 4) & 0xf0) >> 4) + 'A'), (pci_read_config(dev, PCIR_REVID, 4) & 0xf)); - - device_set_desc_copy(dev, descbuf); - free(descbuf, M_TEMP); return(BUS_PROBE_DEFAULT); } t++; From nobody Sun Jun 16 20:37:58 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W2PwR3ZgFz5PRRf; Sun, 16 Jun 2024 20:37:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2PwR0vJCz3xD3; Sun, 16 Jun 2024 20:37:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718570279; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1tGW4vIf0YeQWGKSJqw+SoFlmgL/uoIq8qKwGrTsKg8=; b=CIWETs1wyy8z7B4ZhyP01NhxdUVRQXzG6Uv4Fqrs8fz/d/TYVOh4egy6ftSPhei/6j80B3 tghXn0YWciscK0RNgR/UxBC62Kbj/B+FuXc4uCDQ/G4SXQAR1e/OVfVTP2Kmdh/jL8ovLn CyFOQYDH2RQEdwBsbZzVz/q7q0aL2fuAr0s5v8fPNKG3pOeWt3VCgWnZLQvDYF4BeVoHuW xmKs8P6ZBujcCfo+Bq3ozMiqcpROiOIgZr2S0KQvD1NEvp/djYEk24pzO6ebUAuf7qs1i9 Ej32ojShFcRp6dx0lasCrZo+oZT54aluK2TZ07OVY5R0MAynTtbycK2Hh5pTyQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718570279; a=rsa-sha256; cv=none; b=c5qmJU09pd5EC6ZHxAYLkgSnDRL12iTvtBpfciVxFhDaPIUwOpzpZHaiMAWyvVsLdWSIld SSrlUWevv8RhqHOlRyjtjFBJ/dKTG9z8gs/D9RZJ6jK3/ABLt1fMHZmODzDJi+T23YfY5B ZysjjsNUUvBCflZaWtQFx91wdmTfF6VShn2Hf1dfuNAxoA0FbIkTcIUO2IVlzQQFF8aap/ jXx3wk9nL9sPJBOBknAkgcxzlGMqNgebBZqEmxegNHyYCqjaxGm1Q1KcSUiXc5YS2xnPjr XL3VFw7oh+v6BCIpgrLOFwEZWiScCyI4MO0pVjd8sYSi0RMejBZ1BCD2JJVEOA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718570279; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1tGW4vIf0YeQWGKSJqw+SoFlmgL/uoIq8qKwGrTsKg8=; b=E1qKHvOCMzWeaL3HIBi2eRfYc/u+PsLLAFo6jIrYk1p58sSWOBdNz3wWjytd0mbJA0S8RK 3/RRdk3rWzZeDw1gTIYwyDI1NRnks569ER5/lCHBCu9f4GTfceurL9/RZwKcMIVb37+DGe ktCsTnxtgk35i1RqX4S7lX1a4RoNT5eOJhD+rVaK+R2i0jbg4UkbQRNR2XoYa0Wj0C63yF o5tqnHXU1bM30JcTjh/AfYDlNpCeoIywjciHFVssel1bKgvBRob+Ltwzc4zvC0CszHzVrw ICzf+Kf02UvbdymIOQ9SmwRSKqVgW2cUGVMMStebXSVFjARVc9I3odbFireBRA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W2PwR0RGFz12yZ; Sun, 16 Jun 2024 20:37:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45GKbwnP079567; Sun, 16 Jun 2024 20:37:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45GKbw7g079564; Sun, 16 Jun 2024 20:37:58 GMT (envelope-from git) Date: Sun, 16 Jun 2024 20:37:58 GMT Message-Id: <202406162037.45GKbw7g079564@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 50505c853c6c - main - bge: Use device_set_descf() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 50505c853c6cf1a4e8fac54d20c43f0f91ff0c67 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=50505c853c6cf1a4e8fac54d20c43f0f91ff0c67 commit 50505c853c6cf1a4e8fac54d20c43f0f91ff0c67 Author: Mark Johnston AuthorDate: 2024-06-05 19:23:26 +0000 Commit: Mark Johnston CommitDate: 2024-06-16 20:37:26 +0000 bge: Use device_set_descf() No functional change intended. MFC after: 1 week --- sys/dev/bge/if_bge.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c index 15cd3b0df8e9..2662568c850a 100644 --- a/sys/dev/bge/if_bge.c +++ b/sys/dev/bge/if_bge.c @@ -2699,7 +2699,6 @@ bge_chipid(device_t dev) static int bge_probe(device_t dev) { - char buf[96]; char model[64]; const struct bge_revision *br; const char *pname; @@ -2727,9 +2726,8 @@ bge_probe(device_t dev) br != NULL ? br->br_name : "NetXtreme/NetLink Ethernet Controller"); } - snprintf(buf, sizeof(buf), "%s, %sASIC rev. %#08x", + device_set_descf(dev, "%s, %sASIC rev. %#08x", model, br != NULL ? "" : "unknown ", id); - device_set_desc_copy(dev, buf); return (BUS_PROBE_DEFAULT); } t++; From nobody Sun Jun 16 20:38:00 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W2PwS2lMpz5PR29; Sun, 16 Jun 2024 20:38:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2PwS1c4Kz3x3C; Sun, 16 Jun 2024 20:38:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718570280; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i5vuKDpxm6/k11K8ouECy2kIMsjAB39+ra/P7Nf64us=; b=tvaxARySzYSRaC9GIbPNLP21SKgF4wXBRmTQlHTAlo5961jKx+IcVAsfLiWkTIm+f5DKdQ ANnieCNnnQpH11gC8/SOSmyhQ8rjR4yiOtp78de6PhFkFBxi293uyDoThPFJiVpVr0EqVf vNsIN6seEC9qXqywdZSoTdbmltqE+sSgc3j14AsaFWS9Uy9VWJC73LmlS/dL2qqYjRcBbc 3WW2JN1zInROl1q1hF4faQPSB2VZLSTEPizf23G3e5i9H19kdcEYm7PzF5mH9O8kA3NCHz NIaysrt9lckuDADTOBL0vqM1iPLX2lQVwTD0WAUt0APxTR6N+h4R9YyAJWmGpA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718570280; a=rsa-sha256; cv=none; b=RlPipNPTj8J6+Nx0C6MpfLOlQm1ij6JTGbDKvABZCOSfOK9zS4x4dUINNWn1deiQ7AthJc pJ+Do/R3ne5a3QRNZgHX1Gbgh8zIDY2lV1ius3RLCgkWpL+9hsSYrnhX3eJ5u+rXvSm9+3 ZNFledZxo7He6wP61iMCO2gcbskyA04w+Bqr6OM7f1NzCsdNmHB6wQ0kRcIaFrXVw9y3tX Io/wyICgo0vsM6MVIMor8AYqKv+yfXVTN5vLRPWzmPZAhEVk9xOL8iRzuglTRbZ+JM9KsD THuWSSNJnWcBAhn+T8lXwjHpBfBg+X9sGq9oPi5cr7WW3PkeP1+Ab8qiXLO0pg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718570280; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i5vuKDpxm6/k11K8ouECy2kIMsjAB39+ra/P7Nf64us=; b=bGLsvJUKk6/lRTUAk1MXf+rfz0gkJIu3vxwfxliMSOEfLFXHfVmMyDSyf0GtJc8+sKzGpr Ig9YAjQVOrRRgsT+NPozgtDTFsqa4MdnK+Lz0n1Lc0wvmhabuZWYdTdhtGhG6Y9R+xY+9h zhHkq1pDdTEN4R4S8r4z30iIKI4uwmZj3Dt4WopxOdWEY2uCO0vOe/PADCe8G9HbWwZifh ZqajBMIVGKBMxnkS8FrbkxabjinjBNtCVgnJgF8nOPPSAWiF4WPe51QQK7PoyalS/UirRB VpmqRrr/Nvv2qzb1HdXyiSqfqr9SHwR3iGpYyiF9PnG7hLLo942sg16Zxgz7kQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W2PwS1BBLz12KT; Sun, 16 Jun 2024 20:38:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45GKc0P2079618; Sun, 16 Jun 2024 20:38:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45GKc0Te079615; Sun, 16 Jun 2024 20:38:00 GMT (envelope-from git) Date: Sun, 16 Jun 2024 20:38:00 GMT Message-Id: <202406162038.45GKc0Te079615@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 9da1b6dc161b - main - bxe: Use device_set_descf() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9da1b6dc161bfd7b494ba472cde33af49ef8196f Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=9da1b6dc161bfd7b494ba472cde33af49ef8196f commit 9da1b6dc161bfd7b494ba472cde33af49ef8196f Author: Mark Johnston AuthorDate: 2024-06-05 19:24:16 +0000 Commit: Mark Johnston CommitDate: 2024-06-16 20:37:26 +0000 bxe: Use device_set_descf() No functional change intended. MFC after: 1 week --- sys/dev/bxe/bxe.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/sys/dev/bxe/bxe.c b/sys/dev/bxe/bxe.c index 8350d02cb2a3..38a45de95083 100644 --- a/sys/dev/bxe/bxe.c +++ b/sys/dev/bxe/bxe.c @@ -2489,7 +2489,6 @@ static int bxe_probe(device_t dev) { struct bxe_device_type *t; - char *descbuf; uint16_t did, sdid, svid, vid; /* Find our device structure */ @@ -2506,20 +2505,12 @@ bxe_probe(device_t dev) if ((vid == t->bxe_vid) && (did == t->bxe_did) && ((svid == t->bxe_svid) || (t->bxe_svid == PCI_ANY_ID)) && ((sdid == t->bxe_sdid) || (t->bxe_sdid == PCI_ANY_ID))) { - descbuf = malloc(BXE_DEVDESC_MAX, M_TEMP, M_NOWAIT); - if (descbuf == NULL) - return (ENOMEM); - - /* Print out the device identity. */ - snprintf(descbuf, BXE_DEVDESC_MAX, + device_set_descf(dev, "%s (%c%d) BXE v:%s", t->bxe_name, (((pci_read_config(dev, PCIR_REVID, 4) & 0xf0) >> 4) + 'A'), (pci_read_config(dev, PCIR_REVID, 4) & 0xf), BXE_DRIVER_VERSION); - - device_set_desc_copy(dev, descbuf); - free(descbuf, M_TEMP); return (BUS_PROBE_DEFAULT); } t++; From nobody Sun Jun 16 20:38:01 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W2PwT50Q5z5PRRk; Sun, 16 Jun 2024 20:38:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2PwT2SwDz3xJj; Sun, 16 Jun 2024 20:38:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718570281; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1vg61I47w1Nhr37vmH8PsEIKOJsdyVWNGEyXs2d5YiQ=; b=ZLiz+Iucuo33DpwfTfUn5rM/rYVU+jgytopqpY4XKjmmlh38tU1EyoQ5iF/SXivf8vYxS3 xUmvMjrMsqYl5NJOquaqkwpQ4CXfFNrsF7CS6/ZZMs+fpVZm4pkoTPn6br5VzbTGxNhHu+ 7WeovYAGH8MzJPnDFHsVrXgIwvlx0ZeO9Abg3FXVIO52yZ92kVWjuZfIuGfWgRXWc11PCy 7QLp00e2SZm/STRPxidDmdzyjhUNVFfzmuQy13hBGL7AXjh0OwI9eqOVLf1NOP4TPuzz/5 6+F3YsJA0QL6NHuck02xBsmveT1fiGWpb0HGkCL3kJ4UfLrOv0XFxP4HJNRABQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718570281; a=rsa-sha256; cv=none; b=yBh8rIZX2/zwdR5azm/ZmhL9gvQGcLQQdKrA0KG55KXCJ8FHIuL89G+U/jQ/QKVEZqxbUf uTLjjOc6nPYebHiD8l/HMkbbHRxFiB55KMXDPkAgSxmmbA6oLII2fZFZyrgqfcE98WoRUy poBXbtP5XgE+KzQre43PfYrmGp1oehB8szNeav/zYEV2hffXLdzl97r4elUhBH0xKmULJW dVD+mhQscZm3jplCN+FGOPExsbyNHWylaDkPnsamdiqeuI4///gZPEf2ZpAK/v+4cOPmzk +hLSGNoAm6XseXsaNB5knu1pkehL6igdjnYFczuXkgpDPbyEjTplygQoWeM41Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718570281; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1vg61I47w1Nhr37vmH8PsEIKOJsdyVWNGEyXs2d5YiQ=; b=DCVMC+sFuqdn6PYa+/0UNmKm4+Gcf029Nkf8eqG+WfoEAR9X8dq06zkLJ8aYUBZ6DT919q xTkyOARvu7Z0k0CwehhluJc7yuWZhN8oLGdmMlbXLDyGvf8pZyuxi94ogIKx4soOOZ1JzG A7eYeTHezf/dMZQLNWF/cznatEEs0z1dwX0VcPqcYXrN933rdhuKZEfAzKN2IY6zJBr1mQ wtKOtcO7k8CAYulsO9LB1MMxPQniVERwzd/nM/zbmgC5FKQj8WNdnzbwzq+JN0Pc7i27qM oLsnImcuHTb+NNk+YTilqjCkgxsCY/5JPwBdG2VicbYr1qoZQG/UB3gOKKTKBQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W2PwT25Mfz12kp; Sun, 16 Jun 2024 20:38:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45GKc111079656; Sun, 16 Jun 2024 20:38:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45GKc1jw079653; Sun, 16 Jun 2024 20:38:01 GMT (envelope-from git) Date: Sun, 16 Jun 2024 20:38:01 GMT Message-Id: <202406162038.45GKc1jw079653@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 3f795763e453 - main - hidbus: Use device_set_descf() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3f795763e45326489ab707c369b8daea495f6562 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3f795763e45326489ab707c369b8daea495f6562 commit 3f795763e45326489ab707c369b8daea495f6562 Author: Mark Johnston AuthorDate: 2024-06-05 19:25:05 +0000 Commit: Mark Johnston CommitDate: 2024-06-16 20:37:26 +0000 hidbus: Use device_set_descf() No functional change intended. MFC after: 1 week --- sys/dev/hid/hidbus.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sys/dev/hid/hidbus.c b/sys/dev/hid/hidbus.c index f50abd4b0a4d..003017c0f3ea 100644 --- a/sys/dev/hid/hidbus.c +++ b/sys/dev/hid/hidbus.c @@ -525,14 +525,12 @@ hidbus_set_desc(device_t child, const char *suffix) struct hidbus_softc *sc = device_get_softc(bus); struct hid_device_info *devinfo = device_get_ivars(bus); struct hidbus_ivars *tlc = device_get_ivars(child); - char buf[80]; /* Do not add NULL suffix or if device name already contains it. */ if (suffix != NULL && strcasestr(devinfo->name, suffix) == NULL && - (sc->nauto > 1 || (tlc->flags & HIDBUS_FLAG_AUTOCHILD) == 0)) { - snprintf(buf, sizeof(buf), "%s %s", devinfo->name, suffix); - device_set_desc_copy(child, buf); - } else + (sc->nauto > 1 || (tlc->flags & HIDBUS_FLAG_AUTOCHILD) == 0)) + device_set_descf(child, "%s %s", devinfo->name, suffix); + else device_set_desc(child, devinfo->name); } From nobody Sun Jun 16 20:38:02 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W2PwV593kz5PR6y; Sun, 16 Jun 2024 20:38:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2PwV3g9kz3xG9; Sun, 16 Jun 2024 20:38:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718570282; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TZBpNWs/bK9Or1RmkxGy9B3c3Ri6vUFAB2dd9ZZRA7o=; b=lypg6obZxs7SmG/SUFng6RyktnNfBT541kqbyraY/OqJZSt39KmxmYzcBBhCLysRjtumWp kvzOl6KdwuMspth8GHxt47gNPMkW6hwM3Lw5SN7m/EWHc34+ayLLdBnSPi/vXVpldWyLsZ TuCEO61L6dOSPAaLsdsR3Dj1dLMmlD8P5MjVP75L4FYfjM6bUyF46HSvRDGIzW2xlSjcMy QxN3qbrNQNzxEXDeI6kI4Z0BIa9jwNqQmijcaSCNVH6V8q3ZnXHJ44gqS8Qjfh8tGn2rSO o5jg69M6kzlh/f97zfGxo05gKj4hUaVN+mentvOkTFM3jkxFHv+J3ffJQ5JCCA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718570282; a=rsa-sha256; cv=none; b=lI/GIsE8gxTvfdnjpw/xZZXI+LSp52M0LaS4meXFIJrRoFwsekIboLg3bJCJPwRoNorfj5 1ZnRze6v/3HJyvi4DDDHc2S1hb3SV11u9QXTjSBTS4XgQVkx7lncV4rRexWr7h/66czU5I X1fp/emvOIExTOkrq1xYnj/06BxBiTU3PE2IN9qXfWCywvHeKYSeb5/VswWMa0GswOwo8l u+Tcx34lXQvcOLXJOkqiWiqDGX6ZIrX596JiVQSvfDpvTo0qPyqgkZtSHi9BYzVJaHrGqg kNyo5HIa4L3k9zYB5onjmtIUpLe3aOyExrcgdFkXD4lXyZWcjiuFFW73cvz+CQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718570282; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TZBpNWs/bK9Or1RmkxGy9B3c3Ri6vUFAB2dd9ZZRA7o=; b=WTuiXZiXbffB2UfyIzTkOPL7stjMeqKsXCZLDJbRpRK4J8x/S28D2Do03VqXW2ZxcDE1Su Peei6OokAiU266atyBQtqNeIZqQkwWgYJYZ6/nmiPBw0w4hXgsP0u9TJGg1XxApu6HshQh DwGrdITt3JIwxKHg8Ko6W7bbrf6nXSY0iMMom+xhEY7pqaMoSHydEJJ1nGm0kD6Qza59ed MAIvIaKl22+HhzDj2bRm7RDitbNeDx7Vx95L7xu39vDjVALvWYyA7xRqwgD/+o1YN/AVfB CYdsHomzBDzOTx7YIwNMO2UeaxEMKxcVUCyYXB9ZC2xskEvEwhd1ZXcr4gkZEg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W2PwV3Hfkz1321; Sun, 16 Jun 2024 20:38:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45GKc2lC079692; Sun, 16 Jun 2024 20:38:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45GKc2sn079689; Sun, 16 Jun 2024 20:38:02 GMT (envelope-from git) Date: Sun, 16 Jun 2024 20:38:02 GMT Message-Id: <202406162038.45GKc2sn079689@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 76a79178187f - main - superio: Use device_set_descf() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 76a79178187f5a3ac05733e068c0860b14fd8632 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=76a79178187f5a3ac05733e068c0860b14fd8632 commit 76a79178187f5a3ac05733e068c0860b14fd8632 Author: Mark Johnston AuthorDate: 2024-06-05 19:25:58 +0000 Commit: Mark Johnston CommitDate: 2024-06-16 20:37:26 +0000 superio: Use device_set_descf() No functional change intended. MFC after: 1 week --- sys/dev/superio/superio.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/dev/superio/superio.c b/sys/dev/superio/superio.c index 35b15ac4d62e..ddb06af93bec 100644 --- a/sys/dev/superio/superio.c +++ b/sys/dev/superio/superio.c @@ -615,12 +615,9 @@ superio_detect(device_t dev, bool claim, struct siosc *sc) if (superio_table[i].descr != NULL) { device_set_desc(dev, superio_table[i].descr); } else if (sc->vendor == SUPERIO_VENDOR_ITE) { - char descr[64]; - - snprintf(descr, sizeof(descr), + device_set_descf(dev, "ITE IT%4x SuperIO (revision 0x%02x)", sc->devid, sc->revid); - device_set_desc_copy(dev, descr); } return (0); } From nobody Sun Jun 16 20:38:03 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W2PwW73Y6z5PR2G; Sun, 16 Jun 2024 20:38:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2PwW4st6z3xRh; Sun, 16 Jun 2024 20:38:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718570283; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9J4sFVksSdqHK29DVLFqEszfxHtqJ7Bd2dAj6Gbyphs=; b=KC5wAcaGOtwiHRt2nMH7clltZpSNoGvgN+i2ba4gs1/VCwNlIKfUvVisNj76xXwMyRRldy js0EWsd1/pzODJwYKAoBwEiWbNMfTMglIS17Jm7uocKt3PA3J9UOru2WBy+Hd/XW0ofVw4 /+7OP6CFPfRNxl8X6zVmIoInNIjv5jEPNHAYVhyQ6LeEIb3rydykYT3k5V7TtwbG1tx+WG VJJ0egbYnDIoEcpoxQdRI/f1eoAc9PTa2heho9ypehcGrtOdf7PNztfwhm5ois/MboueUm jWqFf/8p2riiOvs7Iddbf1MQPjiPhMVAXbr6R1Kyx2Jv3kBcpvCkqgC7CnxadQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718570283; a=rsa-sha256; cv=none; b=bXzKy1BhHrjr5qSDk2OboBI5ZsjkC9gkfAGOovIqvI/x7UCGsCnawZvoeKpG6Mxiyj9hPO 7Bx3beKrr598zB8ELuDxb4pPRUmIkh2r5m7RqlB0L25x+vCKpKokZrpCPlbRhEoYIgAbuT 4KQHOsU0C+oPjefAF2sswbVBHzFMiKqAafkkABkKTFaD2AqQKs0V4iCzHIpZ9MXKla7lza OPrDizWklJTsyxL7ff/uO9fT5rWDpOTKlNTHkOK7+YLz/M/U/ONdqzcg6uN7fCY346P7JZ FGcHVD3yTwvETuniY/5n/zL9IcRlMI7WjwI6DZ7E0S/tA9Qm2iYYNj7Qf6ZNxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718570283; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9J4sFVksSdqHK29DVLFqEszfxHtqJ7Bd2dAj6Gbyphs=; b=rSRHDK9u6zrH8c0xAtoIDR9mbeacdnCaXNG98HschxQq9dsK1ljkFyu5eRrlNSBqCCp0WW kvGACylRNQf45GMF31HEmywKEVZqlu2wXfauhujcRBCvWhn4FTcRybzmM2FxNnrQROkb6R QCeqJK9eD9Fdz7nqxI77m+u+fMBVtFNNoN6hDiaSqhwj1T0eDyMQ4VF8RlYtns/3BazNSQ gbdw7v706IubsVeSLnolee+a6CE8pBfJMARPiS4oudgFgjecdLEkh/fTk3iaY42pF30fEk SDXaAzTUFwdgJdjMnG+s1CSiF1RU8vW55O6FDeW65AOy+9Zl+jpNmr0GwJgUEg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W2PwW4Qqmz12KV; Sun, 16 Jun 2024 20:38:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45GKc3hA079728; Sun, 16 Jun 2024 20:38:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45GKc3cL079725; Sun, 16 Jun 2024 20:38:03 GMT (envelope-from git) Date: Sun, 16 Jun 2024 20:38:03 GMT Message-Id: <202406162038.45GKc3cL079725@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 2ef1f61df2d5 - main - cfi: Use device_set_descf() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2ef1f61df2d5961ffff1205d4800e46efadbf5ba Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=2ef1f61df2d5961ffff1205d4800e46efadbf5ba commit 2ef1f61df2d5961ffff1205d4800e46efadbf5ba Author: Mark Johnston AuthorDate: 2024-06-05 19:26:50 +0000 Commit: Mark Johnston CommitDate: 2024-06-16 20:37:26 +0000 cfi: Use device_set_descf() No functional change intended. MFC after: 1 week --- sys/dev/cfi/cfi_core.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/dev/cfi/cfi_core.c b/sys/dev/cfi/cfi_core.c index 4e137140372c..9554a710d8f2 100644 --- a/sys/dev/cfi/cfi_core.c +++ b/sys/dev/cfi/cfi_core.c @@ -194,7 +194,6 @@ cfi_fmtsize(uint32_t sz) int cfi_probe(device_t dev) { - char desc[80]; struct cfi_softc *sc; char *vend_str; int error; @@ -279,9 +278,7 @@ cfi_probe(device_t dev) if (error) goto out; - snprintf(desc, sizeof(desc), "%s - %s", vend_str, - cfi_fmtsize(sc->sc_size)); - device_set_desc_copy(dev, desc); + device_set_descf(dev, "%s - %s", vend_str, cfi_fmtsize(sc->sc_size)); out: bus_release_resource(dev, SYS_RES_MEMORY, sc->sc_rid, sc->sc_res); From nobody Sun Jun 16 20:38:04 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W2PwY0xjDz5PR71; Sun, 16 Jun 2024 20:38:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2PwX66ptz3xMX; Sun, 16 Jun 2024 20:38:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718570284; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j6orLuqOfeuxEL+Xx4JzHJhLY/xrERZQ/vjHYwwmpoM=; b=tnsza/LR4C+lG5dh27Qonbuz0IBuhC/+6cCTeRAcso1HN2U0MN12zjV0nM9Hn4a71PkrZD ZyuFNXKYfCAvOn8EyQONJbmwBM4sMv3MNkDKjya87dIghrw+QfItYqtCg3sPe83Mir4/ta sMwBaQu4tI8McM+vdLh8u0U4qNwZqZr87yW0PRf03To27vgHsMruFaDtpuF4pTKGB9eWAk 9HI6SKvyPEa3ZY05f35BBKTtb9qKVrxThDFc1GeAkMrK04lms26d1hZ4jLEvojSeGDaI/f WLMFPCm/JYLPeVeKVD0X+waKRJRaBM4wUpnzTVRVLQwq611+8YgBlei9vlOICQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718570284; a=rsa-sha256; cv=none; b=YnOWtmtM/tW7BLNVoyJwP4NuTm4XV3wRPlnrOoi8JLBZuFUKK6p83JRXqN5mgH5fLEsLak crcEjDS7QXH7pGfA3596uqg5gUoMjd64k2u2w6veghMQQaVvnvvPVgZT+etQWP6UgbW1lT 5oab1NkW7A+Q944KuY2t8RTsfjVjKrpafcrrJhNJXtSNi1xBaGbvAte/AZVC40aFLHaMHX oje/kDkaZsU1km+LkneWJVH+bWF8ihzHegfHb/COrjwv7QP5f5i7qg4hhbCUd3CxmVFU9M iGijbiTxhaUUOs0SjuCG3HDPiOi9TwsfFTXnIIdGnDIoL83SZAWCtQfaJtNvZw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718570284; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j6orLuqOfeuxEL+Xx4JzHJhLY/xrERZQ/vjHYwwmpoM=; b=IG5arHWtYzMuSnVKzfNBv4q1dDerxaU8jeI8EuVBi9/bthIfLI/BJ8VQapfFobzs69oas8 0wAEH+uBXOnWmvioMCEmPPSgbFk5Hni9GzvmUkodhdRiKYIatKRNDk1qg0S1qgiDrqfrIl +espx8+G0jafDBmWB+Vb9AYsd56zBer53cXFCi6Dx365WSNExSxZJBAlUnl72Lhlrf8VV8 Wf44e9v1jtq5zKmUTtEzMgHumgb0LOaUwlutfhQzazjoGMuPkU7KenPF2OM8fwteVUcdBC 5iXHb4wygu2gz5lu+bA0HXcEPo7tti0ovGaF1A5VCc7b1LAhZjxEnTbFYqn8Tw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W2PwX5jsKz12yb; Sun, 16 Jun 2024 20:38:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45GKc4uW079764; Sun, 16 Jun 2024 20:38:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45GKc4Fx079761; Sun, 16 Jun 2024 20:38:04 GMT (envelope-from git) Date: Sun, 16 Jun 2024 20:38:04 GMT Message-Id: <202406162038.45GKc4Fx079761@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: c704b87ba679 - main - oce: Use device_set_descf() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c704b87ba679563cb8b344da69aa3cb7118a10b0 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c704b87ba679563cb8b344da69aa3cb7118a10b0 commit c704b87ba679563cb8b344da69aa3cb7118a10b0 Author: Mark Johnston AuthorDate: 2024-06-05 19:28:13 +0000 Commit: Mark Johnston CommitDate: 2024-06-16 20:37:26 +0000 oce: Use device_set_descf() No functional change intended. MFC after: 1 week --- sys/dev/oce/oce_if.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/dev/oce/oce_if.c b/sys/dev/oce/oce_if.c index d7ec58ec1f5e..2084b9c84fff 100644 --- a/sys/dev/oce/oce_if.c +++ b/sys/dev/oce/oce_if.c @@ -252,7 +252,6 @@ oce_probe(device_t dev) uint16_t vendor = 0; uint16_t device = 0; int i = 0; - char str[256] = {0}; POCE_SOFTC sc; sc = device_get_softc(dev); @@ -265,9 +264,9 @@ oce_probe(device_t dev) for (i = 0; i < (sizeof(supportedDevices) / sizeof(uint32_t)); i++) { if (vendor == ((supportedDevices[i] >> 16) & 0xffff)) { if (device == (supportedDevices[i] & 0xffff)) { - sprintf(str, "%s:%s", "Emulex CNA NIC function", - component_revision); - device_set_desc_copy(dev, str); + device_set_descf(dev, + "%s:%s", "Emulex CNA NIC function", + component_revision); switch (device) { case PCI_PRODUCT_BE2: From nobody Sun Jun 16 20:38:05 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W2PwZ0s9Nz5PRKB; Sun, 16 Jun 2024 20:38:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2PwY6tj9z3xKg; Sun, 16 Jun 2024 20:38:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718570286; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DDLepf5sA64N+dukNEKsi/ndpO1zGaccZNc0ZOmEbf4=; b=J17AnrjjNtFYvyR+UxbcULspnNMqnyeHFfr2tVaSUNi0qytzDzDB7cqb0kf5AlddylMJcY 9c0FjbxmlJSE26HFyBjPhnMJHPl1HnOfJnvTvjbeW8fuFyJ7GrqPKY9r1CQBXe81QemeDy IlZYpLuJxp8yjIilKLOrr19Li8g9kUOspLrNg/68+ibMUL3J8VOKXKN5xcBZi9oIXP/Kcj 4An37N3i45Cy/8rIuYOXDDipPjCuZmAlCYSN4Uhz3AsU56spE2B/ucpFuuxjc9zicBQuFz A+iUjEKhxA8QQeaOMxzRoKat03n8qqyN8KJoDo8E/gNylaX5Yq/6J1jcMmcKyg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718570286; a=rsa-sha256; cv=none; b=XmcCQnsZQrcV1MJW0mGCyN6gKiaVu8daaFlo82dH8GmvKPhff6hRqJec5YSdXWswEya01q arhx1PTHVdMIrqWrljBnj3lFcGvRE2pgdmt8kU1WOc+3+IKkChzB4jeO0BFISERI/D/UiR IENaJq8yRnr1ySXyZxxRM67mEjPv7WJpeMLYhpk+F06ud4fAKGUV5/WRw00qzH4CQw+M0z fjYwwrjjEaTydUGi1pwg+dvQ+DWJ75TYnuJedvhioRh7YVaytSYrK8/ApKUCdSfPszeIyF 3ekB2hmBzML5RikB0hkH7IvA4yscFrf4VnuxYc8PJne8gpHF1rSAUGrnPwavtg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718570286; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DDLepf5sA64N+dukNEKsi/ndpO1zGaccZNc0ZOmEbf4=; b=qhKCLz/HotvH16fuO/ZxuRERZe7mPdZIxv5Ev1FAiCrqsaVgiFJX0y74D4uaX8DAvxZXNt ViJdB0h6TqLV+YTXzVBb+/PKezjdzKlG9VPzsCQ8TA3/8xyiPhji7kyDZP8xB/YEU5Ocxu u8SOJ/LNdghc0P5tKRGO9qpKGc/cMvochK5Rg7iuNy3VKWQRVbr7mP+SzExXM/VezPJs8p sYWLBd7isYB1ICPnjYFWXIbUSvFPdq+vdzEfDIlxQtcDcuhLLFTs+vTKS0iWB2dIocOHPo uGU755O9XAyavdrQno4SZMtwOoEavTdnIJd/g2KqpzrQRfa5GwbwhiUCJ0+X9A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W2PwY6SgJz12Xd; Sun, 16 Jun 2024 20:38:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45GKc5s1079806; Sun, 16 Jun 2024 20:38:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45GKc59W079803; Sun, 16 Jun 2024 20:38:05 GMT (envelope-from git) Date: Sun, 16 Jun 2024 20:38:05 GMT Message-Id: <202406162038.45GKc59W079803@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: a96a9577127c - main - pir: Use device_set_descf() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a96a9577127c9bf804e7e47e38e7b4123a43efa1 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a96a9577127c9bf804e7e47e38e7b4123a43efa1 commit a96a9577127c9bf804e7e47e38e7b4123a43efa1 Author: Mark Johnston AuthorDate: 2024-06-05 19:29:30 +0000 Commit: Mark Johnston CommitDate: 2024-06-16 20:37:26 +0000 pir: Use device_set_descf() No functional change intended. MFC after: 1 week --- sys/i386/pci/pci_pir.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/i386/pci/pci_pir.c b/sys/i386/pci/pci_pir.c index 6750e85deb40..ec56fcb2c54e 100644 --- a/sys/i386/pci/pci_pir.c +++ b/sys/i386/pci/pci_pir.c @@ -653,11 +653,8 @@ pci_pir_probe(int bus, int require_parse) static int pir_probe(device_t dev) { - char buf[64]; - - snprintf(buf, sizeof(buf), "PCI Interrupt Routing Table: %d Entries", + device_set_descf(dev, "PCI Interrupt Routing Table: %d Entries", pci_route_count); - device_set_desc_copy(dev, buf); return (0); } From nobody Sun Jun 16 20:38:06 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W2Pwb6MmDz5PR4N; Sun, 16 Jun 2024 20:38:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2Pwb0pH7z3xH8; Sun, 16 Jun 2024 20:38:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718570287; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bE2rNCHah2InDAH4OrYEYOarNgQxgl+KQI8wUrwSdb4=; b=GpmMxRz0tFotwGwa0Key1vqruG4ZkFLuFUE4qSnh0rIazp7F08jmJRLhC9BgldwpjmhFfe FG38qTPi+kBRzZxFEEXHSuvnlF9e+z3/Lns6TXbHfCbgERtMWwOvUk/y6ItAMCn4ejC/7m 04V1OpQ/XIxcLFagxURTTkLvFMxyf9V5J4XK5BPEQDGWvlzFUk/ipAl9MpaH4jNfzlGL4L QhH3GLBkSughiCCEzMXkl3Ku15RIEUCPse0djdZxjzPmfs+ubp98mQn4TJdRnSIi5ch29g 1PonWERCjctDo0wFRkaE01vipgnjyv1+S6sSh/nZYZHV/Yb/qIHU3Xi87qrNag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718570287; a=rsa-sha256; cv=none; b=LsRf4G2dAVJHkS3GF26CNSVSmxu9bKi5tFIvK5odpIRkYvc5lvT4EIiMFgXuIk7bFPpOEQ lXdy0JKhVAaGhvAG2Pg9GgrSXb6e6xqA0UHgCCNoQuKlYv67jnYp1f5Rk99QVpAX4/3CfI MR2raIZl80Pv30ndAqu205be+HwKOsljYAwE4l6NXD8d61HkEDT+woPa2U+VSIQX/FnB8Z loWB5RuPuccmURRu5ezPHTjSB0dvwZf+D5r05vF329yVzovr4PTB/Q/0tR2RW5dTLL3V2I aIekwRWbKwQdOBy9sHD6cK92HQLOSivrnHPRGYSGqcySRySn+7/+ghZuunn6mw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718570287; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bE2rNCHah2InDAH4OrYEYOarNgQxgl+KQI8wUrwSdb4=; b=tgOxDHWXKWG4T1UZ9Y2ZnW5QgaQlQ8j15TVxNFDbaQ34fC5TgK6dUTsdK7fbjjkMw4D8+Z Cp1y+cnZxYZXHyxwgpQYMGhf90I5LRgRyFXha9b4lWH13n1NZSArj5+xIcYmt3PQLIAp8W Gae6SCJ/EhNpoR48UvmcKLU85RHi8fmna0olzNFZak7UzCSxg+bO+z8iv/cdqXDFoGyBIO TAuGQSD5uy70CJ+unWdDEl4u32ONmrHuAIrEJ0UPMcxLxNSn7CVSqEIYAQPdHVQI1REliU iDWT8zP9Wu21lan0C02edOEbPUA3iJaosxIUn/T9JB2QJRtiCqoxf+H2XFbsRQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W2Pwb0Q2jz12kq; Sun, 16 Jun 2024 20:38:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45GKc6Y4079842; Sun, 16 Jun 2024 20:38:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45GKc6Ig079839; Sun, 16 Jun 2024 20:38:06 GMT (envelope-from git) Date: Sun, 16 Jun 2024 20:38:06 GMT Message-Id: <202406162038.45GKc6Ig079839@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 89848b3445ad - main - mana: Use device_set_desc() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 89848b3445ad52c304e6f9c5036aa9108bedb4c8 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=89848b3445ad52c304e6f9c5036aa9108bedb4c8 commit 89848b3445ad52c304e6f9c5036aa9108bedb4c8 Author: Mark Johnston AuthorDate: 2024-06-05 19:30:15 +0000 Commit: Mark Johnston CommitDate: 2024-06-16 20:37:26 +0000 mana: Use device_set_desc() No functional change intended. MFC after: 1 week --- sys/dev/mana/gdma_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/dev/mana/gdma_main.c b/sys/dev/mana/gdma_main.c index 13f8a30762b1..6be3e148d0da 100644 --- a/sys/dev/mana/gdma_main.c +++ b/sys/dev/mana/gdma_main.c @@ -1750,7 +1750,6 @@ static int mana_gd_probe(device_t dev) { mana_vendor_id_t *ent; - char adapter_name[60]; uint16_t pci_vendor_id = 0; uint16_t pci_device_id = 0; @@ -1764,8 +1763,7 @@ mana_gd_probe(device_t dev) mana_dbg(NULL, "vendor=%x device=%x\n", pci_vendor_id, pci_device_id); - sprintf(adapter_name, DEVICE_DESC); - device_set_desc_copy(dev, adapter_name); + device_set_desc(dev, DEVICE_DESC); return (BUS_PROBE_DEFAULT); } From nobody Sun Jun 16 20:38:08 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W2Pwc42pPz5PRKH; Sun, 16 Jun 2024 20:38:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2Pwc1Ywbz3xQt; Sun, 16 Jun 2024 20:38:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718570288; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/DrlB5HN7hk3ipG2998FIlOjjY2OElBIzAcAijDbAnY=; b=mAh+jPeKQp5VpFazZRuEsagrzdLOGxLHBvWKQa1B6MHuf2E12f7CW3p0Tt4zTQ0mk+P1Rf fJzcl+VwhFanxOsL03MNz7hH0wp3ixfLG8NdSEMlocJTG9tvXJWthVGD3DoV+/XIOeZZha ovTRFThkh78X5H9l1/s2uDtHAk3Gho2fxfL9rMQ3djW//U4wnq4yxScpE4KLbWTaE54e9Z eG7qSU3WWsvWrtP1ujt23Lhqfry2qtFM9axvICJk0KuyZlcWl0KMbS+DczTjOlCnFLmXNn sqhU7VgqC1IadTU+ZYSd0pOifVEnebB136uNf9WGYN2nNSvVxProke7NshQdoQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718570288; a=rsa-sha256; cv=none; b=Yv9OLh4/Wq2KejP3xRT4dWh7sFz1B4LG7T/K70mbSR0VPVzYNzxauZijqxOYvFvJ5IzDBC 6iGfGQZpPwTCH2cYKrSdMFBVohEKOxulBJtlsr3/ZQnoQaoU/zl2GQS0ts/ZuqoxR4g7Mp XJUEmWQfUUcFxwu6IefOn7kzq8xsLg9wfTF6A6glWVg6XZBCTk/4YNH/t3qSuz87iHYMqH 744AhJ4BvAwKSXJxodxn9omLoI6iYARgBFm+81Bsp6RntYGHAentIePQPQgRPjRI5pnRNU fo+mEJd9NZdrYwT+ygwgHxyLTpUQinkJVo28gJkz2YE4H9Dq7mNW+AW/Oyne8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718570288; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/DrlB5HN7hk3ipG2998FIlOjjY2OElBIzAcAijDbAnY=; b=DMhTL2+2LBeJogwDbN1cZ5gEJ/C62ueWcUPFGon/Ifv/vW/k1wWKVWKOLWLSreFJH9MNBz BXo4zcGqieTX7WLiLKlaaKqVY/RRQedLDWEf5dQh4G/s/6hcgk6luXU4vcBqQHD/XqgXgL GJ6pZfMit2CkskfqKBgkPBYvyvHX7z0GRvBKZ2HaWkd8DktC23ZFxDg6P3xTfv4QmtnXEo rmzQNFId/ft9UPGzgL248+QwrfmZy8RUz/2SciFxWM6dbzHivuQbEDkdFb/IzJFgsqUnUL 1eyq4wGopF5c9hnK4QkM/3u6F991CcJ6ulKy8OmMJEPvzi/f2/uBh/nzxtYGZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W2Pwc18jjz12KW; Sun, 16 Jun 2024 20:38:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45GKc8ar079878; Sun, 16 Jun 2024 20:38:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45GKc85G079875; Sun, 16 Jun 2024 20:38:08 GMT (envelope-from git) Date: Sun, 16 Jun 2024 20:38:08 GMT Message-Id: <202406162038.45GKc85G079875@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 131c8ee7331a - main - padlock: Use device_set_descf() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 131c8ee7331af701c78e694c9c7051f53600c4fe Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=131c8ee7331af701c78e694c9c7051f53600c4fe commit 131c8ee7331af701c78e694c9c7051f53600c4fe Author: Mark Johnston AuthorDate: 2024-06-05 19:33:59 +0000 Commit: Mark Johnston CommitDate: 2024-06-16 20:37:26 +0000 padlock: Use device_set_descf() No functional change intended. MFC after: 1 week --- sys/crypto/via/padlock.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/sys/crypto/via/padlock.c b/sys/crypto/via/padlock.c index 8ff222ef413b..359618409f09 100644 --- a/sys/crypto/via/padlock.c +++ b/sys/crypto/via/padlock.c @@ -79,31 +79,14 @@ padlock_identify(driver_t *drv, device_t parent) static int padlock_probe(device_t dev) { - char capp[256]; - #if defined(__amd64__) || defined(__i386__) /* If there is no AES support, we has nothing to do here. */ if (!(via_feature_xcrypt & VIA_HAS_AES)) { device_printf(dev, "No ACE support.\n"); return (EINVAL); } - strlcpy(capp, "AES-CBC", sizeof(capp)); -#if 0 - strlcat(capp, ",AES-EBC", sizeof(capp)); - strlcat(capp, ",AES-CFB", sizeof(capp)); - strlcat(capp, ",AES-OFB", sizeof(capp)); -#endif - if (via_feature_xcrypt & VIA_HAS_SHA) { - strlcat(capp, ",SHA1", sizeof(capp)); - strlcat(capp, ",SHA256", sizeof(capp)); - } -#if 0 - if (via_feature_xcrypt & VIA_HAS_AESCTR) - strlcat(capp, ",AES-CTR", sizeof(capp)); - if (via_feature_xcrypt & VIA_HAS_MM) - strlcat(capp, ",RSA", sizeof(capp)); -#endif - device_set_desc_copy(dev, capp); + device_set_descf(dev, "AES-CBC%s", + (via_feature_xcrypt & VIA_HAS_SHA) ? ",SHA1,SHA256" : ""); return (0); #else return (EINVAL); From nobody Sun Jun 16 20:38:09 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W2Pwd5Y5Zz5PRML; Sun, 16 Jun 2024 20:38:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2Pwd387nz3xRF; Sun, 16 Jun 2024 20:38:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718570289; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VKCl+d3KvfBmb7MpDhh2NIQ/fdl1H4iQFSQiKVejOJA=; b=YAWiDt6R9UUstLehq66HE6vzg7TTwNWjyTYHcSDkofXGQLvs+cCoVeqnoIzdwTElzedVi7 8ZyTo2kW6oLQElhQOrr11JdEB7GieXuIJRb1aj1AuZmWC/4ppv9mthlEaDQylkyW0aHVi9 PQXKJkICimVywtZ3zoqn0MYrylT04ufdcxKY0P3/VodLrFJUV2PUAYe6yfjphzJHXnjDl8 OBzUAFedwsnKE9aWwy3Miy7HrL7qcmNkngC2rqCeP9br2Hb11HpfWBka+DHrAlfMPN3UI2 8hcAFFbxrMbao2aKOk3InqRaz+odh1Km7xyVkwW9gKGDHnHc7FAP7DXpP8g7eg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718570289; a=rsa-sha256; cv=none; b=PFLns0MJEj7MdEK+dqQZzUZOLwDrJ9nNqUjHBdfdHNQBvQ2TQFlxep/FBdVV5XS51/rgvh u37VVqgw9jr1g5iwDZ5fWVlJjumwlBOLM/mtAfbkbyqXzcX6WBLW3XbaGY4vDlYgs0E8xl Txswm9t9VKeBhCCSegrZn8ctK6/CeRYoCNA1/bMQhT5wCqwJMQtK9GZokllLHjtCJlOf/o Bc9WfijrhSY30uS0tSlNbUyKDyF/6wye/iDe6Inj8hIIVtjtImEQaNl9UVeP0SotcBVcj5 bSOnBDoJPNfrYzMN7HDY70d79e3PN4DjbYWu3UiV00VakeEss/l2nR8Mg1CEqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718570289; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VKCl+d3KvfBmb7MpDhh2NIQ/fdl1H4iQFSQiKVejOJA=; b=OfBVNo39qA81+x9bO7jfilUmo/QKQawE7he8CYnaP7W/IimqzRWYuY5QyCCTAboDKzw69Y oY83wb2J8dF94CrSUgAZLW2/ToH4de7cfFh+4wC0K5bQsGWIxCM4evLjYROuV1AUF6C3lj 9yGFQli1TG4VWQkdf9yX7xMiEWxV8Wk5MXicOKhCp1AQB+AKq3ZP7dfiR/mZPPZ6vB1O5Y oaLmeFHFR2sd49nGEJAy/eOnNaJHfkFuIVBWzBvDR53OaB9SLbdMVVkGc7CgvoSjVFocmb EgmcVlFFUaV3JCeowIKxQC65eZ/XyhGjV1hjQ2VVzcoh7ePfHotD7G1XSvXzpQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W2Pwd2jglz12wJ; Sun, 16 Jun 2024 20:38:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45GKc9De079914; Sun, 16 Jun 2024 20:38:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45GKc9nw079911; Sun, 16 Jun 2024 20:38:09 GMT (envelope-from git) Date: Sun, 16 Jun 2024 20:38:09 GMT Message-Id: <202406162038.45GKc9nw079911@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 83caa244bc9e - main - jedec_dimm: Use device_set_descf() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 83caa244bc9eef6949a1250a875ad1409775a46e Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=83caa244bc9eef6949a1250a875ad1409775a46e commit 83caa244bc9eef6949a1250a875ad1409775a46e Author: Mark Johnston AuthorDate: 2024-06-05 19:34:30 +0000 Commit: Mark Johnston CommitDate: 2024-06-16 20:37:26 +0000 jedec_dimm: Use device_set_descf() Note that it is ok to use device_get_desc() as one of the format string parameters because it is set using device_set_desc() (not device_set_desc_copy()) and so won't be freed when the description is updated. No functional change intended. MFC after: 1 week --- sys/dev/jedec_dimm/jedec_dimm.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/sys/dev/jedec_dimm/jedec_dimm.c b/sys/dev/jedec_dimm/jedec_dimm.c index ddaa0e96856e..697e7695a009 100644 --- a/sys/dev/jedec_dimm/jedec_dimm.c +++ b/sys/dev/jedec_dimm/jedec_dimm.c @@ -265,7 +265,6 @@ jedec_dimm_attach(device_t dev) uint16_t vendorid; bool tsod_present; int rc; - int new_desc_len; enum dram_type type; struct jedec_dimm_softc *sc; struct sysctl_ctx_list *ctx; @@ -273,7 +272,6 @@ jedec_dimm_attach(device_t dev) struct sysctl_oid_list *children; const char *tsod_match; const char *slotid_str; - char *new_desc; sc = device_get_softc(dev); ctx = device_get_sysctl_ctx(dev); @@ -447,26 +445,13 @@ no_tsod: * device description. */ if ((tsod_match != NULL) || (sc->slotid_str != NULL)) { - new_desc_len = strlen(device_get_desc(dev)); - if (tsod_match != NULL) { - new_desc_len += strlen(tsod_match); - new_desc_len += 4; /* " w/ " */ - } - if (sc->slotid_str != NULL) { - new_desc_len += strlen(sc->slotid_str); - new_desc_len += 3; /* space + parens */ - } - new_desc_len++; /* terminator */ - new_desc = malloc(new_desc_len, M_TEMP, (M_WAITOK | M_ZERO)); - (void) snprintf(new_desc, new_desc_len, "%s%s%s%s%s%s", + device_set_descf(dev, "%s%s%s%s%s%s", device_get_desc(dev), (tsod_match ? " w/ " : ""), (tsod_match ? tsod_match : ""), (sc->slotid_str ? " (" : ""), (sc->slotid_str ? sc->slotid_str : ""), (sc->slotid_str ? ")" : "")); - device_set_desc_copy(dev, new_desc); - free(new_desc, M_TEMP); } out: From nobody Sun Jun 16 20:51:49 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W2QDZ4g7Dz5PSld; Sun, 16 Jun 2024 20:51:58 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (cross.sbone.de [195.201.62.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE Root Certificate Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2QDY0v85z46q1; Sun, 16 Jun 2024 20:51:56 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=softfail (mx1.freebsd.org: 195.201.62.131 is neither permitted nor denied by domain of bzeeb-lists@lists.zabbadoz.net) smtp.mailfrom=bzeeb-lists@lists.zabbadoz.net Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id D0D808D4A126; Sun, 16 Jun 2024 20:51:54 +0000 (UTC) Received: from content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 0E76E2D029D8; Sun, 16 Jun 2024 20:51:54 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) by content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (amavisd-new, port 10024) with ESMTP id vhRFsDF_t_IO; Sun, 16 Jun 2024 20:51:50 +0000 (UTC) Received: from strong-iwl0.sbone.de (strong-iwl0.sbone.de [IPv6:fde9:577b:c1a9:4902:b66b:fcff:fef3:e3d2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 080BB2D029D2; Sun, 16 Jun 2024 20:51:49 +0000 (UTC) Date: Sun, 16 Jun 2024 20:51:49 +0000 (UTC) From: "Bjoern A. Zeeb" To: Warner Losh cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 50ecbc5142e1 - main - libipsec: make const-correct In-Reply-To: <202404230452.43N4qhYd063681@gitrepo.freebsd.org> Message-ID: References: <202404230452.43N4qhYd063681@gitrepo.freebsd.org> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.10 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; ASN(0.00)[asn:24940, ipnet:195.201.0.0/16, country:DE]; MIME_TRACE(0.00)[0:+]; MISSING_XM_UA(0.00)[]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@FreeBSD.org,dev-commits-src-main@FreeBSD.org]; RCVD_COUNT_THREE(0.00)[4]; R_SPF_SOFTFAIL(0.00)[~all]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DMARC_NA(0.00)[zabbadoz.net]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_THREE(0.00)[4] X-Rspamd-Queue-Id: 4W2QDY0v85z46q1 On Tue, 23 Apr 2024, Warner Losh wrote: > The branch main has been updated by imp: > > URL: https://cgit.FreeBSD.org/src/commit/?id=50ecbc5142e1c58f2132b351da19c5e4aa5f4e6a > > commit 50ecbc5142e1c58f2132b351da19c5e4aa5f4e6a > Author: Lexi Winter > AuthorDate: 2024-04-22 21:56:24 +0000 > Commit: Warner Losh > CommitDate: 2024-04-23 04:36:34 +0000 > > libipsec: make const-correct > > - add const to the appropriate places in the libipsec public API and the > relevant internal functions needed to support that. > > - replace caddr_t with c_caddr_t in ipsec_dump_policy() > > - update the ipsec_dump_policy manpage to use c_caddr_t (this manpage > was already wrong as it had "char *" instead of caddr_t previously). > > While here, update pfkeyv2.h to not cast away const in the PFKEY_*() > macros. > > This should not cause any ABI changes as the actual types have not > changed. > > Reviewed by: imp > Pull Request: https://github.com/freebsd/freebsd-src/pull/1099 > --- > lib/libipsec/ipsec_dump_policy.c | 4 ++-- > lib/libipsec/ipsec_get_policylen.c | 2 +- > lib/libipsec/ipsec_set_policy.3 | 6 +++--- > lib/libipsec/policy_parse.y | 20 ++++++++++---------- > sys/net/pfkeyv2.h | 8 ++++---- > sys/netipsec/ipsec.h | 6 +++--- > 6 files changed, 23 insertions(+), 23 deletions(-) I am surprised that this did not break ipsec-tools and/or other ports for conflicting types for ipsec_set_policy(), ipsec_get_policylen() and ipsec_dump_policy(). -- Bjoern A. Zeeb r15:7 From nobody Sun Jun 16 21:18:33 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W2QqF3x4nz5PVyF; Sun, 16 Jun 2024 21:18:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2QqF3Rxcz4GM1; Sun, 16 Jun 2024 21:18:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718572713; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Na4NJg6lQePQALkN9f6mvmjSM2eLhftJQpSTfrfzQCQ=; b=U+n0iyQw8PirsNY4gRaHmt4oxkdoJAx7RucCtyq1OcaN46720j7SNXilKuA+3gSAmTWWSh /yuzw/kLznSdS5QVMhDNoGjIBCBJQnLu+K0Uny1VyhbUhvvKkUiNqzAoUYnyqn1MGIP2W9 e7cDhkTJgjKlKWn77s7zsQ5wn5vGEF2dYlEYSGd6vorbd2Bd96EtJrimbhhC2XieFQ9VJp zhDIkE+nuQhy8lYU+0bAahsJ1g5+A5516QP4x6BUDoogRZ6DEKeiRazfXBXyzGQ5Y2sy5b OLb9R85gHpwN34aHBzx0qMafBd/sd0oi7Fl9RGXJ+H6XjKicwKuprctNQUoVMg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718572713; a=rsa-sha256; cv=none; b=MWZZBh/2DYmwcB45BAVLdQjzI2cCS3nTLV64diU41IdBnqFX/2CCO65SkDHe3ASW5Nf10F i8GXeLeWy88wA5SHFqsVd4OCh3+g9wloDUlqFkyHIzF9AgRx8ed50iLsI2lAqpBg+d50Uf uC5vA1EcG+U1o1WCX5EtxyxMi8AJzDPEtQ10AwJX8lj2awvA0nhMKz0j6DlKP7od7EOp14 mqOE/MmbWU5mauKzGU8YxJVQ6QFkg9smwZP6dvmxvsNWqaNkdViN9seCoDpCPtv2bLeq0q Tq6KdVcI6w2NMbk6iKIhXay+lz7ukCUhxyMCfGHlisElzjnncX4Ts75DD+gLOw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718572713; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Na4NJg6lQePQALkN9f6mvmjSM2eLhftJQpSTfrfzQCQ=; b=vVlDcuMUBkGXrIkBCp3QLjgb3+mE5EoDwNZ8lnP4Q45UeIfbEF8O3g1MOc9SgXOFdy7LiY oRURN+nCT5+gCZzQx+tFpnYBntm4+ZwNp7d4up8iN3Qy9iMdxi7a4ZV7lhZOgxw01z6P+e ahELrpKONtEu2JG64F+xDSpVeYG6RImz+PeddyFtuu5k0cYFc4DNDP6dfXRnKpUUur6ukt Ytvskg24kQd6yIbclaXZJp1GZLk0CmLoqmtJjlcwFfC8jgnRDD2KALPxUxj8Rl1EcDkaTG 0aqnvEgX6oU4KL3AoI0Z1sbiDelTa5rPEehPftGBNxyXALyk/XF4hrx15L2iJQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W2QqF2l99z13jt; Sun, 16 Jun 2024 21:18:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45GLIXCA047796; Sun, 16 Jun 2024 21:18:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45GLIXLP047793; Sun, 16 Jun 2024 21:18:33 GMT (envelope-from git) Date: Sun, 16 Jun 2024 21:18:33 GMT Message-Id: <202406162118.45GLIXLP047793@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: 0dc98b57f321 - main - getblk: track "non-sterile" bufobj to avoid bo lock on miss if sterile List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0dc98b57f321945b24a160282eb402bf0a6e4220 Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=0dc98b57f321945b24a160282eb402bf0a6e4220 commit 0dc98b57f321945b24a160282eb402bf0a6e4220 Author: Ryan Libby AuthorDate: 2024-06-16 21:09:45 +0000 Commit: Ryan Libby CommitDate: 2024-06-16 21:09:45 +0000 getblk: track "non-sterile" bufobj to avoid bo lock on miss if sterile This is a scheme to avoid taking the bufobj lock and doing a second lookup in the case where in getblk we do an unlocked lookup and find no buf. Was there really no buf, or were we in the middle of a reassignbuf race? By tracking any use of reassignbuf with a flag, we can know if there can't have been a race because there has been no reassignbuf. Because this scheme is spoiled on the first use of reassignbuf, it is mostly only beneficial for cases where a certain vnode is never expected to use dirty bufs at all. Reviewed by: kib Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D45571 --- sys/kern/vfs_bio.c | 8 +++++++- sys/kern/vfs_subr.c | 10 ++++++++++ sys/sys/bufobj.h | 1 + 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 4f1df9711dec..7bcc61c27109 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -4002,9 +4002,15 @@ getblkx(struct vnode *vp, daddr_t blkno, daddr_t dblkno, int size, int slpflag, /* * With GB_NOCREAT we must be sure about not finding the buffer * as it may have been reassigned during unlocked lookup. + * If BO_NONSTERILE is still unset, no reassign has occurred. */ - if ((flags & GB_NOCREAT) != 0) + if ((flags & GB_NOCREAT) != 0) { + /* Ensure bo_flag is loaded after gbincore_unlocked. */ + atomic_thread_fence_acq(); + if ((bo->bo_flag & BO_NONSTERILE) == 0) + return (EEXIST); goto loop; + } goto newbuf_unlocked; } diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 398eda7ed897..f8f4c2a868f3 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -3207,6 +3207,16 @@ reassignbuf(struct buf *bp) bp, bp->b_vp, bp->b_flags); BO_LOCK(bo); + if ((bo->bo_flag & BO_NONSTERILE) == 0) { + /* + * Coordinate with getblk's unlocked lookup. Make + * BO_NONSTERILE visible before the first reassignbuf produces + * any side effect. This could be outside the bo lock if we + * used a separate atomic flag field. + */ + bo->bo_flag |= BO_NONSTERILE; + atomic_thread_fence_rel(); + } buf_vlist_remove(bp); /* diff --git a/sys/sys/bufobj.h b/sys/sys/bufobj.h index a6a9c5c2bf01..1c8fdcebe4d4 100644 --- a/sys/sys/bufobj.h +++ b/sys/sys/bufobj.h @@ -116,6 +116,7 @@ struct bufobj { #define BO_WWAIT (1 << 1) /* Wait for output to complete */ #define BO_DEAD (1 << 2) /* Dead; only with INVARIANTS */ #define BO_NOBUFS (1 << 3) /* No bufs allowed */ +#define BO_NONSTERILE (1 << 4) /* Ever called reassignbuf() */ #define BO_LOCKPTR(bo) (&(bo)->bo_lock) #define BO_LOCK(bo) rw_wlock(BO_LOCKPTR((bo)))