From owner-svn-src-vendor@freebsd.org Sun May 5 00:16:42 2019 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93B63159CCE9; Sun, 5 May 2019 00:16:41 +0000 (UTC) (envelope-from cy@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3D1E176C15; Sun, 5 May 2019 00:16:41 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 14301FDD3; Sun, 5 May 2019 00:16:41 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x450Gfwc047702; Sun, 5 May 2019 00:16:41 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x450GP9E047687; Sun, 5 May 2019 00:16:25 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201905050016.x450GP9E047687@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sun, 5 May 2019 00:16:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r347136 - in vendor/sqlite3/dist: . tea tea/generic X-SVN-Group: vendor X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in vendor/sqlite3/dist: . tea tea/generic X-SVN-Commit-Revision: 347136 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3D1E176C15 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 May 2019 00:16:42 -0000 Author: cy Date: Sun May 5 00:16:24 2019 New Revision: 347136 URL: https://svnweb.freebsd.org/changeset/base/347136 Log: Import sqlite3-3.28.0 (3280000) Security: CVE-2019-9937, CVE-2019-9936 Modified: vendor/sqlite3/dist/Makefile.msc vendor/sqlite3/dist/configure vendor/sqlite3/dist/configure.ac vendor/sqlite3/dist/shell.c vendor/sqlite3/dist/sqlite3.c vendor/sqlite3/dist/sqlite3.h vendor/sqlite3/dist/sqlite3ext.h vendor/sqlite3/dist/tea/configure vendor/sqlite3/dist/tea/configure.ac vendor/sqlite3/dist/tea/generic/tclsqlite3.c Modified: vendor/sqlite3/dist/Makefile.msc ============================================================================== --- vendor/sqlite3/dist/Makefile.msc Sun May 5 00:15:30 2019 (r347135) +++ vendor/sqlite3/dist/Makefile.msc Sun May 5 00:16:24 2019 (r347136) @@ -433,9 +433,9 @@ UCRTLIBPATH = $(UCRTLIBPATH:\\=\) # will run on the platform that is doing the build. # !IF $(USE_FULLWARN)!=0 -BCC = $(NCC) -nologo -W4 $(CCOPTS) $(BCCOPTS) +BCC = $(NCC) -nologo -W4 -Fd$*.pdb $(CCOPTS) $(BCCOPTS) !ELSE -BCC = $(NCC) -nologo -W3 $(CCOPTS) $(BCCOPTS) +BCC = $(NCC) -nologo -W3 -Fd$*.pdb $(CCOPTS) $(BCCOPTS) !ENDIF # Check if assembly code listings should be generated for the source @@ -808,7 +808,7 @@ BCC = $(BCC) -Zi # Command line prefixes for compiling code, compiling resources, # linking, etc. # -LTCOMPILE = $(TCC) -Fo$@ +LTCOMPILE = $(TCC) -Fo$@ -Fd$*.pdb LTRCOMPILE = $(RCC) -r LTLIB = lib.exe LTLINK = $(TCC) -Fe$@ @@ -826,6 +826,11 @@ LTLIBS = $(LTLIBS) rpcrt4.lib !IFDEF PLATFORM LTLINKOPTS = /NOLOGO /MACHINE:$(PLATFORM) LTLIBOPTS = /NOLOGO /MACHINE:$(PLATFORM) +!ELSEIF "$(VISUALSTUDIOVERSION)"=="12.0" || \ + "$(VISUALSTUDIOVERSION)"=="14.0" || \ + "$(VISUALSTUDIOVERSION)"=="15.0" +LTLINKOPTS = /NOLOGO /MACHINE:x86 +LTLIBOPTS = /NOLOGO /MACHINE:x86 !ELSE LTLINKOPTS = /NOLOGO LTLIBOPTS = /NOLOGO Modified: vendor/sqlite3/dist/configure ============================================================================== --- vendor/sqlite3/dist/configure Sun May 5 00:15:30 2019 (r347135) +++ vendor/sqlite3/dist/configure Sun May 5 00:16:24 2019 (r347136) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for sqlite 3.27.2. +# Generated by GNU Autoconf 2.69 for sqlite 3.28.0. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='sqlite' PACKAGE_TARNAME='sqlite' -PACKAGE_VERSION='3.27.2' -PACKAGE_STRING='sqlite 3.27.2' +PACKAGE_VERSION='3.28.0' +PACKAGE_STRING='sqlite 3.28.0' PACKAGE_BUGREPORT='http://www.sqlite.org' PACKAGE_URL='' @@ -1341,7 +1341,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.27.2 to adapt to many kinds of systems. +\`configure' configures sqlite 3.28.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1412,7 +1412,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of sqlite 3.27.2:";; + short | recursive ) echo "Configuration of sqlite 3.28.0:";; esac cat <<\_ACEOF @@ -1537,7 +1537,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -sqlite configure 3.27.2 +sqlite configure 3.28.0 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1952,7 +1952,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.27.2, which was +It was created by sqlite $as_me 3.28.0, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2818,7 +2818,7 @@ fi # Define the identity of the package. PACKAGE='sqlite' - VERSION='3.27.2' + VERSION='3.28.0' cat >>confdefs.h <<_ACEOF @@ -14438,7 +14438,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.27.2, which was +This file was extended by sqlite $as_me 3.28.0, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14495,7 +14495,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -sqlite config.status 3.27.2 +sqlite config.status 3.28.0 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Modified: vendor/sqlite3/dist/configure.ac ============================================================================== --- vendor/sqlite3/dist/configure.ac Sun May 5 00:15:30 2019 (r347135) +++ vendor/sqlite3/dist/configure.ac Sun May 5 00:16:24 2019 (r347136) @@ -10,7 +10,7 @@ # AC_PREREQ(2.61) -AC_INIT(sqlite, 3.27.2, http://www.sqlite.org) +AC_INIT(sqlite, 3.28.0, http://www.sqlite.org) AC_CONFIG_SRCDIR([sqlite3.c]) AC_CONFIG_AUX_DIR([.]) Modified: vendor/sqlite3/dist/shell.c ============================================================================== --- vendor/sqlite3/dist/shell.c Sun May 5 00:15:30 2019 (r347135) +++ vendor/sqlite3/dist/shell.c Sun May 5 00:16:24 2019 (r347136) @@ -2177,13 +2177,13 @@ static void readFileContents(sqlite3_context *ctx, con fclose(in); return; } - pBuf = sqlite3_malloc64( nIn ); + pBuf = sqlite3_malloc64( nIn ? nIn : 1 ); if( pBuf==0 ){ sqlite3_result_error_nomem(ctx); fclose(in); return; } - if( 1==fread(pBuf, nIn, 1, in) ){ + if( nIn==(sqlite3_int64)fread(pBuf, 1, (size_t)nIn, in) ){ sqlite3_result_blob64(ctx, pBuf, nIn, sqlite3_free); }else{ sqlite3_result_error_code(ctx, SQLITE_IOERR); @@ -2318,15 +2318,15 @@ static int fileLinkStat( ** Argument zFile is the name of a file that will be created and/or written ** by SQL function writefile(). This function ensures that the directory ** zFile will be written to exists, creating it if required. The permissions -** for any path components created by this function are set to (mode&0777). +** for any path components created by this function are set in accordance +** with the current umask. ** ** If an OOM condition is encountered, SQLITE_NOMEM is returned. Otherwise, ** SQLITE_OK is returned if the directory is successfully created, or ** SQLITE_ERROR otherwise. */ static int makeDirectory( - const char *zFile, - mode_t mode + const char *zFile ){ char *zCopy = sqlite3_mprintf("%s", zFile); int rc = SQLITE_OK; @@ -2347,7 +2347,7 @@ static int makeDirectory( rc2 = fileStat(zCopy, &sStat); if( rc2!=0 ){ - if( mkdir(zCopy, mode & 0777) ) rc = SQLITE_ERROR; + if( mkdir(zCopy, 0777) ) rc = SQLITE_ERROR; }else{ if( !S_ISDIR(sStat.st_mode) ) rc = SQLITE_ERROR; } @@ -2505,7 +2505,7 @@ static void writefileFunc( res = writeFile(context, zFile, argv[1], mode, mtime); if( res==1 && errno==ENOENT ){ - if( makeDirectory(zFile, mode)==SQLITE_OK ){ + if( makeDirectory(zFile)==SQLITE_OK ){ res = writeFile(context, zFile, argv[1], mode, mtime); } } @@ -10430,7 +10430,67 @@ static void restore_debug_trace_modes(void){ #endif } +/* Create the TEMP table used to store parameter bindings */ +static void bind_table_init(ShellState *p){ + int wrSchema = 0; + sqlite3_db_config(p->db, SQLITE_DBCONFIG_WRITABLE_SCHEMA, -1, &wrSchema); + sqlite3_db_config(p->db, SQLITE_DBCONFIG_WRITABLE_SCHEMA, 1, 0); + sqlite3_exec(p->db, + "CREATE TABLE IF NOT EXISTS temp.sqlite_parameters(\n" + " key TEXT PRIMARY KEY,\n" + " value ANY\n" + ") WITHOUT ROWID;", + 0, 0, 0); + sqlite3_db_config(p->db, SQLITE_DBCONFIG_WRITABLE_SCHEMA, wrSchema, 0); +} + /* +** Bind parameters on a prepared statement. +** +** Parameter bindings are taken from a TEMP table of the form: +** +** CREATE TEMP TABLE sqlite_parameters(key TEXT PRIMARY KEY, value) +** WITHOUT ROWID; +** +** No bindings occur if this table does not exist. The special character '$' +** is included in the table name to help prevent collisions with actual tables. +** The table must be in the TEMP schema. +*/ +static void bind_prepared_stmt(ShellState *pArg, sqlite3_stmt *pStmt){ + int nVar; + int i; + int rc; + sqlite3_stmt *pQ = 0; + + nVar = sqlite3_bind_parameter_count(pStmt); + if( nVar==0 ) return; /* Nothing to do */ + if( sqlite3_table_column_metadata(pArg->db, "TEMP", "sqlite_parameters", + "key", 0, 0, 0, 0, 0)!=SQLITE_OK ){ + return; /* Parameter table does not exist */ + } + rc = sqlite3_prepare_v2(pArg->db, + "SELECT value FROM temp.sqlite_parameters" + " WHERE key=?1", -1, &pQ, 0); + if( rc || pQ==0 ) return; + for(i=1; i<=nVar; i++){ + char zNum[30]; + const char *zVar = sqlite3_bind_parameter_name(pStmt, i); + if( zVar==0 ){ + sqlite3_snprintf(sizeof(zNum),zNum,"?%d",i); + zVar = zNum; + } + sqlite3_bind_text(pQ, 1, zVar, -1, SQLITE_STATIC); + if( sqlite3_step(pQ)==SQLITE_ROW ){ + sqlite3_bind_value(pStmt, i, sqlite3_column_value(pQ, 0)); + }else{ + sqlite3_bind_null(pStmt, i); + } + sqlite3_reset(pQ); + } + sqlite3_finalize(pQ); +} + +/* ** Run a prepared statement */ static void exec_prepared_stmt( @@ -10682,7 +10742,7 @@ static int shell_exec( } /* Show the EXPLAIN QUERY PLAN if .eqp is on */ - if( pArg && pArg->autoEQP && sqlite3_strlike("EXPLAIN%",zStmtSql,0)!=0 ){ + if( pArg && pArg->autoEQP && sqlite3_stmt_isexplain(pStmt)==0 ){ sqlite3_stmt *pExplain; char *zEQP; int triggerEQP = 0; @@ -10731,13 +10791,10 @@ static int shell_exec( if( pArg ){ pArg->cMode = pArg->mode; if( pArg->autoExplain ){ - if( sqlite3_column_count(pStmt)==8 - && sqlite3_strlike("EXPLAIN%", zStmtSql,0)==0 - ){ + if( sqlite3_stmt_isexplain(pStmt)==1 ){ pArg->cMode = MODE_Explain; } - if( sqlite3_column_count(pStmt)==4 - && sqlite3_strlike("EXPLAIN QUERY PLAN%", zStmtSql,0)==0 ){ + if( sqlite3_stmt_isexplain(pStmt)==2 ){ pArg->cMode = MODE_EQP; } } @@ -10749,6 +10806,7 @@ static int shell_exec( } } + bind_prepared_stmt(pArg, pStmt); exec_prepared_stmt(pArg, pStmt); explain_data_delete(pArg); eqp_render(pArg); @@ -11078,7 +11136,8 @@ static const char *(azHelp[]) = { ".archive ... Manage SQL archives", " Each command must have exactly one of the following options:", " -c, --create Create a new archive", - " -u, --update Update or add files to an existing archive", + " -u, --update Add files or update files with changed mtime", + " -i, --insert Like -u but always add even if mtime unchanged", " -t, --list List contents of archive", " -x, --extract Extract files from archive", " Optional arguments:", @@ -11180,6 +11239,13 @@ static const char *(azHelp[]) = { " --zip FILE is a ZIP archive", ".output ?FILE? Send output to FILE or stdout if FILE is omitted", " If FILE begins with '|' then open it as a pipe.", + ".parameter CMD ... Manage SQL parameter bindings", + " clear Erase all bindings", + " init Initialize the TEMP table that holds bindings", + " list List the current parameter bindings", + " set PARAMETER VALUE Given SQL parameter PARAMETER a value of VALUE", + " PARAMETER should start with '$', ':', '@', or '?'", + " unset PARAMETER Remove PARAMETER from the binding table", ".print STRING... Print literal STRING", #ifndef SQLITE_OMIT_PROGRESS_CALLBACK ".progress N Invoke progress handler after every N opcodes", @@ -12392,7 +12458,7 @@ static int shell_dbinfo_command(ShellState *p, int nAr { "schema size:", "SELECT total(length(sql)) FROM %s" }, }; - int i; + int i, rc; unsigned iDataVersion; char *zSchemaTab; char *zDb = nArg>=2 ? azArg[1] : "main"; @@ -12400,8 +12466,19 @@ static int shell_dbinfo_command(ShellState *p, int nAr unsigned char aHdr[100]; open_db(p, 0); if( p->db==0 ) return 1; - sqlite3_prepare_v2(p->db,"SELECT data FROM sqlite_dbpage(?1) WHERE pgno=1", - -1, &pStmt, 0); + rc = sqlite3_prepare_v2(p->db, + "SELECT data FROM sqlite_dbpage(?1) WHERE pgno=1", + -1, &pStmt, 0); + if( rc ){ + if( !sqlite3_compileoption_used("ENABLE_DBPAGE_VTAB") ){ + utf8_printf(stderr, "the \".dbinfo\" command requires the " + "-DSQLITE_ENABLE_DBPAGE_VTAB compile-time options\n"); + }else{ + utf8_printf(stderr, "error: %s\n", sqlite3_errmsg(p->db)); + } + sqlite3_finalize(pStmt); + return 1; + } sqlite3_bind_text(pStmt, 1, zDb, -1, SQLITE_STATIC); if( sqlite3_step(pStmt)==SQLITE_ROW && sqlite3_column_bytes(pStmt,0)>100 @@ -12995,19 +13072,20 @@ static int arErrorMsg(ArCommand *pAr, const char *zFmt ** Values for ArCommand.eCmd. */ #define AR_CMD_CREATE 1 -#define AR_CMD_EXTRACT 2 -#define AR_CMD_LIST 3 -#define AR_CMD_UPDATE 4 -#define AR_CMD_HELP 5 +#define AR_CMD_UPDATE 2 +#define AR_CMD_INSERT 3 +#define AR_CMD_EXTRACT 4 +#define AR_CMD_LIST 5 +#define AR_CMD_HELP 6 /* ** Other (non-command) switches. */ -#define AR_SWITCH_VERBOSE 6 -#define AR_SWITCH_FILE 7 -#define AR_SWITCH_DIRECTORY 8 -#define AR_SWITCH_APPEND 9 -#define AR_SWITCH_DRYRUN 10 +#define AR_SWITCH_VERBOSE 7 +#define AR_SWITCH_FILE 8 +#define AR_SWITCH_DIRECTORY 9 +#define AR_SWITCH_APPEND 10 +#define AR_SWITCH_DRYRUN 11 static int arProcessSwitch(ArCommand *pAr, int eSwitch, const char *zArg){ switch( eSwitch ){ @@ -13015,6 +13093,7 @@ static int arProcessSwitch(ArCommand *pAr, int eSwitch case AR_CMD_EXTRACT: case AR_CMD_LIST: case AR_CMD_UPDATE: + case AR_CMD_INSERT: case AR_CMD_HELP: if( pAr->eCmd ){ return arErrorMsg(pAr, "multiple command options"); @@ -13061,6 +13140,7 @@ static int arParseCommand( } aSwitch[] = { { "create", 'c', AR_CMD_CREATE, 0 }, { "extract", 'x', AR_CMD_EXTRACT, 0 }, + { "insert", 'i', AR_CMD_INSERT, 0 }, { "list", 't', AR_CMD_LIST, 0 }, { "update", 'u', AR_CMD_UPDATE, 0 }, { "help", 'h', AR_CMD_HELP, 0 }, @@ -13396,19 +13476,27 @@ static int arExecSql(ArCommand *pAr, const char *zSql) /* -** Implementation of .ar "create" and "update" commands. +** Implementation of .ar "create", "insert", and "update" commands. ** +** create -> Create a new SQL archive +** insert -> Insert or reinsert all files listed +** update -> Insert files that have changed or that were not +** previously in the archive +** ** Create the "sqlar" table in the database if it does not already exist. ** Then add each file in the azFile[] array to the archive. Directories ** are added recursively. If argument bVerbose is non-zero, a message is ** printed on stdout for each file archived. ** ** The create command is the same as update, except that it drops -** any existing "sqlar" table before beginning. +** any existing "sqlar" table before beginning. The "insert" command +** always overwrites every file named on the command-line, where as +** "update" only overwrites if the size or mtime or mode has changed. */ static int arCreateOrUpdateCommand( ArCommand *pAr, /* Command arguments and options */ - int bUpdate /* true for a --create. false for --update */ + int bUpdate, /* true for a --create. */ + int bOnlyIfChanged /* Only update if file has changed */ ){ const char *zCreate = "CREATE TABLE IF NOT EXISTS sqlar(\n" @@ -13430,22 +13518,24 @@ static int arCreateOrUpdateCommand( " WHEN 'd' THEN 0\n" " ELSE -1 END,\n" " sqlar_compress(data)\n" - " FROM fsdir(%Q,%Q)\n" - " WHERE lsmode(mode) NOT LIKE '?%%';", + " FROM fsdir(%Q,%Q) AS disk\n" + " WHERE lsmode(mode) NOT LIKE '?%%'%s;" + , "REPLACE INTO %s(name,mode,mtime,data)\n" " SELECT\n" " %s,\n" " mode,\n" " mtime,\n" " data\n" - " FROM fsdir(%Q,%Q)\n" - " WHERE lsmode(mode) NOT LIKE '?%%';" + " FROM fsdir(%Q,%Q) AS disk\n" + " WHERE lsmode(mode) NOT LIKE '?%%'%s;" }; int i; /* For iterating through azFile[] */ int rc; /* Return code */ const char *zTab = 0; /* SQL table into which to insert */ char *zSql; char zTemp[50]; + char *zExists = 0; arExecSql(pAr, "PRAGMA page_size=512"); rc = arExecSql(pAr, "SAVEPOINT ar;"); @@ -13476,10 +13566,21 @@ static int arCreateOrUpdateCommand( } rc = arExecSql(pAr, zCreate); } + if( bOnlyIfChanged ){ + zExists = sqlite3_mprintf( + " AND NOT EXISTS(" + "SELECT 1 FROM %s AS mem" + " WHERE mem.name=disk.name" + " AND mem.mtime=disk.mtime" + " AND mem.mode=disk.mode)", zTab); + }else{ + zExists = sqlite3_mprintf(""); + } + if( zExists==0 ) rc = SQLITE_NOMEM; for(i=0; inArg && rc==SQLITE_OK; i++){ char *zSql2 = sqlite3_mprintf(zInsertFmt[pAr->bZip], zTab, pAr->bVerbose ? "shell_putsnl(name)" : "name", - pAr->azArg[i], pAr->zDir); + pAr->azArg[i], pAr->zDir, zExists); rc = arExecSql(pAr, zSql2); sqlite3_free(zSql2); } @@ -13494,6 +13595,7 @@ end_ar_transaction: sqlite3_free(zSql); } } + sqlite3_free(zExists); return rc; } @@ -13532,7 +13634,8 @@ static int arDotCommand( }else if( cmd.zFile ){ int flags; if( cmd.bAppend ) eDbType = SHELL_OPEN_APPENDVFS; - if( cmd.eCmd==AR_CMD_CREATE || cmd.eCmd==AR_CMD_UPDATE ){ + if( cmd.eCmd==AR_CMD_CREATE || cmd.eCmd==AR_CMD_INSERT + || cmd.eCmd==AR_CMD_UPDATE ){ flags = SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE; }else{ flags = SQLITE_OPEN_READONLY; @@ -13569,7 +13672,7 @@ static int arDotCommand( switch( cmd.eCmd ){ case AR_CMD_CREATE: - rc = arCreateOrUpdateCommand(&cmd, 0); + rc = arCreateOrUpdateCommand(&cmd, 0, 0); break; case AR_CMD_EXTRACT: @@ -13584,9 +13687,13 @@ static int arDotCommand( arUsage(pState->out); break; + case AR_CMD_INSERT: + rc = arCreateOrUpdateCommand(&cmd, 1, 0); + break; + default: assert( cmd.eCmd==AR_CMD_UPDATE ); - rc = arCreateOrUpdateCommand(&cmd, 1); + rc = arCreateOrUpdateCommand(&cmd, 1, 1); break; } } @@ -14709,6 +14816,114 @@ static int do_meta_command(char *zLine, ShellState *p) sqlite3_snprintf(sizeof(p->outfile), p->outfile, "%s", zFile); } } + }else + + if( c=='p' && n>=3 && strncmp(azArg[0], "parameter", n)==0 ){ + open_db(p,0); + if( nArg<=1 ) goto parameter_syntax_error; + + /* .parameter clear + ** Clear all bind parameters by dropping the TEMP table that holds them. + */ + if( nArg==2 && strcmp(azArg[1],"clear")==0 ){ + int wrSchema = 0; + sqlite3_db_config(p->db, SQLITE_DBCONFIG_WRITABLE_SCHEMA, -1, &wrSchema); + sqlite3_db_config(p->db, SQLITE_DBCONFIG_WRITABLE_SCHEMA, 1, 0); + sqlite3_exec(p->db, "DROP TABLE IF EXISTS temp.sqlite_parameters;", + 0, 0, 0); + sqlite3_db_config(p->db, SQLITE_DBCONFIG_WRITABLE_SCHEMA, wrSchema, 0); + }else + + /* .parameter list + ** List all bind parameters. + */ + if( nArg==2 && strcmp(azArg[1],"list")==0 ){ + sqlite3_stmt *pStmt = 0; + int rx; + int len = 0; + rx = sqlite3_prepare_v2(p->db, + "SELECT max(length(key)) " + "FROM temp.sqlite_parameters;", -1, &pStmt, 0); + if( rx==SQLITE_OK && sqlite3_step(pStmt)==SQLITE_ROW ){ + len = sqlite3_column_int(pStmt, 0); + if( len>40 ) len = 40; + } + sqlite3_finalize(pStmt); + pStmt = 0; + if( len ){ + rx = sqlite3_prepare_v2(p->db, + "SELECT key, quote(value) " + "FROM temp.sqlite_parameters;", -1, &pStmt, 0); + while( sqlite3_step(pStmt)==SQLITE_ROW ){ + utf8_printf(p->out, "%-*s %s\n", len, sqlite3_column_text(pStmt,0), + sqlite3_column_text(pStmt,1)); + } + sqlite3_finalize(pStmt); + } + }else + + /* .parameter init + ** Make sure the TEMP table used to hold bind parameters exists. + ** Create it if necessary. + */ + if( nArg==2 && strcmp(azArg[1],"init")==0 ){ + bind_table_init(p); + }else + + /* .parameter set NAME VALUE + ** Set or reset a bind parameter. NAME should be the full parameter + ** name exactly as it appears in the query. (ex: $abc, @def). The + ** VALUE can be in either SQL literal notation, or if not it will be + ** understood to be a text string. + */ + if( nArg==4 && strcmp(azArg[1],"set")==0 ){ + int rx; + char *zSql; + sqlite3_stmt *pStmt; + const char *zKey = azArg[2]; + const char *zValue = azArg[3]; + bind_table_init(p); + zSql = sqlite3_mprintf( + "REPLACE INTO temp.sqlite_parameters(key,value)" + "VALUES(%Q,%s);", zKey, zValue); + if( zSql==0 ) shell_out_of_memory(); + pStmt = 0; + rx = sqlite3_prepare_v2(p->db, zSql, -1, &pStmt, 0); + sqlite3_free(zSql); + if( rx!=SQLITE_OK ){ + sqlite3_finalize(pStmt); + pStmt = 0; + zSql = sqlite3_mprintf( + "REPLACE INTO temp.sqlite_parameters(key,value)" + "VALUES(%Q,%Q);", zKey, zValue); + if( zSql==0 ) shell_out_of_memory(); + rx = sqlite3_prepare_v2(p->db, zSql, -1, &pStmt, 0); + sqlite3_free(zSql); + if( rx!=SQLITE_OK ){ + utf8_printf(p->out, "Error: %s\n", sqlite3_errmsg(p->db)); + sqlite3_finalize(pStmt); + pStmt = 0; + rc = 1; + } + } + sqlite3_step(pStmt); + sqlite3_finalize(pStmt); + }else + + /* .parameter unset NAME + ** Remove the NAME binding from the parameter binding table, if it + ** exists. + */ + if( nArg==3 && strcmp(azArg[1],"unset")==0 ){ + char *zSql = sqlite3_mprintf( + "DELETE FROM temp.sqlite_parameters WHERE key=%Q", azArg[2]); + if( zSql==0 ) shell_out_of_memory(); + sqlite3_exec(p->db, zSql, 0, 0, 0); + sqlite3_free(zSql); + }else + /* If no command name matches, show a syntax error */ + parameter_syntax_error: + showHelp(p->out, "parameter"); }else if( c=='p' && n>=3 && strncmp(azArg[0], "print", n)==0 ){ Modified: vendor/sqlite3/dist/sqlite3.c ============================================================================== --- vendor/sqlite3/dist/sqlite3.c Sun May 5 00:15:30 2019 (r347135) +++ vendor/sqlite3/dist/sqlite3.c Sun May 5 00:16:24 2019 (r347136) @@ -1,6 +1,6 @@ /****************************************************************************** ** This file is an amalgamation of many separate C source files from SQLite -** version 3.27.2. By combining all the individual C code files into this +** version 3.28.0. By combining all the individual C code files into this ** single large file, the entire code can be compiled as a single translation ** unit. This allows many compilers to do optimizations that would not be ** possible if the files were compiled separately. Performance improvements @@ -1162,9 +1162,9 @@ extern "C" { ** [sqlite3_libversion_number()], [sqlite3_sourceid()], ** [sqlite_version()] and [sqlite_source_id()]. */ -#define SQLITE_VERSION "3.27.2" -#define SQLITE_VERSION_NUMBER 3027002 -#define SQLITE_SOURCE_ID "2019-02-25 16:06:06 bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0f6d7" +#define SQLITE_VERSION "3.28.0" +#define SQLITE_VERSION_NUMBER 3028000 +#define SQLITE_SOURCE_ID "2019-04-16 19:49:53 884b4b7e502b4e991677b53971277adfaf0a04a284f8e483e2553d0f83156b50" /* ** CAPI3REF: Run-Time Library Version Numbers @@ -1228,6 +1228,9 @@ SQLITE_API int sqlite3_libversion_number(void); #ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS SQLITE_API int sqlite3_compileoption_used(const char *zOptName); SQLITE_API const char *sqlite3_compileoption_get(int N); +#else +# define sqlite3_compileoption_used(X) 0 +# define sqlite3_compileoption_get(X) ((void*)0) #endif /* @@ -3125,8 +3128,8 @@ struct sqlite3_mem_methods { ** ** [[SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER]] **
SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER
-**
^This option is used to enable or disable the two-argument -** version of the [fts3_tokenizer()] function which is part of the +**
^This option is used to enable or disable the +** [fts3_tokenizer()] function which is part of the ** [FTS3] full-text search engine extension. ** There should be two additional arguments. ** The first argument is an integer which is 0 to disable fts3_tokenizer() or @@ -3238,6 +3241,17 @@ struct sqlite3_mem_methods { **
  • Direct writes to [shadow tables]. ** **
  • +** +** [[SQLITE_DBCONFIG_WRITABLE_SCHEMA]]
    SQLITE_DBCONFIG_WRITABLE_SCHEMA
    +**
    The SQLITE_DBCONFIG_WRITABLE_SCHEMA option activates or deactivates the +** "writable_schema" flag. This has the same effect and is logically equivalent +** to setting [PRAGMA writable_schema=ON] or [PRAGMA writable_schema=OFF]. +** The first argument to this setting is an integer which is 0 to disable +** the writable_schema, positive to enable writable_schema, or negative to +** leave the setting unchanged. The second parameter is a pointer to an +** integer into which is written 0 or 1 to indicate whether the writable_schema +** is enabled or disabled following this call. +**
    ** */ #define SQLITE_DBCONFIG_MAINDBNAME 1000 /* const char* */ @@ -3251,7 +3265,8 @@ struct sqlite3_mem_methods { #define SQLITE_DBCONFIG_TRIGGER_EQP 1008 /* int int* */ #define SQLITE_DBCONFIG_RESET_DATABASE 1009 /* int int* */ #define SQLITE_DBCONFIG_DEFENSIVE 1010 /* int int* */ -#define SQLITE_DBCONFIG_MAX 1010 /* Largest DBCONFIG */ +#define SQLITE_DBCONFIG_WRITABLE_SCHEMA 1011 /* int int* */ +#define SQLITE_DBCONFIG_MAX 1011 /* Largest DBCONFIG */ /* ** CAPI3REF: Enable Or Disable Extended Result Codes @@ -4934,6 +4949,18 @@ SQLITE_API const char *sqlite3_normalized_sql(sqlite3_ SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt); /* +** CAPI3REF: Query The EXPLAIN Setting For A Prepared Statement +** METHOD: sqlite3_stmt +** +** ^The sqlite3_stmt_isexplain(S) interface returns 1 if the +** prepared statement S is an EXPLAIN statement, or 2 if the +** statement S is an EXPLAIN QUERY PLAN. +** ^The sqlite3_stmt_isexplain(S) interface returns 0 if S is +** an ordinary statement or a NULL pointer. +*/ +SQLITE_API int sqlite3_stmt_isexplain(sqlite3_stmt *pStmt); + +/* ** CAPI3REF: Determine If A Prepared Statement Has Been Reset ** METHOD: sqlite3_stmt ** @@ -5072,7 +5099,9 @@ typedef struct sqlite3_context sqlite3_context; ** ^The fifth argument to the BLOB and string binding interfaces ** is a destructor used to dispose of the BLOB or ** string after SQLite has finished with it. ^The destructor is called -** to dispose of the BLOB or string even if the call to bind API fails. +** to dispose of the BLOB or string even if the call to the bind API fails, +** except the destructor is not called if the third parameter is a NULL +** pointer or the fourth parameter is negative. ** ^If the fifth argument is ** the special value [SQLITE_STATIC], then SQLite assumes that the ** information is in static, unmanaged space and does not need to be freed. @@ -5989,6 +6018,8 @@ SQLITE_API SQLITE_DEPRECATED int sqlite3_memory_alarm( ** sqlite3_value_nochange   ** →  True if the column is unchanged in an UPDATE ** against a virtual table. +** sqlite3_value_frombind   +** →  True if value originated from a [bound parameter] ** ** ** Details: @@ -6050,6 +6081,11 @@ SQLITE_API SQLITE_DEPRECATED int sqlite3_memory_alarm( ** than within an [xUpdate] method call for an UPDATE statement, then ** the return value is arbitrary and meaningless. ** +** ^The sqlite3_value_frombind(X) interface returns non-zero if the +** value X originated from one of the [sqlite3_bind_int|sqlite3_bind()] +** interfaces. ^If X comes from an SQL literal value, or a table column, +** and expression, then sqlite3_value_frombind(X) returns zero. +** ** Please pay particular attention to the fact that the pointer returned ** from [sqlite3_value_blob()], [sqlite3_value_text()], or ** [sqlite3_value_text16()] can be invalidated by a subsequent call to @@ -6095,6 +6131,7 @@ SQLITE_API int sqlite3_value_bytes16(sqlite3_value*); SQLITE_API int sqlite3_value_type(sqlite3_value*); SQLITE_API int sqlite3_value_numeric_type(sqlite3_value*); SQLITE_API int sqlite3_value_nochange(sqlite3_value*); +SQLITE_API int sqlite3_value_frombind(sqlite3_value*); /* ** CAPI3REF: Finding The Subtype Of SQL Values @@ -6830,7 +6867,7 @@ SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*); ** associated with database N of connection D. ^The main database file ** has the name "main". If there is no attached database N on the database ** connection D, or if database N is a temporary or in-memory database, then -** a NULL pointer is returned. +** this function will return either a NULL pointer or an empty string. ** ** ^The filename returned by this function is the output of the ** xFullPathname method of the [VFS]. ^In other words, the filename @@ -11931,7 +11968,7 @@ SQLITE_API int sqlite3rebaser_configure( ** in size. This function allocates and populates a buffer with a copy ** of the changeset rebased rebased according to the configuration of the ** rebaser object passed as the first argument. If successful, (*ppOut) -** is set to point to the new buffer containing the rebased changset and +** is set to point to the new buffer containing the rebased changeset and ** (*pnOut) to its size in bytes and SQLITE_OK returned. It is the ** responsibility of the caller to eventually free the new buffer using ** sqlite3_free(). Otherwise, if an error occurs, (*ppOut) and (*pnOut) @@ -12340,7 +12377,7 @@ struct Fts5PhraseIter { ** Save the pointer passed as the second argument as the extension functions ** "auxiliary data". The pointer may then be retrieved by the current or any ** future invocation of the same fts5 extension function made as part of -** of the same MATCH query using the xGetAuxdata() API. +** the same MATCH query using the xGetAuxdata() API. ** ** Each extension function is allocated a single auxiliary data slot for ** each FTS query (MATCH expression). If the extension function is invoked @@ -12355,7 +12392,7 @@ struct Fts5PhraseIter { ** The xDelete callback, if one is specified, is also invoked on the ** auxiliary data pointer after the FTS5 query has finished. ** -** If an error (e.g. an OOM condition) occurs within this function, an +** If an error (e.g. an OOM condition) occurs within this function, ** the auxiliary data is set to NULL and an error code returned. If the ** xDelete parameter was not NULL, it is invoked on the auxiliary data ** pointer before returning. @@ -13381,7 +13418,7 @@ struct Hash { unsigned int count; /* Number of entries in this table */ HashElem *first; /* The first element of the array */ struct _ht { /* the hash table */ - int count; /* Number of entries with this hash */ + unsigned int count; /* Number of entries with this hash */ HashElem *chain; /* Pointer to first entry with this hash */ } *ht; }; @@ -13522,100 +13559,95 @@ SQLITE_PRIVATE void sqlite3HashClear(Hash*); #define TK_PRECEDING 85 #define TK_RANGE 86 #define TK_UNBOUNDED 87 -#define TK_REINDEX 88 -#define TK_RENAME 89 -#define TK_CTIME_KW 90 -#define TK_ANY 91 -#define TK_BITAND 92 -#define TK_BITOR 93 -#define TK_LSHIFT 94 -#define TK_RSHIFT 95 -#define TK_PLUS 96 -#define TK_MINUS 97 -#define TK_STAR 98 -#define TK_SLASH 99 -#define TK_REM 100 -#define TK_CONCAT 101 -#define TK_COLLATE 102 -#define TK_BITNOT 103 -#define TK_ON 104 -#define TK_INDEXED 105 -#define TK_STRING 106 -#define TK_JOIN_KW 107 -#define TK_CONSTRAINT 108 -#define TK_DEFAULT 109 -#define TK_NULL 110 -#define TK_PRIMARY 111 -#define TK_UNIQUE 112 -#define TK_CHECK 113 -#define TK_REFERENCES 114 -#define TK_AUTOINCR 115 -#define TK_INSERT 116 -#define TK_DELETE 117 -#define TK_UPDATE 118 -#define TK_SET 119 -#define TK_DEFERRABLE 120 -#define TK_FOREIGN 121 -#define TK_DROP 122 -#define TK_UNION 123 -#define TK_ALL 124 -#define TK_EXCEPT 125 -#define TK_INTERSECT 126 -#define TK_SELECT 127 -#define TK_VALUES 128 -#define TK_DISTINCT 129 -#define TK_DOT 130 -#define TK_FROM 131 -#define TK_JOIN 132 -#define TK_USING 133 -#define TK_ORDER 134 -#define TK_GROUP 135 -#define TK_HAVING 136 -#define TK_LIMIT 137 -#define TK_WHERE 138 -#define TK_INTO 139 -#define TK_NOTHING 140 -#define TK_FLOAT 141 -#define TK_BLOB 142 -#define TK_INTEGER 143 -#define TK_VARIABLE 144 -#define TK_CASE 145 -#define TK_WHEN 146 -#define TK_THEN 147 -#define TK_ELSE 148 -#define TK_INDEX 149 -#define TK_ALTER 150 -#define TK_ADD 151 -#define TK_WINDOW 152 -#define TK_OVER 153 -#define TK_FILTER 154 -#define TK_TRUEFALSE 155 -#define TK_ISNOT 156 -#define TK_FUNCTION 157 -#define TK_COLUMN 158 -#define TK_AGG_FUNCTION 159 -#define TK_AGG_COLUMN 160 -#define TK_UMINUS 161 -#define TK_UPLUS 162 -#define TK_TRUTH 163 -#define TK_REGISTER 164 -#define TK_VECTOR 165 -#define TK_SELECT_COLUMN 166 -#define TK_IF_NULL_ROW 167 -#define TK_ASTERISK 168 -#define TK_SPAN 169 -#define TK_END_OF_FILE 170 -#define TK_UNCLOSED_STRING 171 -#define TK_SPACE 172 -#define TK_ILLEGAL 173 +#define TK_EXCLUDE 88 +#define TK_GROUPS 89 +#define TK_OTHERS 90 +#define TK_TIES 91 +#define TK_REINDEX 92 +#define TK_RENAME 93 +#define TK_CTIME_KW 94 +#define TK_ANY 95 +#define TK_BITAND 96 +#define TK_BITOR 97 +#define TK_LSHIFT 98 +#define TK_RSHIFT 99 +#define TK_PLUS 100 +#define TK_MINUS 101 +#define TK_STAR 102 +#define TK_SLASH 103 +#define TK_REM 104 +#define TK_CONCAT 105 +#define TK_COLLATE 106 +#define TK_BITNOT 107 +#define TK_ON 108 +#define TK_INDEXED 109 +#define TK_STRING 110 +#define TK_JOIN_KW 111 +#define TK_CONSTRAINT 112 +#define TK_DEFAULT 113 +#define TK_NULL 114 +#define TK_PRIMARY 115 +#define TK_UNIQUE 116 +#define TK_CHECK 117 +#define TK_REFERENCES 118 +#define TK_AUTOINCR 119 +#define TK_INSERT 120 +#define TK_DELETE 121 +#define TK_UPDATE 122 +#define TK_SET 123 +#define TK_DEFERRABLE 124 +#define TK_FOREIGN 125 +#define TK_DROP 126 +#define TK_UNION 127 +#define TK_ALL 128 +#define TK_EXCEPT 129 +#define TK_INTERSECT 130 +#define TK_SELECT 131 +#define TK_VALUES 132 +#define TK_DISTINCT 133 +#define TK_DOT 134 +#define TK_FROM 135 +#define TK_JOIN 136 +#define TK_USING 137 +#define TK_ORDER 138 +#define TK_GROUP 139 +#define TK_HAVING 140 +#define TK_LIMIT 141 +#define TK_WHERE 142 +#define TK_INTO 143 +#define TK_NOTHING 144 +#define TK_FLOAT 145 +#define TK_BLOB 146 +#define TK_INTEGER 147 +#define TK_VARIABLE 148 +#define TK_CASE 149 +#define TK_WHEN 150 +#define TK_THEN 151 +#define TK_ELSE 152 +#define TK_INDEX 153 +#define TK_ALTER 154 +#define TK_ADD 155 +#define TK_WINDOW 156 +#define TK_OVER 157 +#define TK_FILTER 158 +#define TK_TRUEFALSE 159 +#define TK_ISNOT 160 +#define TK_FUNCTION 161 +#define TK_COLUMN 162 +#define TK_AGG_FUNCTION 163 +#define TK_AGG_COLUMN 164 +#define TK_UMINUS 165 +#define TK_UPLUS 166 +#define TK_TRUTH 167 +#define TK_REGISTER 168 +#define TK_VECTOR 169 +#define TK_SELECT_COLUMN 170 +#define TK_IF_NULL_ROW 171 +#define TK_ASTERISK 172 +#define TK_SPAN 173 +#define TK_SPACE 174 +#define TK_ILLEGAL 175 -/* The token codes above must all fit in 8 bits */ -#define TKFLG_MASK 0xff - -/* Flags that can be added to a token code when it is not -** being stored in a u8: */ -#define TKFLG_DONTFOLD 0x100 /* Omit constant folding optimizations */ - /************** End of parse.h ***********************************************/ /************** Continuing where we left off in sqliteInt.h ******************/ #include @@ -14546,9 +14578,6 @@ struct BtreePayload { SQLITE_PRIVATE int sqlite3BtreeInsert(BtCursor*, const BtreePayload *pPayload, int flags, int seekResult); SQLITE_PRIVATE int sqlite3BtreeFirst(BtCursor*, int *pRes); -#ifndef SQLITE_OMIT_WINDOWFUNC -SQLITE_PRIVATE void sqlite3BtreeSkipNext(BtCursor*); -#endif SQLITE_PRIVATE int sqlite3BtreeLast(BtCursor*, int *pRes); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Sun May 5 00:20:46 2019 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E9E2159CDD2; Sun, 5 May 2019 00:20:46 +0000 (UTC) (envelope-from cy@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3296D76D85; Sun, 5 May 2019 00:20:46 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DD0BBFDEC; Sun, 5 May 2019 00:20:45 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x450KjLr048653; Sun, 5 May 2019 00:20:45 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x450Kj1O048652; Sun, 5 May 2019 00:20:45 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201905050020.x450Kj1O048652@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sun, 5 May 2019 00:20:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r347137 - vendor/sqlite3/sqlite-3280000 X-SVN-Group: vendor X-SVN-Commit-Author: cy X-SVN-Commit-Paths: vendor/sqlite3/sqlite-3280000 X-SVN-Commit-Revision: 347137 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3296D76D85 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 May 2019 00:20:46 -0000 Author: cy Date: Sun May 5 00:20:45 2019 New Revision: 347137 URL: https://svnweb.freebsd.org/changeset/base/347137 Log: Tag import of sqlite3-3.28.0 (3280000) Added: vendor/sqlite3/sqlite-3280000/ - copied from r347136, vendor/sqlite3/dist/ From owner-svn-src-vendor@freebsd.org Mon May 6 20:15:06 2019 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B08841594A24; Mon, 6 May 2019 20:15:06 +0000 (UTC) (envelope-from phil@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4E3D587B77; Mon, 6 May 2019 20:15:06 +0000 (UTC) (envelope-from phil@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 00F82BDF1; Mon, 6 May 2019 20:15:05 +0000 (UTC) (envelope-from phil@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x46KF5B2035996; Mon, 6 May 2019 20:15:05 GMT (envelope-from phil@FreeBSD.org) Received: (from phil@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x46KF0j8035968; Mon, 6 May 2019 20:15:00 GMT (envelope-from phil@FreeBSD.org) Message-Id: <201905062015.x46KF0j8035968@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: phil set sender to phil@FreeBSD.org using -f From: Phil Shafer Date: Mon, 6 May 2019 20:15:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r347205 - in vendor/Juniper/libxo/dist: . doc libxo tests/core tests/core/saved xo X-SVN-Group: vendor X-SVN-Commit-Author: phil X-SVN-Commit-Paths: in vendor/Juniper/libxo/dist: . doc libxo tests/core tests/core/saved xo X-SVN-Commit-Revision: 347205 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4E3D587B77 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 May 2019 20:15:07 -0000 Author: phil Date: Mon May 6 20:15:00 2019 New Revision: 347205 URL: https://svnweb.freebsd.org/changeset/base/347205 Log: Import libxo 1.0.4 Modified: vendor/Juniper/libxo/dist/configure.ac vendor/Juniper/libxo/dist/doc/libxo-manual.html vendor/Juniper/libxo/dist/libxo/libxo.c vendor/Juniper/libxo/dist/libxo/xo_explicit.h vendor/Juniper/libxo/dist/tests/core/saved/test_02.E.err vendor/Juniper/libxo/dist/tests/core/saved/test_02.E.out vendor/Juniper/libxo/dist/tests/core/saved/test_02.H.err vendor/Juniper/libxo/dist/tests/core/saved/test_02.H.out vendor/Juniper/libxo/dist/tests/core/saved/test_02.HIPx.err vendor/Juniper/libxo/dist/tests/core/saved/test_02.HIPx.out vendor/Juniper/libxo/dist/tests/core/saved/test_02.HP.err vendor/Juniper/libxo/dist/tests/core/saved/test_02.HP.out vendor/Juniper/libxo/dist/tests/core/saved/test_02.J.err vendor/Juniper/libxo/dist/tests/core/saved/test_02.J.out vendor/Juniper/libxo/dist/tests/core/saved/test_02.JP.err vendor/Juniper/libxo/dist/tests/core/saved/test_02.JP.out vendor/Juniper/libxo/dist/tests/core/saved/test_02.T.err vendor/Juniper/libxo/dist/tests/core/saved/test_02.T.out vendor/Juniper/libxo/dist/tests/core/saved/test_02.X.err vendor/Juniper/libxo/dist/tests/core/saved/test_02.X.out vendor/Juniper/libxo/dist/tests/core/saved/test_02.XP.err vendor/Juniper/libxo/dist/tests/core/saved/test_02.XP.out vendor/Juniper/libxo/dist/tests/core/test_01.c vendor/Juniper/libxo/dist/tests/core/test_02.c vendor/Juniper/libxo/dist/xo/xo.c Modified: vendor/Juniper/libxo/dist/configure.ac ============================================================================== --- vendor/Juniper/libxo/dist/configure.ac Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/configure.ac Mon May 6 20:15:00 2019 (r347205) @@ -12,7 +12,7 @@ # AC_PREREQ(2.2) -AC_INIT([libxo], [1.0.2], [phil@juniper.net]) +AC_INIT([libxo], [1.0.4], [phil@juniper.net]) AM_INIT_AUTOMAKE([-Wall -Werror foreign -Wno-portability]) # Support silent build rules. Requires at least automake-1.11. Modified: vendor/Juniper/libxo/dist/doc/libxo-manual.html ============================================================================== --- vendor/Juniper/libxo/dist/doc/libxo-manual.html Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/doc/libxo-manual.html Mon May 6 20:15:00 2019 (r347205) @@ -22011,7 +22011,7 @@ jQuery(function ($) { -April 2, 2019 +April 24, 2019

    libxo: The Easy Way to Generate text, XML, JSON, and HTML output
    libxo-manual

    Modified: vendor/Juniper/libxo/dist/libxo/libxo.c ============================================================================== --- vendor/Juniper/libxo/dist/libxo/libxo.c Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/libxo/libxo.c Mon May 6 20:15:00 2019 (r347205) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2018, Juniper Networks, Inc. + * Copyright (c) 2014-2019, Juniper Networks, Inc. * All rights reserved. * This SOFTWARE is licensed under the LICENSE provided in the * ../Copyright file. By downloading, installing, copying, or otherwise @@ -600,7 +600,7 @@ xo_no_setlocale (void) static const char * xo_xml_leader_len (xo_handle_t *xop, const char *name, xo_ssize_t nlen) { - if (isalpha(name[0]) || name[0] == '_') + if (name == NULL || isalpha(name[0]) || name[0] == '_') return ""; xo_failure(xop, "invalid XML tag name: '%.*s'", nlen, name); Modified: vendor/Juniper/libxo/dist/libxo/xo_explicit.h ============================================================================== --- vendor/Juniper/libxo/dist/libxo/xo_explicit.h Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/libxo/xo_explicit.h Mon May 6 20:15:00 2019 (r347205) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Juniper Networks, Inc. + * Copyright (c) 2019, Juniper Networks, Inc. * All rights reserved. * This SOFTWARE is licensed under the LICENSE provided in the * ../Copyright file. By downloading, installing, copying, or otherwise Modified: vendor/Juniper/libxo/dist/tests/core/saved/test_02.E.err ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/saved/test_02.E.err Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/tests/core/saved/test_02.E.err Mon May 6 20:15:00 2019 (r347205) @@ -0,0 +1 @@ +test_02.test: key field emitted after normal value field: 'name' Modified: vendor/Juniper/libxo/dist/tests/core/saved/test_02.E.out ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/saved/test_02.E.out Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/tests/core/saved/test_02.E.out Mon May 6 20:15:00 2019 (r347205) @@ -1,6 +1,10 @@ op create: [] [] [0] op open_container: [top] [] [0x40010] op open_container: [data] [] [0x40010] +op string: [name] [em0] [0x1080] +op string: [flags] [0x8843] [0x18] +op string: [name] [em0] [0x1088] +op string: [flags] [0x8843] [0x18] op string: [what] [braces] [0] op string: [length] [abcdef] [0] op content: [fd] [-1] [0] Modified: vendor/Juniper/libxo/dist/tests/core/saved/test_02.H.err ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/saved/test_02.H.err Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/tests/core/saved/test_02.H.err Mon May 6 20:15:00 2019 (r347205) @@ -0,0 +1 @@ +test_02.test: key field emitted after normal value field: 'name' Modified: vendor/Juniper/libxo/dist/tests/core/saved/test_02.H.out ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/saved/test_02.H.out Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/tests/core/saved/test_02.H.out Mon May 6 20:15:00 2019 (r347205) @@ -1,4 +1,4 @@ -
    We are
    {emit}
    {ting}
    some
    braces
    abcdef +
    em0
    em0
    We are
    {emit}
    {ting}
    some
    braces
    abcdef
    abcdef: Bad file descriptor
    improper use of profanity; ten yard penalty; first down
    length
    abcdef
    close
    -1
    returned
    Bad file descriptor
    good
    close
    -1
    returned
    Bad fi
    good
    improper use of profanity; ten yard penalty; first down Modified: vendor/Juniper/libxo/dist/tests/core/saved/test_02.HIPx.err ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/saved/test_02.HIPx.err Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/tests/core/saved/test_02.HIPx.err Mon May 6 20:15:00 2019 (r347205) @@ -0,0 +1 @@ +test_02.test: key field emitted after normal value field: 'name' Modified: vendor/Juniper/libxo/dist/tests/core/saved/test_02.HIPx.out ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/saved/test_02.HIPx.out Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/tests/core/saved/test_02.HIPx.out Mon May 6 20:15:00 2019 (r347205) @@ -1,9 +1,11 @@
    +
    em0
    +
    em0
    We are
    {emit}
    {ting}
    some
    -
    braces
    +
    braces
    abcdef @@ -19,23 +21,23 @@
    length
    -
    abcdef
    +
    abcdef
    close
    -
    -1
    +
    -1
    returned
    -
    Bad file descriptor
    +
    Bad file descriptor
    -
    good
    +
    good
    close
    -
    -1
    +
    -1
    returned
    -
    Bad fi
    +
    Bad fi
    -
    good
    +
    good
    improper use of profanity; ten yard penalty; first down @@ -43,155 +45,155 @@
    -
    20
    +
    20
    -
    30
    +
    30
    -
    40
    +
    40
    -
    file
    +
    file
    -
    0
    +
    0
    bytes
    -
    1
    +
    1
    byte
    -
    2
    +
    2
    bytes
    -
    3
    +
    3
    bytes
    -
    4
    +
    4
    bytes
    -
    10
    +
    10
    /
    -
    20
    +
    20
    /
    -
    30
    +
    30
    mbufs <&> in use (current/cache/total)
    -
    50
    +
    50
    from
    -
    Boston
    +
    Boston
    -
    64
    +
    64
    left out of
    -
    640
    +
    640
    -
    64
    +
    64
    left out of
    -
    640
    +
    640
    beforeworkingafter:
    -
    string
    +
    string
    :
    -
    10
    -
    11
    +
    10
    +
    11
    -
    1010
    +
    1010
    packets here/there/everywhere
    -
    1010
    +
    1010
    packets here/there/everywhere
    (
    -
    15
    +
    15
    /
    -
    20
    +
    20
    /
    -
    125
    +
    125
    )
    (
    -
    15
    +
    15
    /
    -
    20
    +
    20
    /
    -
    125
    +
    125
    )
    (
    -
    15
    +
    15
    /
    -
    20
    +
    20
    /
    -
    125
    +
    125
    )
    (
    -
    15
    +
    15
    /
    -
    20
    +
    20
    /
    -
    125
    +
    125
    )
    Humanize:
    -
    21
    +
    21
    ,
    -
    57 K
    +
    57 K
    ,
    -
    96M
    +
    96M
    ,
    -
    44M
    +
    44M
    ,
    -
    1.2G
    +
    1.2G
    -
    one
    +
    one
    -
    two
    +
    two
    -
    three
    +
    three
    -
    (null)
    +
    (null)
    1:
    -
    1000
    +
    1000
    2:
    -
    test5000
    +
    test5000
    3:
    -
    ten-longx
    +
    ten-longx
    4:
    -
    xtest
    +
    xtest
    this is an error
    @@ -208,10 +210,10 @@
    V1/V2 packets
    :
    -
    10
    +
    10
    -
    0004
    +
    0004
    tries
    Modified: vendor/Juniper/libxo/dist/tests/core/saved/test_02.HP.err ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/saved/test_02.HP.err Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/tests/core/saved/test_02.HP.err Mon May 6 20:15:00 2019 (r347205) @@ -0,0 +1 @@ +test_02.test: key field emitted after normal value field: 'name' Modified: vendor/Juniper/libxo/dist/tests/core/saved/test_02.HP.out ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/saved/test_02.HP.out Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/tests/core/saved/test_02.HP.out Mon May 6 20:15:00 2019 (r347205) @@ -1,4 +1,6 @@
    +
    em0
    +
    em0
    We are
    {emit}
    {ting}
    Modified: vendor/Juniper/libxo/dist/tests/core/saved/test_02.J.err ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/saved/test_02.J.err Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/tests/core/saved/test_02.J.err Mon May 6 20:15:00 2019 (r347205) @@ -0,0 +1 @@ +test_02.test: key field emitted after normal value field: 'name' Modified: vendor/Juniper/libxo/dist/tests/core/saved/test_02.J.out ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/saved/test_02.J.out Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/tests/core/saved/test_02.J.out Mon May 6 20:15:00 2019 (r347205) @@ -1 +1 @@ -{"top": {"data": {"what":"braces","length":"abcdef","fd":-1,"error":"Bad file descriptor","test":"good","fd":-1,"error":"Bad fi","test":"good","lines":20,"words":30,"characters":40, "bytes": [0,1,2,3,4],"mbuf-current":10,"mbuf-cache":20,"mbuf-total":30,"distance":50,"location":"Boston","memory":64,"total":640,"memory":64,"total":640,"ten":10,"eleven":11,"unknown":1010,"unknown":1010,"min":15,"cur":20,"max":125,"min":15,"cur":20,"max":125,"min":15,"cur":20,"max":125,"min":15,"cur":20,"max":125,"val1":21,"val2":58368,"val3":100663296,"val4":44470272,"val5":1342172800, "flag": ["one","two","three"],"works":null,"empty-tag":true,"t1":"1000","t2":"test5000","t3":"ten-longx","t4":"xtest", "__error": {"message":"this is an error"}, "__error": {"message":"two more errors"}, "__warning": {"message":"this is an warning"}, "__warning": {"message":"two more warnings"},"count":10,"test":4, "error": {"message":"Shut 'er down, Clancey! She's a-pumpin' mud! <>!,\"!<>\n"}}}} +{"top": {"data": {"name":"em0","flags":"0x8843","name":"em0","flags":"0x8843","what":"braces","length":"abcdef","fd":-1,"error":"Bad file descriptor","test":"good","fd":-1,"error":"Bad fi","test":"good","lines":20,"words":30,"characters":40, "bytes": [0,1,2,3,4],"mbuf-current":10,"mbuf-cache":20,"mbuf-total":30,"distance":50,"location":"Boston","memory":64,"total":640,"memory":64,"total":640,"ten":10,"eleven":11,"unknown":1010,"unknown":1010,"min":15,"cur":20,"max":125,"min":15,"cur":20,"max":125,"min":15,"cur":20,"max":125,"min":15,"cur":20,"max":125,"val1":21,"val2":58368,"val3":100663296,"val4":44470272,"val5":1342172800, "flag": ["one","two","three"],"works":null,"empty-tag":true,"t1":"1000","t2":"test5000","t3":"ten-longx","t4":"xtest", "__error": {"message":"this is an error"}, "__error": {"message":"two more errors"}, "__warning": {"message":"this is an warning"}, "__warning": {"message":"two more warnings"},"count":10,"test":4, "error": {"message":"Shut 'er down, Clancey! S he's a-pumpin' mud! <>!,\"!<>\n"}}}} Modified: vendor/Juniper/libxo/dist/tests/core/saved/test_02.JP.err ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/saved/test_02.JP.err Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/tests/core/saved/test_02.JP.err Mon May 6 20:15:00 2019 (r347205) @@ -0,0 +1 @@ +test_02.test: key field emitted after normal value field: 'name' Modified: vendor/Juniper/libxo/dist/tests/core/saved/test_02.JP.out ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/saved/test_02.JP.out Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/tests/core/saved/test_02.JP.out Mon May 6 20:15:00 2019 (r347205) @@ -1,6 +1,10 @@ { "top": { "data": { + "name": "em0", + "flags": "0x8843", + "name": "em0", + "flags": "0x8843", "what": "braces", "length": "abcdef", "fd": -1, Modified: vendor/Juniper/libxo/dist/tests/core/saved/test_02.T.err ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/saved/test_02.T.err Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/tests/core/saved/test_02.T.err Mon May 6 20:15:00 2019 (r347205) @@ -1 +1,2 @@ +test_02.test: key field emitted after normal value field: 'name' Shut 'er down, Clancey! She's a-pumpin' mud! <>!,"!<> Modified: vendor/Juniper/libxo/dist/tests/core/saved/test_02.T.out ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/saved/test_02.T.out Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/tests/core/saved/test_02.T.out Mon May 6 20:15:00 2019 (r347205) @@ -1,4 +1,4 @@ -We are {emit}{ting} some braces +em0 em0 We are {emit}{ting} some braces abcdef abcdef: Bad file descriptor improper use of profanity; ten yard penalty; first down Modified: vendor/Juniper/libxo/dist/tests/core/saved/test_02.X.err ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/saved/test_02.X.err Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/tests/core/saved/test_02.X.err Mon May 6 20:15:00 2019 (r347205) @@ -0,0 +1 @@ +test_02.test: key field emitted after normal value field: 'name' Modified: vendor/Juniper/libxo/dist/tests/core/saved/test_02.X.out ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/saved/test_02.X.out Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/tests/core/saved/test_02.X.out Mon May 6 20:15:00 2019 (r347205) @@ -1,4 +1,4 @@ -bracesabcdef +em00x8843em00x8843bracesabcdef abcdef: Bad file descriptor improper use of profanity; ten yard penalty; first down abcdef-1Bad file descriptorgood-1Bad figoodimproper use of profanity; ten yard penalty; first down Modified: vendor/Juniper/libxo/dist/tests/core/saved/test_02.XP.err ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/saved/test_02.XP.err Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/tests/core/saved/test_02.XP.err Mon May 6 20:15:00 2019 (r347205) @@ -0,0 +1 @@ +test_02.test: key field emitted after normal value field: 'name' Modified: vendor/Juniper/libxo/dist/tests/core/saved/test_02.XP.out ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/saved/test_02.XP.out Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/tests/core/saved/test_02.XP.out Mon May 6 20:15:00 2019 (r347205) @@ -1,5 +1,9 @@ + em0 + 0x8843 + em0 + 0x8843 braces abcdef Modified: vendor/Juniper/libxo/dist/tests/core/test_01.c ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/test_01.c Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/tests/core/test_01.c Mon May 6 20:15:00 2019 (r347205) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Juniper Networks, Inc. + * Copyright (c) 2014-2019, Juniper Networks, Inc. * All rights reserved. * This SOFTWARE is licensed under the LICENSE provided in the * ../Copyright file. By downloading, installing, copying, or otherwise Modified: vendor/Juniper/libxo/dist/tests/core/test_02.c ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/test_02.c Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/tests/core/test_02.c Mon May 6 20:15:00 2019 (r347205) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Juniper Networks, Inc. + * Copyright (c) 2014-2019, Juniper Networks, Inc. * All rights reserved. * This SOFTWARE is licensed under the LICENSE provided in the * ../Copyright file. By downloading, installing, copying, or otherwise @@ -47,6 +47,12 @@ main (int argc, char **argv) xo_open_container_h(NULL, "top"); xo_open_container("data"); + + xo_emit("{kt:name/%-*.*s}{eq:flags/0x%x}", + 5, 5, "em0", 34883); + + xo_emit("{d:/%-*.*s}{etk:name}{eq:flags/0x%x}", + 5, 5, "em0", "em0", 34883); xo_emit("We are {{emit}}{{ting}} some {:what}\n", "braces"); Modified: vendor/Juniper/libxo/dist/xo/xo.c ============================================================================== --- vendor/Juniper/libxo/dist/xo/xo.c Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/xo/xo.c Mon May 6 20:15:00 2019 (r347205) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2018, Juniper Networks, Inc. + * Copyright (c) 2014-2019, Juniper Networks, Inc. * All rights reserved. * This SOFTWARE is licensed under the LICENSE provided in the * ../Copyright file. By downloading, installing, copying, or otherwise From owner-svn-src-vendor@freebsd.org Mon May 6 20:15:19 2019 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1176F1594A4E; Mon, 6 May 2019 20:15:19 +0000 (UTC) (envelope-from phil@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AB11187C6E; Mon, 6 May 2019 20:15:18 +0000 (UTC) (envelope-from phil@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6F9CFBDF3; Mon, 6 May 2019 20:15:18 +0000 (UTC) (envelope-from phil@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x46KFIA5036049; Mon, 6 May 2019 20:15:18 GMT (envelope-from phil@FreeBSD.org) Received: (from phil@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x46KFIEi036048; Mon, 6 May 2019 20:15:18 GMT (envelope-from phil@FreeBSD.org) Message-Id: <201905062015.x46KFIEi036048@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: phil set sender to phil@FreeBSD.org using -f From: Phil Shafer Date: Mon, 6 May 2019 20:15:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r347206 - vendor/Juniper/libxo/1.0.4 X-SVN-Group: vendor X-SVN-Commit-Author: phil X-SVN-Commit-Paths: vendor/Juniper/libxo/1.0.4 X-SVN-Commit-Revision: 347206 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AB11187C6E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 May 2019 20:15:19 -0000 Author: phil Date: Mon May 6 20:15:18 2019 New Revision: 347206 URL: https://svnweb.freebsd.org/changeset/base/347206 Log: Tag libxo 1.0.4 Added: - copied from r347205, vendor/Juniper/libxo/dist/ Directory Properties: vendor/Juniper/libxo/1.0.4/ (props changed) From owner-svn-src-vendor@freebsd.org Wed May 8 19:00:51 2019 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D74781590E1E; Wed, 8 May 2019 19:00:50 +0000 (UTC) (envelope-from manu@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 864FE89E58; Wed, 8 May 2019 19:00:50 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 617489E59; Wed, 8 May 2019 19:00:50 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x48J0o8l018439; Wed, 8 May 2019 19:00:50 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x48J0lRY018422; Wed, 8 May 2019 19:00:47 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201905081900.x48J0lRY018422@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 8 May 2019 19:00:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r347363 - in vendor/device-tree/dist: Bindings Bindings/arm Bindings/arm/bcm Bindings/arm/freescale Bindings/arm/socionext Bindings/bus Bindings/clock Bindings/cpufreq Bindings/crypto B... X-SVN-Group: vendor X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in vendor/device-tree/dist: Bindings Bindings/arm Bindings/arm/bcm Bindings/arm/freescale Bindings/arm/socionext Bindings/bus Bindings/clock Bindings/cpufreq Bindings/crypto Bindings/display Bindings/... X-SVN-Commit-Revision: 347363 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 864FE89E58 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 May 2019 19:00:51 -0000 Author: manu Date: Wed May 8 19:00:46 2019 New Revision: 347363 URL: https://svnweb.freebsd.org/changeset/base/347363 Log: Import Linux 5.1 DTS files Added: vendor/device-tree/dist/Bindings/arm/bitmain.yaml vendor/device-tree/dist/Bindings/arm/freescale/fsl,imx7ulp-sim.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/fsl.yaml vendor/device-tree/dist/Bindings/arm/l2c2x0.yaml vendor/device-tree/dist/Bindings/arm/pmu.yaml vendor/device-tree/dist/Bindings/arm/renesas.yaml vendor/device-tree/dist/Bindings/arm/socionext/milbeaut.yaml vendor/device-tree/dist/Bindings/clock/fixed-clock.yaml vendor/device-tree/dist/Bindings/clock/fixed-factor-clock.yaml vendor/device-tree/dist/Bindings/clock/fixed-mmio-clock.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/imx8mm-clock.txt (contents, props changed) vendor/device-tree/dist/Bindings/crypto/samsung-slimsss.txt (contents, props changed) vendor/device-tree/dist/Bindings/display/amlogic,simple-framebuffer.txt (contents, props changed) vendor/device-tree/dist/Bindings/display/arm,komeda.txt (contents, props changed) vendor/device-tree/dist/Bindings/display/bridge/ti,ds90c185.txt (contents, props changed) vendor/device-tree/dist/Bindings/display/msm/gmu.txt (contents, props changed) vendor/device-tree/dist/Bindings/display/panel/auo,g101evn010.txt (contents, props changed) vendor/device-tree/dist/Bindings/display/panel/innolux,ee101ia-01d.txt (contents, props changed) vendor/device-tree/dist/Bindings/display/panel/lemaker,bl035-rgb-002.txt (contents, props changed) vendor/device-tree/dist/Bindings/display/panel/pda,91-00156-a0.txt (contents, props changed) vendor/device-tree/dist/Bindings/display/panel/sitronix,st7701.txt (contents, props changed) vendor/device-tree/dist/Bindings/dma/fsl-qdma.txt (contents, props changed) vendor/device-tree/dist/Bindings/edac/aspeed-sdram-edac.txt (contents, props changed) vendor/device-tree/dist/Bindings/extcon/extcon-ptn5150.txt (contents, props changed) vendor/device-tree/dist/Bindings/firmware/nvidia,tegra210-bpmp.txt (contents, props changed) vendor/device-tree/dist/Bindings/gnss/mediatek.txt (contents, props changed) vendor/device-tree/dist/Bindings/gpio/gateworks,pld-gpio.txt (contents, props changed) vendor/device-tree/dist/Bindings/gpio/intel,ixp4xx-gpio.txt (contents, props changed) vendor/device-tree/dist/Bindings/hwmon/ad741x.txt (contents, props changed) vendor/device-tree/dist/Bindings/hwmon/dps650ab.txt (contents, props changed) vendor/device-tree/dist/Bindings/hwmon/hih6130.txt (contents, props changed) vendor/device-tree/dist/Bindings/hwmon/lm75.txt (contents, props changed) vendor/device-tree/dist/Bindings/i2c/i2c-iop3xx.txt (contents, props changed) vendor/device-tree/dist/Bindings/i2c/i2c-mt65xx.txt (contents, props changed) vendor/device-tree/dist/Bindings/i2c/i2c-stu300.txt (contents, props changed) vendor/device-tree/dist/Bindings/i2c/i2c-sun6i-p2wi.txt (contents, props changed) vendor/device-tree/dist/Bindings/i2c/i2c-wmt.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/adc/adi,ad7606.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/adc/adi,ad7768-1.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/adc/ingenic,adc.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/adc/lpc32xx-adc.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/adc/nuvoton,npcm-adc.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/adc/stmpe-adc.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/adc/ti-ads124s08.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/chemical/bme680.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/chemical/plantower,pms7003.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/chemical/sensirion,sgp30.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/chemical/sensirion,sps30.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/dac/ti,dac7612.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/impedance-analyzer/ vendor/device-tree/dist/Bindings/iio/impedance-analyzer/ad5933.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/light/max44009.txt (contents, props changed) vendor/device-tree/dist/Bindings/input/ilitek,ili2xxx.txt (contents, props changed) vendor/device-tree/dist/Bindings/input/msm-vibrator.txt (contents, props changed) vendor/device-tree/dist/Bindings/input/st,stpmic1-onkey.txt (contents, props changed) vendor/device-tree/dist/Bindings/interconnect/ vendor/device-tree/dist/Bindings/interconnect/interconnect.txt (contents, props changed) vendor/device-tree/dist/Bindings/interconnect/qcom,sdm845.txt (contents, props changed) vendor/device-tree/dist/Bindings/interrupt-controller/arm,gic-v3.yaml vendor/device-tree/dist/Bindings/interrupt-controller/arm,gic.yaml vendor/device-tree/dist/Bindings/interrupt-controller/loongson,ls1x-intc.txt (contents, props changed) vendor/device-tree/dist/Bindings/leds/leds-trigger-pattern.txt (contents, props changed) vendor/device-tree/dist/Bindings/mailbox/xlnx,zynqmp-ipi-mailbox.txt (contents, props changed) vendor/device-tree/dist/Bindings/media/i2c/melexis,mlx90640.txt (contents, props changed) vendor/device-tree/dist/Bindings/media/i2c/mt9m001.txt (contents, props changed) vendor/device-tree/dist/Bindings/media/imx7-csi.txt (contents, props changed) vendor/device-tree/dist/Bindings/media/imx7-mipi-csi2.txt (contents, props changed) vendor/device-tree/dist/Bindings/media/si470x.txt (contents, props changed) vendor/device-tree/dist/Bindings/mfd/cirrus,lochnagar.txt (contents, props changed) vendor/device-tree/dist/Bindings/mfd/st,stpmic1.txt (contents, props changed) vendor/device-tree/dist/Bindings/misc/qcom,fastrpc.txt (contents, props changed) vendor/device-tree/dist/Bindings/mtd/amlogic,meson-nand.txt (contents, props changed) vendor/device-tree/dist/Bindings/mtd/stm32-fmc2-nand.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/fsl-enetc.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/mdio-mux-multiplexer.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/qcom,ethqos.txt (contents, props changed) vendor/device-tree/dist/Bindings/nvmem/xlnx,zynqmp-nvmem.txt (contents, props changed) vendor/device-tree/dist/Bindings/phy/cdns,dphy.txt (contents, props changed) vendor/device-tree/dist/Bindings/phy/phy-armada38x-comphy.txt (contents, props changed) vendor/device-tree/dist/Bindings/phy/phy-mvebu-utmi.txt (contents, props changed) vendor/device-tree/dist/Bindings/pinctrl/fsl,imx50-pinctrl.txt (contents, props changed) vendor/device-tree/dist/Bindings/pinctrl/fsl,imx8mm-pinctrl.txt (contents, props changed) vendor/device-tree/dist/Bindings/power/qcom,rpmpd.txt (contents, props changed) vendor/device-tree/dist/Bindings/power/reset/xlnx,zynqmp-power.txt (contents, props changed) vendor/device-tree/dist/Bindings/power/xlnx,zynqmp-genpd.txt (contents, props changed) vendor/device-tree/dist/Bindings/regulator/fixed-regulator.yaml vendor/device-tree/dist/Bindings/regulator/max77650-regulator.txt (contents, props changed) vendor/device-tree/dist/Bindings/regulator/rohm,bd70528-regulator.txt (contents, props changed) vendor/device-tree/dist/Bindings/reset/brcm,brcmstb-reset.txt (contents, props changed) vendor/device-tree/dist/Bindings/reset/xlnx,zynqmp-reset.txt (contents, props changed) vendor/device-tree/dist/Bindings/rtc/cdns,rtc.txt (contents, props changed) vendor/device-tree/dist/Bindings/rtc/isil,isl1208.txt (contents, props changed) vendor/device-tree/dist/Bindings/rtc/nxp,pcf85063.txt (contents, props changed) vendor/device-tree/dist/Bindings/rtc/nxp,pcf8523.txt (contents, props changed) vendor/device-tree/dist/Bindings/rtc/rtc-meson.txt (contents, props changed) vendor/device-tree/dist/Bindings/serial/milbeaut-uart.txt (contents, props changed) vendor/device-tree/dist/Bindings/serial/nvidia,tegra194-tcu.txt (contents, props changed) vendor/device-tree/dist/Bindings/serial/pl011.yaml vendor/device-tree/dist/Bindings/serial/snps-dw-apb-uart.yaml vendor/device-tree/dist/Bindings/soc/bcm/brcm,bcm2835-pm.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/cs35l36.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/cs4341.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/fsl,micfil.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/google,cros-ec-codec.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/ingenic,jz4725b-codec.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/ingenic,jz4740-codec.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/mt6358.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/mt8183-afe-pcm.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/mtk-btcvsd-snd.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/rockchip,rk3328-codec.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/sprd-pcm.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/xlnx,audio-formatter.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/xlnx,spdif.txt (contents, props changed) vendor/device-tree/dist/Bindings/spi/spi-fsl-qspi.txt (contents, props changed) vendor/device-tree/dist/Bindings/spi/spi-nxp-fspi.txt (contents, props changed) vendor/device-tree/dist/Bindings/spi/spi-sifive.txt (contents, props changed) vendor/device-tree/dist/Bindings/sram/milbeaut-smp-sram.txt (contents, props changed) vendor/device-tree/dist/Bindings/thermal/brcm,sr-thermal.txt (contents, props changed) vendor/device-tree/dist/Bindings/timer/nvidia,tegra210-timer.txt (contents, props changed) vendor/device-tree/dist/Bindings/timer/socionext,milbeaut-timer.txt (contents, props changed) vendor/device-tree/dist/Bindings/usb/ingenic,jz4740-musb.txt (contents, props changed) vendor/device-tree/dist/Bindings/watchdog/st,stpmic1-wdt.txt (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clk/lochnagar.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/actions,s500-cmu.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/g12a-aoclkc.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/g12a-clkc.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/imx8mm-clock.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/sifive-fu540-prci.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/iio/adc/ingenic,adc.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/interconnect/ vendor/device-tree/dist/include/dt-bindings/interconnect/qcom,sdm845.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/mfd/st,stpmic1.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/pinctrl/lochnagar.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/power/qcom-rpmpd.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/power/xlnx-zynqmp-power.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/reset/amlogic,meson-g12a-reset.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/reset/g12a-aoclkc.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/reset/imx8mq-reset.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/reset/xlnx-zynqmp-resets.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/soc/bcm2835-pm.h (contents, props changed) vendor/device-tree/dist/src/arm/am335x-guardian.dts (contents, props changed) vendor/device-tree/dist/src/arm/am3874-iceboard.dts (contents, props changed) vendor/device-tree/dist/src/arm/aspeed-bmc-inspur-on5263m5.dts (contents, props changed) vendor/device-tree/dist/src/arm/bcm2837-rpi-3-a-plus.dts (contents, props changed) vendor/device-tree/dist/src/arm/bcm47094-phicomm-k3.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6-logicpd-baseboard.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx6-logicpd-som.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx6dl-yapp4-common.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx6dl-yapp4-draco.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6dl-yapp4-hydra.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6dl-yapp4-ursa.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6q-logicpd.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6ul-phytec-pcl063.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx6ul-phytec-peb-eval-01.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx6ul-phytec-phyboard-segin-full.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6ul-phytec-phyboard-segin.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/lpc4357-myd-lpc4357.dts (contents, props changed) vendor/device-tree/dist/src/arm/milbeaut-m10v-evb.dts (contents, props changed) vendor/device-tree/dist/src/arm/milbeaut-m10v.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/r7s9210-rza2mevb.dts (contents, props changed) vendor/device-tree/dist/src/arm/r7s9210.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/rv1108-elgin-r1.dts (contents, props changed) vendor/device-tree/dist/src/arm/socfpga_cyclone5_chameleon96.dts (contents, props changed) vendor/device-tree/dist/src/arm/vf610-zii-ssmb-dtu.dts (contents, props changed) vendor/device-tree/dist/src/arm64/amlogic/meson-g12a-x96-max.dts (contents, props changed) vendor/device-tree/dist/src/arm64/arm/fvp-base-revc.dts (contents, props changed) vendor/device-tree/dist/src/arm64/arm/rtsm_ve-motherboard-rs2.dtsi (contents, props changed) vendor/device-tree/dist/src/arm64/bitmain/ vendor/device-tree/dist/src/arm64/bitmain/bm1880-sophon-edge.dts (contents, props changed) vendor/device-tree/dist/src/arm64/bitmain/bm1880.dtsi (contents, props changed) vendor/device-tree/dist/src/arm64/broadcom/bcm2837-rpi-3-a-plus.dts (contents, props changed) vendor/device-tree/dist/src/arm64/freescale/fsl-ls1012a-oxalis.dts (contents, props changed) vendor/device-tree/dist/src/arm64/freescale/imx8mm-pinfunc.h (contents, props changed) vendor/device-tree/dist/src/arm64/freescale/imx8qxp-mek.dts (contents, props changed) vendor/device-tree/dist/src/arm64/freescale/imx8qxp.dtsi (contents, props changed) vendor/device-tree/dist/src/arm64/marvell/armada-3720-uDPU.dts (contents, props changed) vendor/device-tree/dist/src/arm64/nvidia/tegra210-p2894-0050-a08.dts (contents, props changed) vendor/device-tree/dist/src/arm64/nvidia/tegra210-p2894.dtsi (contents, props changed) vendor/device-tree/dist/src/arm64/renesas/cat875.dtsi (contents, props changed) vendor/device-tree/dist/src/arm64/renesas/r8a774c0-cat874.dts (contents, props changed) vendor/device-tree/dist/src/arm64/renesas/r8a774c0-ek874.dts (contents, props changed) vendor/device-tree/dist/src/arm64/renesas/r8a774c0.dtsi (contents, props changed) vendor/device-tree/dist/src/arm64/rockchip/rk3399-nanopc-t4.dts (contents, props changed) vendor/device-tree/dist/src/arm64/rockchip/rk3399-nanopi-m4.dts (contents, props changed) vendor/device-tree/dist/src/arm64/rockchip/rk3399-nanopi4.dtsi (contents, props changed) vendor/device-tree/dist/src/arm64/rockchip/rk3399-rock-pi-4.dts (contents, props changed) Deleted: vendor/device-tree/dist/Bindings/arm/armadeus.txt vendor/device-tree/dist/Bindings/arm/bhf.txt vendor/device-tree/dist/Bindings/arm/compulab-boards.txt vendor/device-tree/dist/Bindings/arm/fsl.txt vendor/device-tree/dist/Bindings/arm/i2se.txt vendor/device-tree/dist/Bindings/arm/l2c2x0.txt vendor/device-tree/dist/Bindings/arm/olimex.txt vendor/device-tree/dist/Bindings/arm/pmu.txt vendor/device-tree/dist/Bindings/arm/shmobile.txt vendor/device-tree/dist/Bindings/arm/technologic.txt vendor/device-tree/dist/Bindings/clock/fixed-clock.txt vendor/device-tree/dist/Bindings/clock/fixed-factor-clock.txt vendor/device-tree/dist/Bindings/display/panel/auo,g101evn010 vendor/device-tree/dist/Bindings/i2c/i2c-mtk.txt vendor/device-tree/dist/Bindings/i2c/i2c-st-ddci2c.txt vendor/device-tree/dist/Bindings/i2c/i2c-sunxi-p2wi.txt vendor/device-tree/dist/Bindings/i2c/i2c-vt8500.txt vendor/device-tree/dist/Bindings/interrupt-controller/arm,gic-v3.txt vendor/device-tree/dist/Bindings/interrupt-controller/arm,gic.txt vendor/device-tree/dist/Bindings/iommu/nvidia,tegra20-gart.txt vendor/device-tree/dist/Bindings/mips/lantiq/rcu-gphy.txt vendor/device-tree/dist/Bindings/mtd/fsl-quadspi.txt vendor/device-tree/dist/Bindings/regulator/fixed-regulator.txt vendor/device-tree/dist/Bindings/rtc/isil,isl1219.txt vendor/device-tree/dist/Bindings/serial/pl011.txt vendor/device-tree/dist/Bindings/serial/renesas,rzn1-uart.txt vendor/device-tree/dist/Bindings/serial/snps-dw-apb-uart.txt vendor/device-tree/dist/Bindings/sound/audio-graph-scu-card.txt vendor/device-tree/dist/Bindings/sound/simple-scu-card.txt vendor/device-tree/dist/Bindings/staging/iio/adc/lpc32xx-adc.txt vendor/device-tree/dist/src/arm/skeleton.dtsi vendor/device-tree/dist/src/arm/skeleton64.dtsi Modified: vendor/device-tree/dist/Bindings/Makefile vendor/device-tree/dist/Bindings/arm/amlogic.txt vendor/device-tree/dist/Bindings/arm/atmel-sysregs.txt vendor/device-tree/dist/Bindings/arm/bcm/brcm,bcm2835.txt vendor/device-tree/dist/Bindings/arm/cpus.yaml vendor/device-tree/dist/Bindings/arm/freescale/fsl,scu.txt vendor/device-tree/dist/Bindings/arm/mediatek.txt vendor/device-tree/dist/Bindings/arm/rockchip.yaml vendor/device-tree/dist/Bindings/arm/tegra.yaml vendor/device-tree/dist/Bindings/bus/imx-weim.txt vendor/device-tree/dist/Bindings/clock/actions,owl-cmu.txt vendor/device-tree/dist/Bindings/clock/amlogic,gxbb-aoclkc.txt vendor/device-tree/dist/Bindings/clock/amlogic,gxbb-clkc.txt vendor/device-tree/dist/Bindings/clock/exynos5433-clock.txt vendor/device-tree/dist/Bindings/clock/nvidia,tegra124-dfll.txt vendor/device-tree/dist/Bindings/clock/qcom,rpmcc.txt vendor/device-tree/dist/Bindings/cpufreq/nvidia,tegra124-cpufreq.txt vendor/device-tree/dist/Bindings/display/bridge/cdns,dsi.txt vendor/device-tree/dist/Bindings/display/bridge/lvds-transmitter.txt vendor/device-tree/dist/Bindings/display/bridge/renesas,lvds.txt vendor/device-tree/dist/Bindings/display/bridge/thine,thc63lvdm83d.txt vendor/device-tree/dist/Bindings/display/msm/gpu.txt vendor/device-tree/dist/Bindings/display/renesas,du.txt vendor/device-tree/dist/Bindings/display/rockchip/rockchip-vop.txt vendor/device-tree/dist/Bindings/display/sitronix,st7735r.txt vendor/device-tree/dist/Bindings/display/ssd1307fb.txt vendor/device-tree/dist/Bindings/display/sunxi/sun4i-drm.txt vendor/device-tree/dist/Bindings/display/tegra/nvidia,tegra20-host1x.txt vendor/device-tree/dist/Bindings/dma/dma.txt vendor/device-tree/dist/Bindings/dma/k3dma.txt vendor/device-tree/dist/Bindings/dma/snps-dma.txt vendor/device-tree/dist/Bindings/dma/sprd-dma.txt vendor/device-tree/dist/Bindings/dma/xilinx/xilinx_dma.txt vendor/device-tree/dist/Bindings/eeprom/at24.txt vendor/device-tree/dist/Bindings/firmware/nvidia,tegra186-bpmp.txt vendor/device-tree/dist/Bindings/gnss/gnss.txt vendor/device-tree/dist/Bindings/gnss/sirfstar.txt vendor/device-tree/dist/Bindings/gpio/gpio-eic-sprd.txt vendor/device-tree/dist/Bindings/gpio/gpio-pca953x.txt vendor/device-tree/dist/Bindings/gpio/gpio.txt vendor/device-tree/dist/Bindings/gpu/arm,mali-utgard.txt vendor/device-tree/dist/Bindings/gpu/samsung-rotator.txt vendor/device-tree/dist/Bindings/hwmon/adc128d818.txt vendor/device-tree/dist/Bindings/hwmon/ina3221.txt vendor/device-tree/dist/Bindings/hwmon/pwm-fan.txt vendor/device-tree/dist/Bindings/iio/accel/mma8452.txt vendor/device-tree/dist/Bindings/iio/adc/amlogic,meson-saradc.txt vendor/device-tree/dist/Bindings/iio/adc/samsung,exynos-adc.txt vendor/device-tree/dist/Bindings/iio/imu/bmi160.txt vendor/device-tree/dist/Bindings/iio/imu/inv_mpu6050.txt vendor/device-tree/dist/Bindings/iio/st-sensors.txt vendor/device-tree/dist/Bindings/input/cypress,tm2-touchkey.txt vendor/device-tree/dist/Bindings/input/touchscreen/edt-ft5x06.txt vendor/device-tree/dist/Bindings/input/touchscreen/goodix.txt vendor/device-tree/dist/Bindings/input/touchscreen/sitronix-st1232.txt vendor/device-tree/dist/Bindings/input/touchscreen/stmpe.txt vendor/device-tree/dist/Bindings/input/touchscreen/sx8654.txt vendor/device-tree/dist/Bindings/input/touchscreen/ti-tsc-adc.txt vendor/device-tree/dist/Bindings/interrupt-controller/fsl,irqsteer.txt vendor/device-tree/dist/Bindings/interrupt-controller/mediatek,sysirq.txt vendor/device-tree/dist/Bindings/interrupt-controller/renesas,irqc.txt vendor/device-tree/dist/Bindings/leds/common.txt vendor/device-tree/dist/Bindings/media/i2c/adv748x.txt vendor/device-tree/dist/Bindings/media/i2c/ov5645.txt vendor/device-tree/dist/Bindings/media/mediatek-vcodec.txt vendor/device-tree/dist/Bindings/media/rcar_vin.txt vendor/device-tree/dist/Bindings/media/renesas,fcp.txt vendor/device-tree/dist/Bindings/media/renesas,rcar-csi2.txt vendor/device-tree/dist/Bindings/media/renesas,vsp1.txt vendor/device-tree/dist/Bindings/media/sun6i-csi.txt vendor/device-tree/dist/Bindings/memory-controllers/nvidia,tegra20-mc.txt vendor/device-tree/dist/Bindings/mfd/aspeed-lpc.txt vendor/device-tree/dist/Bindings/mfd/rohm,bd71837-pmic.txt vendor/device-tree/dist/Bindings/mfd/stmpe.txt vendor/device-tree/dist/Bindings/mips/lantiq/rcu.txt vendor/device-tree/dist/Bindings/mmc/fsl-imx-esdhc.txt vendor/device-tree/dist/Bindings/mmc/mmc.txt vendor/device-tree/dist/Bindings/mmc/nvidia,tegra20-sdhci.txt vendor/device-tree/dist/Bindings/mmc/ti-omap.txt vendor/device-tree/dist/Bindings/mtd/cadence-quadspi.txt vendor/device-tree/dist/Bindings/mtd/mtk-quadspi.txt vendor/device-tree/dist/Bindings/net/btusb.txt vendor/device-tree/dist/Bindings/net/cpsw-phy-sel.txt vendor/device-tree/dist/Bindings/net/davinci_emac.txt vendor/device-tree/dist/Bindings/net/dsa/dsa.txt vendor/device-tree/dist/Bindings/net/dsa/ksz.txt vendor/device-tree/dist/Bindings/net/dsa/mt7530.txt vendor/device-tree/dist/Bindings/net/dsa/qca8k.txt vendor/device-tree/dist/Bindings/net/ethernet.txt vendor/device-tree/dist/Bindings/net/macb.txt vendor/device-tree/dist/Bindings/net/marvell-armada-370-neta.txt vendor/device-tree/dist/Bindings/net/mediatek-bluetooth.txt vendor/device-tree/dist/Bindings/net/nixge.txt vendor/device-tree/dist/Bindings/net/stm32-dwmac.txt vendor/device-tree/dist/Bindings/net/wireless/mediatek,mt76.txt vendor/device-tree/dist/Bindings/nvmem/imx-ocotp.txt vendor/device-tree/dist/Bindings/opp/opp.txt vendor/device-tree/dist/Bindings/pci/altera-pcie.txt vendor/device-tree/dist/Bindings/pci/fsl,imx6q-pcie.txt vendor/device-tree/dist/Bindings/pci/layerscape-pci.txt vendor/device-tree/dist/Bindings/pci/rcar-pci.txt vendor/device-tree/dist/Bindings/pci/ti-pci.txt vendor/device-tree/dist/Bindings/phy/phy-mvebu-comphy.txt vendor/device-tree/dist/Bindings/phy/phy-rockchip-inno-usb2.txt vendor/device-tree/dist/Bindings/phy/qcom-qmp-phy.txt vendor/device-tree/dist/Bindings/phy/qcom-qusb2-phy.txt vendor/device-tree/dist/Bindings/phy/rcar-gen3-phy-usb2.txt vendor/device-tree/dist/Bindings/phy/ti-phy.txt vendor/device-tree/dist/Bindings/pinctrl/atmel,at91-pinctrl.txt vendor/device-tree/dist/Bindings/pinctrl/marvell,armada-37xx-pinctrl.txt vendor/device-tree/dist/Bindings/pinctrl/meson,pinctrl.txt vendor/device-tree/dist/Bindings/pinctrl/qcom,pmic-gpio.txt vendor/device-tree/dist/Bindings/power/fsl,imx-gpcv2.txt vendor/device-tree/dist/Bindings/power/supply/battery.txt vendor/device-tree/dist/Bindings/power/supply/sc27xx-fg.txt vendor/device-tree/dist/Bindings/property-units.txt vendor/device-tree/dist/Bindings/ptp/ptp-qoriq.txt vendor/device-tree/dist/Bindings/pwm/atmel-pwm.txt vendor/device-tree/dist/Bindings/pwm/pwm-hibvt.txt vendor/device-tree/dist/Bindings/regulator/fan53555.txt vendor/device-tree/dist/Bindings/regulator/pfuze100.txt vendor/device-tree/dist/Bindings/regulator/rohm,bd71837-regulator.txt vendor/device-tree/dist/Bindings/regulator/st,stpmic1-regulator.txt vendor/device-tree/dist/Bindings/regulator/tps65218.txt vendor/device-tree/dist/Bindings/remoteproc/qcom,adsp-pil.txt vendor/device-tree/dist/Bindings/remoteproc/qcom,adsp.txt vendor/device-tree/dist/Bindings/remoteproc/qcom,q6v5.txt vendor/device-tree/dist/Bindings/reset/fsl,imx7-src.txt vendor/device-tree/dist/Bindings/rtc/abracon,abx80x.txt vendor/device-tree/dist/Bindings/rtc/rtc.txt vendor/device-tree/dist/Bindings/serial/8250.txt vendor/device-tree/dist/Bindings/serial/ingenic,uart.txt vendor/device-tree/dist/Bindings/serial/mtk-uart.txt vendor/device-tree/dist/Bindings/serial/omap_serial.txt vendor/device-tree/dist/Bindings/serial/renesas,sci-serial.txt vendor/device-tree/dist/Bindings/soc/amlogic/clk-measure.txt vendor/device-tree/dist/Bindings/soc/qcom/qcom,smd-rpm.txt vendor/device-tree/dist/Bindings/sound/adi,adau1977.txt vendor/device-tree/dist/Bindings/sound/ak4458.txt vendor/device-tree/dist/Bindings/sound/davinci-mcasp-audio.txt vendor/device-tree/dist/Bindings/sound/nvidia,tegra30-hda.txt vendor/device-tree/dist/Bindings/sound/qcom,msm8916-wcd-analog.txt vendor/device-tree/dist/Bindings/sound/qcom,wcd9335.txt vendor/device-tree/dist/Bindings/sound/sgtl5000.txt vendor/device-tree/dist/Bindings/spi/atmel-quadspi.txt vendor/device-tree/dist/Bindings/spi/fsl-imx-cspi.txt vendor/device-tree/dist/Bindings/spi/spi-sprd.txt vendor/device-tree/dist/Bindings/spi/spi-stm32.txt vendor/device-tree/dist/Bindings/sram/sunxi-sram.txt vendor/device-tree/dist/Bindings/thermal/mediatek-thermal.txt vendor/device-tree/dist/Bindings/timer/fsl,imxgpt.txt vendor/device-tree/dist/Bindings/timer/mediatek,mtk-timer.txt vendor/device-tree/dist/Bindings/timer/renesas,cmt.txt vendor/device-tree/dist/Bindings/timer/renesas,tmu.txt vendor/device-tree/dist/Bindings/trivial-devices.yaml vendor/device-tree/dist/Bindings/ufs/ufs-hisi.txt vendor/device-tree/dist/Bindings/ufs/ufshcd-pltfrm.txt vendor/device-tree/dist/Bindings/usb/ci-hdrc-usb2.txt vendor/device-tree/dist/Bindings/usb/keystone-usb.txt vendor/device-tree/dist/Bindings/usb/qcom,dwc3.txt vendor/device-tree/dist/Bindings/usb/renesas_usb3.txt vendor/device-tree/dist/Bindings/usb/renesas_usbhs.txt vendor/device-tree/dist/Bindings/usb/usb251xb.txt vendor/device-tree/dist/Bindings/vendor-prefixes.txt vendor/device-tree/dist/Bindings/watchdog/renesas-wdt.txt vendor/device-tree/dist/include/dt-bindings/clock/ath79-clk.h vendor/device-tree/dist/include/dt-bindings/clock/axg-aoclkc.h vendor/device-tree/dist/include/dt-bindings/clock/exynos5433.h vendor/device-tree/dist/include/dt-bindings/clock/gxbb-aoclkc.h vendor/device-tree/dist/include/dt-bindings/clock/imx5-clock.h vendor/device-tree/dist/include/dt-bindings/clock/imx8mq-clock.h vendor/device-tree/dist/include/dt-bindings/clock/marvell,mmp2.h vendor/device-tree/dist/include/dt-bindings/clock/meson8b-clkc.h vendor/device-tree/dist/include/dt-bindings/clock/mt2712-clk.h vendor/device-tree/dist/include/dt-bindings/clock/mt8173-clk.h vendor/device-tree/dist/include/dt-bindings/clock/qcom,rpmcc.h vendor/device-tree/dist/include/dt-bindings/clock/qcom,rpmh.h vendor/device-tree/dist/include/dt-bindings/clock/r8a774a1-cpg-mssr.h vendor/device-tree/dist/include/dt-bindings/clock/r8a774c0-cpg-mssr.h vendor/device-tree/dist/include/dt-bindings/clock/r8a7778-clock.h vendor/device-tree/dist/include/dt-bindings/clock/stm32mp1-clks.h vendor/device-tree/dist/include/dt-bindings/gpio/gpio.h vendor/device-tree/dist/include/dt-bindings/input/linux-event-codes.h vendor/device-tree/dist/include/dt-bindings/pinctrl/at91.h vendor/device-tree/dist/include/dt-bindings/power/mt8173-power.h vendor/device-tree/dist/src/arc/abilis_tb100.dtsi vendor/device-tree/dist/src/arc/abilis_tb100_dvk.dts vendor/device-tree/dist/src/arc/abilis_tb101.dtsi vendor/device-tree/dist/src/arc/abilis_tb101_dvk.dts vendor/device-tree/dist/src/arc/abilis_tb10x.dtsi vendor/device-tree/dist/src/arc/axc001.dtsi vendor/device-tree/dist/src/arc/axc003.dtsi vendor/device-tree/dist/src/arc/axc003_idu.dtsi vendor/device-tree/dist/src/arc/axs10x_mb.dtsi vendor/device-tree/dist/src/arc/hsdk.dts vendor/device-tree/dist/src/arc/vdk_axc003.dtsi vendor/device-tree/dist/src/arc/vdk_axc003_idu.dtsi vendor/device-tree/dist/src/arc/vdk_axs10x_mb.dtsi vendor/device-tree/dist/src/arm/alphascale-asm9260.dtsi vendor/device-tree/dist/src/arm/alpine.dtsi vendor/device-tree/dist/src/arm/am335x-baltos-ir2110.dts vendor/device-tree/dist/src/arm/am335x-baltos-ir3220.dts vendor/device-tree/dist/src/arm/am335x-baltos-ir5221.dts vendor/device-tree/dist/src/arm/am335x-chiliboard.dts vendor/device-tree/dist/src/arm/am335x-evm.dts vendor/device-tree/dist/src/arm/am335x-evmsk.dts vendor/device-tree/dist/src/arm/am335x-icev2.dts vendor/device-tree/dist/src/arm/am335x-igep0033.dtsi vendor/device-tree/dist/src/arm/am335x-lxm.dts vendor/device-tree/dist/src/arm/am335x-moxa-uc-2100-common.dtsi vendor/device-tree/dist/src/arm/am335x-moxa-uc-8100-me-t.dts vendor/device-tree/dist/src/arm/am335x-phycore-som.dtsi vendor/device-tree/dist/src/arm/am335x-shc.dts vendor/device-tree/dist/src/arm/am33xx-l4.dtsi vendor/device-tree/dist/src/arm/am437x-gp-evm.dts vendor/device-tree/dist/src/arm/am437x-l4.dtsi vendor/device-tree/dist/src/arm/am43x-epos-evm.dts vendor/device-tree/dist/src/arm/arm-realview-eb.dtsi vendor/device-tree/dist/src/arm/arm-realview-pb1176.dts vendor/device-tree/dist/src/arm/arm-realview-pb11mp.dts vendor/device-tree/dist/src/arm/arm-realview-pbx.dtsi vendor/device-tree/dist/src/arm/armada-370-rd.dts vendor/device-tree/dist/src/arm/armada-388-clearfog.dts vendor/device-tree/dist/src/arm/armada-388-clearfog.dtsi vendor/device-tree/dist/src/arm/armada-38x.dtsi vendor/device-tree/dist/src/arm/armada-39x.dtsi vendor/device-tree/dist/src/arm/armada-xp-linksys-mamba.dts vendor/device-tree/dist/src/arm/artpec6.dtsi vendor/device-tree/dist/src/arm/aspeed-bmc-arm-stardragon4800-rep2.dts vendor/device-tree/dist/src/arm/aspeed-bmc-facebook-tiogapass.dts vendor/device-tree/dist/src/arm/aspeed-bmc-opp-palmetto.dts vendor/device-tree/dist/src/arm/aspeed-bmc-quanta-q71l.dts vendor/device-tree/dist/src/arm/aspeed-g4.dtsi vendor/device-tree/dist/src/arm/aspeed-g5.dtsi vendor/device-tree/dist/src/arm/at91-nattis-2-natte-2.dts vendor/device-tree/dist/src/arm/at91-sama5d27_som1.dtsi vendor/device-tree/dist/src/arm/at91-sama5d27_som1_ek.dts vendor/device-tree/dist/src/arm/at91-wb45n.dts vendor/device-tree/dist/src/arm/at91-wb50n.dts vendor/device-tree/dist/src/arm/at91rm9200.dtsi vendor/device-tree/dist/src/arm/at91sam9260.dtsi vendor/device-tree/dist/src/arm/at91sam9261.dtsi vendor/device-tree/dist/src/arm/at91sam9263.dtsi vendor/device-tree/dist/src/arm/at91sam9g45.dtsi vendor/device-tree/dist/src/arm/at91sam9n12.dtsi vendor/device-tree/dist/src/arm/at91sam9rl.dtsi vendor/device-tree/dist/src/arm/at91sam9x5.dtsi vendor/device-tree/dist/src/arm/atlas6-evb.dts vendor/device-tree/dist/src/arm/atlas6.dtsi vendor/device-tree/dist/src/arm/atlas7.dtsi vendor/device-tree/dist/src/arm/axm55xx.dtsi vendor/device-tree/dist/src/arm/bcm-cygnus.dtsi vendor/device-tree/dist/src/arm/bcm-nsp.dtsi vendor/device-tree/dist/src/arm/bcm11351.dtsi vendor/device-tree/dist/src/arm/bcm21664-garnet.dts vendor/device-tree/dist/src/arm/bcm21664.dtsi vendor/device-tree/dist/src/arm/bcm23550-sparrow.dts vendor/device-tree/dist/src/arm/bcm23550.dtsi vendor/device-tree/dist/src/arm/bcm28155-ap.dts vendor/device-tree/dist/src/arm/bcm2835-rpi-a-plus.dts vendor/device-tree/dist/src/arm/bcm2835-rpi-b-plus.dts vendor/device-tree/dist/src/arm/bcm2835-rpi-b-rev2.dts vendor/device-tree/dist/src/arm/bcm2835-rpi-zero-w.dts vendor/device-tree/dist/src/arm/bcm2835-rpi-zero.dts vendor/device-tree/dist/src/arm/bcm2835-rpi.dtsi vendor/device-tree/dist/src/arm/bcm2836-rpi-2-b.dts vendor/device-tree/dist/src/arm/bcm2837-rpi-3-b-plus.dts vendor/device-tree/dist/src/arm/bcm2837-rpi-3-b.dts vendor/device-tree/dist/src/arm/bcm2837-rpi-cm3.dtsi vendor/device-tree/dist/src/arm/bcm283x.dtsi vendor/device-tree/dist/src/arm/bcm47081-asus-rt-n18u.dts vendor/device-tree/dist/src/arm/bcm47081-buffalo-wzr-600dhp2.dts vendor/device-tree/dist/src/arm/bcm47081-buffalo-wzr-900dhp.dts vendor/device-tree/dist/src/arm/bcm47081-luxul-xap-1410.dts vendor/device-tree/dist/src/arm/bcm47081-luxul-xwr-1200.dts vendor/device-tree/dist/src/arm/bcm47081-tplink-archer-c5-v2.dts vendor/device-tree/dist/src/arm/bcm47094-dlink-dir-885l.dts vendor/device-tree/dist/src/arm/bcm47094-linksys-panamera.dts vendor/device-tree/dist/src/arm/bcm47094-luxul-abr-4500.dts vendor/device-tree/dist/src/arm/bcm47094-luxul-xap-1610.dts vendor/device-tree/dist/src/arm/bcm47094-luxul-xbr-4500.dts vendor/device-tree/dist/src/arm/bcm47094-luxul-xwr-3100.dts vendor/device-tree/dist/src/arm/bcm47094-luxul-xwr-3150-v1.dts vendor/device-tree/dist/src/arm/bcm47094-netgear-r8500.dts vendor/device-tree/dist/src/arm/bcm47189-luxul-xap-1440.dts vendor/device-tree/dist/src/arm/bcm47189-luxul-xap-810.dts vendor/device-tree/dist/src/arm/bcm47189-tenda-ac9.dts vendor/device-tree/dist/src/arm/bcm5301x.dtsi vendor/device-tree/dist/src/arm/bcm53340-ubnt-unifi-switch8.dts vendor/device-tree/dist/src/arm/bcm53573.dtsi vendor/device-tree/dist/src/arm/bcm63138.dtsi vendor/device-tree/dist/src/arm/bcm7445.dtsi vendor/device-tree/dist/src/arm/bcm947189acdbmr.dts vendor/device-tree/dist/src/arm/bcm953012er.dts vendor/device-tree/dist/src/arm/bcm953012hr.dts vendor/device-tree/dist/src/arm/bcm953012k.dts vendor/device-tree/dist/src/arm/cx92755.dtsi vendor/device-tree/dist/src/arm/da850-lcdk.dts vendor/device-tree/dist/src/arm/dm814x.dtsi vendor/device-tree/dist/src/arm/dove.dtsi vendor/device-tree/dist/src/arm/dra7-l4.dtsi vendor/device-tree/dist/src/arm/ep7209.dtsi vendor/device-tree/dist/src/arm/ep7211-edb7211.dts vendor/device-tree/dist/src/arm/exynos3250.dtsi vendor/device-tree/dist/src/arm/exynos4412-odroid-common.dtsi vendor/device-tree/dist/src/arm/exynos4412-odroidx.dts vendor/device-tree/dist/src/arm/exynos5250-arndale.dts vendor/device-tree/dist/src/arm/exynos5422-odroid-core.dtsi vendor/device-tree/dist/src/arm/exynos5422-odroidxu3-audio.dtsi vendor/device-tree/dist/src/arm/exynos5422-odroidxu3-common.dtsi vendor/device-tree/dist/src/arm/exynos5422-odroidxu3-lite.dts vendor/device-tree/dist/src/arm/exynos5422-odroidxu4.dts vendor/device-tree/dist/src/arm/imx27.dtsi vendor/device-tree/dist/src/arm/imx28-cfa10036.dts vendor/device-tree/dist/src/arm/imx51-digi-connectcore-jsk.dts vendor/device-tree/dist/src/arm/imx51-digi-connectcore-som.dtsi vendor/device-tree/dist/src/arm/imx6dl-colibri-eval-v3.dts vendor/device-tree/dist/src/arm/imx6q-tbs2910.dts vendor/device-tree/dist/src/arm/imx6qdl-apalis.dtsi vendor/device-tree/dist/src/arm/imx6qdl-colibri.dtsi vendor/device-tree/dist/src/arm/imx6qdl-icore-rqs.dtsi vendor/device-tree/dist/src/arm/imx6qdl-phytec-pfla02.dtsi vendor/device-tree/dist/src/arm/imx6qdl-sabresd.dtsi vendor/device-tree/dist/src/arm/imx6sl.dtsi vendor/device-tree/dist/src/arm/imx6sx.dtsi vendor/device-tree/dist/src/arm/imx6ull-colibri.dtsi vendor/device-tree/dist/src/arm/imx6ull-pinfunc-snvs.h vendor/device-tree/dist/src/arm/imx6ull.dtsi vendor/device-tree/dist/src/arm/imx7d.dtsi vendor/device-tree/dist/src/arm/imx7ulp.dtsi vendor/device-tree/dist/src/arm/integrator.dtsi vendor/device-tree/dist/src/arm/integratorcp.dts vendor/device-tree/dist/src/arm/kirkwood-dir665.dts vendor/device-tree/dist/src/arm/kirkwood-linksys-viper.dts vendor/device-tree/dist/src/arm/kirkwood-mv88f6281gtw-ge.dts vendor/device-tree/dist/src/arm/kirkwood-rd88f6281-z0.dts vendor/device-tree/dist/src/arm/kirkwood-rd88f6281.dtsi vendor/device-tree/dist/src/arm/kirkwood.dtsi vendor/device-tree/dist/src/arm/lpc3250-ea3250.dts vendor/device-tree/dist/src/arm/lpc3250-phy3250.dts vendor/device-tree/dist/src/arm/lpc32xx.dtsi vendor/device-tree/dist/src/arm/lpc4350-hitex-eval.dts vendor/device-tree/dist/src/arm/lpc4357-ea4357-devkit.dts vendor/device-tree/dist/src/arm/ls1021a-moxa-uc-8410a.dts vendor/device-tree/dist/src/arm/ls1021a-qds.dts vendor/device-tree/dist/src/arm/ls1021a-twr.dts vendor/device-tree/dist/src/arm/ls1021a.dtsi vendor/device-tree/dist/src/arm/meson.dtsi vendor/device-tree/dist/src/arm/meson6-atv1200.dts vendor/device-tree/dist/src/arm/meson6.dtsi vendor/device-tree/dist/src/arm/meson8-minix-neo-x8.dts vendor/device-tree/dist/src/arm/meson8.dtsi vendor/device-tree/dist/src/arm/meson8b-ec100.dts vendor/device-tree/dist/src/arm/meson8b-mxq.dts vendor/device-tree/dist/src/arm/meson8b-odroidc1.dts vendor/device-tree/dist/src/arm/meson8b.dtsi vendor/device-tree/dist/src/arm/meson8m2-mxiii-plus.dts vendor/device-tree/dist/src/arm/meson8m2.dtsi vendor/device-tree/dist/src/arm/mmp2-brownstone.dts vendor/device-tree/dist/src/arm/mmp2.dtsi vendor/device-tree/dist/src/arm/moxart.dtsi vendor/device-tree/dist/src/arm/mps2.dtsi vendor/device-tree/dist/src/arm/mt2701-evb.dts vendor/device-tree/dist/src/arm/mt2701.dtsi vendor/device-tree/dist/src/arm/mt6580-evbp1.dts vendor/device-tree/dist/src/arm/mt6580.dtsi vendor/device-tree/dist/src/arm/mt6589-aquaris5.dts vendor/device-tree/dist/src/arm/mt6589.dtsi vendor/device-tree/dist/src/arm/mt6592-evb.dts vendor/device-tree/dist/src/arm/mt6592.dtsi vendor/device-tree/dist/src/arm/mt7623.dtsi vendor/device-tree/dist/src/arm/mt8127-moose.dts vendor/device-tree/dist/src/arm/mt8127.dtsi vendor/device-tree/dist/src/arm/mt8135-evbp1.dts vendor/device-tree/dist/src/arm/mt8135.dtsi vendor/device-tree/dist/src/arm/nspire.dtsi vendor/device-tree/dist/src/arm/omap3-evm-common.dtsi vendor/device-tree/dist/src/arm/omap3-evm-processor-common.dtsi vendor/device-tree/dist/src/arm/omap3-gta04.dtsi vendor/device-tree/dist/src/arm/omap3-gta04a5.dts vendor/device-tree/dist/src/arm/omap4-droid4-xt894.dts vendor/device-tree/dist/src/arm/omap4-panda-common.dtsi vendor/device-tree/dist/src/arm/omap4-sdp.dts vendor/device-tree/dist/src/arm/orion5x-lacie-d2-network.dts vendor/device-tree/dist/src/arm/orion5x-lacie-ethernet-disk-mini-v2.dts vendor/device-tree/dist/src/arm/orion5x-lswsgl.dts vendor/device-tree/dist/src/arm/orion5x-maxtor-shared-storage-2.dts vendor/device-tree/dist/src/arm/orion5x-netgear-wnr854t.dts vendor/device-tree/dist/src/arm/orion5x-rd88f5182-nas.dts vendor/device-tree/dist/src/arm/orion5x.dtsi vendor/device-tree/dist/src/arm/ox810se.dtsi vendor/device-tree/dist/src/arm/ox820.dtsi vendor/device-tree/dist/src/arm/picoxcell-pc3x2.dtsi vendor/device-tree/dist/src/arm/picoxcell-pc3x3.dtsi vendor/device-tree/dist/src/arm/prima2-evb.dts vendor/device-tree/dist/src/arm/prima2.dtsi vendor/device-tree/dist/src/arm/pxa168.dtsi vendor/device-tree/dist/src/arm/pxa2xx.dtsi vendor/device-tree/dist/src/arm/pxa910.dtsi vendor/device-tree/dist/src/arm/qcom-apq8060-dragonboard.dts vendor/device-tree/dist/src/arm/qcom-apq8064.dtsi vendor/device-tree/dist/src/arm/qcom-apq8084.dtsi vendor/device-tree/dist/src/arm/qcom-ipq4019.dtsi vendor/device-tree/dist/src/arm/qcom-ipq8064.dtsi vendor/device-tree/dist/src/arm/qcom-mdm9615-wp8548.dtsi vendor/device-tree/dist/src/arm/qcom-mdm9615.dtsi vendor/device-tree/dist/src/arm/qcom-msm8660.dtsi vendor/device-tree/dist/src/arm/qcom-msm8960.dtsi vendor/device-tree/dist/src/arm/qcom-msm8974-lge-nexus5-hammerhead.dts vendor/device-tree/dist/src/arm/qcom-msm8974.dtsi vendor/device-tree/dist/src/arm/qcom-pm8941.dtsi vendor/device-tree/dist/src/arm/qcom-pma8084.dtsi vendor/device-tree/dist/src/arm/r8a7743.dtsi vendor/device-tree/dist/src/arm/r8a7744.dtsi vendor/device-tree/dist/src/arm/r8a77470-iwg23s-sbc.dts vendor/device-tree/dist/src/arm/r8a7778.dtsi vendor/device-tree/dist/src/arm/r8a7779.dtsi vendor/device-tree/dist/src/arm/r8a7790-stout.dts vendor/device-tree/dist/src/arm/rk3036-kylin.dts vendor/device-tree/dist/src/arm/rk3036.dtsi vendor/device-tree/dist/src/arm/rk3066a-bqcurie2.dts vendor/device-tree/dist/src/arm/rk3066a-mk808.dts vendor/device-tree/dist/src/arm/rk3066a-rayeager.dts vendor/device-tree/dist/src/arm/rk3066a.dtsi vendor/device-tree/dist/src/arm/rk3188-bqedison2qc.dts vendor/device-tree/dist/src/arm/rk3188-px3-evb.dts vendor/device-tree/dist/src/arm/rk3229-evb.dts vendor/device-tree/dist/src/arm/rk3288-fennec.dts vendor/device-tree/dist/src/arm/rk3288-firefly-reload.dts vendor/device-tree/dist/src/arm/rk3288-miqi.dts vendor/device-tree/dist/src/arm/rk3288-popmetal.dts vendor/device-tree/dist/src/arm/rk3288-rock2-square.dts vendor/device-tree/dist/src/arm/rk3288-tinker-s.dts vendor/device-tree/dist/src/arm/rk3288-tinker.dtsi vendor/device-tree/dist/src/arm/rk3288-veyron.dtsi vendor/device-tree/dist/src/arm/rk3288-vyasa.dts vendor/device-tree/dist/src/arm/rk3288.dtsi vendor/device-tree/dist/src/arm/rv1108-evb.dts vendor/device-tree/dist/src/arm/rv1108.dtsi vendor/device-tree/dist/src/arm/s3c2416-smdk2416.dts vendor/device-tree/dist/src/arm/s5pv210-aries.dtsi vendor/device-tree/dist/src/arm/s5pv210-fascinate4g.dts vendor/device-tree/dist/src/arm/s5pv210-galaxys.dts vendor/device-tree/dist/src/arm/s5pv210.dtsi vendor/device-tree/dist/src/arm/sama5d2-pinfunc.h vendor/device-tree/dist/src/arm/sama5d2.dtsi vendor/device-tree/dist/src/arm/sama5d3.dtsi vendor/device-tree/dist/src/arm/sama5d4.dtsi vendor/device-tree/dist/src/arm/socfpga.dtsi vendor/device-tree/dist/src/arm/socfpga_arria10.dtsi vendor/device-tree/dist/src/arm/spear13xx.dtsi vendor/device-tree/dist/src/arm/spear3xx.dtsi vendor/device-tree/dist/src/arm/spear600.dtsi vendor/device-tree/dist/src/arm/ste-nomadik-nhk15.dts vendor/device-tree/dist/src/arm/ste-nomadik-stn8815.dtsi vendor/device-tree/dist/src/arm/ste-u300.dts vendor/device-tree/dist/src/arm/stm32429i-eval.dts vendor/device-tree/dist/src/arm/stm32746g-eval.dts vendor/device-tree/dist/src/arm/stm32f429-disco.dts vendor/device-tree/dist/src/arm/stm32f429.dtsi vendor/device-tree/dist/src/arm/stm32f469-disco.dts vendor/device-tree/dist/src/arm/stm32f746-disco.dts vendor/device-tree/dist/src/arm/stm32f746.dtsi vendor/device-tree/dist/src/arm/stm32f769-disco.dts vendor/device-tree/dist/src/arm/stm32h743-pinctrl.dtsi vendor/device-tree/dist/src/arm/stm32h743.dtsi vendor/device-tree/dist/src/arm/stm32h743i-disco.dts vendor/device-tree/dist/src/arm/stm32h743i-eval.dts vendor/device-tree/dist/src/arm/stm32mp157-pinctrl.dtsi vendor/device-tree/dist/src/arm/stm32mp157c-ed1.dts vendor/device-tree/dist/src/arm/stm32mp157c-ev1.dts vendor/device-tree/dist/src/arm/stm32mp157c.dtsi vendor/device-tree/dist/src/arm/sun4i-a10.dtsi vendor/device-tree/dist/src/arm/sun5i-a13-q8-tablet.dts vendor/device-tree/dist/src/arm/sun5i-reference-design-tablet.dtsi vendor/device-tree/dist/src/arm/sun7i-a20-bananapi.dts vendor/device-tree/dist/src/arm/sun8i-a23-a33.dtsi vendor/device-tree/dist/src/arm/sun8i-a23-ippo-q8h-v1.2.dts vendor/device-tree/dist/src/arm/sun8i-a23-ippo-q8h-v5.dts vendor/device-tree/dist/src/arm/sun8i-a23-q8-tablet.dts vendor/device-tree/dist/src/arm/sun8i-a23.dtsi vendor/device-tree/dist/src/arm/sun8i-a33.dtsi vendor/device-tree/dist/src/arm/sun8i-a83t-allwinner-h8homlet-v2.dts vendor/device-tree/dist/src/arm/sun8i-a83t-bananapi-m3.dts vendor/device-tree/dist/src/arm/sun8i-a83t-cubietruck-plus.dts vendor/device-tree/dist/src/arm/sun8i-h3-nanopi-m1-plus.dts vendor/device-tree/dist/src/arm/sun8i-q8-common.dtsi vendor/device-tree/dist/src/arm/sun8i-r40-bananapi-m2-ultra.dts vendor/device-tree/dist/src/arm/sun8i-r40.dtsi vendor/device-tree/dist/src/arm/sun9i-a80-cubieboard4.dts vendor/device-tree/dist/src/arm/sun9i-a80-optimus.dts vendor/device-tree/dist/src/arm/sun9i-a80.dtsi vendor/device-tree/dist/src/arm/sunxi-bananapi-m2-plus.dtsi vendor/device-tree/dist/src/arm/sunxi-h3-h5.dtsi vendor/device-tree/dist/src/arm/tegra114-dalmore.dts vendor/device-tree/dist/src/arm/tegra124-jetson-tk1.dts vendor/device-tree/dist/src/arm/tegra124-nyan.dtsi vendor/device-tree/dist/src/arm/tegra124-venice2.dts vendor/device-tree/dist/src/arm/tegra20-trimslice.dts vendor/device-tree/dist/src/arm/tegra20.dtsi vendor/device-tree/dist/src/arm/tegra30-beaver.dts vendor/device-tree/dist/src/arm/tegra30-cardhu.dtsi vendor/device-tree/dist/src/arm/versatile-ab.dts vendor/device-tree/dist/src/arm/vexpress-v2m-rs1.dtsi vendor/device-tree/dist/src/arm/vexpress-v2m.dtsi vendor/device-tree/dist/src/arm/vexpress-v2p-ca15_a7.dts vendor/device-tree/dist/src/arm/vf610-bk4.dts vendor/device-tree/dist/src/arm/vf610-zii-cfu1.dts vendor/device-tree/dist/src/arm/vf610-zii-ssmb-spu3.dts vendor/device-tree/dist/src/arm/vt8500.dtsi vendor/device-tree/dist/src/arm/wm8505.dtsi vendor/device-tree/dist/src/arm/wm8650.dtsi vendor/device-tree/dist/src/arm/wm8750.dtsi vendor/device-tree/dist/src/arm/wm8850.dtsi vendor/device-tree/dist/src/arm/zx296702-ad1.dts vendor/device-tree/dist/src/arm/zx296702.dtsi vendor/device-tree/dist/src/arm/zynq-zturn.dts vendor/device-tree/dist/src/arm64/actions/s700-cubieboard7.dts vendor/device-tree/dist/src/arm64/actions/s700.dtsi vendor/device-tree/dist/src/arm64/actions/s900.dtsi vendor/device-tree/dist/src/arm64/al/alpine-v2.dtsi vendor/device-tree/dist/src/arm64/allwinner/sun50i-a64-bananapi-m64.dts vendor/device-tree/dist/src/arm64/allwinner/sun50i-a64-nanopi-a64.dts vendor/device-tree/dist/src/arm64/allwinner/sun50i-a64-olinuxino.dts vendor/device-tree/dist/src/arm64/allwinner/sun50i-a64-orangepi-win.dts vendor/device-tree/dist/src/arm64/allwinner/sun50i-a64-pine64.dts vendor/device-tree/dist/src/arm64/allwinner/sun50i-a64-teres-i.dts vendor/device-tree/dist/src/arm64/allwinner/sun50i-a64.dtsi vendor/device-tree/dist/src/arm64/allwinner/sun50i-h5-libretech-all-h3-cc.dts vendor/device-tree/dist/src/arm64/allwinner/sun50i-h5.dtsi vendor/device-tree/dist/src/arm64/allwinner/sun50i-h6.dtsi vendor/device-tree/dist/src/arm64/altera/socfpga_stratix10.dtsi vendor/device-tree/dist/src/arm64/amlogic/meson-axg-s400.dts vendor/device-tree/dist/src/arm64/amlogic/meson-axg.dtsi vendor/device-tree/dist/src/arm64/amlogic/meson-g12a.dtsi vendor/device-tree/dist/src/arm64/amlogic/meson-gx.dtsi vendor/device-tree/dist/src/arm64/amlogic/meson-gxbb.dtsi vendor/device-tree/dist/src/arm64/amlogic/meson-gxl.dtsi vendor/device-tree/dist/src/arm64/amlogic/meson-gxm.dtsi vendor/device-tree/dist/src/arm64/apm/apm-shadowcat.dtsi vendor/device-tree/dist/src/arm64/apm/apm-storm.dtsi vendor/device-tree/dist/src/arm64/arm/foundation-v8-gicv2.dtsi vendor/device-tree/dist/src/arm64/arm/foundation-v8-gicv3.dtsi vendor/device-tree/dist/src/arm64/arm/foundation-v8.dtsi vendor/device-tree/dist/src/arm64/arm/juno-base.dtsi vendor/device-tree/dist/src/arm64/arm/juno-r1.dts vendor/device-tree/dist/src/arm64/arm/juno-r2.dts vendor/device-tree/dist/src/arm64/arm/juno.dts vendor/device-tree/dist/src/arm64/arm/rtsm_ve-aemv8a.dts vendor/device-tree/dist/src/arm64/arm/rtsm_ve-motherboard.dtsi vendor/device-tree/dist/src/arm64/arm/vexpress-v2f-1xv7-ca53x2.dts vendor/device-tree/dist/src/arm64/arm/vexpress-v2m-rs1.dtsi vendor/device-tree/dist/src/arm64/broadcom/northstar2/ns2.dtsi vendor/device-tree/dist/src/arm64/broadcom/stingray/stingray.dtsi vendor/device-tree/dist/src/arm64/cavium/thunder-88xx.dtsi vendor/device-tree/dist/src/arm64/cavium/thunder2-99xx.dtsi vendor/device-tree/dist/src/arm64/exynos/exynos5433.dtsi vendor/device-tree/dist/src/arm64/exynos/exynos7.dtsi vendor/device-tree/dist/src/arm64/freescale/fsl-ls1012a.dtsi vendor/device-tree/dist/src/arm64/freescale/fsl-ls1028a-rdb.dts vendor/device-tree/dist/src/arm64/freescale/fsl-ls1028a.dtsi vendor/device-tree/dist/src/arm64/freescale/fsl-ls1043a-qds.dts vendor/device-tree/dist/src/arm64/freescale/fsl-ls1043a.dtsi vendor/device-tree/dist/src/arm64/freescale/fsl-ls1046a-qds.dts vendor/device-tree/dist/src/arm64/freescale/fsl-ls1046a-rdb.dts vendor/device-tree/dist/src/arm64/freescale/fsl-ls1046a.dtsi vendor/device-tree/dist/src/arm64/freescale/fsl-ls1088a.dtsi vendor/device-tree/dist/src/arm64/freescale/fsl-ls208xa.dtsi vendor/device-tree/dist/src/arm64/freescale/fsl-lx2160a-rdb.dts vendor/device-tree/dist/src/arm64/freescale/fsl-lx2160a.dtsi vendor/device-tree/dist/src/arm64/freescale/imx8mq-evk.dts vendor/device-tree/dist/src/arm64/freescale/imx8mq.dtsi vendor/device-tree/dist/src/arm64/hisilicon/hi3660-hikey960.dts vendor/device-tree/dist/src/arm64/hisilicon/hi3660.dtsi vendor/device-tree/dist/src/arm64/hisilicon/hi3670.dtsi vendor/device-tree/dist/src/arm64/hisilicon/hi3798cv200-poplar.dts vendor/device-tree/dist/src/arm64/hisilicon/hi3798cv200.dtsi vendor/device-tree/dist/src/arm64/hisilicon/hi6220-hikey.dts vendor/device-tree/dist/src/arm64/hisilicon/hi6220.dtsi vendor/device-tree/dist/src/arm64/hisilicon/hip05.dtsi vendor/device-tree/dist/src/arm64/hisilicon/hip06.dtsi vendor/device-tree/dist/src/arm64/hisilicon/hip07.dtsi vendor/device-tree/dist/src/arm64/lg/lg1312.dtsi vendor/device-tree/dist/src/arm64/lg/lg1313.dtsi vendor/device-tree/dist/src/arm64/marvell/armada-3720-espressobin.dts vendor/device-tree/dist/src/arm64/marvell/armada-372x.dtsi vendor/device-tree/dist/src/arm64/marvell/armada-37xx.dtsi vendor/device-tree/dist/src/arm64/marvell/armada-7040-db.dts vendor/device-tree/dist/src/arm64/marvell/armada-8040-db.dts vendor/device-tree/dist/src/arm64/marvell/armada-ap806-dual.dtsi vendor/device-tree/dist/src/arm64/marvell/armada-ap806-quad.dtsi vendor/device-tree/dist/src/arm64/marvell/armada-ap806.dtsi vendor/device-tree/dist/src/arm64/marvell/armada-ap810-ap0-octa-core.dtsi vendor/device-tree/dist/src/arm64/marvell/armada-cp110.dtsi vendor/device-tree/dist/src/arm64/mediatek/mt2712-evb.dts vendor/device-tree/dist/src/arm64/mediatek/mt2712e.dtsi vendor/device-tree/dist/src/arm64/mediatek/mt6797-evb.dts vendor/device-tree/dist/src/arm64/mediatek/mt6797-x20-dev.dts vendor/device-tree/dist/src/arm64/mediatek/mt6797.dtsi vendor/device-tree/dist/src/arm64/mediatek/mt7622.dtsi vendor/device-tree/dist/src/arm64/mediatek/mt8173.dtsi vendor/device-tree/dist/src/arm64/nvidia/tegra132.dtsi vendor/device-tree/dist/src/arm64/nvidia/tegra186-p2771-0000.dts vendor/device-tree/dist/src/arm64/nvidia/tegra186-p3310.dtsi vendor/device-tree/dist/src/arm64/nvidia/tegra186.dtsi vendor/device-tree/dist/src/arm64/nvidia/tegra194-p2888.dtsi vendor/device-tree/dist/src/arm64/nvidia/tegra194-p2972-0000.dts vendor/device-tree/dist/src/arm64/nvidia/tegra194.dtsi vendor/device-tree/dist/src/arm64/nvidia/tegra210-p2371-2180.dts vendor/device-tree/dist/src/arm64/nvidia/tegra210-p2597.dtsi vendor/device-tree/dist/src/arm64/nvidia/tegra210-smaug.dts vendor/device-tree/dist/src/arm64/nvidia/tegra210.dtsi vendor/device-tree/dist/src/arm64/qcom/apq8016-sbc.dtsi vendor/device-tree/dist/src/arm64/qcom/ipq8074.dtsi vendor/device-tree/dist/src/arm64/qcom/msm8916.dtsi vendor/device-tree/dist/src/arm64/qcom/msm8992.dtsi vendor/device-tree/dist/src/arm64/qcom/msm8994.dtsi vendor/device-tree/dist/src/arm64/qcom/msm8996-pins.dtsi vendor/device-tree/dist/src/arm64/qcom/msm8996.dtsi vendor/device-tree/dist/src/arm64/qcom/msm8998-mtp.dtsi vendor/device-tree/dist/src/arm64/qcom/msm8998.dtsi vendor/device-tree/dist/src/arm64/qcom/pm8005.dtsi vendor/device-tree/dist/src/arm64/qcom/pm8916.dtsi vendor/device-tree/dist/src/arm64/qcom/pm8998.dtsi vendor/device-tree/dist/src/arm64/qcom/pmi8994.dtsi vendor/device-tree/dist/src/arm64/qcom/pmi8998.dtsi vendor/device-tree/dist/src/arm64/qcom/pms405.dtsi vendor/device-tree/dist/src/arm64/qcom/qcs404-evb.dtsi vendor/device-tree/dist/src/arm64/qcom/qcs404.dtsi vendor/device-tree/dist/src/arm64/qcom/sdm845-mtp.dts vendor/device-tree/dist/src/arm64/qcom/sdm845.dtsi vendor/device-tree/dist/src/arm64/realtek/rtd1295.dtsi vendor/device-tree/dist/src/arm64/renesas/r8a774a1.dtsi vendor/device-tree/dist/src/arm64/renesas/r8a7795.dtsi vendor/device-tree/dist/src/arm64/renesas/r8a7796-salvator-xs.dts vendor/device-tree/dist/src/arm64/renesas/r8a7796.dtsi vendor/device-tree/dist/src/arm64/renesas/r8a77965.dtsi vendor/device-tree/dist/src/arm64/renesas/r8a77970-v3msk.dts vendor/device-tree/dist/src/arm64/renesas/r8a77970.dtsi vendor/device-tree/dist/src/arm64/renesas/r8a77980.dtsi vendor/device-tree/dist/src/arm64/renesas/r8a77990-ebisu.dts vendor/device-tree/dist/src/arm64/renesas/r8a77990.dtsi vendor/device-tree/dist/src/arm64/renesas/r8a77995-draak.dts vendor/device-tree/dist/src/arm64/renesas/r8a77995.dtsi vendor/device-tree/dist/src/arm64/renesas/salvator-common.dtsi vendor/device-tree/dist/src/arm64/renesas/ulcb-kf.dtsi vendor/device-tree/dist/src/arm64/renesas/ulcb.dtsi vendor/device-tree/dist/src/arm64/rockchip/px30.dtsi vendor/device-tree/dist/src/arm64/rockchip/rk3328-roc-cc.dts vendor/device-tree/dist/src/arm64/rockchip/rk3328-rock64.dts vendor/device-tree/dist/src/arm64/rockchip/rk3328.dtsi vendor/device-tree/dist/src/arm64/rockchip/rk3368-evb.dtsi vendor/device-tree/dist/src/arm64/rockchip/rk3368-geekbox.dts vendor/device-tree/dist/src/arm64/rockchip/rk3368-lion.dtsi vendor/device-tree/dist/src/arm64/rockchip/rk3368-orion-r68-meta.dts vendor/device-tree/dist/src/arm64/rockchip/rk3368-px5-evb.dts vendor/device-tree/dist/src/arm64/rockchip/rk3368-r88.dts vendor/device-tree/dist/src/arm64/rockchip/rk3368.dtsi vendor/device-tree/dist/src/arm64/rockchip/rk3399-gru-chromebook.dtsi vendor/device-tree/dist/src/arm64/rockchip/rk3399-gru-scarlet.dtsi vendor/device-tree/dist/src/arm64/rockchip/rk3399-gru.dtsi vendor/device-tree/dist/src/arm64/rockchip/rk3399-rock960.dtsi vendor/device-tree/dist/src/arm64/rockchip/rk3399-rockpro64.dts vendor/device-tree/dist/src/arm64/rockchip/rk3399-sapphire-excavator.dts vendor/device-tree/dist/src/arm64/rockchip/rk3399.dtsi vendor/device-tree/dist/src/arm64/socionext/uniphier-ld11.dtsi vendor/device-tree/dist/src/arm64/socionext/uniphier-ld20-global.dts vendor/device-tree/dist/src/arm64/socionext/uniphier-ld20.dtsi vendor/device-tree/dist/src/arm64/socionext/uniphier-pxs3-ref.dts vendor/device-tree/dist/src/arm64/socionext/uniphier-pxs3.dtsi vendor/device-tree/dist/src/arm64/sprd/sc2731.dtsi vendor/device-tree/dist/src/arm64/sprd/sc9836.dtsi vendor/device-tree/dist/src/arm64/sprd/sc9860.dtsi vendor/device-tree/dist/src/arm64/sprd/sp9860g-1h10.dts vendor/device-tree/dist/src/arm64/synaptics/as370.dtsi vendor/device-tree/dist/src/arm64/synaptics/berlin4ct.dtsi vendor/device-tree/dist/src/arm64/ti/k3-am65-main.dtsi vendor/device-tree/dist/src/arm64/ti/k3-am65-mcu.dtsi vendor/device-tree/dist/src/arm64/ti/k3-am654-base-board.dts vendor/device-tree/dist/src/arm64/ti/k3-am654.dtsi vendor/device-tree/dist/src/arm64/xilinx/zynqmp-zcu100-revC.dts vendor/device-tree/dist/src/arm64/xilinx/zynqmp.dtsi vendor/device-tree/dist/src/arm64/zte/zx296718.dtsi vendor/device-tree/dist/src/mips/cavium-octeon/octeon_3xxx.dts vendor/device-tree/dist/src/mips/cavium-octeon/ubnt_e100.dts vendor/device-tree/dist/src/powerpc/akebono.dts vendor/device-tree/dist/src/powerpc/bluestone.dts vendor/device-tree/dist/src/powerpc/currituck.dts vendor/device-tree/dist/src/powerpc/iss4xx-mpic.dts vendor/device-tree/dist/src/powerpc/wii.dts Modified: vendor/device-tree/dist/Bindings/Makefile ============================================================================== --- vendor/device-tree/dist/Bindings/Makefile Wed May 8 18:56:24 2019 (r347362) +++ vendor/device-tree/dist/Bindings/Makefile Wed May 8 19:00:46 2019 (r347363) @@ -15,7 +15,7 @@ DT_TMP_SCHEMA := processed-schema.yaml extra-y += $(DT_TMP_SCHEMA) quiet_cmd_mk_schema = SCHEMA $@ - cmd_mk_schema = $(DT_MK_SCHEMA) $(DT_MK_SCHEMA_FLAGS) -o $@ $(filter-out FORCE, $^) + cmd_mk_schema = $(DT_MK_SCHEMA) $(DT_MK_SCHEMA_FLAGS) -o $@ $(real-prereqs) DT_DOCS = $(shell \ cd $(srctree)/$(src) && \ Modified: vendor/device-tree/dist/Bindings/arm/amlogic.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/amlogic.txt Wed May 8 18:56:24 2019 (r347362) +++ vendor/device-tree/dist/Bindings/arm/amlogic.txt Wed May 8 19:00:46 2019 (r347363) @@ -109,6 +109,7 @@ Board compatible values (alphabetically, grouped by So - "amlogic,s400" (Meson axg a113d) - "amlogic,u200" (Meson g12a s905d2) + - "amediatech,x96-max" (Meson g12a s905x2) Amlogic Meson Firmware registers Interface ------------------------------------------ Modified: vendor/device-tree/dist/Bindings/arm/atmel-sysregs.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/atmel-sysregs.txt Wed May 8 18:56:24 2019 (r347362) +++ vendor/device-tree/dist/Bindings/arm/atmel-sysregs.txt Wed May 8 19:00:46 2019 (r347363) @@ -21,7 +21,8 @@ Its subnodes can be: RSTC Reset Controller required properties: - compatible: Should be "atmel,-rstc". - can be "at91sam9260" or "at91sam9g45" or "sama5d3" + can be "at91sam9260", "at91sam9g45", "sama5d3" or "samx7" + it also can be "microchip,sam9x60-rstc" - reg: Should contain registers location and length - clocks: phandle to input clock. @@ -147,6 +148,7 @@ required properties: - compatible: Should be "atmel,-sfr", "syscon" or "atmel,-sfrbu", "syscon" can be "sama5d3", "sama5d4" or "sama5d2". + It also can be "microchip,sam9x60-sfr", "syscon". - reg: Should contain registers location and length sfr@f0038000 { Modified: vendor/device-tree/dist/Bindings/arm/bcm/brcm,bcm2835.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/bcm/brcm,bcm2835.txt Wed May 8 18:56:24 2019 (r347362) +++ vendor/device-tree/dist/Bindings/arm/bcm/brcm,bcm2835.txt Wed May 8 19:00:46 2019 (r347363) @@ -30,6 +30,10 @@ Raspberry Pi 2 Model B Required root node properties: compatible = "raspberrypi,2-model-b", "brcm,bcm2836"; +Raspberry Pi 3 Model A+ +Required root node properties: +compatible = "raspberrypi,3-model-a-plus", "brcm,bcm2837"; + Raspberry Pi 3 Model B Required root node properties: compatible = "raspberrypi,3-model-b", "brcm,bcm2837"; Added: vendor/device-tree/dist/Bindings/arm/bitmain.yaml ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/bitmain.yaml Wed May 8 19:00:46 2019 (r347363) @@ -0,0 +1,18 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/arm/bitmain.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Bitmain platform device tree bindings + +maintainers: + - Manivannan Sadhasivam + +properties: + compatible: + items: + - enum: + - bitmain,sophon-edge + - const: bitmain,bm1880 +... Modified: vendor/device-tree/dist/Bindings/arm/cpus.yaml ============================================================================== --- vendor/device-tree/dist/Bindings/arm/cpus.yaml Wed May 8 18:56:24 2019 (r347362) +++ vendor/device-tree/dist/Bindings/arm/cpus.yaml Wed May 8 19:00:46 2019 (r347363) @@ -228,6 +228,7 @@ patternProperties: - renesas,r9a06g032-smp - rockchip,rk3036-smp - rockchip,rk3066-smp + - socionext,milbeaut-m10v-smp - ste,dbx500-smp cpu-release-addr: Added: vendor/device-tree/dist/Bindings/arm/freescale/fsl,imx7ulp-sim.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/freescale/fsl,imx7ulp-sim.txt Wed May 8 19:00:46 2019 (r347363) @@ -0,0 +1,16 @@ +Freescale i.MX7ULP System Integration Module +---------------------------------------------- +The system integration module (SIM) provides system control and chip configuration +registers. In this module, chip revision information is located in JTAG ID register, +and a set of registers have been made available in DGO domain for SW use, with the +objective to maintain its value between system resets. + +Required properties: +- compatible: Should be "fsl,imx7ulp-sim". +- reg: Specifies base physical address and size of the register sets. + +Example: +sim: sim@410a3000 { + compatible = "fsl,imx7ulp-sim", "syscon"; + reg = <0x410a3000 0x1000>; +}; Modified: vendor/device-tree/dist/Bindings/arm/freescale/fsl,scu.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/freescale/fsl,scu.txt Wed May 8 18:56:24 2019 (r347362) +++ vendor/device-tree/dist/Bindings/arm/freescale/fsl,scu.txt Wed May 8 19:00:46 2019 (r347363) @@ -58,7 +58,11 @@ This binding for the SCU power domain providers uses t domain binding[2]. Required properties: -- compatible: Should be "fsl,imx8qxp-scu-pd". +- compatible: Should be one of: + "fsl,imx8qm-scu-pd", + "fsl,imx8qxp-scu-pd" + followed by "fsl,scu-pd" + - #power-domain-cells: Must be 1. Contains the Resource ID used by SCU commands. See detailed Resource ID list from: @@ -70,7 +74,10 @@ Clock bindings based on SCU Message Protocol This binding uses the common clock binding[1]. Required properties: -- compatible: Should be "fsl,imx8qxp-clock". +- compatible: Should be one of: + "fsl,imx8qm-clock" + "fsl,imx8qxp-clock" + followed by "fsl,scu-clk" - #clock-cells: Should be 1. Contains the Clock ID value. - clocks: List of clock specifiers, must contain an entry for each required entry in clock-names @@ -137,7 +144,7 @@ firmware { &lsio_mu1 1 3>; clk: clk { - compatible = "fsl,imx8qxp-clk"; + compatible = "fsl,imx8qxp-clk", "fsl,scu-clk"; #clock-cells = <1>; }; @@ -154,7 +161,7 @@ firmware { }; pd: imx8qx-pd { - compatible = "fsl,imx8qxp-scu-pd"; + compatible = "fsl,imx8qxp-scu-pd", "fsl,scu-pd"; #power-domain-cells = <1>; }; Added: vendor/device-tree/dist/Bindings/arm/fsl.yaml ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/fsl.yaml Wed May 8 19:00:46 2019 (r347363) @@ -0,0 +1,232 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/bindings/arm/fsl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX Platforms Device Tree Bindings + +maintainers: + - Shawn Guo + - Li Yang + +properties: + $nodename: + const: '/' + compatible: + oneOf: + - description: i.MX23 based Boards + items: + - enum: + - fsl,imx23-evk + - olimex,imx23-olinuxino + - const: fsl,imx23 + + - description: i.MX25 Product Development Kit + items: + - enum: + - fsl,imx25-pdk + - const: fsl,imx25 + + - description: i.MX27 Product Development Kit + items: + - enum: + - fsl,imx27-pdk + - const: fsl,imx27 + + - description: i.MX28 based Boards + items: + - enum: + - fsl,imx28-evk + - i2se,duckbill + - i2se,duckbill-2 + - technologic,imx28-ts4600 + - const: fsl,imx28 + - description: i.MX28 Duckbill 2 based Boards + items: + - enum: + - i2se,duckbill-2-485 + - i2se,duckbill-2-enocean + - i2se,duckbill-2-spi + - const: i2se,duckbill-2 + - const: fsl,imx28 + + - description: i.MX51 Babbage Board + items: + - enum: + - armadeus,imx51-apf51 + - fsl,imx51-babbage + - technologic,imx51-ts4800 + - const: fsl,imx51 + + - description: i.MX53 based Boards + items: + - enum: + - bhf,cx9020 + - fsl,imx53-ard + - fsl,imx53-evk + - fsl,imx53-qsb + - fsl,imx53-smd + - const: fsl,imx53 + + - description: i.MX6Q based Boards + items: + - enum: + - fsl,imx6q-arm2 + - fsl,imx6q-sabreauto + - fsl,imx6q-sabrelite + - fsl,imx6q-sabresd + - technologic,imx6q-ts4900 + - technologic,imx6q-ts7970 + - const: fsl,imx6q + + - description: i.MX6QP based Boards + items: + - enum: + - fsl,imx6qp-sabreauto # i.MX6 Quad Plus SABRE Automotive Board + - fsl,imx6qp-sabresd # i.MX6 Quad Plus SABRE Smart Device Board + - const: fsl,imx6qp + + - description: i.MX6DL based Boards + items: + - enum: + - fsl,imx6dl-sabreauto # i.MX6 DualLite/Solo SABRE Automotive Board + - fsl,imx6dl-sabresd # i.MX6 DualLite SABRE Smart Device Board + - technologic,imx6dl-ts4900 + - technologic,imx6dl-ts7970 + - ysoft,imx6dl-yapp4-draco # i.MX6 DualLite Y Soft IOTA Draco board + - ysoft,imx6dl-yapp4-hydra # i.MX6 DualLite Y Soft IOTA Hydra board + - ysoft,imx6dl-yapp4-ursa # i.MX6 Solo Y Soft IOTA Ursa board + - const: fsl,imx6dl + + - description: i.MX6SL based Boards + items: + - enum: + - fsl,imx6sl-evk # i.MX6 SoloLite EVK Board + - const: fsl,imx6sl + + - description: i.MX6SLL based Boards + items: + - enum: + - fsl,imx6sll-evk + - const: fsl,imx6sll + + - description: i.MX6SX based Boards + items: + - enum: + - fsl,imx6sx-sabreauto # i.MX6 SoloX Sabre Auto Board + - fsl,imx6sx-sdb # i.MX6 SoloX SDB Board + - const: fsl,imx6sx + + - description: i.MX6UL based Boards + items: + - enum: + - fsl,imx6ul-14x14-evk # i.MX6 UltraLite 14x14 EVK Board + - const: fsl,imx6ul + + - description: i.MX6ULL based Boards + items: + - enum: + - fsl,imx6ull-14x14-evk # i.MX6 UltraLiteLite 14x14 EVK Board + - const: fsl,imx6ull + + - description: i.MX6ULZ based Boards + items: + - enum: + - fsl,imx6ulz-14x14-evk # i.MX6 ULZ 14x14 EVK Board + - const: fsl,imx6ull # This seems odd. Should be last? + - const: fsl,imx6ulz + + - description: i.MX7D based Boards + items: + - enum: + - fsl,imx7d-sdb # i.MX7 SabreSD Board + - const: fsl,imx7d + + - description: + Compulab SBC-iMX7 is a single board computer based on the + Freescale i.MX7 system-on-chip. SBC-iMX7 is implemented with + the CL-SOM-iMX7 System-on-Module providing most of the functions, + and SB-SOM-iMX7 carrier board providing additional peripheral + functions and connectors. + items: + - const: compulab,sbc-imx7 + - const: compulab,cl-som-imx7 + - const: fsl,imx7d + + - description: i.MX8QXP based Boards + items: + - enum: + - fsl,imx8qxp-mek # i.MX8QXP MEK Board + - const: fsl,imx8qxp + + - description: + Freescale Vybrid Platform Device Tree Bindings + + For the Vybrid SoC familiy all variants with DDR controller are supported, + which is the VF5xx and VF6xx series. Out of historical reasons, in most + places the kernel uses vf610 to refer to the whole familiy. + The compatible string "fsl,vf610m4" is used for the secondary Cortex-M4 + core support. + items: + - enum: + - fsl,vf500 + - fsl,vf510 + - fsl,vf600 + - fsl,vf610 + - fsl,vf610m4 + + - description: LS1012A based Boards + items: + - enum: + - ebs-systart,oxalis + - fsl,ls1012a-rdb + - fsl,ls1012a-frdm + - fsl,ls1012a-qds + - const: fsl,ls1012a + + - description: LS1021A based Boards + items: + - enum: + - fsl,ls1021a-moxa-uc-8410a + - fsl,ls1021a-qds + - fsl,ls1021a-twr + - const: fsl,ls1021a + + - description: LS1043A based Boards + items: + - enum: + - fsl,ls1043a-rdb + - fsl,ls1043a-qds + - const: fsl,ls1043a + + - description: LS1046A based Boards + items: + - enum: + - fsl,ls1046a-qds + - fsl,ls1046a-rdb + - const: fsl,ls1046a + + - description: LS1088A based Boards + items: + - enum: + - fsl,ls1088a-qds + - fsl,ls1088a-rdb + - const: fsl,ls1088a + + - description: LS2080A based Boards + items: + - enum: + - fsl,ls2080a-simu + - fsl,ls2080a-qds + - fsl,ls2080a-rdb + - const: fsl,ls2080a + + - description: LS2088A based Boards + items: + - enum: + - fsl,ls2088a-qds + - fsl,ls2088a-rdb + - const: fsl,ls2088a + +... Added: vendor/device-tree/dist/Bindings/arm/l2c2x0.yaml ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/l2c2x0.yaml Wed May 8 19:00:46 2019 (r347363) @@ -0,0 +1,248 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/arm/l2c2x0.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ARM L2 Cache Controller + +maintainers: + - Rob Herring + +description: |+ + ARM cores often have a separate L2C210/L2C220/L2C310 (also known as PL210/ + PL220/PL310 and variants) based level 2 cache controller. All these various + implementations of the L2 cache controller have compatible programming + models (Note 1). Some of the properties that are just prefixed "cache-*" are + taken from section 3.7.3 of the Devicetree Specification which can be found + at: + https://www.devicetree.org/specifications/ + + Note 1: The description in this document doesn't apply to integrated L2 + cache controllers as found in e.g. Cortex-A15/A7/A57/A53. These + integrated L2 controllers are assumed to be all preconfigured by + early secure boot code. Thus no need to deal with their configuration + in the kernel at all. + +allOf: + - $ref: /schemas/cache-controller.yaml# + +properties: + compatible: + enum: + - arm,pl310-cache + - arm,l220-cache + - arm,l210-cache + # DEPRECATED by "brcm,bcm11351-a2-pl310-cache" + - bcm,bcm11351-a2-pl310-cache + # For Broadcom bcm11351 chipset where an + # offset needs to be added to the address before passing down to the L2 + # cache controller + - brcm,bcm11351-a2-pl310-cache + # Marvell Controller designed to be + # compatible with the ARM one, with system cache mode (meaning + # maintenance operations on L1 are broadcasted to the L2 and L2 + # performs the same operation). + - marvell,aurora-system-cache + # Marvell Controller designed to be + # compatible with the ARM one with outer cache mode. + - marvell,aurora-outer-cache + # Marvell Tauros3 cache controller, compatible + # with arm,pl310-cache controller. + - marvell,tauros3-cache + + cache-level: + const: 2 + + cache-unified: true + cache-size: true + cache-sets: true + cache-block-size: true + cache-line-size: true + + reg: + maxItems: 1 + + arm,data-latency: + description: Cycles of latency for Data RAM accesses. Specifies 3 cells of + read, write and setup latencies. Minimum valid values are 1. Controllers + without setup latency control should use a value of 0. + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32-array + - minItems: 2 + maxItems: 3 + items: + minimum: 0 + maximum: 8 + + arm,tag-latency: + description: Cycles of latency for Tag RAM accesses. Specifies 3 cells of + read, write and setup latencies. Controllers without setup latency control + should use 0. Controllers without separate read and write Tag RAM latency + values should only use the first cell. + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32-array + - minItems: 1 + maxItems: 3 + items: + minimum: 0 + maximum: 8 + + arm,dirty-latency: + description: Cycles of latency for Dirty RAMs. This is a single cell. + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32 + - minimum: 1 + maximum: 8 + + arm,filter-ranges: + description: Starting address and length of window to + filter. Addresses in the filter window are directed to the M1 port. Other + addresses will go to the M0 port. + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32-array + - items: + minItems: 2 + maxItems: 2 + + arm,io-coherent: + description: indicates that the system is operating in an hardware + I/O coherent mode. Valid only when the arm,pl310-cache compatible + string is used. + type: boolean + + interrupts: + # Either a single combined interrupt or up to 9 individual interrupts + minItems: 1 + maxItems: 9 + + cache-id-part: + description: cache id part number to be used if it is not present + on hardware + $ref: /schemas/types.yaml#/definitions/uint32 + + wt-override: + description: If present then L2 is forced to Write through mode + type: boolean + + arm,double-linefill: + description: Override double linefill enable setting. Enable if + non-zero, disable if zero. + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32 + - enum: [ 0, 1 ] + + arm,double-linefill-incr: + description: Override double linefill on INCR read. Enable + if non-zero, disable if zero. + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32 + - enum: [ 0, 1 ] + + arm,double-linefill-wrap: + description: Override double linefill on WRAP read. Enable + if non-zero, disable if zero. + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32 + - enum: [ 0, 1 ] + + arm,prefetch-drop: + description: Override prefetch drop enable setting. Enable if non-zero, + disable if zero. + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32 + - enum: [ 0, 1 ] + + arm,prefetch-offset: + description: Override prefetch offset value. + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32 + - enum: [ 0, 1, 2, 3, 4, 5, 6, 7, 15, 23, 31 ] + + arm,shared-override: + description: The default behavior of the L220 or PL310 cache + controllers with respect to the shareable attribute is to transform "normal + memory non-cacheable transactions" into "cacheable no allocate" (for reads) + or "write through no write allocate" (for writes). + On systems where this may cause DMA buffer corruption, this property must + be specified to indicate that such transforms are precluded. + type: boolean + + arm,parity-enable: + description: enable parity checking on the L2 cache (L220 or PL310). + type: boolean + + arm,parity-disable: + description: disable parity checking on the L2 cache (L220 or PL310). + type: boolean + + arm,outer-sync-disable: + description: disable the outer sync operation on the L2 cache. + Some core tiles, especially ARM PB11MPCore have a faulty L220 cache that + will randomly hang unless outer sync operations are disabled. + type: boolean + + prefetch-data: + description: | + Data prefetch. Value: <0> (forcibly disable), <1> + (forcibly enable), property absent (retain settings set by firmware) + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32 + - enum: [ 0, 1 ] + + prefetch-instr: + description: | + Instruction prefetch. Value: <0> (forcibly disable), + <1> (forcibly enable), property absent (retain settings set by + firmware) + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32 + - enum: [ 0, 1 ] + + arm,dynamic-clock-gating: + description: | + L2 dynamic clock gating. Value: <0> (forcibly + disable), <1> (forcibly enable), property absent (OS specific behavior, + preferably retain firmware settings) + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32 + - enum: [ 0, 1 ] + + arm,standby-mode: + description: L2 standby mode enable. Value <0> (forcibly disable), + <1> (forcibly enable), property absent (OS specific behavior, + preferably retain firmware settings) + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32 + - enum: [ 0, 1 ] + + arm,early-bresp-disable: + description: Disable the CA9 optimization Early BRESP (PL310) + type: boolean + + arm,full-line-zero-disable: + description: Disable the CA9 optimization Full line of zero + write (PL310) + type: boolean + +required: + - compatible + - cache-unified + - reg + +additionalProperties: false + +examples: + - | + cache-controller@fff12000 { + compatible = "arm,pl310-cache"; + reg = <0xfff12000 0x1000>; + arm,data-latency = <1 1 1>; + arm,tag-latency = <2 2 2>; + arm,filter-ranges = <0x80000000 0x8000000>; + cache-unified; + cache-level = <2>; + interrupts = <45>; + }; + +... Modified: vendor/device-tree/dist/Bindings/arm/mediatek.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/mediatek.txt Wed May 8 18:56:24 2019 (r347362) +++ vendor/device-tree/dist/Bindings/arm/mediatek.txt Wed May 8 19:00:46 2019 (r347363) @@ -15,11 +15,12 @@ compatible: Must contain one of "mediatek,mt6795" "mediatek,mt6797" "mediatek,mt7622" - "mediatek,mt7623" which is referred to MT7623N SoC - "mediatek,mt7623a" + "mediatek,mt7623" + "mediatek,mt7629" "mediatek,mt8127" "mediatek,mt8135" "mediatek,mt8173" + "mediatek,mt8183" Supported boards: @@ -57,6 +58,9 @@ Supported boards: - Reference board variant 1 for MT7622: Required root node properties: - compatible = "mediatek,mt7622-rfb1", "mediatek,mt7622"; +- Bananapi BPI-R64 for MT7622: + Required root node properties: + - compatible = "bananapi,bpi-r64", "mediatek,mt7622"; - Reference board for MT7623a with eMMC: Required root node properties: - compatible = "mediatek,mt7623a-rfb-emmc", "mediatek,mt7623"; @@ -68,6 +72,9 @@ Supported boards: - compatible = "mediatek,mt7623n-rfb-emmc", "mediatek,mt7623"; - Bananapi BPI-R2 board: - compatible = "bananapi,bpi-r2", "mediatek,mt7623"; +- Reference board for MT7629: + Required root node properties: + - compatible = "mediatek,mt7629-rfb", "mediatek,mt7629"; - MTK mt8127 tablet moose EVB: Required root node properties: - compatible = "mediatek,mt8127-moose", "mediatek,mt8127"; @@ -77,3 +84,6 @@ Supported boards: - MTK mt8173 tablet EVB: Required root node properties: - compatible = "mediatek,mt8173-evb", "mediatek,mt8173"; +- Evaluation board for MT8183: + Required root node properties: + - compatible = "mediatek,mt8183-evb", "mediatek,mt8183"; Added: vendor/device-tree/dist/Bindings/arm/pmu.yaml ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/pmu.yaml Wed May 8 19:00:46 2019 (r347363) @@ -0,0 +1,87 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/arm/pmu.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ARM Performance Monitor Units + +maintainers: + - Mark Rutland + - Will Deacon + +description: |+ + ARM cores often have a PMU for counting cpu and cache events like cache misses + and hits. The interface to the PMU is part of the ARM ARM. The ARM PMU + representation in the device tree should be done as under:- + +properties: + compatible: + items: + - enum: + - apm,potenza-pmu + - arm,armv8-pmuv3 + - arm,cortex-a73-pmu + - arm,cortex-a72-pmu + - arm,cortex-a57-pmu + - arm,cortex-a53-pmu + - arm,cortex-a35-pmu + - arm,cortex-a17-pmu + - arm,cortex-a15-pmu + - arm,cortex-a12-pmu + - arm,cortex-a9-pmu + - arm,cortex-a8-pmu + - arm,cortex-a7-pmu + - arm,cortex-a5-pmu + - arm,arm11mpcore-pmu + - arm,arm1176-pmu + - arm,arm1136-pmu + - brcm,vulcan-pmu + - cavium,thunder-pmu + - qcom,scorpion-pmu + - qcom,scorpion-mp-pmu + - qcom,krait-pmu + + interrupts: + # Don't know how many CPUs, so no constraints to specify + description: 1 per-cpu interrupt (PPI) or 1 interrupt per core. + + interrupt-affinity: + $ref: /schemas/types.yaml#/definitions/phandle-array + description: + When using SPIs, specifies a list of phandles to CPU + nodes corresponding directly to the affinity of + the SPIs listed in the interrupts property. + + When using a PPI, specifies a list of phandles to CPU + nodes corresponding to the set of CPUs which have + a PMU of this type signalling the PPI listed in the + interrupts property, unless this is already specified + by the PPI interrupt specifier itself (in which case + the interrupt-affinity property shouldn't be present). + + This property should be present when there is more than + a single SPI. + + qcom,no-pc-write: + type: boolean + description: + Indicates that this PMU doesn't support the 0xc and 0xd events. + + secure-reg-access: + type: boolean + description: + Indicates that the ARMv7 Secure Debug Enable Register + (SDER) is accessible. This will cause the driver to do + any setup required that is only possible in ARMv7 secure + state. If not present the ARMv7 SDER will not be touched, + which means the PMU may fail to operate unless external + code (bootloader or security monitor) has performed the + appropriate initialisation. Note that this property is + not valid for non-ARMv7 CPUs or ARMv7 CPUs booting Linux + in Non-secure state. + +required: + - compatible + +... Added: vendor/device-tree/dist/Bindings/arm/renesas.yaml ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/renesas.yaml Wed May 8 19:00:46 2019 (r347363) @@ -0,0 +1,238 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/arm/shmobile.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Renesas SH-Mobile, R-Mobile, and R-Car Platform Device Tree Bindings + +maintainers: + - Geert Uytterhoeven + +properties: + $nodename: + const: '/' + compatible: + oneOf: + - description: Emma Mobile EV2 + items: + - enum: + - renesas,kzm9d # Kyoto Microcomputer Co. KZM-A9-Dual + - const: renesas,emev2 + + - description: RZ/A1H (R7S72100) + items: + - enum: + - renesas,genmai # Genmai (RTK772100BC00000BR) + - renesas,gr-peach # GR-Peach (X28A-M01-E/F) + - renesas,rskrza1 # RSKRZA1 (YR0K77210C000BE) + - const: renesas,r7s72100 + + - description: RZ/A2 (R7S9210) + items: + - enum: + - renesas,rza2mevb # RZ/A2M Eval Board (RTK7921053S00000BE) + - const: renesas,r7s9210 + + - description: SH-Mobile AG5 (R8A73A00/SH73A0) + items: + - enum: + - renesas,kzm9g # Kyoto Microcomputer Co. KZM-A9-GT + - const: renesas,sh73a0 + + - description: R-Mobile APE6 (R8A73A40) + items: + - enum: + - renesas,ape6evm + - const: renesas,r8a73a4 + + - description: R-Mobile A1 (R8A77400) + items: + - enum: + - renesas,armadillo800eva # Atmark Techno Armadillo-800 EVA + - const: renesas,r8a7740 + + - description: RZ/G1H (R8A77420) + items: + - const: renesas,r8a7742 + + - description: RZ/G1M (R8A77430) + items: + - enum: + # iWave Systems RZ/G1M Qseven Development Platform (iW-RainboW-G20D-Qseven) + - iwave,g20d + - const: iwave,g20m + - const: renesas,r8a7743 + + - items: + - enum: + # iWave Systems RZ/G1M Qseven System On Module (iW-RainboW-G20M-Qseven) + - iwave,g20m + - renesas,sk-rzg1m # SK-RZG1M (YR8A77430S000BE) + - const: renesas,r8a7743 + + - description: RZ/G1N (R8A77440) + items: + - enum: + # iWave Systems RZ/G1N Qseven Development Platform (iW-RainboW-G20D-Qseven) + - iwave,g20d + - const: iwave,g20m + - const: renesas,r8a7744 + + - items: + - enum: + # iWave Systems RZ/G1N Qseven System On Module (iW-RainboW-G20M-Qseven) + - iwave,g20m + - const: renesas,r8a7744 + + - description: RZ/G1E (R8A77450) + items: + - enum: + - iwave,g22m # iWave Systems RZ/G1E SODIMM System On Module (iW-RainboW-G22M-SM) + - renesas,sk-rzg1e # SK-RZG1E (YR8A77450S000BE) + - const: renesas,r8a7745 + + - description: iWave Systems RZ/G1E SODIMM SOM Development Platform (iW-RainboW-G22D) + items: + - const: iwave,g22d + - const: iwave,g22m + - const: renesas,r8a7745 + + - description: RZ/G1C (R8A77470) + items: + - enum: + - iwave,g23s #iWave Systems RZ/G1C Single Board Computer (iW-RainboW-G23S) + - const: renesas,r8a77470 + + - description: RZ/G2M (R8A774A1) + items: + - const: renesas,r8a774a1 + + - description: RZ/G2E (R8A774C0) + items: + - enum: + - si-linux,cat874 # Silicon Linux RZ/G2E 96board platform (CAT874) + - const: renesas,r8a774c0 + + - items: + - enum: + - si-linux,cat875 # Silicon Linux sub board for CAT874 (CAT875) + - const: si-linux,cat874 + - const: renesas,r8a774c0 + + - description: R-Car M1A (R8A77781) + items: + - enum: + - renesas,bockw + - const: renesas,r8a7778 + + - description: R-Car H1 (R8A77790) + items: + - enum: + - renesas,marzen # Marzen (R0P7779A00010S) + - const: renesas,r8a7779 + + - description: R-Car H2 (R8A77900) + items: + - enum: + - renesas,lager # Lager (RTP0RC7790SEB00010S) + - renesas,stout # Stout (ADAS Starterkit, Y-R-CAR-ADAS-SKH2-BOARD) + - const: renesas,r8a7790 + + - description: R-Car M2-W (R8A77910) + items: + - enum: + - renesas,henninger + - renesas,koelsch # Koelsch (RTP0RC7791SEB00010S) + - renesas,porter # Porter (M2-LCDP) + - const: renesas,r8a7791 + + - description: R-Car V2H (R8A77920) + items: + - enum: + - renesas,blanche # Blanche (RTP0RC7792SEB00010S) + - renesas,wheat # Wheat (RTP0RC7792ASKB0000JE) + - const: renesas,r8a7792 + + - description: R-Car M2-N (R8A77930) + items: + - enum: + - renesas,gose # Gose (RTP0RC7793SEB00010S) + - const: renesas,r8a7793 + + - description: R-Car E2 (R8A77940) + items: + - enum: + - renesas,alt # Alt (RTP0RC7794SEB00010S) + - renesas,silk # SILK (RTP0RC7794LCB00011S) + - const: renesas,r8a7794 + + - description: R-Car H3 (R8A77950) + items: + - enum: + # H3ULCB (R-Car Starter Kit Premier, RTP0RC7795SKBX0010SA00 (H3 ES1.1)) + # H3ULCB (R-Car Starter Kit Premier, RTP0RC77951SKBX010SA00 (H3 ES2.0)) + - renesas,h3ulcb + - renesas,salvator-x # Salvator-X (RTP0RC7795SIPB0010S) + - renesas,salvator-xs # Salvator-XS (Salvator-X 2nd version, RTP0RC7795SIPB0012S) + - const: renesas,r8a7795 + + - description: R-Car M3-W (R8A77960) + items: + - enum: + - renesas,m3ulcb # M3ULCB (R-Car Starter Kit Pro, RTP0RC7796SKBX0010SA09 (M3 ES1.0)) + - renesas,salvator-x # Salvator-X (RTP0RC7796SIPB0011S) + - renesas,salvator-xs # Salvator-XS (Salvator-X 2nd version, RTP0RC7796SIPB0012S) + - const: renesas,r8a7796 + + - description: Kingfisher (SBEV-RCAR-KF-M03) + items: + - const: shimafuji,kingfisher + - enum: + - renesas,h3ulcb + - renesas,m3ulcb + - enum: + - renesas,r8a7795 + - renesas,r8a7796 + + - description: R-Car M3-N (R8A77965) + items: + - enum: + - renesas,m3nulcb # M3NULCB (R-Car Starter Kit Pro, RTP0RC77965SKBX010SA00 (M3-N ES1.1)) + - renesas,salvator-x # Salvator-X (RTP0RC7796SIPB0011S (M3-N)) + - renesas,salvator-xs # Salvator-XS (Salvator-X 2nd version, RTP0RC77965SIPB012S) + - const: renesas,r8a77965 + + - description: R-Car V3M (R8A77970) + items: + - enum: + - renesas,eagle # Eagle (RTP0RC77970SEB0010S) + - renesas,v3msk # V3MSK (Y-ASK-RCAR-V3M-WS10) + - const: renesas,r8a77970 + + - description: R-Car V3H (R8A77980) + items: + - enum: + - renesas,condor # Condor (RTP0RC77980SEB0010SS/RTP0RC77980SEB0010SA01) + - renesas,v3hsk # V3HSK (Y-ASK-RCAR-V3H-WS10) + - const: renesas,r8a77980 + + - description: R-Car E3 (R8A77990) + items: + - enum: + - renesas,ebisu # Ebisu (RTP0RC77990SEB0010S) + - const: renesas,r8a77990 + + - description: R-Car D3 (R8A77995) + items: + - enum: *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Wed May 8 19:01:41 2019 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 05AAE1590EAD; Wed, 8 May 2019 19:01:41 +0000 (UTC) (envelope-from manu@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9DBC18A170; Wed, 8 May 2019 19:01:40 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5EE369F9E; Wed, 8 May 2019 19:01:40 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x48J1eiq021694; Wed, 8 May 2019 19:01:40 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x48J1eYl021693; Wed, 8 May 2019 19:01:40 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201905081901.x48J1eYl021693@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 8 May 2019 19:01:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r347364 - vendor/device-tree/5.1 X-SVN-Group: vendor X-SVN-Commit-Author: manu X-SVN-Commit-Paths: vendor/device-tree/5.1 X-SVN-Commit-Revision: 347364 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9DBC18A170 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.959,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 May 2019 19:01:41 -0000 Author: manu Date: Wed May 8 19:01:39 2019 New Revision: 347364 URL: https://svnweb.freebsd.org/changeset/base/347364 Log: Tag import of DTS files from Linux 5.1 Added: vendor/device-tree/5.1/ - copied from r347363, vendor/device-tree/dist/ From owner-svn-src-vendor@freebsd.org Thu May 9 22:49:15 2019 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 03BA715900AE; Thu, 9 May 2019 22:49:15 +0000 (UTC) (envelope-from jkim@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A0B5A85BD5; Thu, 9 May 2019 22:49:14 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 791E8237C4; Thu, 9 May 2019 22:49:14 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x49MnEVq020920; Thu, 9 May 2019 22:49:14 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x49MnA5u020899; Thu, 9 May 2019 22:49:10 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201905092249.x49MnA5u020899@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 9 May 2019 22:49:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r347413 - in vendor-sys/acpica/dist: . source/compiler source/components/events source/include source/include/platform X-SVN-Group: vendor-sys X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in vendor-sys/acpica/dist: . source/compiler source/components/events source/include source/include/platform X-SVN-Commit-Revision: 347413 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A0B5A85BD5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.993,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 May 2019 22:49:15 -0000 Author: jkim Date: Thu May 9 22:49:10 2019 New Revision: 347413 URL: https://svnweb.freebsd.org/changeset/base/347413 Log: Import ACPICA 20190509. Modified: vendor-sys/acpica/dist/changes.txt vendor-sys/acpica/dist/source/compiler/aslcodegen.c vendor-sys/acpica/dist/source/compiler/aslcompile.c vendor-sys/acpica/dist/source/compiler/aslcompiler.h vendor-sys/acpica/dist/source/compiler/aslerror.c vendor-sys/acpica/dist/source/compiler/aslfiles.c vendor-sys/acpica/dist/source/compiler/aslload.c vendor-sys/acpica/dist/source/compiler/aslmain.c vendor-sys/acpica/dist/source/compiler/aslmessages.c vendor-sys/acpica/dist/source/compiler/aslmessages.h vendor-sys/acpica/dist/source/compiler/asloperands.c vendor-sys/acpica/dist/source/compiler/aslstartup.c vendor-sys/acpica/dist/source/compiler/aslutils.c vendor-sys/acpica/dist/source/compiler/aslwalks.c vendor-sys/acpica/dist/source/compiler/aslxref.c vendor-sys/acpica/dist/source/components/events/evgpe.c vendor-sys/acpica/dist/source/include/acpixf.h vendor-sys/acpica/dist/source/include/platform/aclinux.h Modified: vendor-sys/acpica/dist/changes.txt ============================================================================== --- vendor-sys/acpica/dist/changes.txt Thu May 9 22:42:23 2019 (r347412) +++ vendor-sys/acpica/dist/changes.txt Thu May 9 22:49:10 2019 (r347413) @@ -1,4 +1,91 @@ ---------------------------------------- +09 May 2019. Summary of changes for version 20190509: + + +1) ACPICA kernel-resident subsystem: + +Revert commit 6c43e1a ("ACPICA: Clear status of GPEs before enabling +them") that causes problems with Thunderbolt controllers to occur if a +dock device is connected at init time (the xhci_hcd and thunderbolt +modules crash which prevents peripherals connected through them from +working). Commit 6c43e1a effectively causes commit ecc1165b8b74 ("ACPICA: +Dispatch active GPEs at init time") to get undone, so the problem +addressed by commit ecc1165b8b74 appears again as a result of it. + + +2) iASL Compiler/Disassembler and ACPICA tools: + +Reverted iASL: Additional forward reference detection. This change +reverts forward reference detection for field declarations. The feature +unintentionally emitted AML bytecode with incorrect package lengths for +some ASL code related to Fields and OperationRegions. This malformed AML +can cause systems to crash +during boot. The malformed AML bytecode is emitted in iASL version +20190329 and 20190405. + +iASL: improve forward reference detection. This change improves forward +reference detection for named objects inside of scopes. If a parse object +has the OP_NOT_FOUND_DURING_LOAD set, it means that Op is a reference to +a named object that is declared later in the AML bytecode. This is +allowed if the reference is inside of a method and the declaration is +outside of a method like so: + +DefinitionBlock(...) +{ + Method (TEST) + { + Return (NUM0) + } + Name (NUM0,0) +} + +However, if the declaration and reference are both in the same method or +outside any methods, this is a forward reference and should be marked as +an error because it would result in runtime errors. + +DefinitionBlock(...) +{ + Name (BUFF, Buffer (NUM0) {}) // Forward reference + Name (NUM0, 0x0) + + Method (TEST) + { + Local0 = NUM1 + Name (NUM1, 0x1) // Forward reference + return (Local0) + } +} + +iASL: Implemented additional buffer overflow analysis for BufferField +declarations. Check if a buffer index argument to a create buffer field +operation is beyond the end of the target buffer. + +This affects these AML operators: + + AML_CREATE_FIELD_OP + AML_CREATE_BIT_FIELD_OP + AML_CREATE_BYTE_FIELD_OP + AML_CREATE_WORD_FIELD_OP + AML_CREATE_DWORD_FIELD_OP + AML_CREATE_QWORD_FIELD_OP + + There are three conditions that must be satisfied in order to allow this +validation at compile time: + + 1) The length of the target buffer must be an integer constant + 2) The index specified in the create* must be an integer constant + 3) For CreateField, the bit length argument must be non-zero. + +Example: + Name (BUF1, Buffer() {1,2}) + CreateField (BUF1, 7, 9, CF03) // 3: ERR + +dsdt.asl 14: CreateField (BUF1, 7, 9, CF03) // 3: ERR +Error 6165 - ^ Buffer index beyond end of +target buffer + + +---------------------------------------- 05 April 2019. Summary of changes for version 20190405: Modified: vendor-sys/acpica/dist/source/compiler/aslcodegen.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcodegen.c Thu May 9 22:42:23 2019 (r347412) +++ vendor-sys/acpica/dist/source/compiler/aslcodegen.c Thu May 9 22:49:10 2019 (r347413) @@ -690,7 +690,8 @@ CgUpdateHeader ( { if (FlReadFile (ASL_FILE_AML_OUTPUT, &FileByte, 1) != AE_OK) { - printf ("EOF while reading checksum bytes\n"); + AslError (ASL_ERROR, ASL_MSG_COMPILER_INTERNAL, NULL, + "Table length is greater than size of the input file"); return; } Modified: vendor-sys/acpica/dist/source/compiler/aslcompile.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompile.c Thu May 9 22:42:23 2019 (r347412) +++ vendor-sys/acpica/dist/source/compiler/aslcompile.c Thu May 9 22:49:10 2019 (r347413) @@ -224,7 +224,6 @@ CmDoCompile ( if (AslGbl_PreprocessOnly) { UtEndEvent (Event); - CmCleanupAndExit (); return (AE_OK); } } @@ -919,7 +918,7 @@ CmCleanupAndExit ( * We will delete the AML file if there are errors and the * force AML output option has not been used. */ - if (AslGbl_ParserErrorDetected || ((AslGbl_ExceptionCount[ASL_ERROR] > 0) && + if (AslGbl_ParserErrorDetected || AslGbl_PreprocessOnly || ((AslGbl_ExceptionCount[ASL_ERROR] > 0) && (!AslGbl_IgnoreErrors) && AslGbl_Files[ASL_FILE_AML_OUTPUT].Handle)) { Modified: vendor-sys/acpica/dist/source/compiler/aslcompiler.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompiler.h Thu May 9 22:42:23 2019 (r347412) +++ vendor-sys/acpica/dist/source/compiler/aslcompiler.h Thu May 9 22:49:10 2019 (r347413) @@ -1105,10 +1105,6 @@ ASL_GLOBAL_FILE_NODE * FlGetCurrentFileNode ( void); -BOOLEAN -FlInputFileExists ( - char *InputFilename); - /* * aslhwmap - hardware map summary Modified: vendor-sys/acpica/dist/source/compiler/aslerror.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslerror.c Thu May 9 22:42:23 2019 (r347412) +++ vendor-sys/acpica/dist/source/compiler/aslerror.c Thu May 9 22:49:10 2019 (r347413) @@ -869,16 +869,8 @@ static void AslInitEnode ( return; } - if (!FlInputFileExists (Filename)) - { - /* - * This means that this file is an include file. Record the .src - * file as the error message source because this file is not in - * the global file list. - */ - Enode->SourceFilename = - FileNode->Files[ASL_FILE_SOURCE_OUTPUT].Filename; - } + Enode->SourceFilename = + FileNode->Files[ASL_FILE_SOURCE_OUTPUT].Filename; } } Modified: vendor-sys/acpica/dist/source/compiler/aslfiles.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslfiles.c Thu May 9 22:42:23 2019 (r347412) +++ vendor-sys/acpica/dist/source/compiler/aslfiles.c Thu May 9 22:49:10 2019 (r347413) @@ -163,6 +163,10 @@ FlOpenIncludeWithPrefix ( ACPI_PARSE_OBJECT *Op, char *Filename); +static BOOLEAN +FlInputFileExists ( + char *InputFilename); + #ifdef ACPI_OBSOLETE_FUNCTIONS ACPI_STATUS FlParseInputPathname ( @@ -250,7 +254,7 @@ FlInitOneFile ( * ******************************************************************************/ -BOOLEAN +static BOOLEAN FlInputFileExists ( char *Filename) { Modified: vendor-sys/acpica/dist/source/compiler/aslload.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslload.c Thu May 9 22:42:23 2019 (r347412) +++ vendor-sys/acpica/dist/source/compiler/aslload.c Thu May 9 22:49:10 2019 (r347413) @@ -263,10 +263,29 @@ LdLoadFieldElements ( ACPI_WALK_STATE *WalkState) { ACPI_PARSE_OBJECT *Child = NULL; + ACPI_PARSE_OBJECT *SourceRegion; ACPI_NAMESPACE_NODE *Node; ACPI_STATUS Status; + + SourceRegion = UtGetArg (Op, 0); + if (SourceRegion) + { + Status = AcpiNsLookup (WalkState->ScopeInfo, + SourceRegion->Asl.Value.String, + ACPI_TYPE_REGION, ACPI_IMODE_EXECUTE, + ACPI_NS_DONT_OPEN_SCOPE, NULL, &Node); + if (Status == AE_NOT_FOUND) + { + /* + * If the named object is not found, it means that it is either a + * forward reference or the named object does not exist. + */ + SourceRegion->Asl.CompileFlags |= OP_NOT_FOUND_DURING_LOAD; + } + } + /* Get the first named field element */ switch (Op->Asl.AmlOpcode) @@ -493,7 +512,7 @@ LdNamespace1Begin ( case AML_FIELD_OP: Status = LdLoadFieldElements (Op, WalkState); - break; + return (Status); case AML_INT_CONNECTION_OP: @@ -557,8 +576,7 @@ LdNamespace1Begin ( * We only want references to named objects: * Store (2, WXYZ) -> Attempt to resolve the name */ - if ((OpInfo->Class == AML_CLASS_NAMED_OBJECT) && - (OpInfo->Type != AML_TYPE_NAMED_FIELD)) + if (OpInfo->Class == AML_CLASS_NAMED_OBJECT) { return (AE_OK); } Modified: vendor-sys/acpica/dist/source/compiler/aslmain.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmain.c Thu May 9 22:42:23 2019 (r347412) +++ vendor-sys/acpica/dist/source/compiler/aslmain.c Thu May 9 22:49:10 2019 (r347413) @@ -291,7 +291,8 @@ main ( /* * At this point, compilation of a data table or disassembly is complete. */ - if (AslGbl_FileType == ASL_INPUT_TYPE_ASCII_DATA || AcpiGbl_DisasmFlag) + if (AslGbl_PreprocessOnly || AcpiGbl_DisasmFlag || + AslGbl_FileType == ASL_INPUT_TYPE_ASCII_DATA) { goto CleanupAndExit; } Modified: vendor-sys/acpica/dist/source/compiler/aslmessages.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmessages.c Thu May 9 22:42:23 2019 (r347412) +++ vendor-sys/acpica/dist/source/compiler/aslmessages.c Thu May 9 22:49:10 2019 (r347413) @@ -283,7 +283,7 @@ const char *AslCompilerMsgs [] = /* ASL_MSG_NO_RETVAL */ "Called method returns no value", /* ASL_MSG_NO_WHILE */ "No enclosing While statement", /* ASL_MSG_NON_ASCII */ "Invalid characters found in file", -/* ASL_MSG_NON_ZERO */ "Operand evaluates to zero", +/* ASL_MSG_BUFFER_FIELD_LENGTH */ "Field length must be non-zero", /* ASL_MSG_NOT_EXIST */ "Object does not exist", /* ASL_MSG_NOT_FOUND */ "Object not found or not accessible from current scope", /* ASL_MSG_NOT_METHOD */ "Not a control method, cannot invoke", @@ -342,7 +342,7 @@ const char *AslCompilerMsgs [] = /* ASL_MSG_RANGE */ "Constant out of range", /* ASL_MSG_BUFFER_ALLOCATION */ "Could not allocate line buffer", /* ASL_MSG_MISSING_DEPENDENCY */ "Missing dependency", -/* ASL_MSG_ILLEGAL_FORWARD_REF */ "Forward references are not supported by the ASL language", +/* ASL_MSG_ILLEGAL_FORWARD_REF */ "Illegal forward reference", /* ASL_MSG_ILLEGAL_METHOD_REF */ "Object is declared in a different method", /* ASL_MSG_LOCAL_NOT_USED */ "Method Local is set but never used", /* ASL_MSG_ARG_AS_LOCAL_NOT_USED */ "Method Argument (as a local) is set but never used", @@ -364,7 +364,8 @@ const char *AslCompilerMsgs [] = /* ASL_MSG_NAMEPATH_NOT_EXIST */ "One or more objects within the Pathname do not exist", /* ASL_MSG_REGION_LENGTH */ "Operation Region declared with zero length", /* ASL_MSG_TEMPORARY_OBJECT */ "Object is created temporarily in another method and cannot be accessed", -/* ASL_MSG_UNDEFINED_EXTERNAL */ "Named object was declared external but the actual definition does not exist" +/* ASL_MSG_UNDEFINED_EXTERNAL */ "Named object was declared external but the actual definition does not exist", +/* ASL_MSG_BUFFER_FIELD_OVERFLOW */ "Buffer field extends beyond end of target buffer" }; /* Table compiler */ Modified: vendor-sys/acpica/dist/source/compiler/aslmessages.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmessages.h Thu May 9 22:42:23 2019 (r347412) +++ vendor-sys/acpica/dist/source/compiler/aslmessages.h Thu May 9 22:49:10 2019 (r347413) @@ -285,7 +285,7 @@ typedef enum ASL_MSG_NO_RETVAL, ASL_MSG_NO_WHILE, ASL_MSG_NON_ASCII, - ASL_MSG_NON_ZERO, + ASL_MSG_BUFFER_FIELD_LENGTH, ASL_MSG_NOT_EXIST, ASL_MSG_NOT_FOUND, ASL_MSG_NOT_METHOD, @@ -367,6 +367,7 @@ typedef enum ASL_MSG_REGION_LENGTH, ASL_MSG_TEMPORARY_OBJECT, ASL_MSG_UNDEFINED_EXTERNAL, + ASL_MSG_BUFFER_FIELD_OVERFLOW, /* These messages are used by the Data Table compiler only */ Modified: vendor-sys/acpica/dist/source/compiler/asloperands.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asloperands.c Thu May 9 22:42:23 2019 (r347412) +++ vendor-sys/acpica/dist/source/compiler/asloperands.c Thu May 9 22:49:10 2019 (r347413) @@ -819,6 +819,7 @@ OpnDoBuffer ( BufferLengthOp->Asl.Value.Integer = BufferLength; (void) OpcSetOptimalIntegerSize (BufferLengthOp); + UtSetParseOpName (BufferLengthOp); /* Remaining nodes are handled via the tree walk */ } @@ -905,6 +906,7 @@ OpnDoPackage ( */ Op->Asl.Child->Asl.ParseOpcode = PARSEOP_INTEGER; Op->Asl.Child->Asl.Value.Integer = PackageLength; + UtSetParseOpName (Op); /* Set the AML opcode */ Modified: vendor-sys/acpica/dist/source/compiler/aslstartup.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslstartup.c Thu May 9 22:42:23 2019 (r347412) +++ vendor-sys/acpica/dist/source/compiler/aslstartup.c Thu May 9 22:49:10 2019 (r347413) @@ -550,13 +550,9 @@ AslDoOneFile ( Status = CmDoCompile (); if (ACPI_FAILURE (Status)) { + PrTerminatePreprocessor (); return (Status); } - - /* Cleanup (for next source file) and exit */ - - AeClearErrorLog (); - PrTerminatePreprocessor (); /* * At this point, we know how many lines are in the input file. Save it Modified: vendor-sys/acpica/dist/source/compiler/aslutils.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslutils.c Thu May 9 22:42:23 2019 (r347412) +++ vendor-sys/acpica/dist/source/compiler/aslutils.c Thu May 9 22:49:10 2019 (r347413) @@ -541,8 +541,14 @@ UtDisplayOneSummary ( { UINT32 i; ASL_GLOBAL_FILE_NODE *FileNode; + BOOLEAN DisplayAMLSummary; + DisplayAMLSummary = + !AslGbl_PreprocessOnly && !AslGbl_ParserErrorDetected && + ((AslGbl_ExceptionCount[ASL_ERROR] == 0) || AslGbl_IgnoreErrors) && + AslGbl_Files[ASL_FILE_AML_OUTPUT].Handle; + if (FileId != ASL_FILE_STDOUT) { /* Compiler name and version number */ @@ -595,9 +601,7 @@ UtDisplayOneSummary ( /* AML summary */ - if (!AslGbl_ParserErrorDetected && - ((AslGbl_ExceptionCount[ASL_ERROR] == 0) || AslGbl_IgnoreErrors) && - AslGbl_Files[ASL_FILE_AML_OUTPUT].Handle) + if (DisplayAMLSummary) { FlPrintFile (FileId, "%-14s %s - %7u bytes %6u opcodes %6u named objects\n", @@ -633,7 +637,7 @@ UtDisplayOneSummary ( continue; } - FlPrintFile (FileId, "%14s %s - %u bytes\n", + FlPrintFile (FileId, "%-14s %s - %7u bytes\n", AslGbl_FileDescs[i].ShortDescription, AslGbl_Files[i].Filename, FlGetFileSize (i)); } Modified: vendor-sys/acpica/dist/source/compiler/aslwalks.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslwalks.c Thu May 9 22:42:23 2019 (r347412) +++ vendor-sys/acpica/dist/source/compiler/aslwalks.c Thu May 9 22:49:10 2019 (r347413) @@ -165,7 +165,15 @@ static void AnAnalyzeStoreOperator ( ACPI_PARSE_OBJECT *Op); +static BOOLEAN +AnIsValidBufferConstant ( + ACPI_PARSE_OBJECT *Op); +static void +AnValidateCreateBufferField ( + ACPI_PARSE_OBJECT *CreateBufferFieldOp); + + /******************************************************************************* * * FUNCTION: AnMethodTypingWalkEnd @@ -669,6 +677,14 @@ AnOtherSemanticAnalysisWalkBegin ( OpInfo = AcpiPsGetOpcodeInfo (Op->Asl.AmlOpcode); + if (OpInfo->Flags & AML_CREATE) + { + /* This group contains all of the Create Buffer Field operators */ + + AnValidateCreateBufferField (Op); + return (AE_OK); + } + /* * Determine if an execution class operator actually does something by * checking if it has a target and/or the function return value is used. @@ -734,10 +750,10 @@ AnOtherSemanticAnalysisWalkBegin ( } } - /* * Semantic checks for individual ASL operators */ + switch (Op->Asl.ParseOpcode) { case PARSEOP_STORE: @@ -785,22 +801,6 @@ AnOtherSemanticAnalysisWalkBegin ( } break; - case PARSEOP_CREATEFIELD: - /* - * Check for a zero Length (NumBits) operand. NumBits is the 3rd operand - */ - ArgOp = Op->Asl.Child; - ArgOp = ArgOp->Asl.Next; - ArgOp = ArgOp->Asl.Next; - - if ((ArgOp->Asl.ParseOpcode == PARSEOP_ZERO) || - ((ArgOp->Asl.ParseOpcode == PARSEOP_INTEGER) && - (ArgOp->Asl.Value.Integer == 0))) - { - AslError (ASL_ERROR, ASL_MSG_NON_ZERO, ArgOp, NULL); - } - break; - case PARSEOP_CONNECTION: /* * Ensure that the referenced operation region has the correct SPACE_ID. @@ -883,6 +883,194 @@ AnOtherSemanticAnalysisWalkBegin ( } return (AE_OK); +} + + +/******************************************************************************* + * + * FUNCTION: AnValidateCreateBufferField + * + * PARAMETERS: Op - A create buffer field operator + * + * RETURN: None + * + * DESCRIPTION: Check if a buffer index argument to a create buffer field + * operation is beyond the end of the target buffer. + * + * Validates these AML operators: + * + * AML_CREATE_FIELD_OP + * AML_CREATE_BIT_FIELD_OP + * AML_CREATE_BYTE_FIELD_OP + * AML_CREATE_WORD_FIELD_OP + * AML_CREATE_DWORD_FIELD_OP + * AML_CREATE_QWORD_FIELD_OP + * + * There are two conditions that must be satisfied in order to enable + * validation at compile time: + * + * 1) The length of the target buffer must be an integer constant + * 2) The index specified in the create* must be an integer constant + * 3) For CreateField, the bit length argument must be non-zero. + * + ******************************************************************************/ + +static void +AnValidateCreateBufferField ( + ACPI_PARSE_OBJECT *CreateBufferFieldOp) +{ + ACPI_PARSE_OBJECT *TargetBufferOp; + ACPI_PARSE_OBJECT *ArgOp; + UINT32 TargetBufferLength; + UINT32 LastFieldByteIndex; + + + /* + * 1) Get the length of the target buffer + */ + ArgOp = CreateBufferFieldOp->Asl.Child; /* Reference to target buffer */ + + /* + * If no attached Node, the target buffer may be something like an + * ArgX or LocalX and cannot be evaluated at compile time. + */ + if (!ArgOp->Asl.Node) + { + return; + } + + TargetBufferOp = ArgOp->Asl.Node->Op; + TargetBufferOp = TargetBufferOp->Asl.Child; /* Target buffer */ + TargetBufferOp = TargetBufferOp->Asl.Next; /* "Buffer" keyword */ + if (!TargetBufferOp) + { + /* Not a statement of the form NAME(XXXX, Buffer.... */ + + return; + } + + /* Get the buffer length argument. It must be an integer constant */ + + ArgOp = TargetBufferOp->Asl.Child; + if (!AnIsValidBufferConstant (ArgOp)) + { + return; + } + + TargetBufferLength = (UINT32) ArgOp->Asl.Value.Integer; + + /* + * 2) Get the value of the buffer index argument. It must be + * an integer constant. + */ + ArgOp = CreateBufferFieldOp->Asl.Child; /* Reference to target buffer */ + ArgOp = ArgOp->Asl.Next; /* Buffer Index argument*/ + if (!AnIsValidBufferConstant (ArgOp)) + { + return; + } + + LastFieldByteIndex = + (UINT32) ArgOp->Asl.Value.Integer; /* Index can be in either bytes or bits */ + + /* + * 3) Get the length of the new buffer field, in bytes. Also, + * create the final target buffer index for the last byte of the field + */ + switch (CreateBufferFieldOp->Asl.ParseOpcode) + { + case PARSEOP_CREATEBITFIELD: /* A one bit field */ + + LastFieldByteIndex = ACPI_ROUND_BITS_DOWN_TO_BYTES (LastFieldByteIndex); + break; + + case PARSEOP_CREATEBYTEFIELD: + break; + + case PARSEOP_CREATEWORDFIELD: + + LastFieldByteIndex += (sizeof (UINT16) - 1); + break; + + case PARSEOP_CREATEDWORDFIELD: + + LastFieldByteIndex += (sizeof (UINT32) - 1); + break; + + case PARSEOP_CREATEQWORDFIELD: + + LastFieldByteIndex += (sizeof (UINT64) - 1); + break; + + case PARSEOP_CREATEFIELD: /* Multi-bit field */ + + ArgOp = ArgOp->Asl.Next; /* Length argument, in bits */ + if (!AnIsValidBufferConstant (ArgOp)) + { + return; + } + + /* The buffer field length is not allowed to be zero */ + + if (ArgOp->Asl.Value.Integer == 0) + { + AslError (ASL_WARNING, ASL_MSG_BUFFER_FIELD_LENGTH, ArgOp, NULL); + return; + } + + LastFieldByteIndex += + ((UINT32) ArgOp->Asl.Value.Integer - 1); /* Create final bit index */ + + /* Convert bit index to a byte index */ + + LastFieldByteIndex = ACPI_ROUND_BITS_DOWN_TO_BYTES (LastFieldByteIndex); + break; + + default: + return; + } + + /* + * 4) Check for an access (index) beyond the end of the target buffer, + * or a zero length target buffer. + */ + if (!TargetBufferLength || (LastFieldByteIndex >= TargetBufferLength)) + { + AslError (ASL_WARNING, ASL_MSG_BUFFER_FIELD_OVERFLOW, ArgOp, NULL); + } +} + + +/******************************************************************************* + * + * FUNCTION: AnIsValidBufferConstant + * + * PARAMETERS: Op - A buffer-related operand + * + * RETURN: TRUE if operand is valid constant, FALSE otherwise + * + * DESCRIPTION: Check if the input Op is valid constant that can be used + * in compile-time analysis. + * + ******************************************************************************/ + +static BOOLEAN +AnIsValidBufferConstant ( + ACPI_PARSE_OBJECT *Op) +{ + if (!Op) + { + return (FALSE); + } + + if ((Op->Asl.ParseOpcode == PARSEOP_INTEGER) || + (Op->Asl.ParseOpcode == PARSEOP_ZERO) || + (Op->Asl.ParseOpcode == PARSEOP_ONE)) + { + return (TRUE); + } + + return (FALSE); } Modified: vendor-sys/acpica/dist/source/compiler/aslxref.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslxref.c Thu May 9 22:42:23 2019 (r347412) +++ vendor-sys/acpica/dist/source/compiler/aslxref.c Thu May 9 22:49:10 2019 (r347413) @@ -460,6 +460,8 @@ XfNamespaceLocateBegin ( ASL_METHOD_LOCAL *MethodArgs = NULL; int RegisterNumber; UINT32 i; + ACPI_NAMESPACE_NODE *DeclarationParentMethod; + ACPI_PARSE_OBJECT *ReferenceParentMethod; ACPI_FUNCTION_TRACE_PTR (XfNamespaceLocateBegin, Op); @@ -613,8 +615,7 @@ XfNamespaceLocateBegin ( (Op->Asl.ParseOpcode != PARSEOP_NAMESTRING) && (Op->Asl.ParseOpcode != PARSEOP_NAMESEG) && (Op->Asl.ParseOpcode != PARSEOP_METHODCALL) && - (Op->Asl.ParseOpcode != PARSEOP_EXTERNAL) && - (OpInfo->Type != AML_TYPE_NAMED_FIELD)) + (Op->Asl.ParseOpcode != PARSEOP_EXTERNAL)) { return_ACPI_STATUS (AE_OK); } @@ -638,8 +639,7 @@ XfNamespaceLocateBegin ( if ((Op->Asl.ParseOpcode == PARSEOP_NAMESTRING) || (Op->Asl.ParseOpcode == PARSEOP_NAMESEG) || (Op->Asl.ParseOpcode == PARSEOP_METHODCALL) || - (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL) || - (OpInfo->Type == AML_TYPE_NAMED_FIELD)) + (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL)) { /* * These are name references, do not push the scope stack @@ -676,10 +676,6 @@ XfNamespaceLocateBegin ( Path = NextOp->Asl.Value.String; } - else if (OpInfo->Type == AML_TYPE_NAMED_FIELD) - { - Path = Op->Asl.Child->Asl.Value.String; - } else { Path = Op->Asl.Value.String; @@ -798,22 +794,43 @@ XfNamespaceLocateBegin ( return_ACPI_STATUS (Status); } - /* Object was found above, check for an illegal forward reference */ + /* Object was found above, check for an illegal forward reference */ if (Op->Asl.CompileFlags & OP_NOT_FOUND_DURING_LOAD) { /* * During the load phase, this Op was flagged as a possible - * illegal forward reference + * illegal forward reference. In other words, Op is a name path or + * name segment that refers to a named object declared after the + * reference. In this scinario, Node refers to the actual declaration + * and Op is a parse node that references the named object. * - * Note: Allow "forward references" from within a method to an - * object that is not within any method (module-level code) + * Note: + * + * Object references inside of control methods are allowed to + * refer to objects declared outside of control methods. + * + * If the declaration and reference are both contained inside of the + * same method or outside of any method, this is a forward reference + * and should be reported as a compiler error. */ - if (!WalkState->ScopeInfo || (UtGetParentMethod (Node) && - !UtNodeIsDescendantOf (WalkState->ScopeInfo->Scope.Node, - UtGetParentMethod (Node)))) + DeclarationParentMethod = UtGetParentMethod (Node); + ReferenceParentMethod = XfGetParentMethod (Op); + + /* case 1: declaration and refrence are both outside of method */ + + if (!ReferenceParentMethod && !DeclarationParentMethod) { AslError (ASL_ERROR, ASL_MSG_ILLEGAL_FORWARD_REF, Op, + Op->Asl.ExternalName); + } + + /* case 2: declaration and reference are both inside of the same method */ + + else if (ReferenceParentMethod && DeclarationParentMethod && + ReferenceParentMethod == DeclarationParentMethod->Op) + { + AslError (ASL_ERROR, ASL_MSG_ILLEGAL_FORWARD_REF, Op, Op->Asl.ExternalName); } } Modified: vendor-sys/acpica/dist/source/components/events/evgpe.c ============================================================================== --- vendor-sys/acpica/dist/source/components/events/evgpe.c Thu May 9 22:42:23 2019 (r347412) +++ vendor-sys/acpica/dist/source/components/events/evgpe.c Thu May 9 22:49:10 2019 (r347413) @@ -240,14 +240,6 @@ AcpiEvEnableGpe ( ACPI_FUNCTION_TRACE (EvEnableGpe); - /* Clear the GPE (of stale events) */ - - Status = AcpiHwClearGpe(GpeEventInfo); - if (ACPI_FAILURE(Status)) - { - return_ACPI_STATUS(Status); - } - /* Enable the requested GPE */ Status = AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_ENABLE); Modified: vendor-sys/acpica/dist/source/include/acpixf.h ============================================================================== --- vendor-sys/acpica/dist/source/include/acpixf.h Thu May 9 22:42:23 2019 (r347412) +++ vendor-sys/acpica/dist/source/include/acpixf.h Thu May 9 22:49:10 2019 (r347413) @@ -154,7 +154,7 @@ /* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20190405 +#define ACPI_CA_VERSION 0x20190509 #include "acconfig.h" #include "actypes.h" Modified: vendor-sys/acpica/dist/source/include/platform/aclinux.h ============================================================================== --- vendor-sys/acpica/dist/source/include/platform/aclinux.h Thu May 9 22:42:23 2019 (r347412) +++ vendor-sys/acpica/dist/source/include/platform/aclinux.h Thu May 9 22:49:10 2019 (r347413) @@ -205,6 +205,11 @@ #define ACPI_INIT_FUNCTION __init +/* Use a specific bugging default separate from ACPICA */ + +#undef ACPI_DEBUG_DEFAULT +#define ACPI_DEBUG_DEFAULT (ACPI_LV_INFO | ACPI_LV_REPAIR) + #ifndef CONFIG_ACPI /* External globals for __KERNEL__, stubs is needed */ @@ -220,11 +225,6 @@ #define ACPI_NO_ERROR_MESSAGES #undef ACPI_DEBUG_OUTPUT - -/* Use a specific bugging default separate from ACPICA */ - -#undef ACPI_DEBUG_DEFAULT -#define ACPI_DEBUG_DEFAULT (ACPI_LV_INFO | ACPI_LV_REPAIR) /* External interface for __KERNEL__, stub is needed */ From owner-svn-src-vendor@freebsd.org Thu May 9 22:49:59 2019 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7EBD815900FA; Thu, 9 May 2019 22:49:59 +0000 (UTC) (envelope-from jkim@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 237D885CF1; Thu, 9 May 2019 22:49:59 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F3A17237C5; Thu, 9 May 2019 22:49:58 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x49MnwCV021006; Thu, 9 May 2019 22:49:58 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x49Mnwfd021005; Thu, 9 May 2019 22:49:58 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201905092249.x49Mnwfd021005@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 9 May 2019 22:49:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r347414 - vendor-sys/acpica/20190509 X-SVN-Group: vendor-sys X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: vendor-sys/acpica/20190509 X-SVN-Commit-Revision: 347414 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 237D885CF1 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 May 2019 22:49:59 -0000 Author: jkim Date: Thu May 9 22:49:58 2019 New Revision: 347414 URL: https://svnweb.freebsd.org/changeset/base/347414 Log: Tag ACPICA 20190509. Added: vendor-sys/acpica/20190509/ - copied from r347413, vendor-sys/acpica/dist/ From owner-svn-src-vendor@freebsd.org Fri May 10 17:28:56 2019 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 034C815A83B1; Fri, 10 May 2019 17:28:56 +0000 (UTC) (envelope-from des@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9CDD4829B3; Fri, 10 May 2019 17:28:55 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5B74D76A5; Fri, 10 May 2019 17:28:55 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4AHSt4s009238; Fri, 10 May 2019 17:28:55 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4AHSs1g009236; Fri, 10 May 2019 17:28:54 GMT (envelope-from des@FreeBSD.org) Message-Id: <201905101728.x4AHSs1g009236@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Fri, 10 May 2019 17:28:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r347446 - vendor/netcat/dist X-SVN-Group: vendor X-SVN-Commit-Author: des X-SVN-Commit-Paths: vendor/netcat/dist X-SVN-Commit-Revision: 347446 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9CDD4829B3 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 May 2019 17:28:56 -0000 Author: des Date: Fri May 10 17:28:54 2019 New Revision: 347446 URL: https://svnweb.freebsd.org/changeset/base/347446 Log: Import netcat from OpenBSD 6.0. Modified: vendor/netcat/dist/nc.1 vendor/netcat/dist/netcat.c vendor/netcat/dist/socks.c Modified: vendor/netcat/dist/nc.1 ============================================================================== --- vendor/netcat/dist/nc.1 Fri May 10 17:05:40 2019 (r347445) +++ vendor/netcat/dist/nc.1 Fri May 10 17:28:54 2019 (r347446) @@ -1,4 +1,4 @@ -.\" $OpenBSD: nc.1,v 1.71 2015/09/25 14:56:33 schwarze Exp $ +.\" $OpenBSD: nc.1,v 1.74 2016/07/02 05:58:00 jmc Exp $ .\" .\" Copyright (c) 1996 David Sacerdote .\" All rights reserved. @@ -25,7 +25,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: September 12 2015 $ +.Dd $Mdocdate: July 2 2016 $ .Dt NC 1 .Os .Sh NAME @@ -40,6 +40,8 @@ .Op Fl I Ar length .Op Fl i Ar interval .Op Fl K Ar keyfile +.Op Fl M Ar ttl +.Op Fl m Ar minttl .Op Fl O Ar length .Op Fl P Ar proxy_username .Op Fl p Ar source_port @@ -171,6 +173,11 @@ options. Additionally, any timeouts specified with the .Fl w option are ignored. +.It Fl M Ar ttl +Set the TTL / hop limit of outgoing packets. +.It Fl m Ar minttl +Ask the kernel to drop incoming packets whose TTL / hop limit is under +.Ar minttl . .It Fl N .Xr shutdown 2 the network socket after EOF on the input. @@ -337,8 +344,8 @@ sockets, a destination is required and is the socket p option is given). .Pp .Ar port -can be a single integer or a range of ports. -Ranges are in the form nn-mm. +can be a specified as a numeric port number, or as a service name. +Ports may be specified in a range of the form nn-mm. In general, a destination port must be specified, unless the Modified: vendor/netcat/dist/netcat.c ============================================================================== --- vendor/netcat/dist/netcat.c Fri May 10 17:05:40 2019 (r347445) +++ vendor/netcat/dist/netcat.c Fri May 10 17:28:54 2019 (r347446) @@ -1,4 +1,4 @@ -/* $OpenBSD: netcat.c,v 1.150 2016/01/04 02:18:31 bcook Exp $ */ +/* $OpenBSD: netcat.c,v 1.160 2016/07/13 16:35:47 jsing Exp $ */ /* * Copyright (c) 2001 Eric Jackson * Copyright (c) 2015 Bob Beck. All rights reserved. @@ -115,6 +115,8 @@ int timeout = -1; int family = AF_UNSPEC; char *portlist[PORT_MAX+1]; char *unix_dg_tmp_socket; +int ttl = -1; +int minttl = -1; void atelnet(int, unsigned char *, unsigned int); void build_ports(char *); @@ -133,7 +135,7 @@ int unix_listen(char *); void set_common_sockopts(int, int); int map_tos(char *, int *); int map_tls(char *, int *); -void report_connect(const struct sockaddr *, socklen_t); +void report_connect(const struct sockaddr *, socklen_t, char *); void report_tls(struct tls *tls_ctx, char * host, char *tls_expectname); void usage(int); ssize_t drainbuf(int, unsigned char *, size_t *, struct tls *); @@ -144,7 +146,7 @@ struct tls *tls_setup_server(struct tls *, int, char * int main(int argc, char *argv[]) { - int ch, s, ret, socksv; + int ch, s = -1, ret, socksv; char *host, *uport; struct addrinfo hints; struct servent *sv; @@ -158,7 +160,6 @@ main(int argc, char *argv[]) struct tls *tls_ctx = NULL; ret = 1; - s = 0; socksv = 5; host = NULL; uport = NULL; @@ -167,7 +168,7 @@ main(int argc, char *argv[]) signal(SIGPIPE, SIG_IGN); while ((ch = getopt(argc, argv, - "46C:cDde:FH:hI:i:K:klNnO:P:p:R:rSs:T:tUuV:vw:X:x:z")) != -1) { + "46C:cDde:FH:hI:i:K:klM:m:NnO:P:p:R:rSs:T:tUuV:vw:X:x:z")) != -1) { switch (ch) { case '4': family = AF_INET; @@ -223,6 +224,16 @@ main(int argc, char *argv[]) case 'l': lflag = 1; break; + case 'M': + ttl = strtonum(optarg, 0, 255, &errstr); + if (errstr) + errx(1, "ttl is %s", errstr); + break; + case 'm': + minttl = strtonum(optarg, 0, 255, &errstr); + if (errstr) + errx(1, "minttl is %s", errstr); + break; case 'N': Nflag = 1; break; @@ -323,8 +334,14 @@ main(int argc, char *argv[]) if (pledge("stdio rpath wpath cpath tmppath unix", NULL) == -1) err(1, "pledge"); } else if (Fflag) { - if (pledge("stdio inet dns sendfd", NULL) == -1) + if (Pflag) { + if (pledge("stdio inet dns sendfd tty", NULL) == -1) + err(1, "pledge"); + } else if (pledge("stdio inet dns sendfd", NULL) == -1) err(1, "pledge"); + } else if (Pflag) { + if (pledge("stdio inet dns tty", NULL) == -1) + err(1, "pledge"); } else if (usetls) { if (pledge("stdio rpath inet dns", NULL) == -1) err(1, "pledge"); @@ -434,7 +451,10 @@ main(int argc, char *argv[]) if (Kflag && (privkey = tls_load_file(Kflag, &privkeylen, NULL)) == NULL) errx(1, "unable to load TLS key file %s", Kflag); - if (pledge("stdio inet dns", NULL) == -1) + if (Pflag) { + if (pledge("stdio inet dns tty", NULL) == -1) + err(1, "pledge"); + } else if (pledge("stdio inet dns", NULL) == -1) err(1, "pledge"); if (tls_init() == -1) @@ -449,7 +469,7 @@ main(int argc, char *argv[]) errx(1, "unable to set TLS key file %s", Kflag); if (TLSopt & TLS_LEGACY) { tls_config_set_protocols(tls_cfg, TLS_PROTOCOLS_ALL); - tls_config_set_ciphers(tls_cfg, "legacy"); + tls_config_set_ciphers(tls_cfg, "all"); } if (!lflag && (TLSopt & TLS_CCERT)) errx(1, "clientcert is only valid with -l"); @@ -516,7 +536,7 @@ main(int argc, char *argv[]) err(1, "connect"); if (vflag) - report_connect((struct sockaddr *)&z, len); + report_connect((struct sockaddr *)&z, len, NULL); readwrite(s, NULL); } else { @@ -528,7 +548,8 @@ main(int argc, char *argv[]) err(1, "accept"); } if (vflag) - report_connect((struct sockaddr *)&cliaddr, len); + report_connect((struct sockaddr *)&cliaddr, len, + family == AF_UNIX ? host : NULL); if ((usetls) && (tls_cctx = tls_setup_server(tls_ctx, connfd, host))) readwrite(connfd, tls_cctx); @@ -576,8 +597,8 @@ main(int argc, char *argv[]) build_ports(uport); /* Cycle through portlist, connecting to each port. */ - for (i = 0; portlist[i] != NULL; i++) { - if (s) + for (s = -1, i = 0; portlist[i] != NULL; i++) { + if (s != -1) close(s); if (usetls) { @@ -594,7 +615,7 @@ main(int argc, char *argv[]) else s = remote_connect(host, portlist[i], hints); - if (s < 0) + if (s == -1) continue; ret = 0; @@ -643,7 +664,7 @@ main(int argc, char *argv[]) } } - if (s) + if (s != -1) close(s); tls_config_free(tls_cfg); @@ -659,7 +680,7 @@ int unix_bind(char *path, int flags) { struct sockaddr_un s_un; - int s; + int s, save_errno; /* Create unix domain socket. */ if ((s = socket(AF_UNIX, flags | (uflag ? SOCK_DGRAM : SOCK_STREAM), @@ -677,7 +698,9 @@ unix_bind(char *path, int flags) } if (bind(s, (struct sockaddr *)&s_un, sizeof(s_un)) < 0) { + save_errno = errno; close(s); + errno = save_errno; return (-1); } return (s); @@ -753,7 +776,7 @@ int unix_connect(char *path) { struct sockaddr_un s_un; - int s; + int s, save_errno; if (uflag) { if ((s = unix_bind(unix_dg_tmp_socket, SOCK_CLOEXEC)) < 0) @@ -773,7 +796,9 @@ unix_connect(char *path) return (-1); } if (connect(s, (struct sockaddr *)&s_un, sizeof(s_un)) < 0) { + save_errno = errno; close(s); + errno = save_errno; return (-1); } return (s); @@ -807,7 +832,7 @@ int remote_connect(const char *host, const char *port, struct addrinfo hints) { struct addrinfo *res, *res0; - int s, error, on = 1; + int s, error, on = 1, save_errno; if ((error = getaddrinfo(host, port, &hints, &res))) errx(1, "getaddrinfo: %s", gai_strerror(error)); @@ -846,7 +871,9 @@ remote_connect(const char *host, const char *port, str warn("connect to %s port %s (%s) failed", host, port, uflag ? "udp" : "tcp"); + save_errno = errno; close(s); + errno = save_errno; s = -1; } while ((res0 = res0->ai_next) != NULL); @@ -892,7 +919,7 @@ int local_listen(char *host, char *port, struct addrinfo hints) { struct addrinfo *res, *res0; - int s, ret, x = 1; + int s, ret, x = 1, save_errno; int error; /* Allow nodename to be null. */ @@ -924,7 +951,9 @@ local_listen(char *host, char *port, struct addrinfo h res0->ai_addrlen) == 0) break; + save_errno = errno; close(s); + errno = save_errno; s = -1; } while ((res0 = res0->ai_next) != NULL); @@ -1273,6 +1302,27 @@ atelnet(int nfd, unsigned char *buf, unsigned int size } } + +int +strtoport(char *portstr, int udp) +{ + struct servent *entry; + const char *errstr; + char *proto; + int port = -1; + + proto = udp ? "udp" : "tcp"; + + port = strtonum(portstr, 1, PORT_MAX, &errstr); + if (errstr == NULL) + return port; + if (errno != EINVAL) + errx(1, "port number %s: %s", errstr, portstr); + if ((entry = getservbyname(portstr, proto)) == NULL) + errx(1, "service \"%s\" unknown", portstr); + return ntohs(entry->s_port); +} + /* * build_ports() * Build an array of ports in portlist[], listing each port @@ -1281,7 +1331,6 @@ atelnet(int nfd, unsigned char *buf, unsigned int size void build_ports(char *p) { - const char *errstr; char *n; int hi, lo, cp; int x = 0; @@ -1291,13 +1340,8 @@ build_ports(char *p) n++; /* Make sure the ports are in order: lowest->highest. */ - hi = strtonum(n, 1, PORT_MAX, &errstr); - if (errstr) - errx(1, "port number %s: %s", errstr, n); - lo = strtonum(p, 1, PORT_MAX, &errstr); - if (errstr) - errx(1, "port number %s: %s", errstr, p); - + hi = strtoport(n, uflag); + lo = strtoport(p, uflag); if (lo > hi) { cp = hi; hi = lo; @@ -1323,11 +1367,12 @@ build_ports(char *p) } } } else { - hi = strtonum(p, 1, PORT_MAX, &errstr); - if (errstr) - errx(1, "port number %s: %s", errstr, p); - portlist[0] = strdup(p); - if (portlist[0] == NULL) + char *tmp; + + hi = strtoport(p, uflag); + if (asprintf(&tmp, "%d", hi) != -1) + portlist[0] = tmp; + else err(1, NULL); } } @@ -1367,18 +1412,13 @@ set_common_sockopts(int s, int af) err(1, NULL); } if (Tflag != -1) { - int proto, option; - - if (af == AF_INET6) { - proto = IPPROTO_IPV6; - option = IPV6_TCLASS; - } else { - proto = IPPROTO_IP; - option = IP_TOS; - } - - if (setsockopt(s, proto, option, &Tflag, sizeof(Tflag)) == -1) + if (af == AF_INET && setsockopt(s, IPPROTO_IP, + IP_TOS, &Tflag, sizeof(Tflag)) == -1) err(1, "set IP ToS"); + + else if (af == AF_INET6 && setsockopt(s, IPPROTO_IPV6, + IPV6_TCLASS, &Tflag, sizeof(Tflag)) == -1) + err(1, "set IPv6 traffic class"); } if (Iflag) { if (setsockopt(s, SOL_SOCKET, SO_RCVBUF, @@ -1390,6 +1430,26 @@ set_common_sockopts(int s, int af) &Oflag, sizeof(Oflag)) == -1) err(1, "set TCP send buffer size"); } + + if (ttl != -1) { + if (af == AF_INET && setsockopt(s, IPPROTO_IP, + IP_TTL, &ttl, sizeof(ttl))) + err(1, "set IP TTL"); + + else if (af == AF_INET6 && setsockopt(s, IPPROTO_IPV6, + IPV6_UNICAST_HOPS, &ttl, sizeof(ttl))) + err(1, "set IPv6 unicast hops"); + } + + if (minttl != -1) { + if (af == AF_INET && setsockopt(s, IPPROTO_IP, + IP_MINTTL, &minttl, sizeof(minttl))) + err(1, "set IP min TTL"); + + else if (af == AF_INET6 && setsockopt(s, IPPROTO_IPV6, + IPV6_MINHOPCOUNT, &minttl, sizeof(minttl))) + err(1, "set IPv6 min hop count"); + } } int @@ -1487,13 +1547,18 @@ report_tls(struct tls * tls_ctx, char * host, char *tl } void -report_connect(const struct sockaddr *sa, socklen_t salen) +report_connect(const struct sockaddr *sa, socklen_t salen, char *path) { char remote_host[NI_MAXHOST]; char remote_port[NI_MAXSERV]; int herr; int flags = NI_NUMERICSERV; + if (path != NULL) { + fprintf(stderr, "Connection on %s received!\n", path); + return; + } + if (nflag) flags |= NI_NUMERICHOST; @@ -1532,6 +1597,8 @@ help(void) \t-K keyfile Private key file\n\ \t-k Keep inbound sockets open for multiple connects\n\ \t-l Listen mode, for inbound connects\n\ + \t-M ttl Outgoing TTL / Hop Limit\n\ + \t-m minttl Minimum incoming TTL / Hop Limit\n\ \t-N Shutdown the network socket after EOF on stdin\n\ \t-n Suppress name/port resolutions\n\ \t-O length TCP send buffer length\n\ @@ -1561,11 +1628,10 @@ usage(int ret) fprintf(stderr, "usage: nc [-46cDdFhklNnrStUuvz] [-C certfile] [-e name] " "[-H hash] [-I length]\n" - "\t [-i interval] [-K keyfile] [-O length] [-P proxy_username]\n" - "\t [-p source_port] [-R CAfile] [-s source] " - "[-T keyword] [-V rtable]\n" - "\t [-w timeout] [-X proxy_protocol] [-x proxy_address[:port]]\n" - "\t [destination] [port]\n"); + "\t [-i interval] [-K keyfile] [-M ttl] [-m minttl] [-O length]\n" + "\t [-P proxy_username] [-p source_port] [-R CAfile] [-s source]\n" + "\t [-T keyword] [-V rtable] [-w timeout] [-X proxy_protocol]\n" + "\t [-x proxy_address[:port]] [destination] [port]\n"); if (ret) exit(1); } Modified: vendor/netcat/dist/socks.c ============================================================================== --- vendor/netcat/dist/socks.c Fri May 10 17:05:40 2019 (r347445) +++ vendor/netcat/dist/socks.c Fri May 10 17:28:54 2019 (r347446) @@ -1,4 +1,4 @@ -/* $OpenBSD: socks.c,v 1.23 2015/12/10 18:31:52 mmcc Exp $ */ +/* $OpenBSD: socks.c,v 1.24 2016/06/27 14:43:04 deraadt Exp $ */ /* * Copyright (c) 1999 Niklas Hallqvist. All rights reserved. @@ -241,7 +241,7 @@ socks_connect(const char *host, const char *port, buf[2] = 0; buf[3] = SOCKS_DOMAIN; buf[4] = hlen; - memcpy(buf + 5, host, hlen); + memcpy(buf + 5, host, hlen); memcpy(buf + 5 + hlen, &serverport, sizeof serverport); wlen = 7 + hlen; break; From owner-svn-src-vendor@freebsd.org Fri May 10 17:29:01 2019 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9AE3315A83D1; Fri, 10 May 2019 17:29:01 +0000 (UTC) (envelope-from des@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3796C829E6; Fri, 10 May 2019 17:29:01 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A012A76A6; Fri, 10 May 2019 17:29:00 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4AHT0MQ009291; Fri, 10 May 2019 17:29:00 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4AHT0bh009290; Fri, 10 May 2019 17:29:00 GMT (envelope-from des@FreeBSD.org) Message-Id: <201905101729.x4AHT0bh009290@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Fri, 10 May 2019 17:29:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r347447 - vendor/netcat/6.0 X-SVN-Group: vendor X-SVN-Commit-Author: des X-SVN-Commit-Paths: vendor/netcat/6.0 X-SVN-Commit-Revision: 347447 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3796C829E6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 May 2019 17:29:01 -0000 Author: des Date: Fri May 10 17:29:00 2019 New Revision: 347447 URL: https://svnweb.freebsd.org/changeset/base/347447 Log: Tag netcat from OpenBSD 6.0. Added: vendor/netcat/6.0/ - copied from r347446, vendor/netcat/dist/ From owner-svn-src-vendor@freebsd.org Fri May 10 17:29:18 2019 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4A14915A8415; Fri, 10 May 2019 17:29:18 +0000 (UTC) (envelope-from des@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F0D2C82BD8; Fri, 10 May 2019 17:29:17 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CF59A76A9; Fri, 10 May 2019 17:29:17 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4AHTHl7009371; Fri, 10 May 2019 17:29:17 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4AHTH2s009370; Fri, 10 May 2019 17:29:17 GMT (envelope-from des@FreeBSD.org) Message-Id: <201905101729.x4AHTH2s009370@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Fri, 10 May 2019 17:29:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r347448 - vendor/netcat/dist X-SVN-Group: vendor X-SVN-Commit-Author: des X-SVN-Commit-Paths: vendor/netcat/dist X-SVN-Commit-Revision: 347448 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: F0D2C82BD8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.98)[-0.980,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 May 2019 17:29:18 -0000 Author: des Date: Fri May 10 17:29:17 2019 New Revision: 347448 URL: https://svnweb.freebsd.org/changeset/base/347448 Log: Import netcat from OpenBSD 6.1. Modified: vendor/netcat/dist/nc.1 vendor/netcat/dist/netcat.c Modified: vendor/netcat/dist/nc.1 ============================================================================== --- vendor/netcat/dist/nc.1 Fri May 10 17:29:00 2019 (r347447) +++ vendor/netcat/dist/nc.1 Fri May 10 17:29:17 2019 (r347448) @@ -1,4 +1,4 @@ -.\" $OpenBSD: nc.1,v 1.74 2016/07/02 05:58:00 jmc Exp $ +.\" $OpenBSD: nc.1,v 1.82 2017/02/09 20:15:59 jca Exp $ .\" .\" Copyright (c) 1996 David Sacerdote .\" All rights reserved. @@ -25,7 +25,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: July 2 2016 $ +.Dd $Mdocdate: February 9 2017 $ .Dt NC 1 .Os .Sh NAME @@ -43,6 +43,7 @@ .Op Fl M Ar ttl .Op Fl m Ar minttl .Op Fl O Ar length +.Op Fl o Ar staplefile .Op Fl P Ar proxy_username .Op Fl p Ar source_port .Op Fl R Ar CAfile @@ -187,6 +188,12 @@ Do not do any DNS or service lookups on any specified hostnames or ports. .It Fl O Ar length Specifies the size of the TCP send buffer. +.It Fl o Ar staplefile +Specifies the filename from which to load data to be stapled +during the TLS handshake. +The file is expected to contain an OCSP response from an OCSP server in +DER format. +May only be used with TLS and when a certificate is being used. .It Fl P Ar proxy_username Specifies a username to present to a proxy server that requires authentication. If no username is specified then authentication will not be attempted. @@ -224,14 +231,17 @@ Change IPv4 TOS value or TLS options. For TLS options .Ar keyword may be one of -.Ar tlslegacy , -which allows legacy TLS protocols; -.Ar noverify , +.Ar tlsall ; +which allows the use of all supported TLS protocols and ciphers, +.Ar noverify ; which disables certificate verification; .Ar noname , -which disables certificate name checking; or +which disables certificate name checking; .Ar clientcert , -which requires a client certificate on incoming connections. +which requires a client certificate on incoming connections; or +.Ar muststaple , +which requires the peer to provide a valid stapled OCSP response +with the handshake. It is illegal to specify TLS options if not using TLS. .Pp For IPv4 TOS value @@ -317,6 +327,9 @@ If .Ar port is not specified, the well-known port for the proxy protocol is used (1080 for SOCKS, 3128 for HTTPS). +An IPv6 address can be specified unambiguously by enclosing +.Ar proxy_address +in square brackets. .It Fl z Specifies that .Nm Modified: vendor/netcat/dist/netcat.c ============================================================================== --- vendor/netcat/dist/netcat.c Fri May 10 17:29:00 2019 (r347447) +++ vendor/netcat/dist/netcat.c Fri May 10 17:29:17 2019 (r347448) @@ -1,4 +1,4 @@ -/* $OpenBSD: netcat.c,v 1.160 2016/07/13 16:35:47 jsing Exp $ */ +/* $OpenBSD: netcat.c,v 1.178 2017/03/09 13:58:00 bluhm Exp $ */ /* * Copyright (c) 2001 Eric Jackson * Copyright (c) 2015 Bob Beck. All rights reserved. @@ -67,10 +67,11 @@ #define BUFSIZE 16384 #define DEFAULT_CA_FILE "/etc/ssl/cert.pem" -#define TLS_LEGACY (1 << 1) +#define TLS_ALL (1 << 1) #define TLS_NOVERIFY (1 << 2) #define TLS_NONAME (1 << 3) #define TLS_CCERT (1 << 4) +#define TLS_MUSTSTAPLE (1 << 5) /* Command Line Options */ int dflag; /* detached, no stdin */ @@ -99,17 +100,12 @@ int rtableid = -1; int usetls; /* use TLS */ char *Cflag; /* Public cert file */ char *Kflag; /* Private key file */ +char *oflag; /* OCSP stapling file */ char *Rflag = DEFAULT_CA_FILE; /* Root CA file */ int tls_cachanged; /* Using non-default CA file */ int TLSopt; /* TLS options */ char *tls_expectname; /* required name in peer cert */ char *tls_expecthash; /* required hash of peer cert */ -uint8_t *cacert; -size_t cacertlen; -uint8_t *privkey; -size_t privkeylen; -uint8_t *pubcert; -size_t pubcertlen; int timeout = -1; int family = AF_UNSPEC; @@ -125,6 +121,7 @@ int local_listen(char *, char *, struct addrinfo); void readwrite(int, struct tls *); void fdpass(int nfd) __attribute__((noreturn)); int remote_connect(const char *, const char *, struct addrinfo); +int timeout_tls(int, struct tls *, int (*)(struct tls *)); int timeout_connect(int, const struct sockaddr *, socklen_t); int socks_connect(const char *, const char *, struct addrinfo, const char *, const char *, struct addrinfo, int, const char *); @@ -152,8 +149,8 @@ main(int argc, char *argv[]) struct servent *sv; socklen_t len; struct sockaddr_storage cliaddr; - char *proxy; - const char *errstr, *proxyhost = "", *proxyport = NULL; + char *proxy, *proxyport = NULL; + const char *errstr; struct addrinfo proxyhints; char unix_dg_tmp_socket_buf[UNIX_DG_TMP_SOCKET_SIZE]; struct tls_config *tls_cfg = NULL; @@ -168,7 +165,7 @@ main(int argc, char *argv[]) signal(SIGPIPE, SIG_IGN); while ((ch = getopt(argc, argv, - "46C:cDde:FH:hI:i:K:klM:m:NnO:P:p:R:rSs:T:tUuV:vw:X:x:z")) != -1) { + "46C:cDde:FH:hI:i:K:klM:m:NnO:o:P:p:R:rSs:T:tUuV:vw:X:x:z")) != -1) { switch (ch) { case '4': family = AF_INET; @@ -300,6 +297,9 @@ main(int argc, char *argv[]) errx(1, "TCP send window %s: %s", errstr, optarg); break; + case 'o': + oflag = optarg; + break; case 'S': Sflag = 1; break; @@ -385,6 +385,8 @@ main(int argc, char *argv[]) errx(1, "you must specify -c to use -C"); if (Kflag && !usetls) errx(1, "you must specify -c to use -K"); + if (oflag && !Cflag) + errx(1, "you must specify -C to use -o"); if (tls_cachanged && !usetls) errx(1, "you must specify -c to use -R"); if (tls_expecthash && !usetls) @@ -425,15 +427,29 @@ main(int argc, char *argv[]) if (family == AF_UNIX) errx(1, "no proxy support for unix sockets"); - /* XXX IPv6 transport to proxy would probably work */ - if (family == AF_INET6) - errx(1, "no proxy support for IPv6"); - if (sflag) errx(1, "no proxy support for local source address"); - proxyhost = strsep(&proxy, ":"); - proxyport = proxy; + if (*proxy == '[') { + ++proxy; + proxyport = strchr(proxy, ']'); + if (proxyport == NULL) + errx(1, "missing closing bracket in proxy"); + *proxyport++ = '\0'; + if (*proxyport == '\0') + /* Use default proxy port. */ + proxyport = NULL; + else { + if (*proxyport == ':') + ++proxyport; + else + errx(1, "garbage proxy port delimiter"); + } + } else { + proxyport = strrchr(proxy, ':'); + if (proxyport != NULL) + *proxyport++ = '\0'; + } memset(&proxyhints, 0, sizeof(struct addrinfo)); proxyhints.ai_family = family; @@ -444,32 +460,30 @@ main(int argc, char *argv[]) } if (usetls) { - if (Rflag && (cacert = tls_load_file(Rflag, &cacertlen, NULL)) == NULL) - errx(1, "unable to load root CA file %s", Rflag); - if (Cflag && (pubcert = tls_load_file(Cflag, &pubcertlen, NULL)) == NULL) - errx(1, "unable to load TLS certificate file %s", Cflag); - if (Kflag && (privkey = tls_load_file(Kflag, &privkeylen, NULL)) == NULL) - errx(1, "unable to load TLS key file %s", Kflag); - if (Pflag) { - if (pledge("stdio inet dns tty", NULL) == -1) + if (pledge("stdio inet dns tty rpath", NULL) == -1) err(1, "pledge"); - } else if (pledge("stdio inet dns", NULL) == -1) + } else if (pledge("stdio inet dns rpath", NULL) == -1) err(1, "pledge"); if (tls_init() == -1) errx(1, "unable to initialize TLS"); if ((tls_cfg = tls_config_new()) == NULL) errx(1, "unable to allocate TLS config"); - if (Rflag && tls_config_set_ca_mem(tls_cfg, cacert, cacertlen) == -1) - errx(1, "unable to set root CA file %s", Rflag); - if (Cflag && tls_config_set_cert_mem(tls_cfg, pubcert, pubcertlen) == -1) - errx(1, "unable to set TLS certificate file %s", Cflag); - if (Kflag && tls_config_set_key_mem(tls_cfg, privkey, privkeylen) == -1) - errx(1, "unable to set TLS key file %s", Kflag); - if (TLSopt & TLS_LEGACY) { - tls_config_set_protocols(tls_cfg, TLS_PROTOCOLS_ALL); - tls_config_set_ciphers(tls_cfg, "all"); + if (Rflag && tls_config_set_ca_file(tls_cfg, Rflag) == -1) + errx(1, "%s", tls_config_error(tls_cfg)); + if (Cflag && tls_config_set_cert_file(tls_cfg, Cflag) == -1) + errx(1, "%s", tls_config_error(tls_cfg)); + if (Kflag && tls_config_set_key_file(tls_cfg, Kflag) == -1) + errx(1, "%s", tls_config_error(tls_cfg)); + if (oflag && tls_config_set_ocsp_staple_file(tls_cfg, oflag) == -1) + errx(1, "%s", tls_config_error(tls_cfg)); + if (TLSopt & TLS_ALL) { + if (tls_config_set_protocols(tls_cfg, + TLS_PROTOCOLS_ALL) != 0) + errx(1, "%s", tls_config_error(tls_cfg)); + if (tls_config_set_ciphers(tls_cfg, "all") != 0) + errx(1, "%s", tls_config_error(tls_cfg)); } if (!lflag && (TLSopt & TLS_CCERT)) errx(1, "clientcert is only valid with -l"); @@ -481,6 +495,14 @@ main(int argc, char *argv[]) "together"); tls_config_insecure_noverifycert(tls_cfg); } + if (TLSopt & TLS_MUSTSTAPLE) + tls_config_ocsp_require_stapling(tls_cfg); + + if (Pflag) { + if (pledge("stdio inet dns tty", NULL) == -1) + err(1, "pledge"); + } else if (pledge("stdio inet dns", NULL) == -1) + err(1, "pledge"); } if (lflag) { struct tls *tls_cctx = NULL; @@ -556,12 +578,7 @@ main(int argc, char *argv[]) if (!usetls) readwrite(connfd, NULL); if (tls_cctx) { - int i; - - do { - i = tls_close(tls_cctx); - } while (i == TLS_WANT_POLLIN || - i == TLS_WANT_POLLOUT); + timeout_tls(s, tls_cctx, tls_close); tls_free(tls_cctx); tls_cctx = NULL; } @@ -580,8 +597,9 @@ main(int argc, char *argv[]) } else if (family == AF_UNIX) { ret = 0; - if ((s = unix_connect(host)) > 0 && !zflag) { - readwrite(s, NULL); + if ((s = unix_connect(host)) > 0) { + if (!zflag) + readwrite(s, NULL); close(s); } else ret = 1; @@ -610,7 +628,7 @@ main(int argc, char *argv[]) } if (xflag) s = socks_connect(host, portlist[i], hints, - proxyhost, proxyport, proxyhints, socksv, + proxy, proxyport, proxyhints, socksv, Pflag); else s = remote_connect(host, portlist[i], hints); @@ -651,12 +669,7 @@ main(int argc, char *argv[]) if (!zflag) readwrite(s, tls_ctx); if (tls_ctx) { - int j; - - do { - j = tls_close(tls_ctx); - } while (j == TLS_WANT_POLLIN || - j == TLS_WANT_POLLOUT); + timeout_tls(s, tls_ctx, tls_close); tls_free(tls_ctx); tls_ctx = NULL; } @@ -706,21 +719,48 @@ unix_bind(char *path, int flags) return (s); } +int +timeout_tls(int s, struct tls *tls_ctx, int (*func)(struct tls *)) +{ + struct pollfd pfd; + int ret; + + while ((ret = (*func)(tls_ctx)) != 0) { + if (ret == TLS_WANT_POLLIN) + pfd.events = POLLIN; + else if (ret == TLS_WANT_POLLOUT) + pfd.events = POLLOUT; + else + break; + pfd.fd = s; + if ((ret = poll(&pfd, 1, timeout)) == 1) + continue; + else if (ret == 0) { + errno = ETIMEDOUT; + ret = -1; + break; + } else + err(1, "poll failed"); + } + + return (ret); +} + void tls_setup_client(struct tls *tls_ctx, int s, char *host) { - int i; + const char *errstr; if (tls_connect_socket(tls_ctx, s, tls_expectname ? tls_expectname : host) == -1) { errx(1, "tls connection failed (%s)", tls_error(tls_ctx)); } - do { - if ((i = tls_handshake(tls_ctx)) == -1) - errx(1, "tls handshake failed (%s)", - tls_error(tls_ctx)); - } while (i == TLS_WANT_POLLIN || i == TLS_WANT_POLLOUT); + if (timeout_tls(s, tls_ctx, tls_handshake) == -1) { + if ((errstr = tls_error(tls_ctx)) == NULL) + errstr = strerror(errno); + errx(1, "tls handshake failed (%s)", errstr); + } if (vflag) report_tls(tls_ctx, host, tls_expectname); if (tls_expecthash && tls_peer_cert_hash(tls_ctx) && @@ -732,22 +772,15 @@ struct tls * tls_setup_server(struct tls *tls_ctx, int connfd, char *host) { struct tls *tls_cctx; + const char *errstr; - if (tls_accept_socket(tls_ctx, &tls_cctx, - connfd) == -1) { - warnx("tls accept failed (%s)", - tls_error(tls_ctx)); - tls_cctx = NULL; + if (tls_accept_socket(tls_ctx, &tls_cctx, connfd) == -1) { + warnx("tls accept failed (%s)", tls_error(tls_ctx)); + } else if (timeout_tls(connfd, tls_cctx, tls_handshake) == -1) { + if ((errstr = tls_error(tls_cctx)) == NULL) + errstr = strerror(errno); + warnx("tls handshake failed (%s)", errstr); } else { - int i; - - do { - if ((i = tls_handshake(tls_cctx)) == -1) - warnx("tls handshake failed (%s)", - tls_error(tls_cctx)); - } while(i == TLS_WANT_POLLIN || i == TLS_WANT_POLLOUT); - } - if (tls_cctx) { int gotcert = tls_peer_cert_provided(tls_cctx); if (vflag && gotcert) @@ -832,15 +865,15 @@ int remote_connect(const char *host, const char *port, struct addrinfo hints) { struct addrinfo *res, *res0; - int s, error, on = 1, save_errno; + int s = -1, error, on = 1, save_errno; - if ((error = getaddrinfo(host, port, &hints, &res))) - errx(1, "getaddrinfo: %s", gai_strerror(error)); + if ((error = getaddrinfo(host, port, &hints, &res0))) + errx(1, "getaddrinfo for host \"%s\" port %s: %s", host, + port, gai_strerror(error)); - res0 = res; - do { - if ((s = socket(res0->ai_family, res0->ai_socktype | - SOCK_NONBLOCK, res0->ai_protocol)) < 0) + for (res = res0; res; res = res->ai_next) { + if ((s = socket(res->ai_family, res->ai_socktype | + SOCK_NONBLOCK, res->ai_protocol)) < 0) continue; /* Bind to a local port or source address if specified. */ @@ -850,7 +883,7 @@ remote_connect(const char *host, const char *port, str /* try SO_BINDANY, but don't insist */ setsockopt(s, SOL_SOCKET, SO_BINDANY, &on, sizeof(on)); memset(&ahints, 0, sizeof(struct addrinfo)); - ahints.ai_family = res0->ai_family; + ahints.ai_family = res->ai_family; ahints.ai_socktype = uflag ? SOCK_DGRAM : SOCK_STREAM; ahints.ai_protocol = uflag ? IPPROTO_UDP : IPPROTO_TCP; ahints.ai_flags = AI_PASSIVE; @@ -863,9 +896,9 @@ remote_connect(const char *host, const char *port, str freeaddrinfo(ares); } - set_common_sockopts(s, res0->ai_family); + set_common_sockopts(s, res->ai_family); - if (timeout_connect(s, res0->ai_addr, res0->ai_addrlen) == 0) + if (timeout_connect(s, res->ai_addr, res->ai_addrlen) == 0) break; if (vflag) warn("connect to %s port %s (%s) failed", host, port, @@ -875,9 +908,9 @@ remote_connect(const char *host, const char *port, str close(s); errno = save_errno; s = -1; - } while ((res0 = res0->ai_next) != NULL); + } - freeaddrinfo(res); + freeaddrinfo(res0); return (s); } @@ -919,7 +952,7 @@ int local_listen(char *host, char *port, struct addrinfo hints) { struct addrinfo *res, *res0; - int s, ret, x = 1, save_errno; + int s = -1, ret, x = 1, save_errno; int error; /* Allow nodename to be null. */ @@ -932,37 +965,36 @@ local_listen(char *host, char *port, struct addrinfo h if (host == NULL && hints.ai_family == AF_UNSPEC) hints.ai_family = AF_INET; - if ((error = getaddrinfo(host, port, &hints, &res))) + if ((error = getaddrinfo(host, port, &hints, &res0))) errx(1, "getaddrinfo: %s", gai_strerror(error)); - res0 = res; - do { - if ((s = socket(res0->ai_family, res0->ai_socktype, - res0->ai_protocol)) < 0) + for (res = res0; res; res = res->ai_next) { + if ((s = socket(res->ai_family, res->ai_socktype, + res->ai_protocol)) < 0) continue; ret = setsockopt(s, SOL_SOCKET, SO_REUSEPORT, &x, sizeof(x)); if (ret == -1) err(1, NULL); - set_common_sockopts(s, res0->ai_family); + set_common_sockopts(s, res->ai_family); - if (bind(s, (struct sockaddr *)res0->ai_addr, - res0->ai_addrlen) == 0) + if (bind(s, (struct sockaddr *)res->ai_addr, + res->ai_addrlen) == 0) break; save_errno = errno; close(s); errno = save_errno; s = -1; - } while ((res0 = res0->ai_next) != NULL); + } if (!uflag && s != -1) { if (listen(s, 1) < 0) err(1, "listen"); } - freeaddrinfo(res); + freeaddrinfo(res0); return (s); } @@ -1007,21 +1039,15 @@ readwrite(int net_fd, struct tls *tls_ctx) while (1) { /* both inputs are gone, buffers are empty, we are done */ if (pfd[POLL_STDIN].fd == -1 && pfd[POLL_NETIN].fd == -1 && - stdinbufpos == 0 && netinbufpos == 0) { - close(net_fd); + stdinbufpos == 0 && netinbufpos == 0) return; - } /* both outputs are gone, we can't continue */ - if (pfd[POLL_NETOUT].fd == -1 && pfd[POLL_STDOUT].fd == -1) { - close(net_fd); + if (pfd[POLL_NETOUT].fd == -1 && pfd[POLL_STDOUT].fd == -1) return; - } /* listen and net in gone, queues empty, done */ if (lflag && pfd[POLL_NETIN].fd == -1 && - stdinbufpos == 0 && netinbufpos == 0) { - close(net_fd); + stdinbufpos == 0 && netinbufpos == 0) return; - } /* help says -i is for "wait between lines sent". We read and * write arbitrary amounts of data, and we don't want to start @@ -1033,10 +1059,8 @@ readwrite(int net_fd, struct tls *tls_ctx) num_fds = poll(pfd, 4, timeout); /* treat poll errors */ - if (num_fds == -1) { - close(net_fd); + if (num_fds == -1) err(1, "polling error"); - } /* timeout happened */ if (num_fds == 0) @@ -1507,10 +1531,11 @@ map_tls(char *s, int *val) const char *keyword; int val; } *t, tlskeywords[] = { - { "tlslegacy", TLS_LEGACY }, + { "tlsall", TLS_ALL }, { "noverify", TLS_NOVERIFY }, { "noname", TLS_NONAME }, { "clientcert", TLS_CCERT}, + { "muststaple", TLS_MUSTSTAPLE}, { NULL, -1 }, }; @@ -1527,6 +1552,8 @@ void report_tls(struct tls * tls_ctx, char * host, char *tls_expectname) { time_t t; + const char *ocsp_url; + fprintf(stderr, "TLS handshake negotiated %s/%s with host %s\n", tls_conn_version(tls_ctx), tls_conn_cipher(tls_ctx), host); fprintf(stderr, "Peer name: %s\n", @@ -1544,6 +1571,39 @@ report_tls(struct tls * tls_ctx, char * host, char *tl if (tls_peer_cert_hash(tls_ctx)) fprintf(stderr, "Cert Hash: %s\n", tls_peer_cert_hash(tls_ctx)); + ocsp_url = tls_peer_ocsp_url(tls_ctx); + if (ocsp_url != NULL) + fprintf(stderr, "OCSP URL: %s\n", ocsp_url); + switch (tls_peer_ocsp_response_status(tls_ctx)) { + case TLS_OCSP_RESPONSE_SUCCESSFUL: + fprintf(stderr, "OCSP Stapling: %s\n", + tls_peer_ocsp_result(tls_ctx) == NULL ? "" : + tls_peer_ocsp_result(tls_ctx)); + fprintf(stderr, + " response_status=%d cert_status=%d crl_reason=%d\n", + tls_peer_ocsp_response_status(tls_ctx), + tls_peer_ocsp_cert_status(tls_ctx), + tls_peer_ocsp_crl_reason(tls_ctx)); + t = tls_peer_ocsp_this_update(tls_ctx); + fprintf(stderr, " this update: %s", + t != -1 ? ctime(&t) : "\n"); + t = tls_peer_ocsp_next_update(tls_ctx); + fprintf(stderr, " next update: %s", + t != -1 ? ctime(&t) : "\n"); + t = tls_peer_ocsp_revocation_time(tls_ctx); + fprintf(stderr, " revocation: %s", + t != -1 ? ctime(&t) : "\n"); + break; + case -1: + break; + default: + fprintf(stderr, "OCSP Stapling: failure - response_status %d (%s)\n", + tls_peer_ocsp_response_status(tls_ctx), + tls_peer_ocsp_result(tls_ctx) == NULL ? "" : + tls_peer_ocsp_result(tls_ctx)); + break; + + } } void @@ -1602,6 +1662,7 @@ help(void) \t-N Shutdown the network socket after EOF on stdin\n\ \t-n Suppress name/port resolutions\n\ \t-O length TCP send buffer length\n\ + \t-o staplefile Staple file\n\ \t-P proxyuser\tUsername for proxy authentication\n\ \t-p port\t Specify local port for remote connects\n\ \t-R CAfile CA bundle\n\ @@ -1629,8 +1690,10 @@ usage(int ret) "usage: nc [-46cDdFhklNnrStUuvz] [-C certfile] [-e name] " "[-H hash] [-I length]\n" "\t [-i interval] [-K keyfile] [-M ttl] [-m minttl] [-O length]\n" - "\t [-P proxy_username] [-p source_port] [-R CAfile] [-s source]\n" - "\t [-T keyword] [-V rtable] [-w timeout] [-X proxy_protocol]\n" + "\t [-o staplefile] [-P proxy_username] [-p source_port] " + "[-R CAfile]\n" + "\t [-s source] [-T keyword] [-V rtable] [-w timeout] " + "[-X proxy_protocol]\n" "\t [-x proxy_address[:port]] [destination] [port]\n"); if (ret) exit(1); From owner-svn-src-vendor@freebsd.org Fri May 10 17:29:25 2019 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28F1915A8449; Fri, 10 May 2019 17:29:25 +0000 (UTC) (envelope-from des@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9534182C60; Fri, 10 May 2019 17:29:24 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1601576AB; Fri, 10 May 2019 17:29:23 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4AHTMnj009420; Fri, 10 May 2019 17:29:22 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4AHTMgX009419; Fri, 10 May 2019 17:29:22 GMT (envelope-from des@FreeBSD.org) Message-Id: <201905101729.x4AHTMgX009419@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Fri, 10 May 2019 17:29:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r347449 - vendor/netcat/6.1 X-SVN-Group: vendor X-SVN-Commit-Author: des X-SVN-Commit-Paths: vendor/netcat/6.1 X-SVN-Commit-Revision: 347449 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9534182C60 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 May 2019 17:29:25 -0000 Author: des Date: Fri May 10 17:29:22 2019 New Revision: 347449 URL: https://svnweb.freebsd.org/changeset/base/347449 Log: Tag netcat from OpenBSD 6.1. Added: vendor/netcat/6.1/ - copied from r347448, vendor/netcat/dist/ From owner-svn-src-vendor@freebsd.org Fri May 10 17:29:32 2019 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41C5115A8473; Fri, 10 May 2019 17:29:32 +0000 (UTC) (envelope-from des@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DF0E382D17; Fri, 10 May 2019 17:29:31 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 00FC476AC; Fri, 10 May 2019 17:29:31 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4AHTUBS009471; Fri, 10 May 2019 17:29:30 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4AHTUKC009469; Fri, 10 May 2019 17:29:30 GMT (envelope-from des@FreeBSD.org) Message-Id: <201905101729.x4AHTUKC009469@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Fri, 10 May 2019 17:29:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r347450 - vendor/netcat/dist X-SVN-Group: vendor X-SVN-Commit-Author: des X-SVN-Commit-Paths: vendor/netcat/dist X-SVN-Commit-Revision: 347450 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DF0E382D17 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 May 2019 17:29:32 -0000 Author: des Date: Fri May 10 17:29:30 2019 New Revision: 347450 URL: https://svnweb.freebsd.org/changeset/base/347450 Log: Import netcat from OpenBSD 6.2. Modified: vendor/netcat/dist/nc.1 vendor/netcat/dist/netcat.c Modified: vendor/netcat/dist/nc.1 ============================================================================== --- vendor/netcat/dist/nc.1 Fri May 10 17:29:22 2019 (r347449) +++ vendor/netcat/dist/nc.1 Fri May 10 17:29:30 2019 (r347450) @@ -1,4 +1,4 @@ -.\" $OpenBSD: nc.1,v 1.82 2017/02/09 20:15:59 jca Exp $ +.\" $OpenBSD: nc.1,v 1.87 2017/07/15 18:11:47 jmc Exp $ .\" .\" Copyright (c) 1996 David Sacerdote .\" All rights reserved. @@ -25,7 +25,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: February 9 2017 $ +.Dd $Mdocdate: July 15 2017 $ .Dt NC 1 .Os .Sh NAME @@ -50,9 +50,11 @@ .Op Fl s Ar source .Op Fl T Ar keyword .Op Fl V Ar rtable +.Op Fl W Ar recvlimit .Op Fl w Ar timeout .Op Fl X Ar proxy_protocol .Op Fl x Ar proxy_address Ns Op : Ns Ar port +.Op Fl Z Ar peercertfile .Op Ar destination .Op Ar port .Sh DESCRIPTION @@ -230,10 +232,12 @@ option. Change IPv4 TOS value or TLS options. For TLS options .Ar keyword -may be one of -.Ar tlsall ; -which allows the use of all supported TLS protocols and ciphers, -.Ar noverify ; +may be one of: +.Ar tlsall , +which allows the use of all supported TLS protocols and ciphers; +.Ar tlscompat , +which allows the use of all supported TLS protocols and "compat" ciphers; +.Ar noverify , which disables certificate verification; .Ar noname , which disables certificate name checking; @@ -287,6 +291,10 @@ Set the routing table to be used. Have .Nm give more verbose output. +.It Fl W Ar recvlimit +Terminate after receiving +.Ar recvlimit +packets from the network. .It Fl w Ar timeout Connections which cannot be established or are idle timeout after .Ar timeout @@ -330,6 +338,10 @@ for SOCKS, 3128 for HTTPS). An IPv6 address can be specified unambiguously by enclosing .Ar proxy_address in square brackets. +.It Fl Z Ar peercertfile +Specifies the filename in which the peer supplied certificates will be saved +in PEM format. +May only be used with TLS. .It Fl z Specifies that .Nm Modified: vendor/netcat/dist/netcat.c ============================================================================== --- vendor/netcat/dist/netcat.c Fri May 10 17:29:22 2019 (r347449) +++ vendor/netcat/dist/netcat.c Fri May 10 17:29:30 2019 (r347450) @@ -1,4 +1,4 @@ -/* $OpenBSD: netcat.c,v 1.178 2017/03/09 13:58:00 bluhm Exp $ */ +/* $OpenBSD: netcat.c,v 1.187 2017/07/15 17:27:39 jsing Exp $ */ /* * Copyright (c) 2001 Eric Jackson * Copyright (c) 2015 Bob Beck. All rights reserved. @@ -53,25 +53,27 @@ #include #include #include -#include #include +#include + #include "atomicio.h" #define PORT_MAX 65535 #define UNIX_DG_TMP_SOCKET_SIZE 19 -#define POLL_STDIN 0 -#define POLL_NETOUT 1 -#define POLL_NETIN 2 -#define POLL_STDOUT 3 -#define BUFSIZE 16384 -#define DEFAULT_CA_FILE "/etc/ssl/cert.pem" +#define POLL_STDIN 0 +#define POLL_NETOUT 1 +#define POLL_NETIN 2 +#define POLL_STDOUT 3 +#define BUFSIZE 16384 +#define DEFAULT_CA_FILE "/etc/ssl/cert.pem" #define TLS_ALL (1 << 1) #define TLS_NOVERIFY (1 << 2) #define TLS_NONAME (1 << 3) #define TLS_CCERT (1 << 4) #define TLS_MUSTSTAPLE (1 << 5) +#define TLS_COMPAT (1 << 6) /* Command Line Options */ int dflag; /* detached, no stdin */ @@ -106,7 +108,9 @@ int tls_cachanged; /* Using non-default CA file */ int TLSopt; /* TLS options */ char *tls_expectname; /* required name in peer cert */ char *tls_expecthash; /* required hash of peer cert */ +FILE *Zflag; /* file to save peer cert */ +int recvcount, recvlimit; int timeout = -1; int family = AF_UNSPEC; char *portlist[PORT_MAX+1]; @@ -115,8 +119,9 @@ int ttl = -1; int minttl = -1; void atelnet(int, unsigned char *, unsigned int); +int strtoport(char *portstr, int udp); void build_ports(char *); -void help(void); +void help(void) __attribute__((noreturn)); int local_listen(char *, char *, struct addrinfo); void readwrite(int, struct tls *); void fdpass(int nfd) __attribute__((noreturn)); @@ -132,8 +137,9 @@ int unix_listen(char *); void set_common_sockopts(int, int); int map_tos(char *, int *); int map_tls(char *, int *); +void save_peer_cert(struct tls *_tls_ctx, FILE *_fp); void report_connect(const struct sockaddr *, socklen_t, char *); -void report_tls(struct tls *tls_ctx, char * host, char *tls_expectname); +void report_tls(struct tls *tls_ctx, char * host); void usage(int); ssize_t drainbuf(int, unsigned char *, size_t *, struct tls *); ssize_t fillbuf(int, unsigned char *, size_t *, struct tls *); @@ -149,7 +155,7 @@ main(int argc, char *argv[]) struct servent *sv; socklen_t len; struct sockaddr_storage cliaddr; - char *proxy, *proxyport = NULL; + char *proxy = NULL, *proxyport = NULL; const char *errstr; struct addrinfo proxyhints; char unix_dg_tmp_socket_buf[UNIX_DG_TMP_SOCKET_SIZE]; @@ -165,7 +171,8 @@ main(int argc, char *argv[]) signal(SIGPIPE, SIG_IGN); while ((ch = getopt(argc, argv, - "46C:cDde:FH:hI:i:K:klM:m:NnO:o:P:p:R:rSs:T:tUuV:vw:X:x:z")) != -1) { + "46C:cDde:FH:hI:i:K:klM:m:NnO:o:P:p:R:rSs:T:tUuV:vW:w:X:x:Z:z")) + != -1) { switch (ch) { case '4': family = AF_INET; @@ -268,6 +275,11 @@ main(int argc, char *argv[]) case 'v': vflag = 1; break; + case 'W': + recvlimit = strtonum(optarg, 1, INT_MAX, &errstr); + if (errstr) + errx(1, "receive limit %s: %s", errstr, optarg); + break; case 'w': timeout = strtonum(optarg, 0, INT_MAX / 1000, &errstr); if (errstr) @@ -279,6 +291,12 @@ main(int argc, char *argv[]) if ((proxy = strdup(optarg)) == NULL) err(1, NULL); break; + case 'Z': + if (strcmp(optarg, "-") == 0) + Zflag = stderr; + else if ((Zflag = fopen(optarg, "w")) == NULL) + err(1, "can't open %s", optarg); + break; case 'z': zflag = 1; break; @@ -333,12 +351,15 @@ main(int argc, char *argv[]) if (family == AF_UNIX) { if (pledge("stdio rpath wpath cpath tmppath unix", NULL) == -1) err(1, "pledge"); - } else if (Fflag) { - if (Pflag) { - if (pledge("stdio inet dns sendfd tty", NULL) == -1) - err(1, "pledge"); - } else if (pledge("stdio inet dns sendfd", NULL) == -1) + } else if (Fflag && Pflag) { + if (pledge("stdio inet dns sendfd tty", NULL) == -1) err(1, "pledge"); + } else if (Fflag) { + if (pledge("stdio inet dns sendfd", NULL) == -1) + err(1, "pledge"); + } else if (Pflag && usetls) { + if (pledge("stdio rpath inet dns tty", NULL) == -1) + err(1, "pledge"); } else if (Pflag) { if (pledge("stdio inet dns tty", NULL) == -1) err(1, "pledge"); @@ -353,7 +374,7 @@ main(int argc, char *argv[]) host = argv[0]; uport = NULL; } else if (argv[0] && !argv[1]) { - if (!lflag) + if (!lflag) usage(1); uport = argv[0]; host = NULL; @@ -381,10 +402,14 @@ main(int argc, char *argv[]) errx(1, "cannot use -c and -F"); if (TLSopt && !usetls) errx(1, "you must specify -c to use TLS options"); + if ((TLSopt & (TLS_ALL|TLS_COMPAT)) == (TLS_ALL|TLS_COMPAT)) + errx(1, "cannot use -T tlsall and -T tlscompat"); if (Cflag && !usetls) errx(1, "you must specify -c to use -C"); if (Kflag && !usetls) errx(1, "you must specify -c to use -K"); + if (Zflag && !usetls) + errx(1, "you must specify -c to use -Z"); if (oflag && !Cflag) errx(1, "you must specify -C to use -o"); if (tls_cachanged && !usetls) @@ -460,12 +485,6 @@ main(int argc, char *argv[]) } if (usetls) { - if (Pflag) { - if (pledge("stdio inet dns tty rpath", NULL) == -1) - err(1, "pledge"); - } else if (pledge("stdio inet dns rpath", NULL) == -1) - err(1, "pledge"); - if (tls_init() == -1) errx(1, "unable to initialize TLS"); if ((tls_cfg = tls_config_new()) == NULL) @@ -478,11 +497,12 @@ main(int argc, char *argv[]) errx(1, "%s", tls_config_error(tls_cfg)); if (oflag && tls_config_set_ocsp_staple_file(tls_cfg, oflag) == -1) errx(1, "%s", tls_config_error(tls_cfg)); - if (TLSopt & TLS_ALL) { + if (TLSopt & (TLS_ALL|TLS_COMPAT)) { if (tls_config_set_protocols(tls_cfg, TLS_PROTOCOLS_ALL) != 0) errx(1, "%s", tls_config_error(tls_cfg)); - if (tls_config_set_ciphers(tls_cfg, "all") != 0) + if (tls_config_set_ciphers(tls_cfg, + (TLSopt & TLS_ALL) ? "all" : "compat") != 0) errx(1, "%s", tls_config_error(tls_cfg)); } if (!lflag && (TLSopt & TLS_CCERT)) @@ -491,7 +511,7 @@ main(int argc, char *argv[]) tls_config_insecure_noverifyname(tls_cfg); if (TLSopt & TLS_NOVERIFY) { if (tls_expecthash != NULL) - errx(1, "-H and -T noverify may not be used" + errx(1, "-H and -T noverify may not be used " "together"); tls_config_insecure_noverifycert(tls_cfg); } @@ -530,18 +550,19 @@ main(int argc, char *argv[]) s = local_listen(host, uport, hints); if (s < 0) err(1, NULL); - /* - * For UDP and -k, don't connect the socket, let it - * receive datagrams from multiple socket pairs. - */ - if (uflag && kflag) + if (uflag && kflag) { + /* + * For UDP and -k, don't connect the socket, + * let it receive datagrams from multiple + * socket pairs. + */ readwrite(s, NULL); - /* - * For UDP and not -k, we will use recvfrom() initially - * to wait for a caller, then use the regular functions - * to talk to the caller. - */ - else if (uflag && !kflag) { + } else if (uflag && !kflag) { + /* + * For UDP and not -k, we will use recvfrom() + * initially to wait for a caller, then use + * the regular functions to talk to the caller. + */ int rv, plen; char buf[16384]; struct sockaddr_storage z; @@ -606,7 +627,7 @@ main(int argc, char *argv[]) if (uflag) unlink(unix_dg_tmp_socket); - exit(ret); + return ret; } else { int i = 0; @@ -682,7 +703,7 @@ main(int argc, char *argv[]) tls_config_free(tls_cfg); - exit(ret); + return ret; } /* @@ -698,7 +719,7 @@ unix_bind(char *path, int flags) /* Create unix domain socket. */ if ((s = socket(AF_UNIX, flags | (uflag ? SOCK_DGRAM : SOCK_STREAM), 0)) < 0) - return (-1); + return -1; memset(&s_un, 0, sizeof(struct sockaddr_un)); s_un.sun_family = AF_UNIX; @@ -707,16 +728,17 @@ unix_bind(char *path, int flags) sizeof(s_un.sun_path)) { close(s); errno = ENAMETOOLONG; - return (-1); + return -1; } if (bind(s, (struct sockaddr *)&s_un, sizeof(s_un)) < 0) { save_errno = errno; close(s); errno = save_errno; - return (-1); + return -1; } - return (s); + + return s; } int @@ -743,7 +765,7 @@ timeout_tls(int s, struct tls *tls_ctx, int (*func)(st err(1, "poll failed"); } - return (ret); + return ret; } void @@ -762,10 +784,15 @@ tls_setup_client(struct tls *tls_ctx, int s, char *hos errx(1, "tls handshake failed (%s)", errstr); } if (vflag) - report_tls(tls_ctx, host, tls_expectname); + report_tls(tls_ctx, host); if (tls_expecthash && tls_peer_cert_hash(tls_ctx) && strcmp(tls_expecthash, tls_peer_cert_hash(tls_ctx)) != 0) errx(1, "peer certificate is not %s", tls_expecthash); + if (Zflag) { + save_peer_cert(tls_ctx, Zflag); + if (Zflag != stderr && (fclose(Zflag) != 0)) + err(1, "fclose failed saving peer cert"); + } } struct tls * @@ -784,7 +811,7 @@ tls_setup_server(struct tls *tls_ctx, int connfd, char int gotcert = tls_peer_cert_provided(tls_cctx); if (vflag && gotcert) - report_tls(tls_cctx, host, tls_expectname); + report_tls(tls_cctx, host); if ((TLSopt & TLS_CCERT) && !gotcert) warnx("No client certificate provided"); else if (gotcert && tls_peer_cert_hash(tls_ctx) && tls_expecthash && @@ -813,10 +840,10 @@ unix_connect(char *path) if (uflag) { if ((s = unix_bind(unix_dg_tmp_socket, SOCK_CLOEXEC)) < 0) - return (-1); + return -1; } else { if ((s = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0)) < 0) - return (-1); + return -1; } memset(&s_un, 0, sizeof(struct sockaddr_un)); @@ -826,15 +853,15 @@ unix_connect(char *path) sizeof(s_un.sun_path)) { close(s); errno = ENAMETOOLONG; - return (-1); + return -1; } if (connect(s, (struct sockaddr *)&s_un, sizeof(s_un)) < 0) { save_errno = errno; close(s); errno = save_errno; - return (-1); + return -1; } - return (s); + return s; } @@ -847,13 +874,13 @@ unix_listen(char *path) { int s; if ((s = unix_bind(path, 0)) < 0) - return (-1); + return -1; if (listen(s, 5) < 0) { close(s); - return (-1); + return -1; } - return (s); + return s; } /* @@ -912,7 +939,7 @@ remote_connect(const char *host, const char *port, str freeaddrinfo(res0); - return (s); + return s; } int @@ -940,7 +967,7 @@ timeout_connect(int s, const struct sockaddr *name, so err(1, "poll failed"); } - return (ret); + return ret; } /* @@ -996,7 +1023,7 @@ local_listen(char *host, char *port, struct addrinfo h freeaddrinfo(res0); - return (s); + return s; } /* @@ -1150,6 +1177,12 @@ readwrite(int net_fd, struct tls *tls_ctx) shutdown(pfd[POLL_NETIN].fd, SHUT_RD); pfd[POLL_NETIN].fd = -1; } + if (recvlimit > 0 && ++recvcount >= recvlimit) { + if (pfd[POLL_NETIN].fd != -1) + shutdown(pfd[POLL_NETIN].fd, SHUT_RD); + pfd[POLL_NETIN].fd = -1; + pfd[POLL_STDIN].fd = -1; + } /* read something - poll stdout */ if (netinbufpos > 0) pfd[POLL_STDOUT].events = POLLOUT; @@ -1417,7 +1450,7 @@ udptest(int s) else ret = -1; } - return (ret); + return ret; } void @@ -1517,11 +1550,11 @@ map_tos(char *s, int *val) for (t = toskeywords; t->keyword != NULL; t++) { if (strcmp(s, t->keyword) == 0) { *val = t->val; - return (1); + return 1; } } - return (0); + return 0; } int @@ -1536,21 +1569,36 @@ map_tls(char *s, int *val) { "noname", TLS_NONAME }, { "clientcert", TLS_CCERT}, { "muststaple", TLS_MUSTSTAPLE}, + { "tlscompat", TLS_COMPAT }, { NULL, -1 }, }; for (t = tlskeywords; t->keyword != NULL; t++) { if (strcmp(s, t->keyword) == 0) { *val |= t->val; - return (1); + return 1; } } - return (0); + return 0; } void -report_tls(struct tls * tls_ctx, char * host, char *tls_expectname) +save_peer_cert(struct tls *tls_ctx, FILE *fp) { + const char *pem; + size_t plen; + + if ((pem = tls_peer_cert_chain_pem(tls_ctx, &plen)) == NULL) + errx(1, "Can't get peer certificate"); + if (fprintf(fp, "%.*s", (int)plen, pem) < 0) + err(1, "unable to save peer cert"); + if (fflush(fp) != 0) + err(1, "unable to flush peer cert"); +} + +void +report_tls(struct tls * tls_ctx, char * host) +{ time_t t; const char *ocsp_url; @@ -1675,9 +1723,11 @@ help(void) \t-u UDP mode\n\ \t-V rtable Specify alternate routing table\n\ \t-v Verbose\n\ + \t-W recvlimit Terminate after receiving a number of packets\n\ \t-w timeout Timeout for connects and final net reads\n\ \t-X proto Proxy protocol: \"4\", \"5\" (SOCKS) or \"connect\"\n\ \t-x addr[:port]\tSpecify proxy address and port\n\ + \t-Z Peer certificate file\n\ \t-z Zero-I/O mode [used for scanning]\n\ Port numbers can be individual or ranges: lo-hi [inclusive]\n"); exit(1); @@ -1692,9 +1742,11 @@ usage(int ret) "\t [-i interval] [-K keyfile] [-M ttl] [-m minttl] [-O length]\n" "\t [-o staplefile] [-P proxy_username] [-p source_port] " "[-R CAfile]\n" - "\t [-s source] [-T keyword] [-V rtable] [-w timeout] " - "[-X proxy_protocol]\n" - "\t [-x proxy_address[:port]] [destination] [port]\n"); + "\t [-s source] [-T keyword] [-V rtable] [-W recvlimit] " + "[-w timeout]\n" + "\t [-X proxy_protocol] [-x proxy_address[:port]] " + "[-Z peercertfile]\n" + "\t [destination] [port]\n"); if (ret) exit(1); } From owner-svn-src-vendor@freebsd.org Fri May 10 17:29:38 2019 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08E7115A84AA; Fri, 10 May 2019 17:29:38 +0000 (UTC) (envelope-from des@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9F95682DCA; Fri, 10 May 2019 17:29:37 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6325E76B0; Fri, 10 May 2019 17:29:37 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4AHTbxO009520; Fri, 10 May 2019 17:29:37 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4AHTbG2009519; Fri, 10 May 2019 17:29:37 GMT (envelope-from des@FreeBSD.org) Message-Id: <201905101729.x4AHTbG2009519@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Fri, 10 May 2019 17:29:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r347451 - vendor/netcat/6.2 X-SVN-Group: vendor X-SVN-Commit-Author: des X-SVN-Commit-Paths: vendor/netcat/6.2 X-SVN-Commit-Revision: 347451 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9F95682DCA X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 May 2019 17:29:38 -0000 Author: des Date: Fri May 10 17:29:37 2019 New Revision: 347451 URL: https://svnweb.freebsd.org/changeset/base/347451 Log: Tag netcat from OpenBSD 6.2. Added: vendor/netcat/6.2/ - copied from r347450, vendor/netcat/dist/ From owner-svn-src-vendor@freebsd.org Fri May 10 17:29:45 2019 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F79215A84D9; Fri, 10 May 2019 17:29:45 +0000 (UTC) (envelope-from des@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1325A82EAE; Fri, 10 May 2019 17:29:45 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DB4ED76B1; Fri, 10 May 2019 17:29:44 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4AHTism009574; Fri, 10 May 2019 17:29:44 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4AHTi67009572; Fri, 10 May 2019 17:29:44 GMT (envelope-from des@FreeBSD.org) Message-Id: <201905101729.x4AHTi67009572@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Fri, 10 May 2019 17:29:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r347452 - vendor/netcat/dist X-SVN-Group: vendor X-SVN-Commit-Author: des X-SVN-Commit-Paths: vendor/netcat/dist X-SVN-Commit-Revision: 347452 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1325A82EAE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 May 2019 17:29:45 -0000 Author: des Date: Fri May 10 17:29:44 2019 New Revision: 347452 URL: https://svnweb.freebsd.org/changeset/base/347452 Log: Import netcat from OpenBSD 6.3. Modified: vendor/netcat/dist/nc.1 vendor/netcat/dist/netcat.c Modified: vendor/netcat/dist/nc.1 ============================================================================== --- vendor/netcat/dist/nc.1 Fri May 10 17:29:37 2019 (r347451) +++ vendor/netcat/dist/nc.1 Fri May 10 17:29:44 2019 (r347452) @@ -1,4 +1,4 @@ -.\" $OpenBSD: nc.1,v 1.87 2017/07/15 18:11:47 jmc Exp $ +.\" $OpenBSD: nc.1,v 1.88 2017/11/28 16:59:10 jsing Exp $ .\" .\" Copyright (c) 1996 David Sacerdote .\" All rights reserved. @@ -25,7 +25,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: July 15 2017 $ +.Dd $Mdocdate: November 28 2017 $ .Dt NC 1 .Os .Sh NAME @@ -233,10 +233,6 @@ Change IPv4 TOS value or TLS options. For TLS options .Ar keyword may be one of: -.Ar tlsall , -which allows the use of all supported TLS protocols and ciphers; -.Ar tlscompat , -which allows the use of all supported TLS protocols and "compat" ciphers; .Ar noverify , which disables certificate verification; .Ar noname , @@ -246,6 +242,15 @@ which requires a client certificate on incoming connec .Ar muststaple , which requires the peer to provide a valid stapled OCSP response with the handshake. +The following TLS options specify a value in the form of a key=value pair: +.Ar ciphers , +which allows the supported TLS ciphers to be specified (see +.Xr tls_config_set_ciphers 3 +for further details); +.Ar protocols , +which allows the supported TLS protocols to be specified (see +.Xr tls_config_parse_protocols 3 +for further details). It is illegal to specify TLS options if not using TLS. .Pp For IPv4 TOS value @@ -497,10 +502,15 @@ the source port, with a timeout of 5 seconds: .Pp .Dl $ nc -p 31337 -w 5 host.example.com 42 .Pp +Open a TCP connection to port 443 of www.example.com, and negotiate TLS with +any supported TLS protocol version and "compat" ciphers: +.Pp +.Dl $ nc -cv -T protocols=all -T ciphers=compat www.example.com 443 +.Pp Open a TCP connection to port 443 of www.google.ca, and negotiate TLS. -Check for a different name in the certificate for validation. +Check for a different name in the certificate for validation: .Pp -.Dl $ nc -v -c -e adsf.au.doubleclick.net www.google.ca 443 +.Dl $ nc -cv -e adsf.au.doubleclick.net www.google.ca 443 .Pp Open a UDP connection to port 53 of host.example.com: .Pp Modified: vendor/netcat/dist/netcat.c ============================================================================== --- vendor/netcat/dist/netcat.c Fri May 10 17:29:37 2019 (r347451) +++ vendor/netcat/dist/netcat.c Fri May 10 17:29:44 2019 (r347452) @@ -1,4 +1,4 @@ -/* $OpenBSD: netcat.c,v 1.187 2017/07/15 17:27:39 jsing Exp $ */ +/* $OpenBSD: netcat.c,v 1.190 2018/03/19 16:35:29 jsing Exp $ */ /* * Copyright (c) 2001 Eric Jackson * Copyright (c) 2015 Bob Beck. All rights reserved. @@ -68,12 +68,10 @@ #define BUFSIZE 16384 #define DEFAULT_CA_FILE "/etc/ssl/cert.pem" -#define TLS_ALL (1 << 1) -#define TLS_NOVERIFY (1 << 2) -#define TLS_NONAME (1 << 3) -#define TLS_CCERT (1 << 4) -#define TLS_MUSTSTAPLE (1 << 5) -#define TLS_COMPAT (1 << 6) +#define TLS_NOVERIFY (1 << 1) +#define TLS_NONAME (1 << 2) +#define TLS_CCERT (1 << 3) +#define TLS_MUSTSTAPLE (1 << 4) /* Command Line Options */ int dflag; /* detached, no stdin */ @@ -108,6 +106,8 @@ int tls_cachanged; /* Using non-default CA file */ int TLSopt; /* TLS options */ char *tls_expectname; /* required name in peer cert */ char *tls_expecthash; /* required hash of peer cert */ +char *tls_ciphers; /* TLS ciphers */ +char *tls_protocols; /* TLS protocols */ FILE *Zflag; /* file to save peer cert */ int recvcount, recvlimit; @@ -135,8 +135,8 @@ int unix_bind(char *, int); int unix_connect(char *); int unix_listen(char *); void set_common_sockopts(int, int); -int map_tos(char *, int *); -int map_tls(char *, int *); +int process_tos_opt(char *, int *); +int process_tls_opt(char *, int *); void save_peer_cert(struct tls *_tls_ctx, FILE *_fp); void report_connect(const struct sockaddr *, socklen_t, char *); void report_tls(struct tls *tls_ctx, char * host); @@ -161,6 +161,7 @@ main(int argc, char *argv[]) char unix_dg_tmp_socket_buf[UNIX_DG_TMP_SOCKET_SIZE]; struct tls_config *tls_cfg = NULL; struct tls *tls_ctx = NULL; + uint32_t protocols; ret = 1; socksv = 5; @@ -324,9 +325,9 @@ main(int argc, char *argv[]) case 'T': errstr = NULL; errno = 0; - if (map_tos(optarg, &Tflag)) + if (process_tls_opt(optarg, &TLSopt)) break; - if (map_tls(optarg, &TLSopt)) + if (process_tos_opt(optarg, &Tflag)) break; if (strlen(optarg) > 1 && optarg[0] == '0' && optarg[1] == 'x') @@ -402,8 +403,6 @@ main(int argc, char *argv[]) errx(1, "cannot use -c and -F"); if (TLSopt && !usetls) errx(1, "you must specify -c to use TLS options"); - if ((TLSopt & (TLS_ALL|TLS_COMPAT)) == (TLS_ALL|TLS_COMPAT)) - errx(1, "cannot use -T tlsall and -T tlscompat"); if (Cflag && !usetls) errx(1, "you must specify -c to use -C"); if (Kflag && !usetls) @@ -485,8 +484,6 @@ main(int argc, char *argv[]) } if (usetls) { - if (tls_init() == -1) - errx(1, "unable to initialize TLS"); if ((tls_cfg = tls_config_new()) == NULL) errx(1, "unable to allocate TLS config"); if (Rflag && tls_config_set_ca_file(tls_cfg, Rflag) == -1) @@ -497,14 +494,12 @@ main(int argc, char *argv[]) errx(1, "%s", tls_config_error(tls_cfg)); if (oflag && tls_config_set_ocsp_staple_file(tls_cfg, oflag) == -1) errx(1, "%s", tls_config_error(tls_cfg)); - if (TLSopt & (TLS_ALL|TLS_COMPAT)) { - if (tls_config_set_protocols(tls_cfg, - TLS_PROTOCOLS_ALL) != 0) - errx(1, "%s", tls_config_error(tls_cfg)); - if (tls_config_set_ciphers(tls_cfg, - (TLSopt & TLS_ALL) ? "all" : "compat") != 0) - errx(1, "%s", tls_config_error(tls_cfg)); - } + if (tls_config_parse_protocols(&protocols, tls_protocols) == -1) + errx(1, "invalid TLS protocols `%s'", tls_protocols); + if (tls_config_set_protocols(tls_cfg, protocols) == -1) + errx(1, "%s", tls_config_error(tls_cfg)); + if (tls_config_set_ciphers(tls_cfg, tls_ciphers) == -1) + errx(1, "%s", tls_config_error(tls_cfg)); if (!lflag && (TLSopt & TLS_CCERT)) errx(1, "clientcert is only valid with -l"); if (TLSopt & TLS_NONAME) @@ -563,13 +558,12 @@ main(int argc, char *argv[]) * initially to wait for a caller, then use * the regular functions to talk to the caller. */ - int rv, plen; - char buf[16384]; + int rv; + char buf[2048]; struct sockaddr_storage z; len = sizeof(z); - plen = 2048; - rv = recvfrom(s, buf, plen, MSG_PEEK, + rv = recvfrom(s, buf, sizeof(buf), MSG_PEEK, (struct sockaddr *)&z, &len); if (rv < 0) err(1, "recvfrom"); @@ -1510,7 +1504,7 @@ set_common_sockopts(int s, int af) } int -map_tos(char *s, int *val) +process_tos_opt(char *s, int *val) { /* DiffServ Codepoints and other TOS mappings */ const struct toskeywords { @@ -1558,24 +1552,41 @@ map_tos(char *s, int *val) } int -map_tls(char *s, int *val) +process_tls_opt(char *s, int *flags) { + size_t len; + char *v; + const struct tlskeywords { const char *keyword; - int val; + int flag; + char **value; } *t, tlskeywords[] = { - { "tlsall", TLS_ALL }, - { "noverify", TLS_NOVERIFY }, - { "noname", TLS_NONAME }, - { "clientcert", TLS_CCERT}, - { "muststaple", TLS_MUSTSTAPLE}, - { "tlscompat", TLS_COMPAT }, - { NULL, -1 }, + { "ciphers", -1, &tls_ciphers }, + { "clientcert", TLS_CCERT, NULL }, + { "muststaple", TLS_MUSTSTAPLE, NULL }, + { "noverify", TLS_NOVERIFY, NULL }, + { "noname", TLS_NONAME, NULL }, + { "protocols", -1, &tls_protocols }, + { NULL, -1, NULL }, }; + len = strlen(s); + if ((v = strchr(s, '=')) != NULL) { + len = v - s; + v++; + } + for (t = tlskeywords; t->keyword != NULL; t++) { - if (strcmp(s, t->keyword) == 0) { - *val |= t->val; + if (strlen(t->keyword) == len && + strncmp(s, t->keyword, len) == 0) { + if (t->value != NULL) { + if (v == NULL) + errx(1, "invalid tls value `%s'", s); + *t->value = v; + } else { + *flags |= t->flag; + } return 1; } } From owner-svn-src-vendor@freebsd.org Fri May 10 17:29:59 2019 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8DDF615A8505; Fri, 10 May 2019 17:29:59 +0000 (UTC) (envelope-from des@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0F2D482FA6; Fri, 10 May 2019 17:29:53 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 05B6A76B2; Fri, 10 May 2019 17:29:50 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4AHTnqV009622; Fri, 10 May 2019 17:29:49 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4AHTnY5009621; Fri, 10 May 2019 17:29:49 GMT (envelope-from des@FreeBSD.org) Message-Id: <201905101729.x4AHTnY5009621@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Fri, 10 May 2019 17:29:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r347453 - vendor/netcat/6.3 X-SVN-Group: vendor X-SVN-Commit-Author: des X-SVN-Commit-Paths: vendor/netcat/6.3 X-SVN-Commit-Revision: 347453 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0F2D482FA6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 May 2019 17:29:59 -0000 Author: des Date: Fri May 10 17:29:49 2019 New Revision: 347453 URL: https://svnweb.freebsd.org/changeset/base/347453 Log: Tag netcat from OpenBSD 6.3. Added: vendor/netcat/6.3/ - copied from r347452, vendor/netcat/dist/ From owner-svn-src-vendor@freebsd.org Fri May 10 17:31:33 2019 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2152A15A8676; Fri, 10 May 2019 17:31:33 +0000 (UTC) (envelope-from des@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C818B833D9; Fri, 10 May 2019 17:31:32 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A5144781F; Fri, 10 May 2019 17:31:32 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4AHVWxY012827; Fri, 10 May 2019 17:31:32 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4AHVW5L012824; Fri, 10 May 2019 17:31:32 GMT (envelope-from des@FreeBSD.org) Message-Id: <201905101731.x4AHVW5L012824@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Fri, 10 May 2019 17:31:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r347454 - vendor/netcat/dist X-SVN-Group: vendor X-SVN-Commit-Author: des X-SVN-Commit-Paths: vendor/netcat/dist X-SVN-Commit-Revision: 347454 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C818B833D9 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 May 2019 17:31:33 -0000 Author: des Date: Fri May 10 17:31:31 2019 New Revision: 347454 URL: https://svnweb.freebsd.org/changeset/base/347454 Log: Import netcat from OpenBSD 6.4. Modified: vendor/netcat/dist/nc.1 vendor/netcat/dist/netcat.c vendor/netcat/dist/socks.c Modified: vendor/netcat/dist/nc.1 ============================================================================== --- vendor/netcat/dist/nc.1 Fri May 10 17:29:49 2019 (r347453) +++ vendor/netcat/dist/nc.1 Fri May 10 17:31:31 2019 (r347454) @@ -1,4 +1,4 @@ -.\" $OpenBSD: nc.1,v 1.88 2017/11/28 16:59:10 jsing Exp $ +.\" $OpenBSD: nc.1,v 1.91 2018/09/25 20:05:07 jmc Exp $ .\" .\" Copyright (c) 1996 David Sacerdote .\" All rights reserved. @@ -25,7 +25,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: November 28 2017 $ +.Dd $Mdocdate: September 25 2018 $ .Dt NC 1 .Os .Sh NAME @@ -96,27 +96,31 @@ and much, much more The options are as follows: .Bl -tag -width Ds .It Fl 4 -Forces -.Nm -to use IPv4 addresses only. +Use IPv4 addresses only. .It Fl 6 -Forces -.Nm -to use IPv6 addresses only. +Use IPv6 addresses only. .It Fl C Ar certfile -Specifies the filename from which the public key part of the TLS -certificate is loaded, in PEM format. -May only be used with TLS. +Load the public key part of the TLS peer certificate from +.Ar certfile , +in PEM format. +Requires +.Fl c . .It Fl c -If using a TCP socket to connect or listen, use TLS. -Illegal if not using TCP sockets. +Use TLS to connect or listen. +Cannot be used together with any of the options +.Fl FuU . .It Fl D Enable debugging on the socket. .It Fl d Do not attempt to read from stdin. .It Fl e Ar name -Specify the name that must be present in the peer certificate when using TLS. -Illegal if not using TLS. +Only accept the TLS peer certificate if it contains the +.Ar name . +Requires +.Fl c . +If not specified, +.Ar destination +is used. .It Fl F Pass the first connected socket using .Xr sendmsg 2 @@ -132,47 +136,49 @@ using the .Xr ssh_config 5 .Cm ProxyUseFdpass option). +Cannot be used with +.Fl c +or +.Fl U . .It Fl H Ar hash -Specifies the required hash string of the peer certificate when using TLS. -The string format required is that used by -.Xr tls_peer_cert_hash 3 . -Illegal if not using TLS, and may not be used with -T noverify. +Only accept the TLS peer certificate if its hash returned from +.Xr tls_peer_cert_hash 3 +matches +.Ar hash . +Requires +.Fl c +and cannot be used with +.Fl T Cm noverify . .It Fl h -Prints out +Print out the .Nm -help. +help text and exit. .It Fl I Ar length -Specifies the size of the TCP receive buffer. +Specify the size of the TCP receive buffer. .It Fl i Ar interval -Specifies a delay time interval between lines of text sent and received. +Sleep for +.Ar interval +seconds between lines of text sent and received. Also causes a delay time between connections to multiple ports. .It Fl K Ar keyfile -Specifies the filename from which the private key -is loaded in PEM format. -May only be used with TLS. +Load the TLS private key from +.Ar keyfile , +in PEM format. +Requires +.Fl c . .It Fl k -Forces -.Nm -to stay listening for another connection after its current connection -is completed. -It is an error to use this option without the -.Fl l -option. +When a connection is completed, listen for another one. +Requires +.Fl l . When used together with the .Fl u option, the server socket is not connected and it can receive UDP datagrams from multiple hosts. .It Fl l -Used to specify that -.Nm -should listen for an incoming connection rather than initiate a +Listen for an incoming connection rather than initiating a connection to a remote host. -It is an error to use this option in conjunction with the -.Fl p , -.Fl s , -or -.Fl z -options. +Cannot be used together with any of the options +.Fl psxz . Additionally, any timeouts specified with the .Fl w option are ignored. @@ -189,97 +195,111 @@ Some servers require this to finish their work. Do not do any DNS or service lookups on any specified addresses, hostnames or ports. .It Fl O Ar length -Specifies the size of the TCP send buffer. +Specify the size of the TCP send buffer. .It Fl o Ar staplefile -Specifies the filename from which to load data to be stapled -during the TLS handshake. -The file is expected to contain an OCSP response from an OCSP server in +During the TLS handshake, load data to be stapled from +.Ar staplefile , +which is expected to contain an OCSP response from an OCSP server in DER format. -May only be used with TLS and when a certificate is being used. +Requires +.Fl c +and +.Fl C . .It Fl P Ar proxy_username Specifies a username to present to a proxy server that requires authentication. If no username is specified then authentication will not be attempted. Proxy authentication is only supported for HTTP CONNECT proxies at present. .It Fl p Ar source_port -Specifies the source port +Specify the source port .Nm should use, subject to privilege restrictions and availability. -It is an error to use this option in conjunction with the -.Fl l -option. +Cannot be used together with +.Fl l . .It Fl R Ar CAfile -Specifies the filename from which the root CA bundle for certificate -verification is loaded, in PEM format. -Illegal if not using TLS. -The default is +Load the root CA bundle for TLS certificate verification from +.Ar CAfile , +in PEM format, instead of .Pa /etc/ssl/cert.pem . +Requires +.Fl c . .It Fl r -Specifies that source and/or destination ports should be chosen randomly +Choose source and/or destination ports randomly instead of sequentially within a range or in the order that the system assigns them. .It Fl S -Enables the RFC 2385 TCP MD5 signature option. +Enable the RFC 2385 TCP MD5 signature option. .It Fl s Ar source -Specifies the IP of the interface which is used to send the packets. +Send packets from the interface with the +.Ar source +IP address. For .Ux Ns -domain datagram sockets, specifies the local temporary socket file to create and use so that datagrams can be received. -It is an error to use this option in conjunction with the +Cannot be used together with .Fl l -option. +or +.Fl x . .It Fl T Ar keyword -Change IPv4 TOS value or TLS options. -For TLS options +Change the IPv4 TOS/IPv6 traffic class value or the TLS options. +.Pp +For TLS options, .Ar keyword may be one of: -.Ar noverify , +.Cm noverify , which disables certificate verification; -.Ar noname , +.Cm noname , which disables certificate name checking; -.Ar clientcert , +.Cm clientcert , which requires a client certificate on incoming connections; or -.Ar muststaple , +.Cm muststaple , which requires the peer to provide a valid stapled OCSP response with the handshake. -The following TLS options specify a value in the form of a key=value pair: -.Ar ciphers , +The following TLS options specify a value in the form of a +.Ar key Ns = Ns Ar value +pair: +.Cm ciphers , which allows the supported TLS ciphers to be specified (see .Xr tls_config_set_ciphers 3 for further details); -.Ar protocols , +.Cm protocols , which allows the supported TLS protocols to be specified (see .Xr tls_config_parse_protocols 3 for further details). -It is illegal to specify TLS options if not using TLS. +Specifying TLS options requires +.Fl c . .Pp -For IPv4 TOS value +For the IPv4 TOS/IPv6 traffic class value, .Ar keyword may be one of -.Ar critical , -.Ar inetcontrol , -.Ar lowdelay , -.Ar netcontrol , -.Ar throughput , -.Ar reliability , +.Cm critical , +.Cm inetcontrol , +.Cm lowdelay , +.Cm netcontrol , +.Cm throughput , +.Cm reliability , or one of the DiffServ Code Points: -.Ar ef , -.Ar af11 ... af43 , -.Ar cs0 ... cs7 ; +.Cm ef , +.Cm af11 No ... Cm af43 , +.Cm cs0 No ... Cm cs7 ; or a number in either hex or decimal. .It Fl t -Causes -.Nm -to send RFC 854 DON'T and WON'T responses to RFC 854 DO and WILL requests. +Send RFC 854 DON'T and WON'T responses to RFC 854 DO and WILL requests. This makes it possible to use .Nm to script telnet sessions. .It Fl U -Specifies to use +Use .Ux Ns -domain sockets. +Cannot be used together with any of the options +.Fl cFx . .It Fl u -Use UDP instead of the default option of TCP. +Use UDP instead of TCP. +Cannot be used together with +.Fl c +or +.Fl x . For .Ux Ns -domain sockets, use a datagram socket instead of a stream socket. @@ -293,9 +313,7 @@ flag is given. .It Fl V Ar rtable Set the routing table to be used. .It Fl v -Have -.Nm -give more verbose output. +Produce more verbose output. .It Fl W Ar recvlimit Terminate after receiving .Ar recvlimit @@ -315,22 +333,20 @@ will listen forever for a connection, with or without flag. The default is no timeout. .It Fl X Ar proxy_protocol -Requests that -.Nm -should use the specified protocol when talking to the proxy server. +Use +.Ar proxy_protocol +when talking to the proxy server. Supported protocols are -.Dq 4 +.Cm 4 (SOCKS v.4), -.Dq 5 +.Cm 5 (SOCKS v.5) and -.Dq connect +.Cm connect (HTTPS proxy). If the protocol is not specified, SOCKS version 5 is used. .It Fl x Ar proxy_address Ns Op : Ns Ar port -Requests that -.Nm -should connect to +Connect to .Ar destination using a proxy at .Ar proxy_address @@ -343,17 +359,18 @@ for SOCKS, 3128 for HTTPS). An IPv6 address can be specified unambiguously by enclosing .Ar proxy_address in square brackets. +A proxy cannot be used with any of the options +.Fl lsuU . .It Fl Z Ar peercertfile -Specifies the filename in which the peer supplied certificates will be saved +Save the peer certificates to +.Ar peercertfile , in PEM format. -May only be used with TLS. +Requires +.Fl c . .It Fl z -Specifies that -.Nm -should just scan for listening daemons, without sending any data to them. -It is an error to use this option in conjunction with the -.Fl l -option. +Only scan for listening daemons, without sending any data to them. +Cannot be used together with +.Fl l . .El .Pp .Ar destination @@ -375,7 +392,8 @@ option is given). .Pp .Ar port can be a specified as a numeric port number, or as a service name. -Ports may be specified in a range of the form nn-mm. +Ports may be specified in a range of the form +.Ar nn Ns - Ns Ar mm . In general, a destination port must be specified, unless the @@ -548,8 +566,8 @@ if the proxy requires it: .Xr cat 1 , .Xr ssh 1 .Sh AUTHORS -Original implementation by *Hobbit* -.Aq Mt hobbit@avian.org . +Original implementation by +.An *Hobbit* Aq Mt hobbit@avian.org . .br Rewritten with IPv6 support by .An Eric Jackson Aq Mt ericj@monkey.org . Modified: vendor/netcat/dist/netcat.c ============================================================================== --- vendor/netcat/dist/netcat.c Fri May 10 17:29:49 2019 (r347453) +++ vendor/netcat/dist/netcat.c Fri May 10 17:31:31 2019 (r347454) @@ -1,4 +1,4 @@ -/* $OpenBSD: netcat.c,v 1.190 2018/03/19 16:35:29 jsing Exp $ */ +/* $OpenBSD: netcat.c,v 1.195 2018/10/04 17:04:50 bluhm Exp $ */ /* * Copyright (c) 2001 Eric Jackson * Copyright (c) 2015 Bob Beck. All rights reserved. @@ -122,7 +122,7 @@ void atelnet(int, unsigned char *, unsigned int); int strtoport(char *portstr, int udp); void build_ports(char *); void help(void) __attribute__((noreturn)); -int local_listen(char *, char *, struct addrinfo); +int local_listen(const char *, const char *, struct addrinfo); void readwrite(int, struct tls *); void fdpass(int nfd) __attribute__((noreturn)); int remote_connect(const char *, const char *, struct addrinfo); @@ -349,13 +349,51 @@ main(int argc, char *argv[]) if (setrtable(rtableid) == -1) err(1, "setrtable"); + /* Cruft to make sure options are clean, and used properly. */ + if (argv[0] && !argv[1] && family == AF_UNIX) { + host = argv[0]; + uport = NULL; + } else if (argv[0] && !argv[1]) { + if (!lflag) + usage(1); + uport = argv[0]; + host = NULL; + } else if (argv[0] && argv[1]) { + host = argv[0]; + uport = argv[1]; + } else + usage(1); + + if (usetls) { + if (Cflag && unveil(Cflag, "r") == -1) + err(1, "unveil"); + if (unveil(Rflag, "r") == -1) + err(1, "unveil"); + if (Kflag && unveil(Kflag, "r") == -1) + err(1, "unveil"); + if (oflag && unveil(oflag, "r") == -1) + err(1, "unveil"); + } else { + if (family == AF_UNIX) { + if (unveil(host, "rwc") == -1) + err(1, "unveil"); + if (uflag && !lflag) { + if (unveil(sflag ? sflag : "/tmp", "rwc") == -1) + err(1, "unveil"); + } + } else { + if (unveil("/", "") == -1) + err(1, "unveil"); + } + } + if (family == AF_UNIX) { if (pledge("stdio rpath wpath cpath tmppath unix", NULL) == -1) err(1, "pledge"); } else if (Fflag && Pflag) { if (pledge("stdio inet dns sendfd tty", NULL) == -1) err(1, "pledge"); - } else if (Fflag) { + } else if (Fflag) { if (pledge("stdio inet dns sendfd", NULL) == -1) err(1, "pledge"); } else if (Pflag && usetls) { @@ -370,21 +408,6 @@ main(int argc, char *argv[]) } else if (pledge("stdio inet dns", NULL) == -1) err(1, "pledge"); - /* Cruft to make sure options are clean, and used properly. */ - if (argv[0] && !argv[1] && family == AF_UNIX) { - host = argv[0]; - uport = NULL; - } else if (argv[0] && !argv[1]) { - if (!lflag) - usage(1); - uport = argv[0]; - host = NULL; - } else if (argv[0] && argv[1]) { - host = argv[0]; - uport = argv[1]; - } else - usage(1); - if (lflag && sflag) errx(1, "cannot use -s and -l"); if (lflag && pflag) @@ -520,8 +543,6 @@ main(int argc, char *argv[]) err(1, "pledge"); } if (lflag) { - struct tls *tls_cctx = NULL; - int connfd; ret = 0; if (family == AF_UNIX) { @@ -541,8 +562,11 @@ main(int argc, char *argv[]) } /* Allow only one connection at a time, but stay alive. */ for (;;) { - if (family != AF_UNIX) + if (family != AF_UNIX) { + if (s != -1) + close(s); s = local_listen(host, uport, hints); + } if (s < 0) err(1, NULL); if (uflag && kflag) { @@ -577,6 +601,9 @@ main(int argc, char *argv[]) readwrite(s, NULL); } else { + struct tls *tls_cctx = NULL; + int connfd; + len = sizeof(cliaddr); connfd = accept4(s, (struct sockaddr *)&cliaddr, &len, SOCK_NONBLOCK); @@ -592,16 +619,12 @@ main(int argc, char *argv[]) readwrite(connfd, tls_cctx); if (!usetls) readwrite(connfd, NULL); - if (tls_cctx) { + if (tls_cctx) timeout_tls(s, tls_cctx, tls_close); - tls_free(tls_cctx); - tls_cctx = NULL; - } close(connfd); + tls_free(tls_cctx); } - if (family != AF_UNIX) - close(s); - else if (uflag) { + if (family == AF_UNIX && uflag) { if (connect(s, NULL, 0) < 0) err(1, "connect"); } @@ -633,6 +656,8 @@ main(int argc, char *argv[]) for (s = -1, i = 0; portlist[i] != NULL; i++) { if (s != -1) close(s); + tls_free(tls_ctx); + tls_ctx = NULL; if (usetls) { if ((tls_ctx = tls_client()) == NULL) @@ -683,18 +708,15 @@ main(int argc, char *argv[]) tls_setup_client(tls_ctx, s, host); if (!zflag) readwrite(s, tls_ctx); - if (tls_ctx) { + if (tls_ctx) timeout_tls(s, tls_ctx, tls_close); - tls_free(tls_ctx); - tls_ctx = NULL; - } } } } if (s != -1) close(s); - + tls_free(tls_ctx); tls_config_free(tls_cfg); return ret; @@ -970,7 +992,7 @@ timeout_connect(int s, const struct sockaddr *name, so * address. Returns -1 on failure. */ int -local_listen(char *host, char *port, struct addrinfo hints) +local_listen(const char *host, const char *port, struct addrinfo hints) { struct addrinfo *res, *res0; int s = -1, ret, x = 1, save_errno; Modified: vendor/netcat/dist/socks.c ============================================================================== --- vendor/netcat/dist/socks.c Fri May 10 17:29:49 2019 (r347453) +++ vendor/netcat/dist/socks.c Fri May 10 17:31:31 2019 (r347454) @@ -1,4 +1,4 @@ -/* $OpenBSD: socks.c,v 1.24 2016/06/27 14:43:04 deraadt Exp $ */ +/* $OpenBSD: socks.c,v 1.25 2018/03/27 16:31:10 deraadt Exp $ */ /* * Copyright (c) 1999 Niklas Hallqvist. All rights reserved. @@ -109,17 +109,16 @@ proxy_read_line(int fd, char *buf, size_t bufsz) return (off); } -static const char * -getproxypass(const char *proxyuser, const char *proxyhost) +static void +getproxypass(const char *proxyuser, const char *proxyhost, + char *pw, size_t pwlen) { char prompt[512]; - static char pw[256]; snprintf(prompt, sizeof(prompt), "Proxy password for %s@%s: ", proxyuser, proxyhost); - if (readpassphrase(prompt, pw, sizeof(pw), RPP_REQUIRE_TTY) == NULL) + if (readpassphrase(prompt, pw, pwlen, RPP_REQUIRE_TTY) == NULL) errx(1, "Unable to read proxy passphrase"); - return (pw); } /* @@ -188,7 +187,6 @@ socks_connect(const char *host, const char *port, struct sockaddr_in *in4 = (struct sockaddr_in *)&addr; struct sockaddr_in6 *in6 = (struct sockaddr_in6 *)&addr; in_port_t serverport; - const char *proxypass = NULL; if (proxyport == NULL) proxyport = (socksv == -1) ? HTTP_PROXY_PORT : SOCKS_PORT; @@ -345,11 +343,14 @@ socks_connect(const char *host, const char *port, err(1, "write failed (%zu/%d)", cnt, r); if (authretry > 1) { + char proxypass[256]; char resp[1024]; - proxypass = getproxypass(proxyuser, proxyhost); + getproxypass(proxyuser, proxyhost, + proxypass, sizeof proxypass); r = snprintf(buf, sizeof(buf), "%s:%s", proxyuser, proxypass); + explicit_bzero(proxypass, sizeof proxypass); if (r == -1 || (size_t)r >= sizeof(buf) || b64_ntop(buf, strlen(buf), resp, sizeof(resp)) == -1) @@ -361,6 +362,8 @@ socks_connect(const char *host, const char *port, r = strlen(buf); if ((cnt = atomicio(vwrite, proxyfd, buf, r)) != r) err(1, "write failed (%zu/%d)", cnt, r); + explicit_bzero(proxypass, sizeof proxypass); + explicit_bzero(buf, sizeof buf); } /* Terminate headers */ From owner-svn-src-vendor@freebsd.org Fri May 10 17:31:39 2019 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 34B2F15A87C7; Fri, 10 May 2019 17:31:39 +0000 (UTC) (envelope-from des@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C7F3283430; Fri, 10 May 2019 17:31:38 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E473C7823; Fri, 10 May 2019 17:31:37 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4AHVbNh012878; Fri, 10 May 2019 17:31:37 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4AHVbIj012877; Fri, 10 May 2019 17:31:37 GMT (envelope-from des@FreeBSD.org) Message-Id: <201905101731.x4AHVbIj012877@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Fri, 10 May 2019 17:31:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r347455 - vendor/netcat/6.4 X-SVN-Group: vendor X-SVN-Commit-Author: des X-SVN-Commit-Paths: vendor/netcat/6.4 X-SVN-Commit-Revision: 347455 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C7F3283430 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.97)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 May 2019 17:31:39 -0000 Author: des Date: Fri May 10 17:31:37 2019 New Revision: 347455 URL: https://svnweb.freebsd.org/changeset/base/347455 Log: Tag netcat from OpenBSD 6.4. Added: vendor/netcat/6.4/ - copied from r347454, vendor/netcat/dist/ From owner-svn-src-vendor@freebsd.org Fri May 10 17:31:47 2019 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0915015A87EF; Fri, 10 May 2019 17:31:47 +0000 (UTC) (envelope-from des@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9ED6A834F9; Fri, 10 May 2019 17:31:46 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1A0857830; Fri, 10 May 2019 17:31:46 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4AHVjYS013651; Fri, 10 May 2019 17:31:45 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4AHVjbo013648; Fri, 10 May 2019 17:31:45 GMT (envelope-from des@FreeBSD.org) Message-Id: <201905101731.x4AHVjbo013648@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Fri, 10 May 2019 17:31:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r347456 - vendor/netcat/dist X-SVN-Group: vendor X-SVN-Commit-Author: des X-SVN-Commit-Paths: vendor/netcat/dist X-SVN-Commit-Revision: 347456 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9ED6A834F9 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 May 2019 17:31:47 -0000 Author: des Date: Fri May 10 17:31:45 2019 New Revision: 347456 URL: https://svnweb.freebsd.org/changeset/base/347456 Log: Import netcat from OpenBSD 6.5. Modified: vendor/netcat/dist/nc.1 vendor/netcat/dist/netcat.c vendor/netcat/dist/socks.c Modified: vendor/netcat/dist/nc.1 ============================================================================== --- vendor/netcat/dist/nc.1 Fri May 10 17:31:37 2019 (r347455) +++ vendor/netcat/dist/nc.1 Fri May 10 17:31:45 2019 (r347456) @@ -1,4 +1,4 @@ -.\" $OpenBSD: nc.1,v 1.91 2018/09/25 20:05:07 jmc Exp $ +.\" $OpenBSD: nc.1,v 1.93 2018/12/27 17:45:36 jmc Exp $ .\" .\" Copyright (c) 1996 David Sacerdote .\" All rights reserved. @@ -25,7 +25,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: September 25 2018 $ +.Dd $Mdocdate: December 27 2018 $ .Dt NC 1 .Os .Sh NAME @@ -391,8 +391,8 @@ sockets, a destination is required and is the socket p option is given). .Pp .Ar port -can be a specified as a numeric port number, or as a service name. -Ports may be specified in a range of the form +can be specified as a numeric port number or as a service name. +Port ranges may be specified as numeric port numbers of the form .Ar nn Ns - Ns Ar mm . In general, a destination port must be specified, Modified: vendor/netcat/dist/netcat.c ============================================================================== --- vendor/netcat/dist/netcat.c Fri May 10 17:31:37 2019 (r347455) +++ vendor/netcat/dist/netcat.c Fri May 10 17:31:45 2019 (r347456) @@ -1,4 +1,4 @@ -/* $OpenBSD: netcat.c,v 1.195 2018/10/04 17:04:50 bluhm Exp $ */ +/* $OpenBSD: netcat.c,v 1.203 2019/02/26 17:32:47 jsing Exp $ */ /* * Copyright (c) 2001 Eric Jackson * Copyright (c) 2015 Bob Beck. All rights reserved. @@ -42,6 +42,7 @@ #include #include +#include #include #include #include @@ -66,7 +67,6 @@ #define POLL_NETIN 2 #define POLL_STDOUT 3 #define BUFSIZE 16384 -#define DEFAULT_CA_FILE "/etc/ssl/cert.pem" #define TLS_NOVERIFY (1 << 1) #define TLS_NONAME (1 << 2) @@ -98,10 +98,10 @@ int Tflag = -1; /* IP Type of Service */ int rtableid = -1; int usetls; /* use TLS */ -char *Cflag; /* Public cert file */ -char *Kflag; /* Private key file */ -char *oflag; /* OCSP stapling file */ -char *Rflag = DEFAULT_CA_FILE; /* Root CA file */ +const char *Cflag; /* Public cert file */ +const char *Kflag; /* Private key file */ +const char *oflag; /* OCSP stapling file */ +const char *Rflag; /* Root CA file */ int tls_cachanged; /* Using non-default CA file */ int TLSopt; /* TLS options */ char *tls_expectname; /* required name in peer cert */ @@ -138,7 +138,7 @@ void set_common_sockopts(int, int); int process_tos_opt(char *, int *); int process_tls_opt(char *, int *); void save_peer_cert(struct tls *_tls_ctx, FILE *_fp); -void report_connect(const struct sockaddr *, socklen_t, char *); +void report_sock(const char *, const struct sockaddr *, socklen_t, char *); void report_tls(struct tls *tls_ctx, char * host); void usage(int); ssize_t drainbuf(int, unsigned char *, size_t *, struct tls *); @@ -168,6 +168,7 @@ main(int argc, char *argv[]) host = NULL; uport = NULL; sv = NULL; + Rflag = tls_default_ca_cert_file(); signal(SIGPIPE, SIG_IGN); @@ -597,7 +598,8 @@ main(int argc, char *argv[]) err(1, "connect"); if (vflag) - report_connect((struct sockaddr *)&z, len, NULL); + report_sock("Connection received", + (struct sockaddr *)&z, len, NULL); readwrite(s, NULL); } else { @@ -612,7 +614,8 @@ main(int argc, char *argv[]) err(1, "accept"); } if (vflag) - report_connect((struct sockaddr *)&cliaddr, len, + report_sock("Connection received", + (struct sockaddr *)&cliaddr, len, family == AF_UNIX ? host : NULL); if ((usetls) && (tls_cctx = tls_setup_server(tls_ctx, connfd, host))) @@ -639,8 +642,10 @@ main(int argc, char *argv[]) if (!zflag) readwrite(s, NULL); close(s); - } else + } else { + warn("%s", host); ret = 1; + } if (uflag) unlink(unix_dg_tmp_socket); @@ -753,6 +758,8 @@ unix_bind(char *path, int flags) errno = save_errno; return -1; } + if (vflag) + report_sock("Bound", NULL, 0, path); return s; } @@ -889,13 +896,16 @@ int unix_listen(char *path) { int s; + if ((s = unix_bind(path, 0)) < 0) return -1; - if (listen(s, 5) < 0) { close(s); return -1; } + if (vflag) + report_sock("Listening", NULL, 0, path); + return s; } @@ -1036,7 +1046,17 @@ local_listen(const char *host, const char *port, struc if (listen(s, 1) < 0) err(1, "listen"); } + if (vflag && s != -1) { + struct sockaddr_storage ss; + socklen_t len; + len = sizeof(ss); + if (getsockname(s, (struct sockaddr *)&ss, &len) == -1) + err(1, "getsockname"); + report_sock(uflag ? "Bound" : "Listening", + (struct sockaddr *)&ss, len, NULL); + } + freeaddrinfo(res0); return s; @@ -1247,9 +1267,11 @@ drainbuf(int fd, unsigned char *buf, size_t *bufpos, s ssize_t n; ssize_t adjust; - if (tls) + if (tls) { n = tls_write(tls, buf, *bufpos); - else { + if (n == -1) + errx(1, "tls write failed (%s)", tls_error(tls)); + } else { n = write(fd, buf, *bufpos); /* don't treat EAGAIN, EINTR as error */ if (n == -1 && (errno == EAGAIN || errno == EINTR)) @@ -1271,9 +1293,11 @@ fillbuf(int fd, unsigned char *buf, size_t *bufpos, st size_t num = BUFSIZE - *bufpos; ssize_t n; - if (tls) + if (tls) { n = tls_read(tls, buf + *bufpos, num); - else { + if (n == -1) + errx(1, "tls read failed (%s)", tls_error(tls)); + } else { n = read(fd, buf + *bufpos, num); /* don't treat EAGAIN, EINTR as error */ if (n == -1 && (errno == EAGAIN || errno == EINTR)) @@ -1307,9 +1331,9 @@ fdpass(int nfd) if (isatty(STDOUT_FILENO)) errx(1, "Cannot pass file descriptor to tty"); - bzero(&mh, sizeof(mh)); - bzero(&cmsgbuf, sizeof(cmsgbuf)); - bzero(&iov, sizeof(iov)); + memset(&mh, 0, sizeof(mh)); + memset(&cmsgbuf, 0, sizeof(cmsgbuf)); + memset(&iov, 0, sizeof(iov)); mh.msg_control = (caddr_t)&cmsgbuf.buf; mh.msg_controllen = sizeof(cmsgbuf.buf); @@ -1324,7 +1348,7 @@ fdpass(int nfd) mh.msg_iov = &iov; mh.msg_iovlen = 1; - bzero(&pfd, sizeof(pfd)); + memset(&pfd, 0, sizeof(pfd)); pfd.fd = STDOUT_FILENO; pfd.events = POLLOUT; for (;;) { @@ -1408,7 +1432,7 @@ build_ports(char *p) int hi, lo, cp; int x = 0; - if ((n = strchr(p, '-')) != NULL) { + if (isdigit((unsigned char)*p) && (n = strchr(p, '-')) != NULL) { *n = '\0'; n++; @@ -1688,34 +1712,30 @@ report_tls(struct tls * tls_ctx, char * host) } void -report_connect(const struct sockaddr *sa, socklen_t salen, char *path) +report_sock(const char *msg, const struct sockaddr *sa, socklen_t salen, + char *path) { - char remote_host[NI_MAXHOST]; - char remote_port[NI_MAXSERV]; + char host[NI_MAXHOST], port[NI_MAXSERV]; int herr; int flags = NI_NUMERICSERV; if (path != NULL) { - fprintf(stderr, "Connection on %s received!\n", path); + fprintf(stderr, "%s on %s\n", msg, path); return; } if (nflag) flags |= NI_NUMERICHOST; - if ((herr = getnameinfo(sa, salen, - remote_host, sizeof(remote_host), - remote_port, sizeof(remote_port), - flags)) != 0) { + if ((herr = getnameinfo(sa, salen, host, sizeof(host), + port, sizeof(port), flags)) != 0) { if (herr == EAI_SYSTEM) err(1, "getnameinfo"); else errx(1, "getnameinfo: %s", gai_strerror(herr)); } - fprintf(stderr, - "Connection from %s %s " - "received!\n", remote_host, remote_port); + fprintf(stderr, "%s on %s %s\n", msg, host, port); } void Modified: vendor/netcat/dist/socks.c ============================================================================== --- vendor/netcat/dist/socks.c Fri May 10 17:31:37 2019 (r347455) +++ vendor/netcat/dist/socks.c Fri May 10 17:31:45 2019 (r347456) @@ -1,4 +1,4 @@ -/* $OpenBSD: socks.c,v 1.25 2018/03/27 16:31:10 deraadt Exp $ */ +/* $OpenBSD: socks.c,v 1.27 2019/01/10 12:44:54 mestre Exp $ */ /* * Copyright (c) 1999 Niklas Hallqvist. All rights reserved. @@ -65,7 +65,7 @@ decode_addrport(const char *h, const char *p, struct s int r; struct addrinfo hints, *res; - bzero(&hints, sizeof(hints)); + memset(&hints, 0, sizeof(hints)); hints.ai_family = v4only ? PF_INET : PF_UNSPEC; hints.ai_flags = numeric ? AI_NUMERICHOST : 0; hints.ai_socktype = SOCK_STREAM; From owner-svn-src-vendor@freebsd.org Fri May 10 17:31:55 2019 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4980815A8814; Fri, 10 May 2019 17:31:55 +0000 (UTC) (envelope-from des@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DCFFA835D8; Fri, 10 May 2019 17:31:54 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 19F737837; Fri, 10 May 2019 17:31:51 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4AHVosZ013700; Fri, 10 May 2019 17:31:50 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4AHVoAP013699; Fri, 10 May 2019 17:31:50 GMT (envelope-from des@FreeBSD.org) Message-Id: <201905101731.x4AHVoAP013699@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Fri, 10 May 2019 17:31:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r347457 - vendor/netcat/6.5 X-SVN-Group: vendor X-SVN-Commit-Author: des X-SVN-Commit-Paths: vendor/netcat/6.5 X-SVN-Commit-Revision: 347457 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DCFFA835D8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.97)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 May 2019 17:31:55 -0000 Author: des Date: Fri May 10 17:31:50 2019 New Revision: 347457 URL: https://svnweb.freebsd.org/changeset/base/347457 Log: Tag netcat from OpenBSD 6.5. Added: vendor/netcat/6.5/ - copied from r347456, vendor/netcat/dist/