From owner-svn-src-head@freebsd.org Sun Jan 6 01:10:09 2019 Return-Path: Delivered-To: svn-src-head@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 D8007142C139; Sun, 6 Jan 2019 01:10:08 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5316077BEA; Sun, 6 Jan 2019 01:10:08 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pl1-x636.google.com with SMTP id u18so19137242plq.7; Sat, 05 Jan 2019 17:10:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=n3hAB5gWbuQOp86era3XdRxvGP+ZHBmojtinzy00nBc=; b=WjXyro4h+RsFvJBusbRkQfW2766B4FH8WAIQETx1qql79AQDcYt0ABP7MjnHgNMMxd QnMekivBZ36c4CvTYDgLTRosaEW2katM6ZcZe0sU3vOXBO2WFh5shc0k7XmtZo5UMp7U V08OKlJRwvfN6WB0tPLTKneI8iyWDJ34NYl6y4v4BHl7Wbx0RgUH1j3om0fxRZA8M/aA M1KUD9YhbzqQhhY6ZOmD9W2cfoswMgNqPWbJ+0RcM6Cs8xGG+Xj8tOa0IDfeVTQPCe+y kcvF/uHf+ueXRWRiI6NKG6SBZOtpAyZ7dnk/IbK7H15N4PgV+yf5Wy2gKMuXPJpckYtW arlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=n3hAB5gWbuQOp86era3XdRxvGP+ZHBmojtinzy00nBc=; b=VSkz8W2T7jpY/fhofHfnUUQt0qIQNbpPYmYLCof3zpV+Dz0tmi7FC2m2nwdcWk72Wu /xaf56scK5+lh1Vtppq0Xyq8/NgyztTOdeaXQBGwdg5oN8iTDiJajHJlx1zWrbAEheTg 53sP2+5VFVMRheJWphBYPnlIyf5YpCi8w7erQEaLQjr8cL3+clmPJjBO1I/A5V0NGHDm zSPucIk5UJfJe/dnWZ4+rSRO74UqyDtTJua6oV/68vyA3UYdIDD1jGsolObUi56USG4q znITgpeoOyT0uMnXPjSwBX+FTTUYAQetBhdkhz+mefGXYIDB5RbdvMM5H76I42CMxsob qVnw== X-Gm-Message-State: AJcUukfGFN9YR/KJefV4+eD571bv8Yj2qWdvXBMYYzAWbr6Hh4R2b4yz tRzA0cN2qK//1kh788+PybDQx/w3 X-Google-Smtp-Source: ALg8bN7iP+xc+zJZa56QiJjLTMkt00A1xR4NjOYGtqAWG+sBliIKB/6e+w303U5p7l1JwLxjj9vo3Q== X-Received: by 2002:a17:902:bb86:: with SMTP id m6mr57093112pls.315.1546737006665; Sat, 05 Jan 2019 17:10:06 -0800 (PST) Received: from ?IPv6:2607:fb90:82bc:fe92:90a4:9bc9:b267:8cf6? ([2607:fb90:82bc:fe92:90a4:9bc9:b267:8cf6]) by smtp.gmail.com with ESMTPSA id p7sm118176328pfj.72.2019.01.05.17.10.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 05 Jan 2019 17:10:06 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r342793 - in head: . share/mk stand/efi/boot1 stand/efi/libefi stand/efi/loader stand/i386 stand/i386/loader stand/libsa stand/sparc64 stand/sparc64/loader stand/userboot/userboot tools... From: Enji Cooper X-Mailer: iPhone Mail (16C104) In-Reply-To: <201901052245.x05MjKGo067160@repo.freebsd.org> Date: Sat, 5 Jan 2019 17:10:04 -0800 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <1AAAA88B-1C04-431F-89CB-26301551AA5F@gmail.com> References: <201901052245.x05MjKGo067160@repo.freebsd.org> To: Matt Macy X-Rspamd-Queue-Id: 5316077BEA X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.86 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.86)[-0.860,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jan 2019 01:10:09 -0000 > On Jan 5, 2019, at 14:45, Matt Macy wrote: >=20 > Author: mmacy > Date: Sat Jan 5 22:45:20 2019 > New Revision: 342793 > URL: https://svnweb.freebsd.org/changeset/base/342793 >=20 > Log: > MK_ZFS -> {MK_ZFS|MK_LOADER_ZFS}, this is so we can diable userland / ker= nel > ZFS but keep the boot-loaders when using ZoL port. Hiya! Things might have changed in this area since I last checked, but does so= mething like this require src.conf.5 to be regenerated? Thanks so much! -Enji= From owner-svn-src-head@freebsd.org Sun Jan 6 01:39:02 2019 Return-Path: Delivered-To: svn-src-head@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 A8059142E34A; Sun, 6 Jan 2019 01:39:02 +0000 (UTC) (envelope-from kevans@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 4E14781BDB; Sun, 6 Jan 2019 01:39:02 +0000 (UTC) (envelope-from kevans@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 42BDD2127F; Sun, 6 Jan 2019 01:39:02 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x061d2ve061256; Sun, 6 Jan 2019 01:39:02 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x061d2Lh061255; Sun, 6 Jan 2019 01:39:02 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201901060139.x061d2Lh061255@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sun, 6 Jan 2019 01:39:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342805 - head/libexec/rc X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/libexec/rc X-SVN-Commit-Revision: 342805 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4E14781BDB X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.93)[-0.932,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jan 2019 01:39:02 -0000 Author: kevans Date: Sun Jan 6 01:39:01 2019 New Revision: 342805 URL: https://svnweb.freebsd.org/changeset/base/342805 Log: rc.subr: Fix typo Originally intended as 'in case in needs to be re-invoked', but it was later decided (by myself) that 're-invoke itself' makes it more clear that the script is expected to use this in a way. Reported by: Jose Luis Duran (jlduran @ github) X-MFC-With: r342792 Modified: head/libexec/rc/rc.subr Modified: head/libexec/rc/rc.subr ============================================================================== --- head/libexec/rc/rc.subr Sun Jan 6 00:59:55 2019 (r342804) +++ head/libexec/rc/rc.subr Sun Jan 6 01:39:01 2019 (r342805) @@ -887,8 +887,8 @@ check_startmsgs() # by $flags from the environment. # This variable may be changed by the precmd method. # -# rc_service Path to the service being executed, in case it needs to -# re-invoked. +# rc_service Path to the service being executed, in case the service +# needs to re-invoke itself. # # rc_pid PID of command (if appropriate) # From owner-svn-src-head@freebsd.org Sun Jan 6 02:39:05 2019 Return-Path: Delivered-To: svn-src-head@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 19EE614309D8; Sun, 6 Jan 2019 02:39:05 +0000 (UTC) (envelope-from avos@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 B55E1843C2; Sun, 6 Jan 2019 02:39:04 +0000 (UTC) (envelope-from avos@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 A088D21DA3; Sun, 6 Jan 2019 02:39:04 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x062d4L1092422; Sun, 6 Jan 2019 02:39:04 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x062d4ZP092421; Sun, 6 Jan 2019 02:39:04 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201901060239.x062d4ZP092421@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Sun, 6 Jan 2019 02:39:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342810 - head/usr.sbin/powerd X-SVN-Group: head X-SVN-Commit-Author: avos X-SVN-Commit-Paths: head/usr.sbin/powerd X-SVN-Commit-Revision: 342810 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B55E1843C2 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.97)[-0.967,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jan 2019 02:39:05 -0000 Author: avos Date: Sun Jan 6 02:39:03 2019 New Revision: 342810 URL: https://svnweb.freebsd.org/changeset/base/342810 Log: powerd(8): allow to force a method of battery state query This change allows to determine power source via sysctl or /dev/apm when devd(8) is running (used by default). Based on patch from PR; other changes on top of it: - '-f' (force) -> '-s' (source) parameter renaming; - allow 'apm' -> 'devd' transition when '-s devd' is set (if APM is enabled); - man page update. Checked on amd64 with -s devd / sysctl and apm (an extra build with forced USE_APM define set was done) PR: 125707 Submitted by: Konstantin Stepanov Reviewed by: bcr, imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D18742 Modified: head/usr.sbin/powerd/powerd.8 head/usr.sbin/powerd/powerd.c Modified: head/usr.sbin/powerd/powerd.8 ============================================================================== --- head/usr.sbin/powerd/powerd.8 Sun Jan 6 02:17:18 2019 (r342809) +++ head/usr.sbin/powerd/powerd.8 Sun Jan 6 02:39:03 2019 (r342810) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 4, 2013 +.Dd January 6, 2019 .Dt POWERD 8 .Os .Sh NAME @@ -41,6 +41,7 @@ .Op Fl p Ar ival .Op Fl P Ar pidfile .Op Fl r Ar percent +.Op Fl s Ar source .Op Fl v .Sh DESCRIPTION The @@ -117,6 +118,14 @@ The default is Specifies the CPU load percent level where adaptive mode should consider the CPU running and increase performance. The default is 75% or higher. +.It Fl s Ar source +Enforces method for AC line state refresh; by default, it is chosen +automatically. +The set of valid methods is +.Cm sysctl , devd +and +.Cm apm +(i386 only). .It Fl v Verbose mode. Messages about power changes will be printed to stdout and Modified: head/usr.sbin/powerd/powerd.c ============================================================================== --- head/usr.sbin/powerd/powerd.c Sun Jan 6 02:17:18 2019 (r342809) +++ head/usr.sbin/powerd/powerd.c Sun Jan 6 02:39:03 2019 (r342810) @@ -113,14 +113,16 @@ static int vflag; static volatile sig_atomic_t exit_requested; static power_src_t acline_status; -static enum { +typedef enum { ac_none, ac_sysctl, ac_acpi_devd, #ifdef USE_APM ac_apm, #endif -} acline_mode; +} acline_mode_t; +static acline_mode_t acline_mode; +static acline_mode_t acline_mode_user = ac_none; #ifdef USE_APM static int apm_fd = -1; #endif @@ -286,21 +288,28 @@ get_freq_id(int freq, int *freqs, int numfreqs) static void acline_init(void) { + int skip_source_check; + acline_mib_len = 4; acline_status = SRC_UNKNOWN; + skip_source_check = (acline_mode_user == ac_none || + acline_mode_user == ac_acpi_devd); - if (sysctlnametomib(ACPIAC, acline_mib, &acline_mib_len) == 0) { + if ((skip_source_check || acline_mode_user == ac_sysctl) && + sysctlnametomib(ACPIAC, acline_mib, &acline_mib_len) == 0) { acline_mode = ac_sysctl; if (vflag) warnx("using sysctl for AC line status"); #ifdef __powerpc__ - } else if (sysctlnametomib(PMUAC, acline_mib, &acline_mib_len) == 0) { + } else if ((skip_source_check || acline_mode_user == ac_sysctl) && + sysctlnametomib(PMUAC, acline_mib, &acline_mib_len) == 0) { acline_mode = ac_sysctl; if (vflag) warnx("using sysctl for AC line status"); #endif #ifdef USE_APM - } else if ((apm_fd = open(APMDEV, O_RDONLY)) >= 0) { + } else if ((skip_source_check || acline_mode_user == ac_apm) && + (apm_fd = open(APMDEV, O_RDONLY)) >= 0) { if (vflag) warnx("using APM for AC line status"); acline_mode = ac_apm; @@ -360,7 +369,17 @@ acline_read(void) } #endif /* try to (re)connect to devd */ - if (acline_mode == ac_sysctl) { +#ifdef USE_APM + if ((acline_mode == ac_sysctl && + (acline_mode_user == ac_none || + acline_mode_user == ac_acpi_devd)) || + (acline_mode == ac_apm && + acline_mode_user == ac_acpi_devd)) { +#else + if (acline_mode == ac_sysctl && + (acline_mode_user == ac_none || + acline_mode_user == ac_acpi_devd)) { +#endif struct timeval now; gettimeofday(&now, NULL); @@ -426,6 +445,21 @@ parse_mode(char *arg, int *mode, int ch) } static void +parse_acline_mode(char *arg, int ch) +{ + if (strcmp(arg, "sysctl") == 0) + acline_mode_user = ac_sysctl; + else if (strcmp(arg, "devd") == 0) + acline_mode_user = ac_acpi_devd; +#ifdef USE_APM + else if (strcmp(arg, "apm") == 0) + acline_mode_user = ac_apm; +#endif + else + errx(1, "bad option: -%c %s", (char)ch, optarg); +} + +static void handle_sigs(int __unused sig) { @@ -437,7 +471,7 @@ usage(void) { fprintf(stderr, -"usage: powerd [-v] [-a mode] [-b mode] [-i %%] [-m freq] [-M freq] [-n mode] [-p ival] [-r %%] [-P pidfile]\n"); +"usage: powerd [-v] [-a mode] [-b mode] [-i %%] [-m freq] [-M freq] [-n mode] [-p ival] [-r %%] [-s source] [-P pidfile]\n"); exit(1); } @@ -468,13 +502,16 @@ main(int argc, char * argv[]) if (geteuid() != 0) errx(1, "must be root to run"); - while ((ch = getopt(argc, argv, "a:b:i:m:M:n:p:P:r:v")) != -1) + while ((ch = getopt(argc, argv, "a:b:i:m:M:n:p:P:r:s:v")) != -1) switch (ch) { case 'a': parse_mode(optarg, &mode_ac, ch); break; case 'b': parse_mode(optarg, &mode_battery, ch); + break; + case 's': + parse_acline_mode(optarg, ch); break; case 'i': cpu_idle_mark = atoi(optarg); From owner-svn-src-head@freebsd.org Sun Jan 6 05:07:53 2019 Return-Path: Delivered-To: svn-src-head@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 56EEA14354E4; Sun, 6 Jan 2019 05:07:53 +0000 (UTC) (envelope-from jhibbits@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 F2F2588F27; Sun, 6 Jan 2019 05:07:52 +0000 (UTC) (envelope-from jhibbits@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 DF973237B3; Sun, 6 Jan 2019 05:07:52 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0657q3X071722; Sun, 6 Jan 2019 05:07:52 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0657q5a071721; Sun, 6 Jan 2019 05:07:52 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201901060507.x0657q5a071721@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sun, 6 Jan 2019 05:07:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342811 - head/sys/contrib/ncsw/user/env X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/contrib/ncsw/user/env X-SVN-Commit-Revision: 342811 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: F2F2588F27 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.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jan 2019 05:07:53 -0000 Author: jhibbits Date: Sun Jan 6 05:07:52 2019 New Revision: 342811 URL: https://svnweb.freebsd.org/changeset/base/342811 Log: dtsec: Fix formatting of addresses in translation error messages Don't clamp addresses to 8 hex digits, particularly since this is primarily used now on a 64-bit platform. MFC after: 1 week Modified: head/sys/contrib/ncsw/user/env/xx.c Modified: head/sys/contrib/ncsw/user/env/xx.c ============================================================================== --- head/sys/contrib/ncsw/user/env/xx.c Sun Jan 6 02:39:03 2019 (r342810) +++ head/sys/contrib/ncsw/user/env/xx.c Sun Jan 6 05:07:52 2019 (r342811) @@ -704,7 +704,7 @@ XX_VirtToPhys(void *addr) paddr = pmap_kextract((vm_offset_t)addr); if (paddr == 0) printf("NetCommSW: " - "Unable to translate virtual address 0x%08X!\n", addr); + "Unable to translate virtual address %p!\n", addr); else pmap_track_page(kernel_pmap, (vm_offset_t)addr); @@ -758,7 +758,7 @@ XX_PhysToVirt(physAddress_t addr) return ((void *)(pv->pv_va + ((vm_offset_t)addr & PAGE_MASK))); printf("NetCommSW: " - "Unable to translate physical address 0x%08llX!\n", addr); + "Unable to translate physical address 0x%09jx!\n", (uintmax_t)addr); return (NULL); } From owner-svn-src-head@freebsd.org Sun Jan 6 16:23:29 2019 Return-Path: Delivered-To: svn-src-head@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 00C731493401; Sun, 6 Jan 2019 16:23:29 +0000 (UTC) (envelope-from trasz@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 988B0845CD; Sun, 6 Jan 2019 16:23:28 +0000 (UTC) (envelope-from trasz@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 8AF212C61; Sun, 6 Jan 2019 16:23:28 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x06GNSlZ057148; Sun, 6 Jan 2019 16:23:28 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x06GNS1w057147; Sun, 6 Jan 2019 16:23:28 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201901061623.x06GNS1w057147@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 6 Jan 2019 16:23:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342812 - head/share/skel X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/share/skel X-SVN-Commit-Revision: 342812 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 988B0845CD 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.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jan 2019 16:23:29 -0000 Author: trasz Date: Sun Jan 6 16:23:28 2019 New Revision: 342812 URL: https://svnweb.freebsd.org/changeset/base/342812 Log: Give sh(1) a proper default prompt instead of just "$". Reviewed by: jilles MFC after: 2 weeks Relnotes: totally Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D18697 Modified: head/share/skel/dot.shrc Modified: head/share/skel/dot.shrc ============================================================================== --- head/share/skel/dot.shrc Sun Jan 6 05:07:52 2019 (r342811) +++ head/share/skel/dot.shrc Sun Jan 6 16:23:28 2019 (r342812) @@ -32,8 +32,8 @@ alias g='egrep -i' # alias rm='rm -i' -# # set prompt: ``username@hostname:directory $ '' -# PS1="`whoami`@\h:\w \\$ " +# set prompt: ``username@hostname:directory $ '' +PS1="`whoami`@\h:\w \\$ " # search path for cd(1) # CDPATH=:$HOME From owner-svn-src-head@freebsd.org Sun Jan 6 16:50:06 2019 Return-Path: Delivered-To: svn-src-head@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 C261F1493E9C; Sun, 6 Jan 2019 16:50:06 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 8F0268538C; Sun, 6 Jan 2019 16:50:05 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id gBcZgnadznBo4gBcagrhan; Sun, 06 Jan 2019 09:49:57 -0700 X-Authority-Analysis: v=2.3 cv=J8fUEzvS c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=3JhidrIBZZsA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=Gn42zuBgP9d_TrsLgVMA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id B89E3310D; Sun, 6 Jan 2019 08:49:54 -0800 (PST) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id x06GnsT0017239; Sun, 6 Jan 2019 08:49:54 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id x06GnsJK017236; Sun, 6 Jan 2019 08:49:54 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201901061649.x06GnsJK017236@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Edward Tomasz Napierala cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r342812 - head/share/skel In-Reply-To: Message from Edward Tomasz Napierala of "Sun, 06 Jan 2019 16:23:28 +0000." <201901061623.x06GNS1w057147@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 06 Jan 2019 08:49:54 -0800 X-CMAE-Envelope: MS4wfApcwdFTxTQHUuT8uGhfzqGgAB00MqxKsaRimx6dA35hN/Qzi/cYOZl7HUnSA/pSmHuC7uN10YeEbfg4lhBfyoZ/fw/UTIspfcr+599gaYFcn7Y4GItc 5+avfEwgKFywokA8Ug5yvDSc7l6vMIsUpEQ24CrYxK9zS6yukzSWiesUnhRdzrjgDAYRxwJR6EjZ6+gsR+rvOfmBAS59qob+/R/jsQyB8T9Mki0F/cjHZDMT PHtAx6e5hG/N9HbU8/haVr3ZUEJFmuqwkgjNyJbZ/VuFsNFuoGvlehPXHl2WMQwW X-Rspamd-Queue-Id: 8F0268538C X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-4.37 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; MV_CASE(0.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_DN_SOME(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MX_GOOD(-0.01)[cached: spqr.komquats.com]; NEURAL_HAM_SHORT(-0.91)[-0.911,0]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[17.125.67.70.zen.spamhaus.org : 127.0.0.11]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; MIME_TRACE(0.00)[0:+]; IP_SCORE(-1.75)[ip: (-4.25), ipnet: 64.59.128.0/20(-2.44), asn: 6327(-1.95), country: CA(-0.09)]; RCVD_IN_DNSWL_LOW(-0.10)[138.136.59.64.list.dnswl.org : 127.0.5.1] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jan 2019 16:50:07 -0000 In message <201901061623.x06GNS1w057147@repo.freebsd.org>, Edward Tomasz Napier ala writes: > Author: trasz > Date: Sun Jan 6 16:23:28 2019 > New Revision: 342812 > URL: https://svnweb.freebsd.org/changeset/base/342812 > > Log: > Give sh(1) a proper default prompt instead of just "$". > > Reviewed by: jilles > MFC after: 2 weeks > Relnotes: totally > Sponsored by: DARPA, AFRL > Differential Revision: https://reviews.freebsd.org/D18697 > > Modified: > head/share/skel/dot.shrc > > Modified: head/share/skel/dot.shrc > ============================================================================= > = > --- head/share/skel/dot.shrc Sun Jan 6 05:07:52 2019 (r342811) > +++ head/share/skel/dot.shrc Sun Jan 6 16:23:28 2019 (r342812) > @@ -32,8 +32,8 @@ alias g='egrep -i' > # alias rm='rm -i' > > > -# # set prompt: ``username@hostname:directory $ '' > -# PS1="`whoami`@\h:\w \\$ " > +# set prompt: ``username@hostname:directory $ '' > +PS1="`whoami`@\h:\w \\$ " > > # search path for cd(1) > # CDPATH=:$HOME > Hmmm. At $JOB the RHEL servers use this prompt. IMO the prompt is unwieldy and distracting. Instead of \w could we use \W instead? -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Sun Jan 6 20:06:57 2019 Return-Path: Delivered-To: svn-src-head@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 B6C661499253; Sun, 6 Jan 2019 20:06:57 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E73C38CFF8; Sun, 6 Jan 2019 20:06:56 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x06K6iAo094888; Sun, 6 Jan 2019 12:06:44 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id x06K6iEQ094887; Sun, 6 Jan 2019 12:06:44 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201901062006.x06K6iEQ094887@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r342812 - head/share/skel In-Reply-To: <201901061649.x06GnsJK017236@slippy.cwsent.com> To: Cy Schubert Date: Sun, 6 Jan 2019 12:06:44 -0800 (PST) CC: Edward Tomasz Napierala , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: E73C38CFF8 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.93 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.93)[-0.932,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jan 2019 20:06:57 -0000 > In message <201901061623.x06GNS1w057147@repo.freebsd.org>, Edward > Tomasz Napier > ala writes: > > Author: trasz > > Date: Sun Jan 6 16:23:28 2019 > > New Revision: 342812 > > URL: https://svnweb.freebsd.org/changeset/base/342812 > > > > Log: > > Give sh(1) a proper default prompt instead of just "$". > > > > Reviewed by: jilles > > MFC after: 2 weeks > > Relnotes: totally > > Sponsored by: DARPA, AFRL > > Differential Revision: https://reviews.freebsd.org/D18697 > > > > Modified: > > head/share/skel/dot.shrc > > > > Modified: head/share/skel/dot.shrc > > ============================================================================= > > = > > --- head/share/skel/dot.shrc Sun Jan 6 05:07:52 2019 (r342811) > > +++ head/share/skel/dot.shrc Sun Jan 6 16:23:28 2019 (r342812) > > @@ -32,8 +32,8 @@ alias g='egrep -i' > > # alias rm='rm -i' > > > > > > -# # set prompt: ``username@hostname:directory $ '' > > -# PS1="`whoami`@\h:\w \\$ " > > +# set prompt: ``username@hostname:directory $ '' > > +PS1="`whoami`@\h:\w \\$ " > > > > # search path for cd(1) > > # CDPATH=:$HOME > > > > Hmmm. At $JOB the RHEL servers use this prompt. IMO the prompt is > unwieldy and distracting. Instead of \w could we use \W instead? Or you just could leave 30 year old status quo in place, people who want other things have long ago dealt with this and your just creating new things they have to deal with, like undoing your tweaking of defaults, which cause local customization patches to now fail because you change the line they are trying to patch. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Sun Jan 6 20:39:27 2019 Return-Path: Delivered-To: svn-src-head@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 A1D7A1499D3D; Sun, 6 Jan 2019 20:39:27 +0000 (UTC) (envelope-from delphij@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 4685F8E371; Sun, 6 Jan 2019 20:39:27 +0000 (UTC) (envelope-from delphij@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 3BE545942; Sun, 6 Jan 2019 20:39:27 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x06KdRu7089840; Sun, 6 Jan 2019 20:39:27 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x06KdOnw089825; Sun, 6 Jan 2019 20:39:24 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201901062039.x06KdOnw089825@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 6 Jan 2019 20:39:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342813 - head/usr.bin/mkimg X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/usr.bin/mkimg X-SVN-Commit-Revision: 342813 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4685F8E371 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_SHORT(-0.97)[-0.971,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)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jan 2019 20:39:27 -0000 Author: delphij Date: Sun Jan 6 20:39:23 2019 New Revision: 342813 URL: https://svnweb.freebsd.org/changeset/base/342813 Log: Remove unneeded headers. MFC after: 1 month Modified: head/usr.bin/mkimg/apm.c head/usr.bin/mkimg/bsd.c head/usr.bin/mkimg/ebr.c head/usr.bin/mkimg/endian.h head/usr.bin/mkimg/format.c head/usr.bin/mkimg/gpt.c head/usr.bin/mkimg/mbr.c head/usr.bin/mkimg/qcow.c head/usr.bin/mkimg/raw.c head/usr.bin/mkimg/scheme.c head/usr.bin/mkimg/uuid.c head/usr.bin/mkimg/vhd.c head/usr.bin/mkimg/vmdk.c head/usr.bin/mkimg/vtoc8.c Modified: head/usr.bin/mkimg/apm.c ============================================================================== --- head/usr.bin/mkimg/apm.c Sun Jan 6 16:23:28 2019 (r342812) +++ head/usr.bin/mkimg/apm.c Sun Jan 6 20:39:23 2019 (r342813) @@ -31,7 +31,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include Modified: head/usr.bin/mkimg/bsd.c ============================================================================== --- head/usr.bin/mkimg/bsd.c Sun Jan 6 16:23:28 2019 (r342812) +++ head/usr.bin/mkimg/bsd.c Sun Jan 6 20:39:23 2019 (r342813) @@ -31,7 +31,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include Modified: head/usr.bin/mkimg/ebr.c ============================================================================== --- head/usr.bin/mkimg/ebr.c Sun Jan 6 16:23:28 2019 (r342812) +++ head/usr.bin/mkimg/ebr.c Sun Jan 6 20:39:23 2019 (r342813) @@ -31,7 +31,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include Modified: head/usr.bin/mkimg/endian.h ============================================================================== --- head/usr.bin/mkimg/endian.h Sun Jan 6 16:23:28 2019 (r342812) +++ head/usr.bin/mkimg/endian.h Sun Jan 6 20:39:23 2019 (r342813) @@ -29,6 +29,8 @@ #ifndef _MKIMG_ENDIAN_H_ #define _MKIMG_ENDIAN_H_ +#include + static __inline uint16_t be16dec(const void *pp) { Modified: head/usr.bin/mkimg/format.c ============================================================================== --- head/usr.bin/mkimg/format.c Sun Jan 6 16:23:28 2019 (r342812) +++ head/usr.bin/mkimg/format.c Sun Jan 6 20:39:23 2019 (r342813) @@ -28,16 +28,11 @@ __FBSDID("$FreeBSD$"); #include -#include #include -#include -#include #include -#include #include "image.h" #include "format.h" -#include "mkimg.h" static struct mkimg_format *first; static struct mkimg_format *format; Modified: head/usr.bin/mkimg/gpt.c ============================================================================== --- head/usr.bin/mkimg/gpt.c Sun Jan 6 16:23:28 2019 (r342812) +++ head/usr.bin/mkimg/gpt.c Sun Jan 6 20:39:23 2019 (r342813) @@ -32,7 +32,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include Modified: head/usr.bin/mkimg/mbr.c ============================================================================== --- head/usr.bin/mkimg/mbr.c Sun Jan 6 16:23:28 2019 (r342812) +++ head/usr.bin/mkimg/mbr.c Sun Jan 6 20:39:23 2019 (r342813) @@ -31,7 +31,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include Modified: head/usr.bin/mkimg/qcow.c ============================================================================== --- head/usr.bin/mkimg/qcow.c Sun Jan 6 16:23:28 2019 (r342812) +++ head/usr.bin/mkimg/qcow.c Sun Jan 6 20:39:23 2019 (r342813) @@ -29,11 +29,9 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include -#include #include "endian.h" #include "image.h" Modified: head/usr.bin/mkimg/raw.c ============================================================================== --- head/usr.bin/mkimg/raw.c Sun Jan 6 16:23:28 2019 (r342812) +++ head/usr.bin/mkimg/raw.c Sun Jan 6 20:39:23 2019 (r342813) @@ -28,14 +28,10 @@ __FBSDID("$FreeBSD$"); #include -#include -#include -#include #include #include "image.h" #include "format.h" -#include "mkimg.h" static int raw_resize(lba_t imgsz __unused) Modified: head/usr.bin/mkimg/scheme.c ============================================================================== --- head/usr.bin/mkimg/scheme.c Sun Jan 6 16:23:28 2019 (r342812) +++ head/usr.bin/mkimg/scheme.c Sun Jan 6 20:39:23 2019 (r342813) @@ -29,10 +29,8 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include -#include #include #include #include Modified: head/usr.bin/mkimg/uuid.c ============================================================================== --- head/usr.bin/mkimg/uuid.c Sun Jan 6 16:23:28 2019 (r342812) +++ head/usr.bin/mkimg/uuid.c Sun Jan 6 20:39:23 2019 (r342813) @@ -28,7 +28,6 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include "endian.h" Modified: head/usr.bin/mkimg/vhd.c ============================================================================== --- head/usr.bin/mkimg/vhd.c Sun Jan 6 16:23:28 2019 (r342812) +++ head/usr.bin/mkimg/vhd.c Sun Jan 6 20:39:23 2019 (r342813) @@ -28,11 +28,9 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include #include -#include #include "endian.h" #include "image.h" Modified: head/usr.bin/mkimg/vmdk.c ============================================================================== --- head/usr.bin/mkimg/vmdk.c Sun Jan 6 16:23:28 2019 (r342812) +++ head/usr.bin/mkimg/vmdk.c Sun Jan 6 20:39:23 2019 (r342813) @@ -32,7 +32,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include "endian.h" #include "image.h" Modified: head/usr.bin/mkimg/vtoc8.c ============================================================================== --- head/usr.bin/mkimg/vtoc8.c Sun Jan 6 16:23:28 2019 (r342812) +++ head/usr.bin/mkimg/vtoc8.c Sun Jan 6 20:39:23 2019 (r342813) @@ -30,9 +30,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include -#include #include From owner-svn-src-head@freebsd.org Sun Jan 6 20:42:19 2019 Return-Path: Delivered-To: svn-src-head@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 0A389149A25B; Sun, 6 Jan 2019 20:42:19 +0000 (UTC) (envelope-from delphij@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 99F3A8F32C; Sun, 6 Jan 2019 20:42:18 +0000 (UTC) (envelope-from delphij@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 7740859CA; Sun, 6 Jan 2019 20:42:09 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x06Kg9ZK094304; Sun, 6 Jan 2019 20:42:09 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x06Kg9vH094303; Sun, 6 Jan 2019 20:42:09 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201901062042.x06Kg9vH094303@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 6 Jan 2019 20:42:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342814 - head/usr.bin/primes X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/usr.bin/primes X-SVN-Commit-Revision: 342814 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 99F3A8F32C 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.998,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)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jan 2019 20:42:19 -0000 Author: delphij Date: Sun Jan 6 20:42:09 2019 New Revision: 342814 URL: https://svnweb.freebsd.org/changeset/base/342814 Log: Remove unneeded assert.h (there is no assertion in this file). MFC after: 2 weeks Modified: head/usr.bin/primes/spsp.c Modified: head/usr.bin/primes/spsp.c ============================================================================== --- head/usr.bin/primes/spsp.c Sun Jan 6 20:39:23 2019 (r342813) +++ head/usr.bin/primes/spsp.c Sun Jan 6 20:42:09 2019 (r342814) @@ -26,7 +26,6 @@ #include __FBSDID("$FreeBSD$"); -#include #include #include From owner-svn-src-head@freebsd.org Sun Jan 6 21:08:57 2019 Return-Path: Delivered-To: svn-src-head@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 F268A149BE48; Sun, 6 Jan 2019 21:08:56 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-oi1-f194.google.com (mail-oi1-f194.google.com [209.85.167.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8F5D691364; Sun, 6 Jan 2019 21:08:56 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-oi1-f194.google.com with SMTP id t204so34369602oie.7; Sun, 06 Jan 2019 13:08:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=gKPyewuxyWWvos0BCCNHHn7wwi1gRwzIaUPcP6Deflg=; b=ZXhwmIDPe8kARP8ANNWePXzG4h842WrwuAGuUBiYaa/XOSZ9KblO3IBezmOsFmU2+U MfSsyUJl+7g5AvSVG07faGBbkUR5pNjSWjEURfnIAf2j+L+WHYUtNOJuejb4VK535K+6 7GQBM4Nzrh0jn3yN8VlhFXJi6JaAzzchZp4ym1EZEwDIUCqexqmM5M1QhEpznDX4aPeF YTU3KFaNNLWWV69Robopy9k9e+FUX/X8FMM8NwPahxIuk3qt7IehdXiruriC47pzLpiR uzifhW6k/2kBr8YPOEXqQIBG4oFlcpXg00ES4plVS2rvl8Hr+JivJW8W4emSmKmxjIik zruw== X-Gm-Message-State: AJcUukfA8NtzHgzvgkMTxqj+8xgQThhfrvcTngG81cMC1i2ssyq6KRVA lZj3EOzFnrShvWOLVURLbN0pey+z6htQj8MF0Do= X-Google-Smtp-Source: ALg8bN6FjCsB+sAuk3GiCHRD586qM0GdlE7C5T10zsw/oAnHx6PGmxlv+AgAr9Uw2MCSV77LNyLw0sB6VqlXDibSICA= X-Received: by 2002:aca:51c6:: with SMTP id f189mr6191189oib.281.1546807172365; Sun, 06 Jan 2019 12:39:32 -0800 (PST) MIME-Version: 1.0 References: <201901061623.x06GNS1w057147@repo.freebsd.org> <201901061649.x06GnsJK017236@slippy.cwsent.com> In-Reply-To: <201901061649.x06GnsJK017236@slippy.cwsent.com> From: Edward Napierala Date: Sun, 6 Jan 2019 20:39:21 +0000 Message-ID: Subject: Re: svn commit: r342812 - head/share/skel To: Cy Schubert Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 8F5D691364 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jan 2019 21:08:57 -0000 niedz., 6 sty 2019 o 16:50 Cy Schubert napisa= =C5=82(a): > > In message <201901061623.x06GNS1w057147@repo.freebsd.org>, Edward > Tomasz Napier > ala writes: > > Author: trasz > > Date: Sun Jan 6 16:23:28 2019 > > New Revision: 342812 > > URL: https://svnweb.freebsd.org/changeset/base/342812 > > > > Log: > > Give sh(1) a proper default prompt instead of just "$". > > > > Reviewed by: jilles > > MFC after: 2 weeks > > Relnotes: totally > > Sponsored by: DARPA, AFRL > > Differential Revision: https://reviews.freebsd.org/D18697 > > > > Modified: > > head/share/skel/dot.shrc > > > > Modified: head/share/skel/dot.shrc > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > > =3D > > --- head/share/skel/dot.shrc Sun Jan 6 05:07:52 2019 (r342811) > > +++ head/share/skel/dot.shrc Sun Jan 6 16:23:28 2019 (r342812) > > @@ -32,8 +32,8 @@ alias g=3D'egrep -i' > > # alias rm=3D'rm -i' > > > > > > -# # set prompt: ``username@hostname:directory $ '' > > -# PS1=3D"`whoami`@\h:\w \\$ " > > +# set prompt: ``username@hostname:directory $ '' > > +PS1=3D"`whoami`@\h:\w \\$ " > > > > # search path for cd(1) > > # CDPATH=3D:$HOME > > > > Hmmm. At $JOB the RHEL servers use this prompt. IMO the prompt is > unwieldy and distracting. Instead of \w could we use \W instead? The whole point of this change is to make things a little less weird for newcomers; existing users either use one of the shells from ports, or just carry their own shell rc file with their preferred PS1; either way they probably won't even notice. That's why I chose to follow the _actual_ status quo, both in FreeBSD (the new prompt is the same as the csh(1) one, apart from the '$') and Linux. Thus the '\w'. From owner-svn-src-head@freebsd.org Sun Jan 6 21:24:45 2019 Return-Path: Delivered-To: svn-src-head@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 16E00149C655; Sun, 6 Jan 2019 21:24:45 +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 B1295920CC; Sun, 6 Jan 2019 21:24:44 +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 A096661DA; Sun, 6 Jan 2019 21:24:44 +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 x06LOi2O018084; Sun, 6 Jan 2019 21:24:44 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x06LOiSd018083; Sun, 6 Jan 2019 21:24:44 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201901062124.x06LOiSd018083@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sun, 6 Jan 2019 21:24:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342815 - in head/contrib/ipfilter/ipsd: . Celler X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in head/contrib/ipfilter/ipsd: . Celler X-SVN-Commit-Revision: 342815 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B1295920CC X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.940,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jan 2019 21:24:45 -0000 Author: cy Date: Sun Jan 6 21:24:44 2019 New Revision: 342815 URL: https://svnweb.freebsd.org/changeset/base/342815 Log: Remove ipsd (IP Scan Detetor). It is unused and to my knowledge has never been used on any platform that ipfilter has been on. However it looks like it could be a useful utility, therefore there are plans to make it a port one day. It lacks a man page as well. MFC after: 1 month Deleted: head/contrib/ipfilter/ipsd/Celler/ip_compat.h head/contrib/ipfilter/ipsd/Makefile head/contrib/ipfilter/ipsd/README head/contrib/ipfilter/ipsd/ipsd.c head/contrib/ipfilter/ipsd/ipsd.h head/contrib/ipfilter/ipsd/ipsdr.c head/contrib/ipfilter/ipsd/linux.h head/contrib/ipfilter/ipsd/sbpf.c head/contrib/ipfilter/ipsd/sdlpi.c head/contrib/ipfilter/ipsd/slinux.c head/contrib/ipfilter/ipsd/snit.c From owner-svn-src-head@freebsd.org Sun Jan 6 21:34:06 2019 Return-Path: Delivered-To: svn-src-head@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 92D13149C8CD; Sun, 6 Jan 2019 21:34:06 +0000 (UTC) (envelope-from jilles@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 205FB926D8; Sun, 6 Jan 2019 21:34:06 +0000 (UTC) (envelope-from jilles@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 12AB16388; Sun, 6 Jan 2019 21:34:06 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x06LY5l7023550; Sun, 6 Jan 2019 21:34:05 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x06LY5wc023549; Sun, 6 Jan 2019 21:34:05 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201901062134.x06LY5wc023549@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 6 Jan 2019 21:34:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342816 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: jilles X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 342816 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 205FB926D8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.94)[-0.940,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jan 2019 21:34:06 -0000 Author: jilles Date: Sun Jan 6 21:34:05 2019 New Revision: 342816 URL: https://svnweb.freebsd.org/changeset/base/342816 Log: thr_wake(2): Minor mdoc fixes MFC after: 1 week Modified: head/lib/libc/sys/thr_wake.2 Modified: head/lib/libc/sys/thr_wake.2 ============================================================================== --- head/lib/libc/sys/thr_wake.2 Sun Jan 6 21:24:44 2019 (r342815) +++ head/lib/libc/sys/thr_wake.2 Sun Jan 6 21:34:05 2019 (r342816) @@ -67,7 +67,7 @@ of that thread in the kernel to fail immediately with .Er EINTR error. The flag is cleared by an interruptible sleep attempt or by a call to -.Xr thr_suspend 2. +.Xr thr_suspend 2 . This is used by the system threading library to implement cancellation. .Pp If @@ -96,7 +96,7 @@ of the calling thread. .El .Sh SEE ALSO .Xr ps 1 , -.Xr thr_self 2 +.Xr thr_self 2 , .Xr thr_suspend 2 , .Xr pthread_cancel 3 , .Xr pthread_resume_np 3 , From owner-svn-src-head@freebsd.org Sun Jan 6 21:43:15 2019 Return-Path: Delivered-To: svn-src-head@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 233F1149CB00; Sun, 6 Jan 2019 21:43:15 +0000 (UTC) (envelope-from jilles@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 BD47292B24; Sun, 6 Jan 2019 21:43:14 +0000 (UTC) (envelope-from jilles@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 AC7E56529; Sun, 6 Jan 2019 21:43:14 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x06LhENv028687; Sun, 6 Jan 2019 21:43:14 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x06LhEsf028686; Sun, 6 Jan 2019 21:43:14 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201901062143.x06LhEsf028686@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 6 Jan 2019 21:43:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342817 - head/usr.bin/getconf X-SVN-Group: head X-SVN-Commit-Author: jilles X-SVN-Commit-Paths: head/usr.bin/getconf X-SVN-Commit-Revision: 342817 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BD47292B24 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.940,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jan 2019 21:43:15 -0000 Author: jilles Date: Sun Jan 6 21:43:14 2019 New Revision: 342817 URL: https://svnweb.freebsd.org/changeset/base/342817 Log: getconf(1): Minor mdoc fix MFC after: 1 week Modified: head/usr.bin/getconf/getconf.1 Modified: head/usr.bin/getconf/getconf.1 ============================================================================== --- head/usr.bin/getconf/getconf.1 Sun Jan 6 21:34:05 2019 (r342816) +++ head/usr.bin/getconf/getconf.1 Sun Jan 6 21:43:14 2019 (r342817) @@ -70,7 +70,7 @@ Otherwise, all system configuration variables are reported using .Xr confstr 3 and -.Xr sysconf 3. +.Xr sysconf 3 . .Pp The second form of the command, with two mandatory arguments, retrieves file- and file system-specific From owner-svn-src-head@freebsd.org Sun Jan 6 23:43:13 2019 Return-Path: Delivered-To: svn-src-head@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 68D90149F372; Sun, 6 Jan 2019 23:43:13 +0000 (UTC) (envelope-from dab@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 0429E96D52; Sun, 6 Jan 2019 23:43:13 +0000 (UTC) (envelope-from dab@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 E36757953; Sun, 6 Jan 2019 23:43:12 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x06NhChU091015; Sun, 6 Jan 2019 23:43:12 GMT (envelope-from dab@FreeBSD.org) Received: (from dab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x06NhCmi091014; Sun, 6 Jan 2019 23:43:12 GMT (envelope-from dab@FreeBSD.org) Message-Id: <201901062343.x06NhCmi091014@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dab set sender to dab@FreeBSD.org using -f From: David Bright Date: Sun, 6 Jan 2019 23:43:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342822 - head/sys/dev/asmc X-SVN-Group: head X-SVN-Commit-Author: dab X-SVN-Commit-Paths: head/sys/dev/asmc X-SVN-Commit-Revision: 342822 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0429E96D52 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.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jan 2019 23:43:13 -0000 Author: dab Date: Sun Jan 6 23:43:12 2019 New Revision: 342822 URL: https://svnweb.freebsd.org/changeset/base/342822 Log: asmc: Add support for Mac mini 4,1 (Mid-2010) MFC after: 1 week Modified: head/sys/dev/asmc/asmc.c head/sys/dev/asmc/asmcvar.h Modified: head/sys/dev/asmc/asmc.c ============================================================================== --- head/sys/dev/asmc/asmc.c Sun Jan 6 22:50:16 2019 (r342821) +++ head/sys/dev/asmc/asmc.c Sun Jan 6 23:43:12 2019 (r342822) @@ -151,6 +151,8 @@ static struct asmc_model *asmc_match(device_t dev); asmc_mbp_sysctl_light_right, \ asmc_mbp_sysctl_light_control +#define ASMC_LIGHT_FUNCS_DISABLED NULL, NULL, NULL + struct asmc_model asmc_models[] = { { "MacBook1,1", "Apple SMC MacBook Core Duo", @@ -264,6 +266,15 @@ struct asmc_model asmc_models[] = { ASMC_FAN_FUNCS, NULL, NULL, NULL, ASMC_MM31_TEMPS, ASMC_MM31_TEMPNAMES, ASMC_MM31_TEMPDESCS + }, + + /* The Mac Mini 4,1 (Mid-2010) has no SMS */ + { + "Macmini4,1", "Apple SMC Mac mini 4,1 (Mid-2010)", + ASMC_SMS_FUNCS_DISABLED, + ASMC_FAN_FUNCS, + ASMC_LIGHT_FUNCS_DISABLED, + ASMC_MM41_TEMPS, ASMC_MM41_TEMPNAMES, ASMC_MM41_TEMPDESCS }, /* The Mac Mini 5,2 has no SMS */ Modified: head/sys/dev/asmc/asmcvar.h ============================================================================== --- head/sys/dev/asmc/asmcvar.h Sun Jan 6 22:50:16 2019 (r342821) +++ head/sys/dev/asmc/asmcvar.h Sun Jan 6 23:43:12 2019 (r342822) @@ -360,6 +360,27 @@ struct asmc_softc { "Northbridge Proximity Temperature", \ "Wireless Module Proximity Temperature", } +#define ASMC_MM41_TEMPS { "TA0P", "TC0D", "TC0G", "TC0H", "TC0P", \ + "TC0p", "TCPG", "TH0G", "TH0P", "TH0p", \ + "TM0G", "TM0P", "TM0p", "TN0D", "TN0G", \ + "TN0P", "TN0p", "TN1D", "TN1E", "TN1F", \ + "TN1G", "TN1S", "TNPG", "TO0P", "TO0p", \ + "TW0P", "Tm0P", "Tp0C", NULL } + +#define ASMC_MM41_TEMPNAMES { "TA0P", "TC0D", "TC0G", "TC0H", "TC0P", \ + "TC0p", "TCPG", "TH0G", "TH0P", "TH0p", \ + "TM0G", "TM0P", "TM0p", "TN0D", "TN0G", \ + "TN0P", "TN0p", "TN1D", "TN1E", "TN1F", \ + "TN1G", "TN1S", "TNPG", "TO0P", "TO0p", \ + "TW0P", "Tm0P", "Tp0C", NULL } + +#define ASMC_MM41_TEMPDESCS { "TA0P", "TC0D", "TC0G", "TC0H", "TC0P", \ + "TC0p", "TCPG", "TH0G", "TH0P", "TH0p", \ + "TM0G", "TM0P", "TM0p", "TN0D", "TN0G", \ + "TN0P", "TN0p", "TN1D", "TN1E", "TN1F", \ + "TN1G", "TN1S", "TNPG", "TO0P", "TO0p", \ + "TW0P", "Tm0P", "Tp0C", NULL } + #define ASMC_MM52_TEMPS { "TA0P", "TA1P", \ "TC0D", "TC0P", \ "TG0D", "TG1D", \ From owner-svn-src-head@freebsd.org Sun Jan 6 23:59:05 2019 Return-Path: Delivered-To: svn-src-head@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 3F162149F840; Sun, 6 Jan 2019 23:59:05 +0000 (UTC) (envelope-from kib@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 D95B597265; Sun, 6 Jan 2019 23:59:04 +0000 (UTC) (envelope-from kib@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 CC46A7AFB; Sun, 6 Jan 2019 23:59:04 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x06Nx4Wb096420; Sun, 6 Jan 2019 23:59:04 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x06Nx4ib096419; Sun, 6 Jan 2019 23:59:04 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201901062359.x06Nx4ib096419@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 6 Jan 2019 23:59:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342823 - head/contrib/xz/src/common X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/contrib/xz/src/common X-SVN-Commit-Revision: 342823 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D95B597265 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.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jan 2019 23:59:05 -0000 Author: kib Date: Sun Jan 6 23:59:04 2019 New Revision: 342823 URL: https://svnweb.freebsd.org/changeset/base/342823 Log: Clamp tuklib_physmem() return value to SIZE_T_MAX. On 32bit platforms it is possible to have (much) more physical RAM than is mappable into single address space. In this case liblzma scales the value into a request to mmap more address space than it is theoretically possible. Reported and tested by: pho Reviewed by: delphij Discussed with: emaste Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/contrib/xz/src/common/tuklib_physmem.c Modified: head/contrib/xz/src/common/tuklib_physmem.c ============================================================================== --- head/contrib/xz/src/common/tuklib_physmem.c Sun Jan 6 23:43:12 2019 (r342822) +++ head/contrib/xz/src/common/tuklib_physmem.c Sun Jan 6 23:59:04 2019 (r342823) @@ -45,6 +45,7 @@ # include #elif defined(TUKLIB_PHYSMEM_SYSCONF) +# include # include #elif defined(TUKLIB_PHYSMEM_SYSCTL) @@ -145,13 +146,16 @@ tuklib_physmem(void) #elif defined(TUKLIB_PHYSMEM_SYSCONF) const long pagesize = sysconf(_SC_PAGESIZE); const long pages = sysconf(_SC_PHYS_PAGES); - if (pagesize != -1 && pages != -1) + if (pagesize != -1 && pages != -1) { // According to docs, pagesize * pages can overflow. // Simple case is 32-bit box with 4 GiB or more RAM, // which may report exactly 4 GiB of RAM, and "long" // being 32-bit will overflow. Casting to uint64_t // hopefully avoids overflows in the near future. ret = (uint64_t)pagesize * (uint64_t)pages; + if (ret > SIZE_T_MAX) + ret = SIZE_T_MAX; + } #elif defined(TUKLIB_PHYSMEM_SYSCTL) int name[2] = { From owner-svn-src-head@freebsd.org Mon Jan 7 02:39:41 2019 Return-Path: Delivered-To: svn-src-head@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 044C714827E6; Mon, 7 Jan 2019 02:39:41 +0000 (UTC) (envelope-from kib@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 9EFB66C96D; Mon, 7 Jan 2019 02:39:40 +0000 (UTC) (envelope-from kib@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 8F794963A; Mon, 7 Jan 2019 02:39:40 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x072dem6079418; Mon, 7 Jan 2019 02:39:40 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x072deWP079417; Mon, 7 Jan 2019 02:39:40 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201901070239.x072deWP079417@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 7 Jan 2019 02:39:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342826 - head/sys/dev/ahci X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/dev/ahci X-SVN-Commit-Revision: 342826 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9EFB66C96D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.938,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jan 2019 02:39:41 -0000 Author: kib Date: Mon Jan 7 02:39:40 2019 New Revision: 342826 URL: https://svnweb.freebsd.org/changeset/base/342826 Log: Fix use of busdma(9) KPI in ahci(4). Use BUS_DMA_NOWAIT for loads at initialization time. Report actual numeric error code if any problem occurs at the initialization. Reported and tested by: pho Reviewed by: mav Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D18741 Modified: head/sys/dev/ahci/ahci.c Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Mon Jan 7 00:32:19 2019 (r342825) +++ head/sys/dev/ahci/ahci.c Mon Jan 7 02:39:40 2019 (r342826) @@ -982,18 +982,22 @@ ahci_dmainit(device_t dev) struct ahci_channel *ch = device_get_softc(dev); struct ahci_dc_cb_args dcba; size_t rfsize; + int error; /* Command area. */ - if (bus_dma_tag_create(bus_get_dma_tag(dev), 1024, 0, + error = bus_dma_tag_create(bus_get_dma_tag(dev), 1024, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, AHCI_WORK_SIZE, 1, AHCI_WORK_SIZE, - 0, NULL, NULL, &ch->dma.work_tag)) + 0, NULL, NULL, &ch->dma.work_tag); + if (error != 0) goto error; - if (bus_dmamem_alloc(ch->dma.work_tag, (void **)&ch->dma.work, - BUS_DMA_ZERO, &ch->dma.work_map)) + error = bus_dmamem_alloc(ch->dma.work_tag, (void **)&ch->dma.work, + BUS_DMA_ZERO, &ch->dma.work_map); + if (error != 0) goto error; - if (bus_dmamap_load(ch->dma.work_tag, ch->dma.work_map, ch->dma.work, - AHCI_WORK_SIZE, ahci_dmasetupc_cb, &dcba, 0) || dcba.error) { + error = bus_dmamap_load(ch->dma.work_tag, ch->dma.work_map, ch->dma.work, + AHCI_WORK_SIZE, ahci_dmasetupc_cb, &dcba, BUS_DMA_NOWAIT); + if (error != 0 || (error = dcba.error) != 0) { bus_dmamem_free(ch->dma.work_tag, ch->dma.work, ch->dma.work_map); goto error; } @@ -1003,33 +1007,37 @@ ahci_dmainit(device_t dev) rfsize = 4096; else rfsize = 256; - if (bus_dma_tag_create(bus_get_dma_tag(dev), rfsize, 0, + error = bus_dma_tag_create(bus_get_dma_tag(dev), rfsize, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, rfsize, 1, rfsize, - 0, NULL, NULL, &ch->dma.rfis_tag)) + 0, NULL, NULL, &ch->dma.rfis_tag); + if (error != 0) goto error; - if (bus_dmamem_alloc(ch->dma.rfis_tag, (void **)&ch->dma.rfis, 0, - &ch->dma.rfis_map)) + error = bus_dmamem_alloc(ch->dma.rfis_tag, (void **)&ch->dma.rfis, 0, + &ch->dma.rfis_map); + if (error != 0) goto error; - if (bus_dmamap_load(ch->dma.rfis_tag, ch->dma.rfis_map, ch->dma.rfis, - rfsize, ahci_dmasetupc_cb, &dcba, 0) || dcba.error) { + error = bus_dmamap_load(ch->dma.rfis_tag, ch->dma.rfis_map, ch->dma.rfis, + rfsize, ahci_dmasetupc_cb, &dcba, BUS_DMA_NOWAIT); + if (error != 0 || (error = dcba.error) != 0) { bus_dmamem_free(ch->dma.rfis_tag, ch->dma.rfis, ch->dma.rfis_map); goto error; } ch->dma.rfis_bus = dcba.maddr; /* Data area. */ - if (bus_dma_tag_create(bus_get_dma_tag(dev), 2, 0, + error = bus_dma_tag_create(bus_get_dma_tag(dev), 2, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, AHCI_SG_ENTRIES * PAGE_SIZE * ch->numslots, AHCI_SG_ENTRIES, AHCI_PRD_MAX, - 0, busdma_lock_mutex, &ch->mtx, &ch->dma.data_tag)) { + 0, busdma_lock_mutex, &ch->mtx, &ch->dma.data_tag); + if (error != 0) goto error; - } return; error: - device_printf(dev, "WARNING - DMA initialization failed\n"); + device_printf(dev, "WARNING - DMA initialization failed, error %d\n", + error); ahci_dmafini(dev); } From owner-svn-src-head@freebsd.org Mon Jan 7 05:49:28 2019 Return-Path: Delivered-To: svn-src-head@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 9C4941486908; Mon, 7 Jan 2019 05:49:28 +0000 (UTC) (envelope-from imp@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 41165735EA; Mon, 7 Jan 2019 05:49:28 +0000 (UTC) (envelope-from imp@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 30D6CB70A; Mon, 7 Jan 2019 05:49:28 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x075nSfs080120; Mon, 7 Jan 2019 05:49:28 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x075nRIG080118; Mon, 7 Jan 2019 05:49:27 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201901070549.x075nRIG080118@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 7 Jan 2019 05:49:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342840 - in head: share/mk stand tools/build/options X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head: share/mk stand tools/build/options X-SVN-Commit-Revision: 342840 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 41165735EA 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.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jan 2019 05:49:28 -0000 Author: imp Date: Mon Jan 7 05:49:27 2019 New Revision: 342840 URL: https://svnweb.freebsd.org/changeset/base/342840 Log: Create MK_LOADER_VERBOSE and connect it to ELF_VERBOSE in the loader code. PR: 18498 Submitted by: mellon at pobox dot com Added: head/tools/build/options/WITH_LOADER_VERBOSE (contents, props changed) Modified: head/share/mk/src.opts.mk head/stand/loader.mk Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Mon Jan 7 05:31:40 2019 (r342839) +++ head/share/mk/src.opts.mk Mon Jan 7 05:49:27 2019 (r342840) @@ -204,6 +204,7 @@ __DEFAULT_NO_OPTIONS = \ LIBSOFT \ LOADER_FIREWIRE \ LOADER_FORCE_LE \ + LOADER_VERBOSE \ NAND \ OFED_EXTRA \ OPENLDAP \ Modified: head/stand/loader.mk ============================================================================== --- head/stand/loader.mk Mon Jan 7 05:31:40 2019 (r342839) +++ head/stand/loader.mk Mon Jan 7 05:49:27 2019 (r342840) @@ -155,6 +155,10 @@ vers.c: ${LDRSRC}/newvers.sh ${VERSION_FILE} sh ${LDRSRC}/newvers.sh ${REPRO_FLAG} ${VERSION_FILE} \ ${NEWVERSWHAT} +.if ${MK_LOADER_VERBOSE} != "no" +CFLAGS+= -DELF_VERBOSE +.endif + .if !empty(HELP_FILES) HELP_FILES+= ${LDRSRC}/help.common Added: head/tools/build/options/WITH_LOADER_VERBOSE ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_LOADER_VERBOSE Mon Jan 7 05:49:27 2019 (r342840) @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Set to build with extra verbose debugging in the loader. +May explode already nearly too large loader over the limit. +Use with care. + From owner-svn-src-head@freebsd.org Mon Jan 7 05:59:59 2019 Return-Path: Delivered-To: svn-src-head@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 1C66414871C3; Mon, 7 Jan 2019 05:59:59 +0000 (UTC) (envelope-from imp@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 B8D2A7468B; Mon, 7 Jan 2019 05:59:58 +0000 (UTC) (envelope-from imp@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 ABEDAB8D9; Mon, 7 Jan 2019 05:59:58 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x075xwxj085201; Mon, 7 Jan 2019 05:59:58 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x075xwpA085200; Mon, 7 Jan 2019 05:59:58 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201901070559.x075xwpA085200@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 7 Jan 2019 05:59:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342842 - head/sys/dev/pccbb X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/pccbb X-SVN-Commit-Revision: 342842 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B8D2A7468B 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.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jan 2019 05:59:59 -0000 Author: imp Date: Mon Jan 7 05:59:58 2019 New Revision: 342842 URL: https://svnweb.freebsd.org/changeset/base/342842 Log: Fix TI PCI1520 PCI Cardbus bridge, but others affected. On system with Celeron 1.5GHz CPU, sometimes when a PCMCIA to Compact Flash adapter containing a Compact Flash card is inserted in the cardbus slot the system hangs. This problem has not been observed in systems with a 2.8GHz XEON CPU or faster. Analysis of the cbb driver shows functional interrupts are routed to PCI BEFORE the interrupt handler for functional interrupts has been registered. Fix applied as described in the bug. PR: 128040 Submitted by: Arthur Hartwig Modified: head/sys/dev/pccbb/pccbb.c Modified: head/sys/dev/pccbb/pccbb.c ============================================================================== --- head/sys/dev/pccbb/pccbb.c Mon Jan 7 05:58:55 2019 (r342841) +++ head/sys/dev/pccbb/pccbb.c Mon Jan 7 05:59:58 2019 (r342842) @@ -275,6 +275,8 @@ cbb_enable_func_intr(struct cbb_softc *sc) reg = (exca_getb(&sc->exca[0], EXCA_INTR) & ~EXCA_INTR_IRQ_MASK) | EXCA_INTR_IRQ_NONE; exca_putb(&sc->exca[0], EXCA_INTR, reg); + PCI_MASK_CONFIG(sc->dev, CBBR_BRIDGECTRL, + & ~CBBM_BRIDGECTRL_INTR_IREQ_ISA_EN, 2); } int @@ -873,8 +875,6 @@ cbb_power(device_t brdev, int volts) reg_ctrl &= ~TOPIC97_REG_CTRL_CLKRUN_ENA; pci_write_config(sc->dev, TOPIC_REG_CTRL, reg_ctrl, 4); } - PCI_MASK_CONFIG(brdev, CBBR_BRIDGECTRL, - & ~CBBM_BRIDGECTRL_INTR_IREQ_ISA_EN, 2); retval = 1; done:; if (volts != 0 && sc->chipset == CB_O2MICRO) From owner-svn-src-head@freebsd.org Mon Jan 7 06:19:52 2019 Return-Path: Delivered-To: svn-src-head@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 957D51487B6B; Mon, 7 Jan 2019 06:19:52 +0000 (UTC) (envelope-from imp@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 1127B75390; Mon, 7 Jan 2019 06:19:52 +0000 (UTC) (envelope-from imp@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 EBEB3BDFB; Mon, 7 Jan 2019 06:19:51 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x076JpVh095532; Mon, 7 Jan 2019 06:19:51 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x076JpAl095531; Mon, 7 Jan 2019 06:19:51 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201901070619.x076JpAl095531@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 7 Jan 2019 06:19:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342843 - head/sys/dev/pccard X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/pccard X-SVN-Commit-Revision: 342843 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1127B75390 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.956,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jan 2019 06:19:52 -0000 Author: imp Date: Mon Jan 7 06:19:51 2019 New Revision: 342843 URL: https://svnweb.freebsd.org/changeset/base/342843 Log: Fix a race between setting up the interrupt handler and it firing by setting the data prior to setting up the interrupt. Now we only set the cookie afterwards, and that (a) cannot be helpd and (b) isn't used in the ISR. PR: 147127 Submitted by: hps@ Modified: head/sys/dev/pccard/pccard.c Modified: head/sys/dev/pccard/pccard.c ============================================================================== --- head/sys/dev/pccard/pccard.c Mon Jan 7 05:59:58 2019 (r342842) +++ head/sys/dev/pccard/pccard.c Mon Jan 7 06:19:51 2019 (r342843) @@ -1272,13 +1272,16 @@ pccard_setup_intr(device_t dev, device_t child, struct if (pf->intr_filter != NULL || pf->intr_handler != NULL) panic("Only one interrupt handler per function allowed"); - err = bus_generic_setup_intr(dev, child, irq, flags, pccard_filter, - intr ? pccard_intr : NULL, pf, cookiep); - if (err != 0) - return (err); pf->intr_filter = filt; pf->intr_handler = intr; pf->intr_handler_arg = arg; + err = bus_generic_setup_intr(dev, child, irq, flags, pccard_filter, + intr ? pccard_intr : NULL, pf, cookiep); + if (err != 0) { + pf->intr_filter = NULL; + pf->intr_handler = NULL; + return (err); + } pf->intr_handler_cookie = *cookiep; if (pccard_mfc(sc)) { pccard_ccr_write(pf, PCCARD_CCR_OPTION, From owner-svn-src-head@freebsd.org Mon Jan 7 08:27:13 2019 Return-Path: Delivered-To: svn-src-head@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 BB614148AF78; Mon, 7 Jan 2019 08:27:12 +0000 (UTC) (envelope-from delphij@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 6DE048176B; Mon, 7 Jan 2019 08:27:12 +0000 (UTC) (envelope-from delphij@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 42242D399; Mon, 7 Jan 2019 08:27:12 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x078RC1e063149; Mon, 7 Jan 2019 08:27:12 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x078RB0K063146; Mon, 7 Jan 2019 08:27:11 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201901070827.x078RB0K063146@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 7 Jan 2019 08:27:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342845 - head/usr.bin/gzip X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/usr.bin/gzip X-SVN-Commit-Revision: 342845 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6DE048176B 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.998,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jan 2019 08:27:13 -0000 Author: delphij Date: Mon Jan 7 08:27:11 2019 New Revision: 342845 URL: https://svnweb.freebsd.org/changeset/base/342845 Log: Port NetBSD improvements: - Add -l support for xz files - Add lzip support to gzip based on the example lzip decoder. Obtained from: NetBSD MFC after: 2 weeks Relnotes: yes Added: head/usr.bin/gzip/unlz.c (contents, props changed) Modified: head/usr.bin/gzip/gzip.1 head/usr.bin/gzip/gzip.c head/usr.bin/gzip/unxz.c Modified: head/usr.bin/gzip/gzip.1 ============================================================================== --- head/usr.bin/gzip/gzip.1 Mon Jan 7 07:12:51 2019 (r342844) +++ head/usr.bin/gzip/gzip.1 Mon Jan 7 08:27:11 2019 (r342845) @@ -1,4 +1,4 @@ -.\" $NetBSD: gzip.1,v 1.30 2017/10/22 17:36:49 abhinav Exp $ +.\" $NetBSD: gzip.1,v 1.31 2018/10/26 22:10:15 christos Exp $ .\" .\" Copyright (c) 1997, 2003, 2004, 2008, 2009, 2015, 2017 Matthew R. Green .\" All rights reserved. @@ -25,7 +25,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd November 21, 2017 +.Dd January 7, 2018 .Dt GZIP 1 .Os .Sh NAME @@ -109,6 +109,7 @@ This version of is also capable of decompressing files compressed using .Xr compress 1 , .Xr bzip2 1 , +.Ar lzip , or .Xr xz 1 . .Sh OPTIONS @@ -224,7 +225,7 @@ This implementation of was ported based on the .Nx .Nm -version 20170803, +version 20181111, and first appeared in .Fx 7.0 . .Sh AUTHORS Modified: head/usr.bin/gzip/gzip.c ============================================================================== --- head/usr.bin/gzip/gzip.c Mon Jan 7 07:12:51 2019 (r342844) +++ head/usr.bin/gzip/gzip.c Mon Jan 7 08:27:11 2019 (r342845) @@ -1,4 +1,4 @@ -/* $NetBSD: gzip.c,v 1.113 2018/06/12 00:42:17 kamil Exp $ */ +/* $NetBSD: gzip.c,v 1.116 2018/10/27 11:39:12 skrll Exp $ */ /*- * SPDX-License-Identifier: BSD-2-Clause-NetBSD @@ -84,6 +84,9 @@ enum filetype { #ifndef NO_XZ_SUPPORT FT_XZ, #endif +#ifndef NO_LZ_SUPPORT + FT_LZ, +#endif FT_LAST, FT_UNKNOWN }; @@ -110,6 +113,11 @@ enum filetype { #define XZ_MAGIC "\3757zXZ" #endif +#ifndef NO_LZ_SUPPORT +#define LZ_SUFFIX ".lz" +#define LZ_MAGIC "LZIP" +#endif + #define GZ_SUFFIX ".gz" #define BUFLEN (64 * 1024) @@ -155,6 +163,9 @@ static suffixes_t suffixes[] = { #ifndef NO_XZ_SUPPORT SUFFIX(XZ_SUFFIX, ""), #endif +#ifndef NO_LZ_SUPPORT + SUFFIX(LZ_SUFFIX, ""), +#endif SUFFIX(GZ_SUFFIX, ""), /* Overwritten by -S "" */ #endif /* SMALL */ #undef SUFFIX @@ -162,7 +173,7 @@ static suffixes_t suffixes[] = { #define NUM_SUFFIXES (nitems(suffixes)) #define SUFFIX_MAXLEN 30 -static const char gzip_version[] = "FreeBSD gzip 20171121"; +static const char gzip_version[] = "FreeBSD gzip 20190107"; #ifndef SMALL static const char gzip_copyright[] = \ @@ -246,6 +257,7 @@ static void display_license(void); static const suffixes_t *check_suffix(char *, int); static ssize_t read_retry(int, void *, size_t); static ssize_t write_retry(int, const void *, size_t); +static void print_list_out(off_t, off_t, const char*); #ifdef SMALL #define infile_set(f,t) infile_set(f) @@ -289,8 +301,13 @@ static off_t unpack(int, int, char *, size_t, off_t *) #ifndef NO_XZ_SUPPORT static off_t unxz(int, int, char *, size_t, off_t *); +static off_t unxz_len(int); #endif +#ifndef NO_LZ_SUPPORT +static off_t unlz(int, int, char *, size_t, off_t *); +#endif + #ifdef SMALL #define getopt_long(a,b,c,d,e) getopt(a,b,c) #else @@ -1159,6 +1176,11 @@ file_gettype(u_char *buf) return FT_XZ; else #endif +#ifndef NO_LZ_SUPPORT + if (memcmp(buf, LZ_MAGIC, 4) == 0) + return FT_LZ; + else +#endif return FT_UNKNOWN; } @@ -1632,14 +1654,23 @@ file_uncompress(char *file, char *outfile, size_t outs #ifndef NO_XZ_SUPPORT case FT_XZ: if (lflag) { - maybe_warnx("no -l with xz files"); - goto lose; + size = unxz_len(fd); + print_list_out(in_size, size, file); + return -1; } - size = unxz(fd, zfd, NULL, 0, NULL); break; #endif +#ifndef NO_LZ_SUPPORT + case FT_LZ: + if (lflag) { + maybe_warnx("no -l with lzip files"); + goto lose; + } + size = unlz(fd, zfd, NULL, 0, NULL); + break; +#endif #ifndef SMALL case FT_UNKNOWN: if (lflag) { @@ -1872,6 +1903,12 @@ handle_stdin(void) (char *)header1, sizeof header1, &gsize); break; #endif +#ifndef NO_LZ_SUPPORT + case FT_LZ: + usize = unlz(STDIN_FILENO, STDOUT_FILENO, + (char *)header1, sizeof header1, &gsize); + break; +#endif } #ifndef SMALL @@ -2197,6 +2234,12 @@ print_list(int fd, off_t out, const char *outfile, tim #else (void)&ts; /* XXX */ #endif + print_list_out(out, in, outfile); +} + +static void +print_list_out(off_t out, off_t in, const char *outfile) +{ printf("%12llu %12llu ", (unsigned long long)out, (unsigned long long)in); print_ratio(in, out, stdout); printf(" %s\n", outfile); @@ -2270,6 +2313,9 @@ display_version(void) #endif #ifndef NO_XZ_SUPPORT #include "unxz.c" +#endif +#ifndef NO_LZ_SUPPORT +#include "unlz.c" #endif static ssize_t Added: head/usr.bin/gzip/unlz.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/gzip/unlz.c Mon Jan 7 08:27:11 2019 (r342845) @@ -0,0 +1,646 @@ +/* $NetBSD: unlz.c,v 1.6 2018/11/11 01:42:36 christos Exp $ */ + +/*- + * Copyright (c) 2018 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/* Lzd - Educational decompressor for the lzip format + Copyright (C) 2013-2018 Antonio Diaz Diaz. + + This program is free software. Redistribution and use in source and + binary forms, with or without modification, are permitted provided + that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include + +#define LZ_STATES 12 + +#define LITERAL_CONTEXT_BITS 3 +#define POS_STATE_BITS 2 +#define POS_STATES (1 << POS_STATE_BITS) +#define POS_STATE_MASK (POS_STATES - 1) + +#define STATES 4 +#define DIS_SLOT_BITS 6 + +#define DIS_MODEL_START 4 +#define DIS_MODEL_END 14 + +#define MODELED_DISTANCES (1 << (DIS_MODEL_END / 2)) +#define DIS_ALIGN_BITS 4 +#define DIS_ALIGN_SIZE (1 << DIS_ALIGN_BITS) + +#define LOW_BITS 3 +#define MID_BITS 3 +#define HIGH_BITS 8 + +#define LOW_SYMBOLS (1 << LOW_BITS) +#define MID_SYMBOLS (1 << MID_BITS) +#define HIGH_SYMBOLS (1 << HIGH_BITS) + +#define MAX_SYMBOLS (LOW_SYMBOLS + MID_SYMBOLS + HIGH_SYMBOLS) + +#define MIN_MATCH_LEN 2 + +#define BIT_MODEL_MOVE_BITS 5 +#define BIT_MODEL_TOTAL_BITS 11 +#define BIT_MODEL_TOTAL (1 << BIT_MODEL_TOTAL_BITS) +#define BIT_MODEL_INIT (BIT_MODEL_TOTAL / 2) + +static const int lz_st_next[] = { + 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 4, 5, +}; + +static bool +lz_st_is_char(int st) { + return st < 7; +} + +static int +lz_st_get_char(int st) { + return lz_st_next[st]; +} + +static int +lz_st_get_match(int st) { + return st < 7 ? 7 : 10; +} + +static int +lz_st_get_rep(int st) { + return st < 7 ? 8 : 11; +} + +static int +lz_st_get_short_rep(int st) { + return st < 7 ? 9 : 11; +} + +struct lz_len_model { + int choice1; + int choice2; + int bm_low[POS_STATES][LOW_SYMBOLS]; + int bm_mid[POS_STATES][MID_SYMBOLS]; + int bm_high[HIGH_SYMBOLS]; +}; + +static uint32_t lz_crc[256]; + +static void +lz_crc_init(void) +{ + for (unsigned i = 0; i < nitems(lz_crc); i++) { + unsigned c = i; + for (unsigned j = 0; j < 8; j++) { + if (c & 1) + c = 0xEDB88320U ^ (c >> 1); + else + c >>= 1; + } + lz_crc[i] = c; + } +} + +static void +lz_crc_update(uint32_t *crc, const uint8_t *buf, size_t len) +{ + for (size_t i = 0; i < len; i++) + *crc = lz_crc[(*crc ^ buf[i]) & 0xFF] ^ (*crc >> 8); +} + +struct lz_range_decoder { + FILE *fp; + uint32_t code; + uint32_t range; +}; + +static int +lz_rd_create(struct lz_range_decoder *rd, FILE *fp) +{ + rd->fp = fp; + rd->code = 0; + rd->range = ~0; + for (int i = 0; i < 5; i++) + rd->code = (rd->code << 8) | (uint8_t)getc(rd->fp); + return ferror(rd->fp) ? -1 : 0; +} + +static unsigned +lz_rd_decode(struct lz_range_decoder *rd, int num_bits) +{ + unsigned symbol = 0; + + for (int i = num_bits; i > 0; i--) { + rd->range >>= 1; + symbol <<= 1; + if (rd->code >= rd->range) { + rd->code -= rd->range; + symbol |= 1; + } + if (rd->range <= 0x00FFFFFFU) { + rd->range <<= 8; + rd->code = (rd->code << 8) | (uint8_t)getc(rd->fp); + } + } + + return symbol; +} + +static unsigned +lz_rd_decode_bit(struct lz_range_decoder *rd, int *bm) +{ + unsigned symbol; + const uint32_t bound = (rd->range >> BIT_MODEL_TOTAL_BITS) * *bm; + + if(rd->code < bound) { + rd->range = bound; + *bm += (BIT_MODEL_TOTAL - *bm) >> BIT_MODEL_MOVE_BITS; + symbol = 0; + } + else { + rd->range -= bound; + rd->code -= bound; + *bm -= *bm >> BIT_MODEL_MOVE_BITS; + symbol = 1; + } + + if (rd->range <= 0x00FFFFFFU) { + rd->range <<= 8; + rd->code = (rd->code << 8) | (uint8_t)getc(rd->fp); + } + return symbol; +} + +static unsigned +lz_rd_decode_tree(struct lz_range_decoder *rd, int *bm, int num_bits) +{ + unsigned symbol = 1; + + for (int i = 0; i < num_bits; i++) + symbol = (symbol << 1) | lz_rd_decode_bit(rd, &bm[symbol]); + + return symbol - (1 << num_bits); +} + +static unsigned +lz_rd_decode_tree_reversed(struct lz_range_decoder *rd, int *bm, int num_bits) +{ + unsigned symbol = lz_rd_decode_tree(rd, bm, num_bits); + unsigned reversed_symbol = 0; + + for (int i = 0; i < num_bits; i++) { + reversed_symbol = (reversed_symbol << 1) | (symbol & 1); + symbol >>= 1; + } + + return reversed_symbol; +} + +static unsigned +lz_rd_decode_matched(struct lz_range_decoder *rd, int *bm, int match_byte) +{ + unsigned symbol = 1; + + for (int i = 7; i >= 0; i--) { + const unsigned match_bit = (match_byte >> i) & 1; + const unsigned bit = lz_rd_decode_bit(rd, + &bm[symbol + (match_bit << 8) + 0x100]); + symbol = (symbol << 1) | bit; + if (match_bit != bit) { + while (symbol < 0x100) { + symbol = (symbol << 1) | + lz_rd_decode_bit(rd, &bm[symbol]); + } + break; + } + } + return symbol & 0xFF; +} + +static unsigned +lz_rd_decode_len(struct lz_range_decoder *rd, struct lz_len_model *lm, + int pos_state) +{ + if (lz_rd_decode_bit(rd, &lm->choice1) == 0) + return lz_rd_decode_tree(rd, lm->bm_low[pos_state], LOW_BITS); + + if (lz_rd_decode_bit(rd, &lm->choice2) == 0) { + return LOW_SYMBOLS + + lz_rd_decode_tree(rd, lm->bm_mid[pos_state], MID_BITS); + } + + return LOW_SYMBOLS + MID_SYMBOLS + + lz_rd_decode_tree(rd, lm->bm_high, HIGH_BITS); +} + +struct lz_decoder { + FILE *fin, *fout; + off_t pos, ppos, spos, dict_size; + bool wrapped; + uint32_t crc; + uint8_t *obuf; + struct lz_range_decoder rdec; +}; + +static int +lz_flush(struct lz_decoder *lz) +{ + off_t offs = lz->pos - lz->spos; + if (offs <= 0) + return -1; + + size_t size = (size_t)offs; + lz_crc_update(&lz->crc, lz->obuf + lz->spos, size); + if (fwrite(lz->obuf + lz->spos, 1, size, lz->fout) != size) + return -1; + + lz->wrapped = lz->pos >= lz->dict_size; + if (lz->wrapped) { + lz->ppos += lz->pos; + lz->pos = 0; + } + lz->spos = lz->pos; + return 0; +} + +static void +lz_destroy(struct lz_decoder *lz) +{ + if (lz->fin) + fclose(lz->fin); + if (lz->fout) + fclose(lz->fout); + free(lz->obuf); +} + +static int +lz_create(struct lz_decoder *lz, int fin, int fdout, int dict_size) +{ + memset(lz, 0, sizeof(*lz)); + + lz->fin = fdopen(dup(fin), "r"); + if (lz->fin == NULL) + goto out; + + lz->fout = fdopen(dup(fdout), "w"); + if (lz->fout == NULL) + goto out; + + lz->pos = lz->ppos = lz->spos = 0; + lz->crc = ~0; + lz->dict_size = dict_size; + lz->wrapped = false; + + lz->obuf = malloc(dict_size); + if (lz->obuf == NULL) + goto out; + + if (lz_rd_create(&lz->rdec, lz->fin) == -1) + goto out; + return 0; +out: + lz_destroy(lz); + return -1; +} + +static uint8_t +lz_peek(const struct lz_decoder *lz, unsigned ahead) +{ + off_t diff = lz->pos - ahead - 1; + + if (diff >= 0) + return lz->obuf[diff]; + + if (lz->wrapped) + return lz->obuf[lz->dict_size + diff]; + + return 0; +} + +static void +lz_put(struct lz_decoder *lz, uint8_t b) +{ + lz->obuf[lz->pos++] = b; + if (lz->dict_size == lz->pos) + lz_flush(lz); +} + +static off_t +lz_get_data_position(const struct lz_decoder *lz) +{ + return lz->ppos + lz->pos; +} + +static unsigned +lz_get_crc(const struct lz_decoder *lz) +{ + return lz->crc ^ 0xffffffffU; +} + +static void +lz_bm_init(int *a, size_t l) +{ + for (size_t i = 0; i < l; i++) + a[i] = BIT_MODEL_INIT; +} + +#define LZ_BM_INIT(a) lz_bm_init(a, nitems(a)) +#define LZ_BM_INIT2(a) do { \ + size_t l = nitems(a[0]); \ + for (size_t i = 0; i < nitems(a); i++) \ + lz_bm_init(a[i], l); \ +} while (/*CONSTCOND*/0) + +#define LZ_MODEL_INIT(a) do { \ + a.choice1 = BIT_MODEL_INIT; \ + a.choice2 = BIT_MODEL_INIT; \ + LZ_BM_INIT2(a.bm_low); \ + LZ_BM_INIT2(a.bm_mid); \ + LZ_BM_INIT(a.bm_high); \ +} while (/*CONSTCOND*/0) + +static bool +lz_decode_member(struct lz_decoder *lz) +{ + int bm_literal[1 << LITERAL_CONTEXT_BITS][0x300]; + int bm_match[LZ_STATES][POS_STATES]; + int bm_rep[4][LZ_STATES]; + int bm_len[LZ_STATES][POS_STATES]; + int bm_dis_slot[LZ_STATES][1 << DIS_SLOT_BITS]; + int bm_dis[MODELED_DISTANCES - DIS_MODEL_END + 1]; + int bm_align[DIS_ALIGN_SIZE]; + + LZ_BM_INIT2(bm_literal); + LZ_BM_INIT2(bm_match); + LZ_BM_INIT2(bm_rep); + LZ_BM_INIT2(bm_len); + LZ_BM_INIT2(bm_dis_slot); + LZ_BM_INIT(bm_dis); + LZ_BM_INIT(bm_align); + + struct lz_len_model match_len_model; + struct lz_len_model rep_len_model; + + LZ_MODEL_INIT(match_len_model); + LZ_MODEL_INIT(rep_len_model); + + struct lz_range_decoder *rd = &lz->rdec; + unsigned rep[4] = { 0 }; + + + int state = 0; + + while (!feof(lz->fin) && !ferror(lz->fin)) { + const int pos_state = lz_get_data_position(lz) & POS_STATE_MASK; + // bit 1 + if (lz_rd_decode_bit(rd, &bm_match[state][pos_state]) == 0) { + const uint8_t prev_byte = lz_peek(lz, 0); + const int literal_state = + prev_byte >> (8 - LITERAL_CONTEXT_BITS); + int *bm = bm_literal[literal_state]; + if (lz_st_is_char(state)) + lz_put(lz, lz_rd_decode_tree(rd, bm, 8)); + else { + int peek = lz_peek(lz, rep[0]); + lz_put(lz, lz_rd_decode_matched(rd, bm, peek)); + } + state = lz_st_get_char(state); + continue; + } + int len; + // bit 2 + if (lz_rd_decode_bit(rd, &bm_rep[0][state]) != 0) { + // bit 3 + if (lz_rd_decode_bit(rd, &bm_rep[1][state]) == 0) { + // bit 4 + if (lz_rd_decode_bit(rd, + &bm_len[state][pos_state]) == 0) + { + state = lz_st_get_short_rep(state); + lz_put(lz, lz_peek(lz, rep[0])); + continue; + } + } else { + unsigned distance; + // bit 4 + if (lz_rd_decode_bit(rd, &bm_rep[2][state]) + == 0) + distance = rep[1]; + else { + // bit 5 + if (lz_rd_decode_bit(rd, + &bm_rep[3][state]) == 0) + distance = rep[2]; + else { + distance = rep[3]; + rep[3] = rep[2]; + } + rep[2] = rep[1]; + } + rep[1] = rep[0]; + rep[0] = distance; + } + state = lz_st_get_rep(state); + len = MIN_MATCH_LEN + + lz_rd_decode_len(rd, &rep_len_model, pos_state); + } else { + rep[3] = rep[2]; rep[2] = rep[1]; rep[1] = rep[0]; + len = MIN_MATCH_LEN + + lz_rd_decode_len(rd, &match_len_model, pos_state); + const int len_state = + MIN(len - MIN_MATCH_LEN, STATES - 1); + rep[0] = lz_rd_decode_tree(rd, bm_dis_slot[len_state], + DIS_SLOT_BITS); + if (rep[0] >= DIS_MODEL_START) { + const unsigned dis_slot = rep[0]; + const int direct_bits = (dis_slot >> 1) - 1; + rep[0] = (2 | (dis_slot & 1)) << direct_bits; + if (dis_slot < DIS_MODEL_END) + rep[0] += lz_rd_decode_tree_reversed(rd, + &bm_dis[rep[0] - dis_slot], + direct_bits); + else { + rep[0] += lz_rd_decode(rd, direct_bits + - DIS_ALIGN_BITS) << DIS_ALIGN_BITS; + rep[0] += lz_rd_decode_tree_reversed(rd, + bm_align, DIS_ALIGN_BITS); + if (rep[0] == 0xFFFFFFFFU) { + lz_flush(lz); + return len == MIN_MATCH_LEN; + } + } + } + state = lz_st_get_match(state); + if (rep[0] >= lz->dict_size || + (rep[0] >= lz->pos && !lz->wrapped)) { + lz_flush(lz); + return false; + } + } + for (int i = 0; i < len; i++) + lz_put(lz, lz_peek(lz, rep[0])); + } + lz_flush(lz); + return false; +} + +/* + * 0-3 CRC32 of the uncompressed data + * 4-11 size of the uncompressed data + * 12-19 member size including header and trailer + */ +#define TRAILER_SIZE 20 + + +static off_t +lz_decode(int fin, int fdout, unsigned dict_size, off_t *insize) +{ + struct lz_decoder lz; + off_t rv = -1; + + if (lz_create(&lz, fin, fdout, dict_size) == -1) + return -1; + + if (!lz_decode_member(&lz)) + goto out; + + uint8_t trailer[TRAILER_SIZE]; + + for(size_t i = 0; i < nitems(trailer); i++) + trailer[i] = (uint8_t)getc(lz.fin); + + unsigned crc = 0; + for (int i = 3; i >= 0; --i) { + crc <<= 8; + crc += trailer[i]; + } + + int64_t data_size = 0; + for (int i = 11; i >= 4; --i) { + data_size <<= 8; + data_size += trailer[i]; + } + + if (crc != lz_get_crc(&lz) || data_size != lz_get_data_position(&lz)) + goto out; + + rv = 0; + for (int i = 19; i >= 12; --i) { + rv <<= 8; + rv += trailer[i]; + } + if (insize) + *insize = rv; +#if 0 + /* Does not work with pipes */ + rv = ftello(lz.fout); +#else + rv = data_size; +#endif +out: + lz_destroy(&lz); + return rv; +} + + +/* + * 0-3 magic + * 4 version + * 5 coded dict_size + */ +#define HDR_SIZE 6 +#define MIN_DICTIONARY_SIZE (1 << 12) +#define MAX_DICTIONARY_SIZE (1 << 29) + +static const char hdrmagic[] = { 'L', 'Z', 'I', 'P', 1 }; + +static unsigned +lz_get_dict_size(unsigned char c) +{ + unsigned dict_size = 1 << (c & 0x1f); + dict_size -= (dict_size >> 2) * ( (c >> 5) & 0x7); + if (dict_size < MIN_DICTIONARY_SIZE || dict_size > MAX_DICTIONARY_SIZE) + return 0; + return dict_size; +} + +static off_t +unlz(int fin, int fout, char *pre, size_t prelen, off_t *bytes_in) +{ + if (lz_crc[0] == 0) + lz_crc_init(); + + char header[HDR_SIZE]; + + if (prelen > sizeof(header)) + return -1; + if (pre && prelen) + memcpy(header, pre, prelen); + + ssize_t nr = read(fin, header + prelen, sizeof(header) - prelen); + switch (nr) { + case -1: + return -1; + case 0: + return prelen ? -1 : 0; + default: + if ((size_t)nr != sizeof(header) - prelen) + return -1; + break; + } + + if (memcmp(header, hdrmagic, sizeof(hdrmagic)) != 0) + return -1; + + unsigned dict_size = lz_get_dict_size(header[5]); + if (dict_size == 0) + return -1; + + return lz_decode(fin, fout, dict_size, bytes_in); +} Modified: head/usr.bin/gzip/unxz.c ============================================================================== --- head/usr.bin/gzip/unxz.c Mon Jan 7 07:12:51 2019 (r342844) +++ head/usr.bin/gzip/unxz.c Mon Jan 7 08:27:11 2019 (r342845) @@ -1,4 +1,4 @@ -/* $NetBSD: unxz.c,v 1.7 2017/08/04 07:27:08 mrg Exp $ */ +/* $NetBSD: unxz.c,v 1.8 2018/10/06 16:36:45 martin Exp $ */ /*- * SPDX-License-Identifier: BSD-2-Clause-NetBSD @@ -156,3 +156,322 @@ unxz(int i, int o, char *pre, size_t prelen, off_t *by } } } + +#include + +/* + * Copied various bits and pieces from xz support code or brute force + * replacements. + */ + +#define my_min(A,B) ((A)<(B)?(A):(B)) + +// Some systems have suboptimal BUFSIZ. Use a bit bigger value on them. +// We also need that IO_BUFFER_SIZE is a multiple of 8 (sizeof(uint64_t)) +#if BUFSIZ <= 1024 +# define IO_BUFFER_SIZE 8192 +#else +# define IO_BUFFER_SIZE (BUFSIZ & ~7U) +#endif + +/// is_sparse() accesses the buffer as uint64_t for maximum speed. +/// Use an union to make sure that the buffer is properly aligned. +typedef union { + uint8_t u8[IO_BUFFER_SIZE]; + uint32_t u32[IO_BUFFER_SIZE / sizeof(uint32_t)]; + uint64_t u64[IO_BUFFER_SIZE / sizeof(uint64_t)]; +} io_buf; + + +static bool +io_pread(int fd, io_buf *buf, size_t size, off_t pos) +{ + // Using lseek() and read() is more portable than pread() and + // for us it is as good as real pread(). + if (lseek(fd, pos, SEEK_SET) != pos) { + return true; + } + + const size_t amount = read(fd, buf, size); + if (amount == SIZE_MAX) + return true; + + if (amount != size) { + return true; + } + + return false; +} + +/* + * Most of the following is copied (mostly verbatim) from the xz + * distribution, from file src/xz/list.c + */ + +/////////////////////////////////////////////////////////////////////////////// +// +/// \file list.c +/// \brief Listing information about .xz files +// +// Author: Lasse Collin +// +// This file has been put into the public domain. +// You can do whatever you want with this file. +// +/////////////////////////////////////////////////////////////////////////////// + + +/// Information about a .xz file +typedef struct { + /// Combined Index of all Streams in the file + lzma_index *idx; + + /// Total amount of Stream Padding + uint64_t stream_padding; + + /// Highest memory usage so far + uint64_t memusage_max; + + /// True if all Blocks so far have Compressed Size and + /// Uncompressed Size fields + bool all_have_sizes; + + /// Oldest XZ Utils version that will decompress the file + uint32_t min_version; + +} xz_file_info; + +#define XZ_FILE_INFO_INIT { NULL, 0, 0, true, 50000002 } + + +/// \brief Parse the Index(es) from the given .xz file +/// +/// \param xfi Pointer to structure where the decoded information +/// is stored. +/// \param pair Input file +/// +/// \return On success, false is returned. On error, true is returned. +/// +// TODO: This function is pretty big. liblzma should have a function that +// takes a callback function to parse the Index(es) from a .xz file to make +// it easy for applications. +static bool +parse_indexes(xz_file_info *xfi, int src_fd) +{ + struct stat st; + + fstat(src_fd, &st); + if (st.st_size <= 0) { + return true; + } + + if (st.st_size < 2 * LZMA_STREAM_HEADER_SIZE) { + return true; + } + + io_buf buf; + lzma_stream_flags header_flags; + lzma_stream_flags footer_flags; + lzma_ret ret; + + // lzma_stream for the Index decoder + lzma_stream strm = LZMA_STREAM_INIT; + + // All Indexes decoded so far + lzma_index *combined_index = NULL; + + // The Index currently being decoded + lzma_index *this_index = NULL; + + // Current position in the file. We parse the file backwards so + // initialize it to point to the end of the file. + off_t pos = st.st_size; + + // Each loop iteration decodes one Index. + do { + // Check that there is enough data left to contain at least + // the Stream Header and Stream Footer. This check cannot + // fail in the first pass of this loop. + if (pos < 2 * LZMA_STREAM_HEADER_SIZE) { + goto error; + } + + pos -= LZMA_STREAM_HEADER_SIZE; + lzma_vli stream_padding = 0; + + // Locate the Stream Footer. There may be Stream Padding which + // we must skip when reading backwards. + while (true) { + if (pos < LZMA_STREAM_HEADER_SIZE) { + goto error; + } + + if (io_pread(src_fd, &buf, + LZMA_STREAM_HEADER_SIZE, pos)) + goto error; + + // Stream Padding is always a multiple of four bytes. + int i = 2; + if (buf.u32[i] != 0) + break; + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Mon Jan 7 08:29:28 2019 Return-Path: Delivered-To: svn-src-head@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 64ED7148B069; Mon, 7 Jan 2019 08:29:28 +0000 (UTC) (envelope-from delphij@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 CC67B8192B; Mon, 7 Jan 2019 08:29:27 +0000 (UTC) (envelope-from delphij@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 BA3D6D39A; Mon, 7 Jan 2019 08:29:27 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x078TRUm063283; Mon, 7 Jan 2019 08:29:27 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x078TRJw063282; Mon, 7 Jan 2019 08:29:27 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201901070829.x078TRJw063282@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 7 Jan 2019 08:29:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342846 - head/usr.bin/gzip X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/usr.bin/gzip X-SVN-Commit-Revision: 342846 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CC67B8192B 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.997,0]; NEURAL_HAM_SHORT(-0.96)[-0.961,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jan 2019 08:29:28 -0000 Author: delphij Date: Mon Jan 7 08:29:27 2019 New Revision: 342846 URL: https://svnweb.freebsd.org/changeset/base/342846 Log: Correct documentation year. MFC after: 2 weeks Modified: head/usr.bin/gzip/gzip.1 Modified: head/usr.bin/gzip/gzip.1 ============================================================================== --- head/usr.bin/gzip/gzip.1 Mon Jan 7 08:27:11 2019 (r342845) +++ head/usr.bin/gzip/gzip.1 Mon Jan 7 08:29:27 2019 (r342846) @@ -25,7 +25,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd January 7, 2018 +.Dd January 7, 2019 .Dt GZIP 1 .Os .Sh NAME From owner-svn-src-head@freebsd.org Mon Jan 7 14:59:02 2019 Return-Path: Delivered-To: svn-src-head@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 4369E1495308; Mon, 7 Jan 2019 14:59:02 +0000 (UTC) (envelope-from leandro.lupori@gmail.com) Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3A80A8FA4A; Mon, 7 Jan 2019 14:59:01 +0000 (UTC) (envelope-from leandro.lupori@gmail.com) Received: by mail-wr1-x42a.google.com with SMTP id u4so748988wrp.3; Mon, 07 Jan 2019 06:59:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4oGIF3kfVJXnp6dmUYGcfHXu9AxGU0X/knmqYMnq1p4=; b=dWvS3cili/gGlXFeUcfjWE+bH9iFWB3fxmIQFD0o7IfMqKdJComw9+TYf84XGEc64T tUC0VcJUDhpCHUTZ6CF5+5B/ofFag6krFp+D5kkX/PlHXK0FhdieN9RuVzvDSvUB5dHs 37aOKUjXp+F3tNRFPMy0lsoaLorurAz9o8Ar1Jh8lrAcmxWzndfwS/7/2x7HeeHtmN/V pMlXUqAkt9njOoR1PWIp/Vtj1Xi+HWpuUKm0rdEZa7LFKy5auX3bWsxjbSORYp5ExiU1 iwdtRAUWJDmbvRgtS7iEJaJHJUmGGE31iKQjrOda9HgAlO5NQjJSG96YV2808bM8fc+I YwDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4oGIF3kfVJXnp6dmUYGcfHXu9AxGU0X/knmqYMnq1p4=; b=cT9LUBoR5qdvL5AeSxxyYfy2TtYm44F54aN86dnGFyDCmBdj1UxRYE/jdtunP0wcqf o95kqmWCp1zH+rVrKX3LG0CuiZJP1WCRaj2Kulk4iAHEI0hDWnhJ+8V8YKxpJIFZrUGA 7d2/u5c1mLFXTM4ZX62AZ1FAYoyslI8UFudA0e7qx3mbwlsBXmzfwL0+VihendIuBKMH mCwerk54d4SgjhcCRaAOemRXz9071wDNPSJnl5FtECJYgZNK5VAAWBUPNAIPnZshBE/I d5rEHwf7XJYDATbjf2iKIXMRJ2KDMBjoPN47JSzXDQhwT/GMnaIjd85uGxl6G8oxY06b lwhw== X-Gm-Message-State: AJcUukeldBZAowRtc4Zxnv7sNymPfZ/IiFj4n3p5IAS84K3fW0hGgbuc tm2jHWVmcWaHtE7h2pTE+DDcSd2Lq6CRUT1obEHcdC1E3zI= X-Google-Smtp-Source: ALg8bN4EAsscZwTYMxIC78mjP/I3rti1khS+f2fAlP2Pk3mykaExlrxSoa1VH4H5S0tSpv5yjOuYT54yXMEPagNnFgs= X-Received: by 2002:a5d:4ccb:: with SMTP id c11mr55411596wrt.241.1546873139655; Mon, 07 Jan 2019 06:58:59 -0800 (PST) MIME-Version: 1.0 References: <201901041831.x04IVHa5070991@repo.freebsd.org> <201901041907.x04J7Rse084674@pdx.rh.CN85.dnsmgr.net> In-Reply-To: <201901041907.x04J7Rse084674@pdx.rh.CN85.dnsmgr.net> From: Leandro Date: Mon, 7 Jan 2019 12:58:48 -0200 Message-ID: Subject: Re: svn commit: r342771 - in head: share/man/man4 sys/kern sys/powerpc/powernv sys/powerpc/powerpc sys/powerpc/ps3 sys/powerpc/pseries sys/sys sys/x86/x86 To: rgrimes@freebsd.org Cc: Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 3A80A8FA4A X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=dWvS3cil; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of leandrolupori@gmail.com designates 2a00:1450:4864:20::42a as permitted sender) smtp.mailfrom=leandrolupori@gmail.com X-Spamd-Result: default: False [-6.68 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCPT_COUNT_FIVE(0.00)[5]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; RCVD_TLS_LAST(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[a.2.4.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; IP_SCORE(-2.69)[ip: (-9.81), ipnet: 2a00:1450::/32(-1.90), asn: 15169(-1.67), country: US(-0.08)]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; TAGGED_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jan 2019 14:59:02 -0000 Hello, This change makes the kernel unbootable on POWER8: panic: Duplicate children in 0xc0000000021d0490. mask (ffffffffffffffff,ffff,0,0) child (ff,0,0,0) cpuid = 0 time = 1 KDB: stack backtrace: 0xe000000000008270: at .kdb_backtrace+0x5c 0xe0000000000083a0: at .vpanic+0x1b4 0xe000000000008460: at .panic+0x38 0xe0000000000084f0: at .topo_init_root+0x1d0 0xe000000000008640: at .smp_topo_1level+0x8c 0xe0000000000086f0: at .opal_call+0x408 0xe000000000008790: at .cpu_topo+0x6c 0xe000000000008810: at .smp_topo+0x11c 0xe000000000008940: at .schedinit+0x80 0xe0000000000089e0: at .mi_startup+0x1f8 0xe000000000008a80: at .__start+0xc4 The panic is due to the new call to cpu_topo(), at sys/powerpc/powerpc/mp_machdep.c. If the call is commented, everything works fine. Also, the related values displayed by sysctl seem correct: kern.smp.cpus: 80 kern.smp.threads_per_core: 8 kern.smp.cores: 10 So, my hunch is that cpu_topo() or the functions called by it are already being called elsewhere, and the new call is creating duplicated nodes, causing the panic. Is the call to cpu_topo() really needed? Thanks, Leandro On Fri, Jan 4, 2019 at 5:07 PM Rodney W. Grimes wrote: > > > Author: cem > > Date: Fri Jan 4 18:31:17 2019 > > New Revision: 342771 > > URL: https://svnweb.freebsd.org/changeset/base/342771 > > > > Log: > > Expose threads-per-core and physical core count information > > > > With new sysctls (to the best of our ability do detect them). Restructured > > smp.4 slightly for clarity (keep relevant stuff closer to the top) while > > documenting. > > > > Reviewed by: markj, jhibbits (ppc parts) > > MFC after: 3 days > > Sponsored by: Dell EMC Isilon > > Differential Revision: https://reviews.freebsd.org/D18322 > > > > Modified: > > head/share/man/man4/smp.4 > > head/sys/kern/subr_smp.c > > head/sys/powerpc/powernv/platform_powernv.c > > head/sys/powerpc/powerpc/mp_machdep.c > > head/sys/powerpc/ps3/platform_ps3.c > > head/sys/powerpc/pseries/platform_chrp.c > > head/sys/sys/smp.h > > head/sys/x86/x86/mp_x86.c > > Can you please alter this to match how topology is expressed > by most tools, > Sockets, > Cores per socket, > Threads per core. > > ncpu = S * C * T > > This matches how bhyve, qemu, kvm and others express > this information. > > Thanks, > Rod > > > Modified: head/share/man/man4/smp.4 > > ============================================================================== > > --- head/share/man/man4/smp.4 Fri Jan 4 18:21:49 2019 (r342770) > > +++ head/share/man/man4/smp.4 Fri Jan 4 18:31:17 2019 (r342771) > > @@ -23,7 +23,7 @@ > > .\" > > .\" $FreeBSD$ > > .\" > > -.Dd January 6, 2018 > > +.Dd January 4, 2019 > > .Dt SMP 4 > > .Os > > .Sh NAME > > @@ -35,27 +35,6 @@ > > The > > .Nm > > kernel implements symmetric multi-processor support. > > -.Sh COMPATIBILITY > > -Support for multi-processor systems is present for all Tier-1 > > -architectures on > > -.Fx . > > -Currently, this includes amd64, i386 and sparc64. > > -Support is enabled using > > -.Cd options SMP . > > -It is permissible to use the SMP kernel configuration on non-SMP equipped > > -motherboards. > > -.Sh I386 NOTES > > -For i386 systems, the > > -.Nm > > -kernel supports motherboards that follow the Intel MP specification, > > -version 1.4. > > -In addition to > > -.Cd options SMP , > > -i386 also requires > > -.Cd device apic . > > -The > > -.Xr mptable 1 > > -command may be used to view the status of multi-processor support. > > .Pp > > .Nm > > support can be disabled by setting the loader tunable > > @@ -66,6 +45,13 @@ The number of CPUs detected by the system is available > > the read-only sysctl variable > > .Va hw.ncpu . > > .Pp > > +The number of online threads per CPU core is available in the read-only sysctl > > +variable > > +.Va kern.smp.threads_per_core . > > +The number of physical CPU cores detected by the system is available in the > > +read-only sysctl variable > > +.Va kern.smp.cores . > > +.Pp > > .Fx > > allows specific CPUs on a multi-processor system to be disabled. > > This can be done using the > > @@ -74,6 +60,12 @@ tunable, where X is the APIC ID of a CPU. > > Setting this tunable to 1 will result in the corresponding CPU being > > disabled. > > .Pp > > +.Fx > > +supports simultaneous multithreading on x86 and powerpc platforms. > > +On x86, the logical CPUs can be disabled by setting the > > +.Va machdep.hyperthreading_allowed > > +tunable to zero. > > +.Pp > > The > > .Xr sched_ule 4 > > scheduler implements CPU topology detection and adjusts the scheduling > > @@ -122,13 +114,26 @@ two quad-core processors is: > > .Pp > > This information is used internally by the kernel to schedule related > > tasks on CPUs that are closely grouped together. > > -.Pp > > -.Fx > > -supports hyperthreading on Intel CPU's on the i386 and AMD64 platforms. > > -Because using logical CPUs can cause performance penalties under certain loads, > > -the logical CPUs can be disabled by setting the > > -.Va machdep.hyperthreading_allowed > > -tunable to zero. > > +.Sh COMPATIBILITY > > +Support for multi-processor systems is present for all Tier-1 and Tier-2 > > +architectures on > > +.Fx . > > +Currently, this includes x86, powerpc, arm, and sparc64. > > +Support is enabled using > > +.Cd options SMP . > > +It is permissible to use the SMP kernel configuration on non-SMP hardware. > > +.Sh I386 NOTES > > +For i386 systems, the > > +.Nm > > +kernel supports motherboards that follow the Intel MP specification, > > +version 1.4. > > +In addition to > > +.Cd options SMP , > > +i386 also requires > > +.Cd device apic . > > +The > > +.Xr mptable 1 > > +command may be used to view the status of multi-processor support. > > .Sh SEE ALSO > > .Xr cpuset 1 , > > .Xr mptable 1 , > > @@ -166,3 +171,20 @@ in > > also introduced support for SMP on the sparc64 architecture. > > .Sh AUTHORS > > .An Steve Passe Aq Mt fsmp@FreeBSD.org > > +.Sh CAVEATS > > +The > > +.Va kern.smp.threads_per_core > > +and > > +.Va kern.smp.cores > > +sysctl variables are provided as a best-effort guess. > > +If an architecture or platform adds SMT and > > +.Fx > > +has not yet implemented detection, the reported values may be inaccurate. > > +In this case, > > +.Va kern.smp.threads_per_core > > +will report > > +.Dv 1 > > +and > > +.Va kern.smp.cores > > +will report the same value as > > +.Va hw.ncpu . > > > > Modified: head/sys/kern/subr_smp.c > > ============================================================================== > > --- head/sys/kern/subr_smp.c Fri Jan 4 18:21:49 2019 (r342770) > > +++ head/sys/kern/subr_smp.c Fri Jan 4 18:31:17 2019 (r342771) > > @@ -98,6 +98,14 @@ int smp_cpus = 1; /* how many cpu's running */ > > SYSCTL_INT(_kern_smp, OID_AUTO, cpus, CTLFLAG_RD|CTLFLAG_CAPRD, &smp_cpus, 0, > > "Number of CPUs online"); > > > > +int smp_threads_per_core = 1; /* how many SMT threads are running per core */ > > +SYSCTL_INT(_kern_smp, OID_AUTO, threads_per_core, CTLFLAG_RD|CTLFLAG_CAPRD, > > + &smp_threads_per_core, 0, "Number of SMT threads online per core"); > > + > > +int mp_ncores = -1; /* how many physical cores running */ > > +SYSCTL_INT(_kern_smp, OID_AUTO, cores, CTLFLAG_RD|CTLFLAG_CAPRD, &mp_ncores, 0, > > + "Number of CPUs online"); > > + > > int smp_topology = 0; /* Which topology we're using. */ > > SYSCTL_INT(_kern_smp, OID_AUTO, topology, CTLFLAG_RDTUN, &smp_topology, 0, > > "Topology override setting; 0 is default provided by hardware."); > > @@ -154,6 +162,7 @@ mp_start(void *dummy) > > > > /* Probe for MP hardware. */ > > if (smp_disabled != 0 || cpu_mp_probe() == 0) { > > + mp_ncores = 1; > > mp_ncpus = 1; > > CPU_SETOF(PCPU_GET(cpuid), &all_cpus); > > return; > > @@ -162,6 +171,11 @@ mp_start(void *dummy) > > cpu_mp_start(); > > printf("FreeBSD/SMP: Multiprocessor System Detected: %d CPUs\n", > > mp_ncpus); > > + > > + /* Provide a default for most architectures that don't have SMT/HTT. */ > > + if (mp_ncores < 0) > > + mp_ncores = mp_ncpus; > > + > > cpu_mp_announce(); > > } > > SYSINIT(cpu_mp, SI_SUB_CPU, SI_ORDER_THIRD, mp_start, NULL); > > @@ -823,6 +837,7 @@ static void > > mp_setvariables_for_up(void *dummy) > > { > > mp_ncpus = 1; > > + mp_ncores = 1; > > mp_maxid = PCPU_GET(cpuid); > > CPU_SETOF(mp_maxid, &all_cpus); > > KASSERT(PCPU_GET(cpuid) == 0, ("UP must have a CPU ID of zero")); > > > > Modified: head/sys/powerpc/powernv/platform_powernv.c > > ============================================================================== > > --- head/sys/powerpc/powernv/platform_powernv.c Fri Jan 4 18:21:49 2019 (r342770) > > +++ head/sys/powerpc/powernv/platform_powernv.c Fri Jan 4 18:31:17 2019 (r342771) > > @@ -435,12 +435,16 @@ powernv_smp_topo(platform_t plat) > > break; > > } > > > > + smp_threads_per_core = nthreads; > > + > > if (mp_ncpus % nthreads != 0) { > > printf("WARNING: Irregular SMP topology. Performance may be " > > "suboptimal (%d threads, %d on first core)\n", > > mp_ncpus, nthreads); > > return (smp_topo_none()); > > } > > + > > + mp_ncores = mp_ncpus / nthreads; > > > > /* Don't do anything fancier for non-threaded SMP */ > > if (nthreads == 1) > > > > Modified: head/sys/powerpc/powerpc/mp_machdep.c > > ============================================================================== > > --- head/sys/powerpc/powerpc/mp_machdep.c Fri Jan 4 18:21:49 2019 (r342770) > > +++ head/sys/powerpc/powerpc/mp_machdep.c Fri Jan 4 18:31:17 2019 (r342771) > > @@ -186,6 +186,11 @@ cpu_mp_start(void) > > next: > > error = platform_smp_next_cpu(&cpu); > > } > > + > > +#ifdef SMP > > + /* Probe mp_ncores and smp_threads_per_core as a side effect. */ > > + (void)cpu_topo(); > > +#endif > > } > > > > void > > > > Modified: head/sys/powerpc/ps3/platform_ps3.c > > ============================================================================== > > --- head/sys/powerpc/ps3/platform_ps3.c Fri Jan 4 18:21:49 2019 (r342770) > > +++ head/sys/powerpc/ps3/platform_ps3.c Fri Jan 4 18:31:17 2019 (r342771) > > @@ -246,6 +246,8 @@ ps3_smp_start_cpu(platform_t plat, struct pcpu *pc) > > static struct cpu_group * > > ps3_smp_topo(platform_t plat) > > { > > + mp_ncores = 1; > > + smp_threads_per_core = 2; > > return (smp_topo_1level(CG_SHARE_L1, 2, CG_FLAG_SMT)); > > } > > #endif > > > > Modified: head/sys/powerpc/pseries/platform_chrp.c > > ============================================================================== > > --- head/sys/powerpc/pseries/platform_chrp.c Fri Jan 4 18:21:49 2019 (r342770) > > +++ head/sys/powerpc/pseries/platform_chrp.c Fri Jan 4 18:31:17 2019 (r342771) > > @@ -517,6 +517,8 @@ chrp_smp_topo(platform_t plat) > > ncpus++; > > } > > > > + mp_ncores = ncores; > > + > > if (ncpus % ncores != 0) { > > printf("WARNING: Irregular SMP topology. Performance may be " > > "suboptimal (%d CPUS, %d cores)\n", ncpus, ncores); > > @@ -527,6 +529,7 @@ chrp_smp_topo(platform_t plat) > > if (ncpus == ncores) > > return (smp_topo_none()); > > > > + smp_threads_per_core = ncpus / ncores; > > return (smp_topo_1level(CG_SHARE_L1, ncpus / ncores, CG_FLAG_SMT)); > > } > > #endif > > > > Modified: head/sys/sys/smp.h > > ============================================================================== > > --- head/sys/sys/smp.h Fri Jan 4 18:21:49 2019 (r342770) > > +++ head/sys/sys/smp.h Fri Jan 4 18:31:17 2019 (r342771) > > @@ -167,8 +167,10 @@ extern cpuset_t logical_cpus_mask; > > > > extern u_int mp_maxid; > > extern int mp_maxcpus; > > +extern int mp_ncores; > > extern int mp_ncpus; > > extern volatile int smp_started; > > +extern int smp_threads_per_core; > > > > extern cpuset_t all_cpus; > > extern cpuset_t cpuset_domain[MAXMEMDOM]; /* CPUs in each NUMA domain. */ > > > > Modified: head/sys/x86/x86/mp_x86.c > > ============================================================================== > > --- head/sys/x86/x86/mp_x86.c Fri Jan 4 18:21:49 2019 (r342770) > > +++ head/sys/x86/x86/mp_x86.c Fri Jan 4 18:31:17 2019 (r342771) > > @@ -607,6 +607,7 @@ assign_cpu_ids(void) > > { > > struct topo_node *node; > > u_int smt_mask; > > + int nhyper; > > > > smt_mask = (1u << core_id_shift) - 1; > > > > @@ -615,6 +616,7 @@ assign_cpu_ids(void) > > * beyond MAXCPU. CPU 0 is always assigned to the BSP. > > */ > > mp_ncpus = 0; > > + nhyper = 0; > > TOPO_FOREACH(node, &topo_root) { > > if (node->type != TOPO_TYPE_PU) > > continue; > > @@ -642,6 +644,9 @@ assign_cpu_ids(void) > > continue; > > } > > > > + if (cpu_info[node->hwid].cpu_hyperthread) > > + nhyper++; > > + > > cpu_apic_ids[mp_ncpus] = node->hwid; > > apic_cpuids[node->hwid] = mp_ncpus; > > topo_set_pu_id(node, mp_ncpus); > > @@ -651,6 +656,9 @@ assign_cpu_ids(void) > > KASSERT(mp_maxid >= mp_ncpus - 1, > > ("%s: counters out of sync: max %d, count %d", __func__, mp_maxid, > > mp_ncpus)); > > + > > + mp_ncores = mp_ncpus - nhyper; > > + smp_threads_per_core = mp_ncpus / mp_ncores; > > } > > > > /* > > > > > > -- > Rod Grimes rgrimes@freebsd.org > From owner-svn-src-head@freebsd.org Mon Jan 7 15:53:55 2019 Return-Path: Delivered-To: svn-src-head@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 7D77814968DE; Mon, 7 Jan 2019 15:53:55 +0000 (UTC) (envelope-from emaste@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 232096AD95; Mon, 7 Jan 2019 15:53:55 +0000 (UTC) (envelope-from emaste@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 16DDE1A0DB; Mon, 7 Jan 2019 15:53:55 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x07FrsYD097518; Mon, 7 Jan 2019 15:53:54 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x07FrsWa097517; Mon, 7 Jan 2019 15:53:54 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201901071553.x07FrsWa097517@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 7 Jan 2019 15:53:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342848 - head/tools/build/mk X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/tools/build/mk X-SVN-Commit-Revision: 342848 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 232096AD95 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.997,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jan 2019 15:53:55 -0000 Author: emaste Date: Mon Jan 7 15:53:54 2019 New Revision: 342848 URL: https://svnweb.freebsd.org/changeset/base/342848 Log: OptionalObsoleteFiles: remove groff leftovers usr/share/dict/eign is removed unconditionally as of r319664, so it no longer needs to be in OptionalObsoleteFiles. PR: 230353 Reported by: philippe.michel7 sfr.fr Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Mon Jan 7 11:03:08 2019 (r342847) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Mon Jan 7 15:53:54 2019 (r342848) @@ -2267,7 +2267,6 @@ OLD_FILES+=usr/libexec/cc1plus .if ${MK_DICT} == no OLD_FILES+=usr/share/dict/README -OLD_FILES+=usr/share/dict/eign OLD_FILES+=usr/share/dict/freebsd OLD_FILES+=usr/share/dict/propernames OLD_FILES+=usr/share/dict/web2 From owner-svn-src-head@freebsd.org Mon Jan 7 16:16:48 2019 Return-Path: Delivered-To: svn-src-head@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 6ED0814972A0; Mon, 7 Jan 2019 16:16:48 +0000 (UTC) (envelope-from kevans@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 DE1876BC8D; Mon, 7 Jan 2019 16:16:47 +0000 (UTC) (envelope-from kevans@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 CFF361A447; Mon, 7 Jan 2019 16:16:47 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x07GGlJB008257; Mon, 7 Jan 2019 16:16:47 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x07GGllJ008256; Mon, 7 Jan 2019 16:16:47 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201901071616.x07GGllJ008256@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 7 Jan 2019 16:16:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342849 - head/lib/libbe X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/lib/libbe X-SVN-Commit-Revision: 342849 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DE1876BC8D 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.997,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jan 2019 16:16:48 -0000 Author: kevans Date: Mon Jan 7 16:16:47 2019 New Revision: 342849 URL: https://svnweb.freebsd.org/changeset/base/342849 Log: libbe(3): Don't allow bootfs to be destroyed Previously, the following sequence of events was feasible under some circumstance: bectl create test bectl activate test # the test BE dataset gets promoted and set as bootfs bectl destroy test I was unable to reproduce the destroy succeeding, but we should be rejecting this before it even gets to libzfs because it would leave the system in an inconsistent state. Forcing the user to be explicit as to which environment should be activated instead is much better. Reported by: Graham Perrin MFC after: 3 days Modified: head/lib/libbe/be.c Modified: head/lib/libbe/be.c ============================================================================== --- head/lib/libbe/be.c Mon Jan 7 15:53:54 2019 (r342848) +++ head/lib/libbe/be.c Mon Jan 7 16:16:47 2019 (r342849) @@ -211,7 +211,8 @@ be_destroy(libbe_handle_t *lbh, const char *name, int if (!zfs_dataset_exists(lbh->lzh, path, ZFS_TYPE_FILESYSTEM)) return (set_error(lbh, BE_ERR_NOENT)); - if (strcmp(path, lbh->rootfs) == 0) + if (strcmp(path, lbh->rootfs) == 0 || + strcmp(path, lbh->bootfs) == 0) return (set_error(lbh, BE_ERR_DESTROYACT)); fs = zfs_open(lbh->lzh, p, ZFS_TYPE_FILESYSTEM); From owner-svn-src-head@freebsd.org Mon Jan 7 16:36:46 2019 Return-Path: Delivered-To: svn-src-head@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 35E7B1497BD7; Mon, 7 Jan 2019 16:36:46 +0000 (UTC) (envelope-from ian@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 D00396CB73; Mon, 7 Jan 2019 16:36:45 +0000 (UTC) (envelope-from ian@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 C26471A79C; Mon, 7 Jan 2019 16:36:45 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x07GajDo018818; Mon, 7 Jan 2019 16:36:45 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x07GajwN018817; Mon, 7 Jan 2019 16:36:45 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201901071636.x07GajwN018817@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 7 Jan 2019 16:36:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342850 - head/sys/arm/arm X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/arm/arm X-SVN-Commit-Revision: 342850 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D00396CB73 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.997,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jan 2019 16:36:46 -0000 Author: ian Date: Mon Jan 7 16:36:45 2019 New Revision: 342850 URL: https://svnweb.freebsd.org/changeset/base/342850 Log: Add a missing \n to a bootverbose printf. Modified: head/sys/arm/arm/mpcore_timer.c Modified: head/sys/arm/arm/mpcore_timer.c ============================================================================== --- head/sys/arm/arm/mpcore_timer.c Mon Jan 7 16:16:47 2019 (r342849) +++ head/sys/arm/arm/mpcore_timer.c Mon Jan 7 16:36:45 2019 (r342850) @@ -420,7 +420,7 @@ arm_tmr_attach(device_t dev) tc_err = attach_tc(sc); else if (bootverbose) device_printf(sc->dev, - "not using variable-frequency device as timecounter"); + "not using variable-frequency device as timecounter\n"); sc->memrid++; sc->irqrid++; } From owner-svn-src-head@freebsd.org Mon Jan 7 17:35:10 2019 Return-Path: Delivered-To: svn-src-head@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 083B31499C43; Mon, 7 Jan 2019 17:35:10 +0000 (UTC) (envelope-from pfg@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 9EAEA6FB08; Mon, 7 Jan 2019 17:35:09 +0000 (UTC) (envelope-from pfg@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 8B1B01B277; Mon, 7 Jan 2019 17:35:09 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x07HZ93I050749; Mon, 7 Jan 2019 17:35:09 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x07HZ9IF050748; Mon, 7 Jan 2019 17:35:09 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201901071735.x07HZ9IF050748@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 7 Jan 2019 17:35:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342851 - head/lib/msun/src X-SVN-Group: head X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: head/lib/msun/src X-SVN-Commit-Revision: 342851 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9EAEA6FB08 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.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jan 2019 17:35:10 -0000 Author: pfg Date: Mon Jan 7 17:35:09 2019 New Revision: 342851 URL: https://svnweb.freebsd.org/changeset/base/342851 Log: pow(3): Workaround possible signed shift Undefined Behavior. j is int32_t and thus j<<31 is undefined if j==1. Hinted by: muusl-lib (git 688d3da0f1730daddbc954bbc2d27cc96ceee04c) Discussed with: freebsd-numerics (kargl) Modified: head/lib/msun/src/e_pow.c Modified: head/lib/msun/src/e_pow.c ============================================================================== --- head/lib/msun/src/e_pow.c Mon Jan 7 16:36:45 2019 (r342850) +++ head/lib/msun/src/e_pow.c Mon Jan 7 17:35:09 2019 (r342851) @@ -133,7 +133,7 @@ __ieee754_pow(double x, double y) k = (iy>>20)-0x3ff; /* exponent */ if(k>20) { j = ly>>(52-k); - if((j<<(52-k))==ly) yisint = 2-(j&1); + if(((u_int32_t)j<<(52-k))==ly) yisint = 2-(j&1); } else if(ly==0) { j = iy>>(20-k); if((j<<(20-k))==iy) yisint = 2-(j&1); From owner-svn-src-head@freebsd.org Mon Jan 7 19:39:33 2019 Return-Path: Delivered-To: svn-src-head@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 709C8149D552; Mon, 7 Jan 2019 19:39:33 +0000 (UTC) (envelope-from cem@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 F06097589F; Mon, 7 Jan 2019 19:39:32 +0000 (UTC) (envelope-from cem@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 DEC3D1C7B8; Mon, 7 Jan 2019 19:39:32 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x07JdWJn014847; Mon, 7 Jan 2019 19:39:32 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x07JdVx9014841; Mon, 7 Jan 2019 19:39:31 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201901071939.x07JdVx9014841@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Mon, 7 Jan 2019 19:39:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342852 - in head/sys/powerpc: include powernv powerpc ps3 pseries X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head/sys/powerpc: include powernv powerpc ps3 pseries X-SVN-Commit-Revision: 342852 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: F06097589F 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.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jan 2019 19:39:33 -0000 Author: cem Date: Mon Jan 7 19:39:31 2019 New Revision: 342852 URL: https://svnweb.freebsd.org/changeset/base/342852 Log: powerpc: Fix regression introduced in r342771 In r342771, I introduced a regression in Power by abusing the platform smp_topo() method as a shortcut for providing the MI information needed for the stated sysctls. The smp_topo() method was already called later by sched_ule (under the name cpu_topo()), and initializes a static array of scheduler topology information. I had skimmed the smp_topo_foo() functions and assumed they were idempotent; empirically, they are not (or at least, detect re-initialization and panic). Do the cleaner thing I should have done in the first place and add a platform method specifically for core- and thread-count probing. Reported by: luporl via jhibbits Reviewed by: luporl X-MFC-With: r342771 Differential Revision: https://reviews.freebsd.org/D18777 Modified: head/sys/powerpc/include/platform.h head/sys/powerpc/powernv/platform_powernv.c head/sys/powerpc/powerpc/mp_machdep.c head/sys/powerpc/powerpc/platform.c head/sys/powerpc/powerpc/platform_if.m head/sys/powerpc/ps3/platform_ps3.c head/sys/powerpc/pseries/platform_chrp.c Modified: head/sys/powerpc/include/platform.h ============================================================================== --- head/sys/powerpc/include/platform.h Mon Jan 7 17:35:09 2019 (r342851) +++ head/sys/powerpc/include/platform.h Mon Jan 7 19:39:31 2019 (r342852) @@ -58,6 +58,7 @@ int platform_smp_get_bsp(struct cpuref *); int platform_smp_start_cpu(struct pcpu *); void platform_smp_timebase_sync(u_long tb, int ap); void platform_smp_ap_init(void); +void platform_smp_probe_threads(void); const char *installed_platform(void); void platform_probe_and_attach(void); Modified: head/sys/powerpc/powernv/platform_powernv.c ============================================================================== --- head/sys/powerpc/powernv/platform_powernv.c Mon Jan 7 17:35:09 2019 (r342851) +++ head/sys/powerpc/powernv/platform_powernv.c Mon Jan 7 19:39:31 2019 (r342852) @@ -71,6 +71,7 @@ static int powernv_smp_get_bsp(platform_t, struct cpur static void powernv_smp_ap_init(platform_t); #ifdef SMP static int powernv_smp_start_cpu(platform_t, struct pcpu *cpu); +static void powernv_smp_probe_threads(platform_t); static struct cpu_group *powernv_smp_topo(platform_t plat); #endif static void powernv_reset(platform_t); @@ -89,6 +90,7 @@ static platform_method_t powernv_methods[] = { PLATFORMMETHOD(platform_smp_get_bsp, powernv_smp_get_bsp), #ifdef SMP PLATFORMMETHOD(platform_smp_start_cpu, powernv_smp_start_cpu), + PLATFORMMETHOD(platform_smp_probe_threads, powernv_smp_probe_threads), PLATFORMMETHOD(platform_smp_topo, powernv_smp_topo), #endif @@ -403,8 +405,8 @@ powernv_smp_start_cpu(platform_t plat, struct pcpu *pc return (0); } -static struct cpu_group * -powernv_smp_topo(platform_t plat) +static void +powernv_smp_probe_threads(platform_t plat) { char buf[8]; phandle_t cpu, dev, root; @@ -436,21 +438,26 @@ powernv_smp_topo(platform_t plat) } smp_threads_per_core = nthreads; + if (mp_ncpus % nthreads == 0) + mp_ncores = mp_ncpus / nthreads; +} - if (mp_ncpus % nthreads != 0) { +static struct cpu_group * +powernv_smp_topo(platform_t plat) +{ + if (mp_ncpus % smp_threads_per_core != 0) { printf("WARNING: Irregular SMP topology. Performance may be " "suboptimal (%d threads, %d on first core)\n", - mp_ncpus, nthreads); + mp_ncpus, smp_threads_per_core); return (smp_topo_none()); } - mp_ncores = mp_ncpus / nthreads; - /* Don't do anything fancier for non-threaded SMP */ - if (nthreads == 1) + if (smp_threads_per_core == 1) return (smp_topo_none()); - return (smp_topo_1level(CG_SHARE_L1, nthreads, CG_FLAG_SMT)); + return (smp_topo_1level(CG_SHARE_L1, smp_threads_per_core, + CG_FLAG_SMT)); } #endif Modified: head/sys/powerpc/powerpc/mp_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/mp_machdep.c Mon Jan 7 17:35:09 2019 (r342851) +++ head/sys/powerpc/powerpc/mp_machdep.c Mon Jan 7 19:39:31 2019 (r342852) @@ -188,8 +188,7 @@ next: } #ifdef SMP - /* Probe mp_ncores and smp_threads_per_core as a side effect. */ - (void)cpu_topo(); + platform_smp_probe_threads(); #endif } Modified: head/sys/powerpc/powerpc/platform.c ============================================================================== --- head/sys/powerpc/powerpc/platform.c Mon Jan 7 17:35:09 2019 (r342851) +++ head/sys/powerpc/powerpc/platform.c Mon Jan 7 19:39:31 2019 (r342852) @@ -242,6 +242,12 @@ platform_smp_ap_init() PLATFORM_SMP_AP_INIT(plat_obj); } +void +platform_smp_probe_threads(void) +{ + PLATFORM_SMP_PROBE_THREADS(plat_obj); +} + #ifdef SMP struct cpu_group * cpu_topo(void) Modified: head/sys/powerpc/powerpc/platform_if.m ============================================================================== --- head/sys/powerpc/powerpc/platform_if.m Mon Jan 7 17:35:09 2019 (r342851) +++ head/sys/powerpc/powerpc/platform_if.m Mon Jan 7 19:39:31 2019 (r342852) @@ -84,6 +84,10 @@ CODE { { return; } + static void platform_null_smp_probe_threads(void) + { + return; + } }; /** @@ -195,6 +199,13 @@ METHOD int smp_start_cpu { METHOD void smp_ap_init { platform_t _plat; } DEFAULT platform_null_smp_ap_init; + +/** + * @brief Probe mp_ncores and smp_threads_per_core for early MI code + */ +METHOD void smp_probe_threads { + platform_t _plat; +} DEFAULT platform_null_smp_probe_threads; /** * @brief Return SMP topology Modified: head/sys/powerpc/ps3/platform_ps3.c ============================================================================== --- head/sys/powerpc/ps3/platform_ps3.c Mon Jan 7 17:35:09 2019 (r342851) +++ head/sys/powerpc/ps3/platform_ps3.c Mon Jan 7 19:39:31 2019 (r342852) @@ -70,6 +70,7 @@ static int ps3_smp_first_cpu(platform_t, struct cpuref static int ps3_smp_next_cpu(platform_t, struct cpuref *cpuref); static int ps3_smp_get_bsp(platform_t, struct cpuref *cpuref); static int ps3_smp_start_cpu(platform_t, struct pcpu *cpu); +static void ps3_smp_probe_threads(platform_t); static struct cpu_group *ps3_smp_topo(platform_t); #endif static void ps3_reset(platform_t); @@ -87,6 +88,7 @@ static platform_method_t ps3_methods[] = { PLATFORMMETHOD(platform_smp_next_cpu, ps3_smp_next_cpu), PLATFORMMETHOD(platform_smp_get_bsp, ps3_smp_get_bsp), PLATFORMMETHOD(platform_smp_start_cpu, ps3_smp_start_cpu), + PLATFORMMETHOD(platform_smp_probe_threads, ps3_smp_probe_threads), PLATFORMMETHOD(platform_smp_topo, ps3_smp_topo), #endif @@ -243,11 +245,16 @@ ps3_smp_start_cpu(platform_t plat, struct pcpu *pc) return ((pc->pc_awake) ? 0 : EBUSY); } -static struct cpu_group * -ps3_smp_topo(platform_t plat) +static void +ps3_smp_probe_threads(platform_t plat) { mp_ncores = 1; smp_threads_per_core = 2; +} + +static struct cpu_group * +ps3_smp_topo(platform_t plat) +{ return (smp_topo_1level(CG_SHARE_L1, 2, CG_FLAG_SMT)); } #endif Modified: head/sys/powerpc/pseries/platform_chrp.c ============================================================================== --- head/sys/powerpc/pseries/platform_chrp.c Mon Jan 7 17:35:09 2019 (r342851) +++ head/sys/powerpc/pseries/platform_chrp.c Mon Jan 7 19:39:31 2019 (r342852) @@ -78,6 +78,7 @@ static void chrp_smp_ap_init(platform_t); static int chrp_cpuref_init(void); #ifdef SMP static int chrp_smp_start_cpu(platform_t, struct pcpu *cpu); +static void chrp_smp_probe_threads(platform_t plat); static struct cpu_group *chrp_smp_topo(platform_t plat); #endif static void chrp_reset(platform_t); @@ -103,6 +104,7 @@ static platform_method_t chrp_methods[] = { PLATFORMMETHOD(platform_smp_get_bsp, chrp_smp_get_bsp), #ifdef SMP PLATFORMMETHOD(platform_smp_start_cpu, chrp_smp_start_cpu), + PLATFORMMETHOD(platform_smp_probe_threads, chrp_smp_probe_threads), PLATFORMMETHOD(platform_smp_topo, chrp_smp_topo), #endif @@ -499,13 +501,13 @@ chrp_smp_start_cpu(platform_t plat, struct pcpu *pc) return ((pc->pc_awake) ? 0 : EBUSY); } -static struct cpu_group * -chrp_smp_topo(platform_t plat) +static void +chrp_smp_probe_threads(platform_t plat) { struct pcpu *pc, *last_pc; - int i, ncores, ncpus; + int i, ncores; - ncores = ncpus = 0; + ncores = 0; last_pc = NULL; for (i = 0; i <= mp_maxid; i++) { pc = pcpu_find(i); @@ -514,23 +516,29 @@ chrp_smp_topo(platform_t plat) if (last_pc == NULL || pc->pc_hwref != last_pc->pc_hwref) ncores++; last_pc = pc; - ncpus++; } mp_ncores = ncores; + if (mp_ncpus % ncores == 0) + smp_threads_per_core = mp_ncpus / ncores; +} - if (ncpus % ncores != 0) { +static struct cpu_group * +chrp_smp_topo(platform_t plat) +{ + + if (mp_ncpus % mp_ncores != 0) { printf("WARNING: Irregular SMP topology. Performance may be " - "suboptimal (%d CPUS, %d cores)\n", ncpus, ncores); + "suboptimal (%d CPUS, %d cores)\n", mp_ncpus, mp_ncores); return (smp_topo_none()); } /* Don't do anything fancier for non-threaded SMP */ - if (ncpus == ncores) + if (mp_ncpus == mp_ncores) return (smp_topo_none()); - smp_threads_per_core = ncpus / ncores; - return (smp_topo_1level(CG_SHARE_L1, ncpus / ncores, CG_FLAG_SMT)); + return (smp_topo_1level(CG_SHARE_L1, smp_threads_per_core, + CG_FLAG_SMT)); } #endif From owner-svn-src-head@freebsd.org Mon Jan 7 22:10:49 2019 Return-Path: Delivered-To: svn-src-head@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 BC18114A145A; Mon, 7 Jan 2019 22:10:49 +0000 (UTC) (envelope-from kib@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 62EFB83A6C; Mon, 7 Jan 2019 22:10:49 +0000 (UTC) (envelope-from kib@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 3D6811E160; Mon, 7 Jan 2019 22:10:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x07MAnL6096062; Mon, 7 Jan 2019 22:10:49 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x07MAm67096060; Mon, 7 Jan 2019 22:10:48 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201901072210.x07MAm67096060@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 7 Jan 2019 22:10:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342853 - in head: lib/libc/sys sys/vm X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head: lib/libc/sys sys/vm X-SVN-Commit-Revision: 342853 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 62EFB83A6C 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.998,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)[-0.998,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jan 2019 22:10:50 -0000 Author: kib Date: Mon Jan 7 22:10:48 2019 New Revision: 342853 URL: https://svnweb.freebsd.org/changeset/base/342853 Log: Add a tunable which changes mincore(2) algorithm to only report data from the local mapping. Enable the setting by default. The article behind the change: https://arxiv.org/abs/1901.01161 Reviewed by: markj Discussed with: emaste Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D18764 Modified: head/lib/libc/sys/mincore.2 head/sys/vm/vm_mmap.c Modified: head/lib/libc/sys/mincore.2 ============================================================================== --- head/lib/libc/sys/mincore.2 Mon Jan 7 19:39:31 2019 (r342852) +++ head/lib/libc/sys/mincore.2 Mon Jan 7 22:10:48 2019 (r342853) @@ -28,7 +28,7 @@ .\" @(#)mincore.2 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd June 1, 2018 +.Dd January 7, 2019 .Dt MINCORE 2 .Os .Sh NAME @@ -47,7 +47,8 @@ system call determines whether each of the pages in th .Fa addr and continuing for .Fa len -bytes is resident. +bytes is resident or mapped, depending on the value of sysctl +.Va vm.mincore_mapped . .\"The beginning address, .\".Fa addr , .\"is first rounded down to a multiple of the page size (see @@ -85,6 +86,18 @@ The only way to ensure that a page is resident is to l with the .Xr mlock 2 system call. +.Pp +If the +.Va vm.mincore_mapped +sysctl is set to a non-zero value (default), only the current process' +mappings of the pages in the specified virtual address range are examined. +This does not preclude the system from returning +.Dv MINCORE_REFERENCED_OTHER +and +.Dv MINCORE_MODIFIED_OTHER +statuses. +Otherwise, if the sysctl value is zero, all resident pages backing the +specified address range are examined, regardless of the mapping state. .Sh RETURN VALUES .Rv -std mincore .Sh ERRORS Modified: head/sys/vm/vm_mmap.c ============================================================================== --- head/sys/vm/vm_mmap.c Mon Jan 7 19:39:31 2019 (r342852) +++ head/sys/vm/vm_mmap.c Mon Jan 7 22:10:48 2019 (r342853) @@ -97,6 +97,9 @@ __FBSDID("$FreeBSD$"); int old_mlock = 0; SYSCTL_INT(_vm, OID_AUTO, old_mlock, CTLFLAG_RWTUN, &old_mlock, 0, "Do not apply RLIMIT_MEMLOCK on mlockall"); +static int mincore_mapped = 1; +SYSCTL_INT(_vm, OID_AUTO, mincore_mapped, CTLFLAG_RWTUN, &mincore_mapped, 0, + "mincore reports mappings, not residency"); #ifdef MAP_32BIT #define MAP_32BIT_MAX_ADDR ((vm_offset_t)1 << 31) @@ -808,7 +811,16 @@ RestartScan: retry: m = NULL; mincoreinfo = pmap_mincore(pmap, addr, &locked_pa); - if (locked_pa != 0) { + if (mincore_mapped) { + /* + * We only care about this pmap's + * mapping of the page, if any. + */ + if (locked_pa != 0) { + vm_page_unlock(PHYS_TO_VM_PAGE( + locked_pa)); + } + } else if (locked_pa != 0) { /* * The page is mapped by this process but not * both accessed and modified. It is also From owner-svn-src-head@freebsd.org Mon Jan 7 23:17:10 2019 Return-Path: Delivered-To: svn-src-head@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 A39C514A27D1; Mon, 7 Jan 2019 23:17:10 +0000 (UTC) (envelope-from glebius@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 092D9860CE; Mon, 7 Jan 2019 23:17:10 +0000 (UTC) (envelope-from glebius@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 EB4F51ED24; Mon, 7 Jan 2019 23:17:09 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x07NH9tL032472; Mon, 7 Jan 2019 23:17:09 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x07NH98N032471; Mon, 7 Jan 2019 23:17:09 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201901072317.x07NH98N032471@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 7 Jan 2019 23:17:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342854 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 342854 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 092D9860CE 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.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jan 2019 23:17:10 -0000 Author: glebius Date: Mon Jan 7 23:17:09 2019 New Revision: 342854 URL: https://svnweb.freebsd.org/changeset/base/342854 Log: Fix regression in r331368, that broke dumping of UMA startup pages when WITNESS is present. Discussed with: markj Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Mon Jan 7 22:10:48 2019 (r342853) +++ head/sys/vm/vm_page.c Mon Jan 7 23:17:09 2019 (r342854) @@ -553,6 +553,9 @@ vm_page_startup(vm_offset_t vaddr) vm_paddr_t biggestsize, last_pa, pa; u_long pagecount; int biggestone, i, segind; +#ifdef WITNESS + int witness_size; +#endif #if defined(__i386__) && defined(VM_PHYSSEG_DENSE) long ii; #endif @@ -620,11 +623,11 @@ vm_page_startup(vm_offset_t vaddr) uma_startup((void *)mapped, boot_pages); #ifdef WITNESS - end = new_end; - new_end = end - round_page(witness_startup_count()); - mapped = pmap_map(&vaddr, new_end, end, + witness_size = round_page(witness_startup_count()); + new_end -= witness_size; + mapped = pmap_map(&vaddr, new_end, new_end + witness_size, VM_PROT_READ | VM_PROT_WRITE); - bzero((void *)mapped, end - new_end); + bzero((void *)mapped, witness_size); witness_startup((void *)mapped); #endif @@ -656,9 +659,9 @@ vm_page_startup(vm_offset_t vaddr) #endif #if defined(__aarch64__) || defined(__amd64__) || defined(__mips__) /* - * Include the UMA bootstrap pages and vm_page_dump in a crash dump. - * When pmap_map() uses the direct map, they are not automatically - * included. + * Include the UMA bootstrap pages, witness pages and vm_page_dump + * in a crash dump. When pmap_map() uses the direct map, they are + * not automatically included. */ for (pa = new_end; pa < end; pa += PAGE_SIZE) dump_add_page(pa); From owner-svn-src-head@freebsd.org Mon Jan 7 23:46:55 2019 Return-Path: Delivered-To: svn-src-head@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 2385D1481054; Mon, 7 Jan 2019 23:46:55 +0000 (UTC) (envelope-from shurd@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 BDEAE87315; Mon, 7 Jan 2019 23:46:54 +0000 (UTC) (envelope-from shurd@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 AD4511F22E; Mon, 7 Jan 2019 23:46:54 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x07Nksh4048445; Mon, 7 Jan 2019 23:46:54 GMT (envelope-from shurd@FreeBSD.org) Received: (from shurd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x07NksTc048444; Mon, 7 Jan 2019 23:46:54 GMT (envelope-from shurd@FreeBSD.org) Message-Id: <201901072346.x07NksTc048444@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: shurd set sender to shurd@FreeBSD.org using -f From: Stephen Hurd Date: Mon, 7 Jan 2019 23:46:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342855 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: shurd X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 342855 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BDEAE87315 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.997,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.983,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jan 2019 23:46:55 -0000 Author: shurd Date: Mon Jan 7 23:46:54 2019 New Revision: 342855 URL: https://svnweb.freebsd.org/changeset/base/342855 Log: Use iflib_if_init_locked() during resume instead of iflib_init_locked(). iflib_init_locked() assumes that iflib_stop() has been called, however, it is not called for suspend. iflib_if_init_locked() calls stop then init, so fixes the problem. This was causing errors after a resume from suspend. PR: 224059 Reported by: zeising MFC after: 1 week Sponsored by: Limelight Networks Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Mon Jan 7 23:17:09 2019 (r342854) +++ head/sys/net/iflib.c Mon Jan 7 23:46:54 2019 (r342855) @@ -4894,7 +4894,7 @@ iflib_device_resume(device_t dev) CTX_LOCK(ctx); IFDI_RESUME(ctx); - iflib_init_locked(ctx); + iflib_if_init_locked(ctx); CTX_UNLOCK(ctx); for (int i = 0; i < NTXQSETS(ctx); i++, txq++) iflib_txq_check_drain(txq, IFLIB_RESTART_BUDGET); From owner-svn-src-head@freebsd.org Tue Jan 8 05:41:05 2019 Return-Path: Delivered-To: svn-src-head@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 94487148FFC1; Tue, 8 Jan 2019 05:41:05 +0000 (UTC) (envelope-from delphij@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 3B6DA6F8DB; Tue, 8 Jan 2019 05:41:05 +0000 (UTC) (envelope-from delphij@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 2FE7C2326B; Tue, 8 Jan 2019 05:41:05 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x085f5vU032819; Tue, 8 Jan 2019 05:41:05 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x085f4hZ032815; Tue, 8 Jan 2019 05:41:04 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201901080541.x085f4hZ032815@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 8 Jan 2019 05:41:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342856 - head/sys/dev/oce X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/sys/dev/oce X-SVN-Commit-Revision: 342856 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3B6DA6F8DB 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.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jan 2019 05:41:05 -0000 Author: delphij Date: Tue Jan 8 05:41:04 2019 New Revision: 342856 URL: https://svnweb.freebsd.org/changeset/base/342856 Log: Added support for the SIOCGI2C ioctl. Submitted by: Ram Kishore Vegesna Obtained from: Broadcom MFC after: 2 weeks Modified: head/sys/dev/oce/oce_if.c head/sys/dev/oce/oce_if.h head/sys/dev/oce/oce_mbox.c head/sys/dev/oce/oce_sysctl.c Modified: head/sys/dev/oce/oce_if.c ============================================================================== --- head/sys/dev/oce/oce_if.c Mon Jan 7 23:46:54 2019 (r342855) +++ head/sys/dev/oce/oce_if.c Tue Jan 8 05:41:04 2019 (r342856) @@ -475,6 +475,8 @@ oce_ioctl(struct ifnet *ifp, u_long command, caddr_t d { struct ifreq *ifr = (struct ifreq *)data; POCE_SOFTC sc = ifp->if_softc; + struct ifi2creq i2c; + uint8_t offset = 0; int rc = 0; uint32_t u; @@ -584,6 +586,38 @@ oce_ioctl(struct ifnet *ifp, u_long command, caddr_t d } #endif + break; + + case SIOCGI2C: + rc = copyin(ifr_data_get_ptr(ifr), &i2c, sizeof(i2c)); + if (rc) + break; + + if (i2c.dev_addr != PAGE_NUM_A0 && + i2c.dev_addr != PAGE_NUM_A2) { + rc = EINVAL; + break; + } + + if (i2c.len > sizeof(i2c.data)) { + rc = EINVAL; + break; + } + + rc = oce_mbox_read_transrecv_data(sc, i2c.dev_addr); + if(rc) { + rc = -rc; + break; + } + + if (i2c.dev_addr == PAGE_NUM_A0) + offset = i2c.offset; + else + offset = TRANSCEIVER_A0_SIZE + i2c.offset; + + memcpy(&i2c.data[0], &sfp_vpd_dump_buffer[offset], i2c.len); + + rc = copyout(&i2c, ifr_data_get_ptr(ifr), sizeof(i2c)); break; case SIOCGPRIVATE_0: Modified: head/sys/dev/oce/oce_if.h ============================================================================== --- head/sys/dev/oce/oce_if.h Mon Jan 7 23:46:54 2019 (r342855) +++ head/sys/dev/oce/oce_if.h Tue Jan 8 05:41:04 2019 (r342856) @@ -1188,6 +1188,7 @@ static inline int MPU_EP_SEMAPHORE(POCE_SOFTC sc) #define PAGE_NUM_A2 0xa2 #define IS_QNQ_OR_UMC(sc) ((sc->pvid && (sc->function_mode & FNM_UMC_MODE ))\ || (sc->qnqid && (sc->function_mode & FNM_FLEX10_MODE))) +extern uint8_t sfp_vpd_dump_buffer[TRANSCEIVER_DATA_SIZE]; struct oce_rdma_info; extern struct oce_rdma_if *oce_rdma_if; Modified: head/sys/dev/oce/oce_mbox.c ============================================================================== --- head/sys/dev/oce/oce_mbox.c Mon Jan 7 23:46:54 2019 (r342855) +++ head/sys/dev/oce/oce_mbox.c Tue Jan 8 05:41:04 2019 (r342856) @@ -41,7 +41,6 @@ /* $FreeBSD$ */ #include "oce_if.h" -extern uint32_t sfp_vpd_dump_buffer[TRANSCEIVER_DATA_NUM_ELE]; int oce_wait_ready(POCE_SOFTC sc) @@ -1966,15 +1965,15 @@ oce_mbox_read_transrecv_data(POCE_SOFTC sc, uint32_t p if(fwcmd->params.rsp.page_num == PAGE_NUM_A0) { bcopy((char *)fwcmd->params.rsp.page_data, - (char *)&sfp_vpd_dump_buffer[0], - TRANSCEIVER_A0_SIZE); + &sfp_vpd_dump_buffer[0], + TRANSCEIVER_A0_SIZE); } if(fwcmd->params.rsp.page_num == PAGE_NUM_A2) { bcopy((char *)fwcmd->params.rsp.page_data, - (char *)&sfp_vpd_dump_buffer[32], - TRANSCEIVER_A2_SIZE); + &sfp_vpd_dump_buffer[TRANSCEIVER_A0_SIZE], + TRANSCEIVER_A2_SIZE); } error: oce_dma_free(sc, &dma); Modified: head/sys/dev/oce/oce_sysctl.c ============================================================================== --- head/sys/dev/oce/oce_sysctl.c Mon Jan 7 23:46:54 2019 (r342855) +++ head/sys/dev/oce/oce_sysctl.c Tue Jan 8 05:41:04 2019 (r342856) @@ -66,7 +66,7 @@ static void oce_add_stats_sysctls_xe201(POCE_SOFTC sc, extern char component_revision[32]; -uint32_t sfp_vpd_dump_buffer[TRANSCEIVER_DATA_NUM_ELE]; +uint8_t sfp_vpd_dump_buffer[TRANSCEIVER_DATA_SIZE]; struct flash_img_attri { int img_offset; From owner-svn-src-head@freebsd.org Tue Jan 8 09:04:28 2019 Return-Path: Delivered-To: svn-src-head@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 243DD1496178; Tue, 8 Jan 2019 09:04:28 +0000 (UTC) (envelope-from tuexen@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 BB7817725A; Tue, 8 Jan 2019 09:04:27 +0000 (UTC) (envelope-from tuexen@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 ABA61256B7; Tue, 8 Jan 2019 09:04:27 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0894Rqm041296; Tue, 8 Jan 2019 09:04:27 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0894R13041295; Tue, 8 Jan 2019 09:04:27 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201901080904.x0894R13041295@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Tue, 8 Jan 2019 09:04:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342857 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 342857 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BB7817725A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.955,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jan 2019 09:04:28 -0000 Author: tuexen Date: Tue Jan 8 09:04:27 2019 New Revision: 342857 URL: https://svnweb.freebsd.org/changeset/base/342857 Log: Avoid overfow in vtruncbuf() Using daddr_t instead of int avoids trunclbn to become negative when it shouldn't. This isssue was found by running syzkaller. Reviewed by: mckusick, kib, markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D18763 Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Tue Jan 8 05:41:04 2019 (r342856) +++ head/sys/kern/vfs_subr.c Tue Jan 8 09:04:27 2019 (r342857) @@ -1858,7 +1858,7 @@ vtruncbuf(struct vnode *vp, struct ucred *cred, off_t { struct buf *bp, *nbp; int anyfreed; - int trunclbn; + daddr_t trunclbn; struct bufobj *bo; CTR5(KTR_VFS, "%s: vp %p with cred %p and block %d:%ju", __func__, From owner-svn-src-head@freebsd.org Tue Jan 8 09:41:53 2019 Return-Path: Delivered-To: svn-src-head@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 66EF214988BA; Tue, 8 Jan 2019 09:41:53 +0000 (UTC) (envelope-from 0mp@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 E432B81363; Tue, 8 Jan 2019 09:41:52 +0000 (UTC) (envelope-from 0mp@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 D33E725E22; Tue, 8 Jan 2019 09:41:52 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x089fqx3059850; Tue, 8 Jan 2019 09:41:52 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x089fqF7059849; Tue, 8 Jan 2019 09:41:52 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <201901080941.x089fqF7059849@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Tue, 8 Jan 2019 09:41:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342859 - head/share/man/man7 X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/share/man/man7 X-SVN-Commit-Revision: 342859 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E432B81363 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.997,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jan 2019 09:41:53 -0000 Author: 0mp (ports committer) Date: Tue Jan 8 09:41:52 2019 New Revision: 342859 URL: https://svnweb.freebsd.org/changeset/base/342859 Log: ports.7: Do not mention deprecated WITH_SSP_PORTS and WITH_GHOSTSCRIPT_VER As mentioned in this special status report[1] from EuroBSDCon 2013, WITH_SSP_PORTS was relevant in the FreeBSD 9 and FreeBSD 10 days. Nowadays, -fstack-protector is set by default. Relevant knobs and variables are documented in ports/Mk/bsd.port.mk. WITH_GHOSTSCRIPT_VER was part of USE_GHOSTSCRIPT, which is deprecated. [1]: https://www.freebsd.org/news/status/report-2013-09-devsummit.html#Ports-and-Packages Reviewed by: bcr, mat, tobik Approved by: bcr (doc) Approved by: krion (mentor, implicit), mat (mentor, implicit) Differential Revision: https://reviews.freebsd.org/D18056 Modified: head/share/man/man7/ports.7 Modified: head/share/man/man7/ports.7 ============================================================================== --- head/share/man/man7/ports.7 Tue Jan 8 09:40:09 2019 (r342858) +++ head/share/man/man7/ports.7 Tue Jan 8 09:41:52 2019 (r342859) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 30, 2018 +.Dd January 8, 2019 .Dt PORTS 7 .Os .Sh NAME @@ -505,20 +505,13 @@ More information on these and other related variables and the .Fx Porter's Handbook. -.Bl -tag -width ".Va WITH_GHOSTSCRIPT_VER" +.Bl -tag -width "WITH_CCACHE_BUILD" .It Va WITH_DEBUG .Pq Vt bool If set, debugging symbols are installed for ports binaries. .It Va WITH_DEBUG_PORTS A list of origins for which to set .Va WITH_DEBUG_PORTS . -.It Va WITH_SSP_PORTS -.Pq Vt bool -If set, enables -.Fl fstack-protector -for most ports. -.It Va WITH_GHOSTSCRIPT_VER -If set, the version of ghostscript to be used by ports. .It Va WITH_CCACHE_BUILD .Pq Vt bool If set, enables the use of From owner-svn-src-head@freebsd.org Tue Jan 8 15:30:57 2019 Return-Path: Delivered-To: svn-src-head@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 C1E7514810BA; Tue, 8 Jan 2019 15:30:57 +0000 (UTC) (envelope-from chuck@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 636AC8F8A5; Tue, 8 Jan 2019 15:30:57 +0000 (UTC) (envelope-from chuck@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 5618D193E; Tue, 8 Jan 2019 15:30:57 +0000 (UTC) (envelope-from chuck@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x08FUvwh051699; Tue, 8 Jan 2019 15:30:57 GMT (envelope-from chuck@FreeBSD.org) Received: (from chuck@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x08FUv0O051698; Tue, 8 Jan 2019 15:30:57 GMT (envelope-from chuck@FreeBSD.org) Message-Id: <201901081530.x08FUv0O051698@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: chuck set sender to chuck@FreeBSD.org using -f From: Chuck Tuffli Date: Tue, 8 Jan 2019 15:30:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342862 - head/sys/dev/nvme X-SVN-Group: head X-SVN-Commit-Author: chuck X-SVN-Commit-Paths: head/sys/dev/nvme X-SVN-Commit-Revision: 342862 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 636AC8F8A5 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.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jan 2019 15:30:57 -0000 Author: chuck Date: Tue Jan 8 15:30:56 2019 New Revision: 342862 URL: https://svnweb.freebsd.org/changeset/base/342862 Log: Add NVMe drive to NOIOB quirk list Dell-branded Intel P4600 NVMe drives benefit from NVMe 1.3's NOIOB feature. Unfortunately just like Intel DC P4500s, they don't advertise themselves as benefiting from this... This changes adds P4600s to the existing list of old drives which benefit from striping. PR: 233969 Submitted by: David Fugate Reviewed by: imp, mav Approved by: imp (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D18772 Modified: head/sys/dev/nvme/nvme_ns.c Modified: head/sys/dev/nvme/nvme_ns.c ============================================================================== --- head/sys/dev/nvme/nvme_ns.c Tue Jan 8 10:29:02 2019 (r342861) +++ head/sys/dev/nvme/nvme_ns.c Tue Jan 8 15:30:56 2019 (r342862) @@ -514,6 +514,7 @@ nvme_ns_construct(struct nvme_namespace *ns, uint32_t case 0x09538086: /* Intel DC PC3500 */ case 0x0a538086: /* Intel DC PC3520 */ case 0x0a548086: /* Intel DC PC4500 */ + case 0x0a558086: /* Dell Intel P4600 */ if (ctrlr->cdata.vs[3] != 0) ns->stripesize = (1 << ctrlr->cdata.vs[3]) * ctrlr->min_page_size; From owner-svn-src-head@freebsd.org Tue Jan 8 17:08:11 2019 Return-Path: Delivered-To: svn-src-head@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 1BC631483F13; Tue, 8 Jan 2019 17:08:11 +0000 (UTC) (envelope-from markj@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 B40EE6D7A2; Tue, 8 Jan 2019 17:08:10 +0000 (UTC) (envelope-from markj@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 9B0A12A94; Tue, 8 Jan 2019 17:08:10 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x08H8Afq000932; Tue, 8 Jan 2019 17:08:10 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x08H8A0l000931; Tue, 8 Jan 2019 17:08:10 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201901081708.x08H8A0l000931@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 8 Jan 2019 17:08:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342863 - head/share/termcap X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/share/termcap X-SVN-Commit-Revision: 342863 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B40EE6D7A2 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.95)[-0.953,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jan 2019 17:08:11 -0000 Author: markj Date: Tue Jan 8 17:08:10 2019 New Revision: 342863 URL: https://svnweb.freebsd.org/changeset/base/342863 Log: Add termcap entries for TI Silent 703/707 terminals. PR: 234716 Submitted by: Robert Clausecker MFC after: 1 week Modified: head/share/termcap/termcap Modified: head/share/termcap/termcap ============================================================================== --- head/share/termcap/termcap Tue Jan 8 15:30:56 2019 (r342862) +++ head/share/termcap/termcap Tue Jan 8 17:08:10 2019 (r342863) @@ -3543,6 +3543,20 @@ ti800|ti omni 800:\ ti931|ti 931:\ :al=\EN:am:bs:cd=\EJ:ce=\EI:cl=\EL:cm=\EY%+ %+ :co#80:dl=\EO:do=\EB:\ :eo:ho=\EH:li#24:ku=\EA:kd=\EB:kr=\EC:kl=\ED:mi:nd:sf=\Eb:sr=\Ea:up=\EA: +# From Robert Clausecker +# +# Terminal entries for the Texas Instruments 703/707 +# hardcopy terminals. +# +# The terminal can switch between 80 and 132 column mode +# using \EPC\\ and \EPD\\, but I don't think there is a +# capability for that. +ti703|ti707|Texas Instruments Silent 703/707, 80 cols:\ + :am:hc:os:xn:\ + :co#80:it#8:\ + :do=\n:le=\b:cr=\r:nd= :bl=^G:ta=\t:is=\EPC\\: +ti703-w|ti707-w|Texas Instruments Silent 703/707, 132 cols:\ + :co#132:is=\EPD\\:tc=ti703: # # -------------------------------- # # v: TELEVIDEO From owner-svn-src-head@freebsd.org Tue Jan 8 17:22:00 2019 Return-Path: Delivered-To: svn-src-head@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 9BABC14845C2; Tue, 8 Jan 2019 17:22:00 +0000 (UTC) (envelope-from markj@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 449AE6E5B7; Tue, 8 Jan 2019 17:22:00 +0000 (UTC) (envelope-from markj@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 E7DD62CBE; Tue, 8 Jan 2019 17:21:59 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x08HLxgt009315; Tue, 8 Jan 2019 17:21:59 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x08HLxMA009314; Tue, 8 Jan 2019 17:21:59 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201901081721.x08HLxMA009314@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 8 Jan 2019 17:21:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342864 - head/sys/compat/linux X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/compat/linux X-SVN-Commit-Revision: 342864 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 449AE6E5B7 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.953,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jan 2019 17:22:00 -0000 Author: markj Date: Tue Jan 8 17:21:59 2019 New Revision: 342864 URL: https://svnweb.freebsd.org/changeset/base/342864 Log: Specify the correct option level when emulating SO_PEERCRED. Our equivalent to SO_PEERCRED, LOCAL_PEERCRED, is implemented at socket option level 0, not SOL_SOCKET. PR: 234722 Submitted by: Dániel Bakai MFC after: 2 weeks Modified: head/sys/compat/linux/linux_socket.c Modified: head/sys/compat/linux/linux_socket.c ============================================================================== --- head/sys/compat/linux/linux_socket.c Tue Jan 8 17:08:10 2019 (r342863) +++ head/sys/compat/linux/linux_socket.c Tue Jan 8 17:21:59 2019 (r342864) @@ -1633,6 +1633,11 @@ linux_getsockopt(struct thread *td, struct linux_getso case LOCAL_PEERCRED: if (args->optlen < sizeof(lxu)) return (EINVAL); + /* + * LOCAL_PEERCRED is not served at the SOL_SOCKET level, + * but by the Unix socket's level 0. + */ + bsd_args.level = 0; xulen = sizeof(xu); error = kern_getsockopt(td, args->s, bsd_args.level, name, &xu, UIO_SYSSPACE, &xulen); From owner-svn-src-head@freebsd.org Tue Jan 8 20:01:57 2019 Return-Path: Delivered-To: svn-src-head@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 C999B14890C6; Tue, 8 Jan 2019 20:01:57 +0000 (UTC) (envelope-from imp@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 6EF8975209; Tue, 8 Jan 2019 20:01:57 +0000 (UTC) (envelope-from imp@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 60BFF4BB5; Tue, 8 Jan 2019 20:01:57 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x08K1vkj093405; Tue, 8 Jan 2019 20:01:57 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x08K1vQh093404; Tue, 8 Jan 2019 20:01:57 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201901082001.x08K1vQh093404@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 8 Jan 2019 20:01:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342865 - head/stand/i386/libfirewire X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/i386/libfirewire X-SVN-Commit-Revision: 342865 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6EF8975209 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.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jan 2019 20:01:58 -0000 Author: imp Date: Tue Jan 8 20:01:56 2019 New Revision: 342865 URL: https://svnweb.freebsd.org/changeset/base/342865 Log: biospci_write_config args were backwards biospci_write_config args swapped length and value to write. Some hardware coped just fine, while other hardware had issues. PR: 155441 Submitted by: longwitz at incore dot de Modified: head/stand/i386/libfirewire/firewire.c Modified: head/stand/i386/libfirewire/firewire.c ============================================================================== --- head/stand/i386/libfirewire/firewire.c Tue Jan 8 17:21:59 2019 (r342864) +++ head/stand/i386/libfirewire/firewire.c Tue Jan 8 20:01:56 2019 (r342865) @@ -107,9 +107,9 @@ fw_probe(int index, struct fwohci_softc *sc) } biospci_write_config(sc->locator, - 0x4 /* command */, - 0x6 /* enable bus master and memory mapped I/O */, - BIOSPCI_16BITS); + 0x4 /* command */, + BIOSPCI_16BITS, + 0x6 /* enable bus master and memory mapped I/O */); biospci_read_config(sc->locator, 0x00 /*devid*/, BIOSPCI_32BITS, &sc->devid); From owner-svn-src-head@freebsd.org Tue Jan 8 20:55:03 2019 Return-Path: Delivered-To: svn-src-head@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 609E4148ACFB; Tue, 8 Jan 2019 20:55:03 +0000 (UTC) (envelope-from imp@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 069E377640; Tue, 8 Jan 2019 20:55:03 +0000 (UTC) (envelope-from imp@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 EEC23547E; Tue, 8 Jan 2019 20:55:02 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x08Kt2mG022345; Tue, 8 Jan 2019 20:55:02 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x08Kt2f2022344; Tue, 8 Jan 2019 20:55:02 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201901082055.x08Kt2f2022344@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 8 Jan 2019 20:55:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342866 - head/sys/cam/scsi X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam/scsi X-SVN-Commit-Revision: 342866 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 069E377640 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.998,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jan 2019 20:55:03 -0000 Author: imp Date: Tue Jan 8 20:55:02 2019 New Revision: 342866 URL: https://svnweb.freebsd.org/changeset/base/342866 Log: Add NO_SYNC_CACHE quirk for PENTAX cameras PR: 93389 Submitted by: Demin Alexander Modified: head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Tue Jan 8 20:01:56 2019 (r342865) +++ head/sys/cam/scsi/scsi_da.c Tue Jan 8 20:55:02 2019 (r342866) @@ -1099,6 +1099,14 @@ static struct da_quirk_entry da_quirk_table[] = }, { /* + * Pentax Digital Camera + * PR: usb/93389 + */ + {T_DIRECT, SIP_MEDIA_REMOVABLE, "PENTAX", "DIGITAL CAMERA", + "*"}, /*quirks*/ DA_Q_NO_SYNC_CACHE + }, + { + /* * LG UP3S MP3 player */ {T_DIRECT, SIP_MEDIA_REMOVABLE, "LG", "UP3S", From owner-svn-src-head@freebsd.org Wed Jan 9 00:31:30 2019 Return-Path: Delivered-To: svn-src-head@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 605121490469; Wed, 9 Jan 2019 00:31:30 +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 EA191932E0; Wed, 9 Jan 2019 00:31:29 +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 D114CC4DF; Wed, 9 Jan 2019 00:31:29 +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 x090VTlk036432; Wed, 9 Jan 2019 00:31:29 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x090VAje035610; Wed, 9 Jan 2019 00:31:10 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201901090031.x090VAje035610@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 9 Jan 2019 00:31:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342869 - in head/sys/contrib/dev/acpica: . common compiler components/debugger components/disassembler components/dispatcher components/events components/executer components/hardware c... X-SVN-Group: head X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in head/sys/contrib/dev/acpica: . common compiler components/debugger components/disassembler components/dispatcher components/events components/executer components/hardware components/namespace compo... X-SVN-Commit-Revision: 342869 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EA191932E0 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.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2019 00:31:31 -0000 Author: jkim Date: Wed Jan 9 00:31:10 2019 New Revision: 342869 URL: https://svnweb.freebsd.org/changeset/base/342869 Log: MFV: r342867 Merge ACPICA 20190108. Modified: head/sys/contrib/dev/acpica/changes.txt head/sys/contrib/dev/acpica/common/acfileio.c head/sys/contrib/dev/acpica/common/acgetline.c head/sys/contrib/dev/acpica/common/adfile.c head/sys/contrib/dev/acpica/common/adisasm.c head/sys/contrib/dev/acpica/common/adwalk.c head/sys/contrib/dev/acpica/common/ahids.c head/sys/contrib/dev/acpica/common/ahpredef.c head/sys/contrib/dev/acpica/common/ahtable.c head/sys/contrib/dev/acpica/common/ahuuids.c head/sys/contrib/dev/acpica/common/cmfsize.c head/sys/contrib/dev/acpica/common/dmextern.c head/sys/contrib/dev/acpica/common/dmrestag.c head/sys/contrib/dev/acpica/common/dmswitch.c head/sys/contrib/dev/acpica/common/dmtable.c head/sys/contrib/dev/acpica/common/dmtables.c head/sys/contrib/dev/acpica/common/dmtbdump.c head/sys/contrib/dev/acpica/common/dmtbdump1.c head/sys/contrib/dev/acpica/common/dmtbdump2.c head/sys/contrib/dev/acpica/common/dmtbdump3.c head/sys/contrib/dev/acpica/common/dmtbinfo.c head/sys/contrib/dev/acpica/common/dmtbinfo1.c head/sys/contrib/dev/acpica/common/dmtbinfo2.c head/sys/contrib/dev/acpica/common/dmtbinfo3.c head/sys/contrib/dev/acpica/common/getopt.c head/sys/contrib/dev/acpica/compiler/aslallocate.c head/sys/contrib/dev/acpica/compiler/aslanalyze.c head/sys/contrib/dev/acpica/compiler/aslascii.c head/sys/contrib/dev/acpica/compiler/aslbtypes.c head/sys/contrib/dev/acpica/compiler/aslcache.c head/sys/contrib/dev/acpica/compiler/aslcodegen.c head/sys/contrib/dev/acpica/compiler/aslcompile.c head/sys/contrib/dev/acpica/compiler/aslcompiler.h head/sys/contrib/dev/acpica/compiler/aslcompiler.l head/sys/contrib/dev/acpica/compiler/aslcstyle.y head/sys/contrib/dev/acpica/compiler/asldebug.c head/sys/contrib/dev/acpica/compiler/asldefine.h head/sys/contrib/dev/acpica/compiler/aslerror.c head/sys/contrib/dev/acpica/compiler/aslexternal.c head/sys/contrib/dev/acpica/compiler/aslfileio.c head/sys/contrib/dev/acpica/compiler/aslfiles.c head/sys/contrib/dev/acpica/compiler/aslfold.c head/sys/contrib/dev/acpica/compiler/aslglobal.h head/sys/contrib/dev/acpica/compiler/aslhelp.c head/sys/contrib/dev/acpica/compiler/aslhelpers.y head/sys/contrib/dev/acpica/compiler/aslhex.c head/sys/contrib/dev/acpica/compiler/aslkeywords.y head/sys/contrib/dev/acpica/compiler/asllength.c head/sys/contrib/dev/acpica/compiler/asllisting.c head/sys/contrib/dev/acpica/compiler/asllistsup.c head/sys/contrib/dev/acpica/compiler/aslload.c head/sys/contrib/dev/acpica/compiler/asllookup.c head/sys/contrib/dev/acpica/compiler/aslmain.c head/sys/contrib/dev/acpica/compiler/aslmap.c head/sys/contrib/dev/acpica/compiler/aslmapenter.c head/sys/contrib/dev/acpica/compiler/aslmapoutput.c head/sys/contrib/dev/acpica/compiler/aslmaputils.c head/sys/contrib/dev/acpica/compiler/aslmessages.c head/sys/contrib/dev/acpica/compiler/aslmessages.h head/sys/contrib/dev/acpica/compiler/aslmethod.c head/sys/contrib/dev/acpica/compiler/aslnamesp.c head/sys/contrib/dev/acpica/compiler/asloffset.c head/sys/contrib/dev/acpica/compiler/aslopcodes.c head/sys/contrib/dev/acpica/compiler/asloperands.c head/sys/contrib/dev/acpica/compiler/aslopt.c head/sys/contrib/dev/acpica/compiler/asloptions.c head/sys/contrib/dev/acpica/compiler/aslparseop.c head/sys/contrib/dev/acpica/compiler/aslparser.y head/sys/contrib/dev/acpica/compiler/aslpld.c head/sys/contrib/dev/acpica/compiler/aslpredef.c head/sys/contrib/dev/acpica/compiler/aslprepkg.c head/sys/contrib/dev/acpica/compiler/aslprimaries.y head/sys/contrib/dev/acpica/compiler/aslprintf.c head/sys/contrib/dev/acpica/compiler/aslprune.c head/sys/contrib/dev/acpica/compiler/aslresource.c head/sys/contrib/dev/acpica/compiler/aslresources.y head/sys/contrib/dev/acpica/compiler/aslrestype1.c head/sys/contrib/dev/acpica/compiler/aslrestype1i.c head/sys/contrib/dev/acpica/compiler/aslrestype2.c head/sys/contrib/dev/acpica/compiler/aslrestype2d.c head/sys/contrib/dev/acpica/compiler/aslrestype2e.c head/sys/contrib/dev/acpica/compiler/aslrestype2q.c head/sys/contrib/dev/acpica/compiler/aslrestype2s.c head/sys/contrib/dev/acpica/compiler/aslrestype2w.c head/sys/contrib/dev/acpica/compiler/aslrules.y head/sys/contrib/dev/acpica/compiler/aslstartup.c head/sys/contrib/dev/acpica/compiler/aslstubs.c head/sys/contrib/dev/acpica/compiler/aslsupport.l head/sys/contrib/dev/acpica/compiler/aslsupport.y head/sys/contrib/dev/acpica/compiler/asltokens.y head/sys/contrib/dev/acpica/compiler/asltransform.c head/sys/contrib/dev/acpica/compiler/asltree.c head/sys/contrib/dev/acpica/compiler/asltypes.h head/sys/contrib/dev/acpica/compiler/asltypes.y head/sys/contrib/dev/acpica/compiler/aslutils.c head/sys/contrib/dev/acpica/compiler/asluuid.c head/sys/contrib/dev/acpica/compiler/aslwalks.c head/sys/contrib/dev/acpica/compiler/aslxref.c head/sys/contrib/dev/acpica/compiler/aslxrefout.c head/sys/contrib/dev/acpica/compiler/cvcompiler.c head/sys/contrib/dev/acpica/compiler/cvdisasm.c head/sys/contrib/dev/acpica/compiler/cvparser.c head/sys/contrib/dev/acpica/compiler/dtcompile.c head/sys/contrib/dev/acpica/compiler/dtcompiler.h head/sys/contrib/dev/acpica/compiler/dtexpress.c head/sys/contrib/dev/acpica/compiler/dtfield.c head/sys/contrib/dev/acpica/compiler/dtio.c head/sys/contrib/dev/acpica/compiler/dtparser.l head/sys/contrib/dev/acpica/compiler/dtparser.y head/sys/contrib/dev/acpica/compiler/dtsubtable.c head/sys/contrib/dev/acpica/compiler/dttable.c head/sys/contrib/dev/acpica/compiler/dttable1.c head/sys/contrib/dev/acpica/compiler/dttable2.c head/sys/contrib/dev/acpica/compiler/dttemplate.c head/sys/contrib/dev/acpica/compiler/dttemplate.h head/sys/contrib/dev/acpica/compiler/dtutils.c head/sys/contrib/dev/acpica/compiler/preprocess.h head/sys/contrib/dev/acpica/compiler/prexpress.c head/sys/contrib/dev/acpica/compiler/prmacros.c head/sys/contrib/dev/acpica/compiler/prparser.l head/sys/contrib/dev/acpica/compiler/prparser.y head/sys/contrib/dev/acpica/compiler/prscan.c head/sys/contrib/dev/acpica/compiler/prutils.c head/sys/contrib/dev/acpica/components/debugger/dbcmds.c head/sys/contrib/dev/acpica/components/debugger/dbconvert.c head/sys/contrib/dev/acpica/components/debugger/dbdisply.c head/sys/contrib/dev/acpica/components/debugger/dbexec.c head/sys/contrib/dev/acpica/components/debugger/dbfileio.c head/sys/contrib/dev/acpica/components/debugger/dbhistry.c head/sys/contrib/dev/acpica/components/debugger/dbinput.c head/sys/contrib/dev/acpica/components/debugger/dbmethod.c head/sys/contrib/dev/acpica/components/debugger/dbnames.c head/sys/contrib/dev/acpica/components/debugger/dbobject.c head/sys/contrib/dev/acpica/components/debugger/dbstats.c head/sys/contrib/dev/acpica/components/debugger/dbtest.c head/sys/contrib/dev/acpica/components/debugger/dbutils.c head/sys/contrib/dev/acpica/components/debugger/dbxface.c head/sys/contrib/dev/acpica/components/disassembler/dmbuffer.c head/sys/contrib/dev/acpica/components/disassembler/dmcstyle.c head/sys/contrib/dev/acpica/components/disassembler/dmdeferred.c head/sys/contrib/dev/acpica/components/disassembler/dmnames.c head/sys/contrib/dev/acpica/components/disassembler/dmopcode.c head/sys/contrib/dev/acpica/components/disassembler/dmresrc.c head/sys/contrib/dev/acpica/components/disassembler/dmresrcl.c head/sys/contrib/dev/acpica/components/disassembler/dmresrcl2.c head/sys/contrib/dev/acpica/components/disassembler/dmresrcs.c head/sys/contrib/dev/acpica/components/disassembler/dmutils.c head/sys/contrib/dev/acpica/components/disassembler/dmwalk.c head/sys/contrib/dev/acpica/components/dispatcher/dsargs.c head/sys/contrib/dev/acpica/components/dispatcher/dscontrol.c head/sys/contrib/dev/acpica/components/dispatcher/dsdebug.c head/sys/contrib/dev/acpica/components/dispatcher/dsfield.c head/sys/contrib/dev/acpica/components/dispatcher/dsinit.c head/sys/contrib/dev/acpica/components/dispatcher/dsmethod.c head/sys/contrib/dev/acpica/components/dispatcher/dsmthdat.c head/sys/contrib/dev/acpica/components/dispatcher/dsobject.c head/sys/contrib/dev/acpica/components/dispatcher/dsopcode.c head/sys/contrib/dev/acpica/components/dispatcher/dspkginit.c head/sys/contrib/dev/acpica/components/dispatcher/dsutils.c head/sys/contrib/dev/acpica/components/dispatcher/dswexec.c head/sys/contrib/dev/acpica/components/dispatcher/dswload.c head/sys/contrib/dev/acpica/components/dispatcher/dswload2.c head/sys/contrib/dev/acpica/components/dispatcher/dswscope.c head/sys/contrib/dev/acpica/components/dispatcher/dswstate.c head/sys/contrib/dev/acpica/components/events/evevent.c head/sys/contrib/dev/acpica/components/events/evglock.c head/sys/contrib/dev/acpica/components/events/evgpe.c head/sys/contrib/dev/acpica/components/events/evgpeblk.c head/sys/contrib/dev/acpica/components/events/evgpeinit.c head/sys/contrib/dev/acpica/components/events/evgpeutil.c head/sys/contrib/dev/acpica/components/events/evhandler.c head/sys/contrib/dev/acpica/components/events/evmisc.c head/sys/contrib/dev/acpica/components/events/evregion.c head/sys/contrib/dev/acpica/components/events/evrgnini.c head/sys/contrib/dev/acpica/components/events/evsci.c head/sys/contrib/dev/acpica/components/events/evxface.c head/sys/contrib/dev/acpica/components/events/evxfevnt.c head/sys/contrib/dev/acpica/components/events/evxfgpe.c head/sys/contrib/dev/acpica/components/events/evxfregn.c head/sys/contrib/dev/acpica/components/executer/exconcat.c head/sys/contrib/dev/acpica/components/executer/exconfig.c head/sys/contrib/dev/acpica/components/executer/exconvrt.c head/sys/contrib/dev/acpica/components/executer/excreate.c head/sys/contrib/dev/acpica/components/executer/exdebug.c head/sys/contrib/dev/acpica/components/executer/exdump.c head/sys/contrib/dev/acpica/components/executer/exfield.c head/sys/contrib/dev/acpica/components/executer/exfldio.c head/sys/contrib/dev/acpica/components/executer/exmisc.c head/sys/contrib/dev/acpica/components/executer/exmutex.c head/sys/contrib/dev/acpica/components/executer/exnames.c head/sys/contrib/dev/acpica/components/executer/exoparg1.c head/sys/contrib/dev/acpica/components/executer/exoparg2.c head/sys/contrib/dev/acpica/components/executer/exoparg3.c head/sys/contrib/dev/acpica/components/executer/exoparg6.c head/sys/contrib/dev/acpica/components/executer/exprep.c head/sys/contrib/dev/acpica/components/executer/exregion.c head/sys/contrib/dev/acpica/components/executer/exresnte.c head/sys/contrib/dev/acpica/components/executer/exresolv.c head/sys/contrib/dev/acpica/components/executer/exresop.c head/sys/contrib/dev/acpica/components/executer/exserial.c head/sys/contrib/dev/acpica/components/executer/exstore.c head/sys/contrib/dev/acpica/components/executer/exstoren.c head/sys/contrib/dev/acpica/components/executer/exstorob.c head/sys/contrib/dev/acpica/components/executer/exsystem.c head/sys/contrib/dev/acpica/components/executer/extrace.c head/sys/contrib/dev/acpica/components/executer/exutils.c head/sys/contrib/dev/acpica/components/hardware/hwacpi.c head/sys/contrib/dev/acpica/components/hardware/hwesleep.c head/sys/contrib/dev/acpica/components/hardware/hwgpe.c head/sys/contrib/dev/acpica/components/hardware/hwpci.c head/sys/contrib/dev/acpica/components/hardware/hwregs.c head/sys/contrib/dev/acpica/components/hardware/hwsleep.c head/sys/contrib/dev/acpica/components/hardware/hwtimer.c head/sys/contrib/dev/acpica/components/hardware/hwvalid.c head/sys/contrib/dev/acpica/components/hardware/hwxface.c head/sys/contrib/dev/acpica/components/hardware/hwxfsleep.c head/sys/contrib/dev/acpica/components/namespace/nsaccess.c head/sys/contrib/dev/acpica/components/namespace/nsalloc.c head/sys/contrib/dev/acpica/components/namespace/nsarguments.c head/sys/contrib/dev/acpica/components/namespace/nsconvert.c head/sys/contrib/dev/acpica/components/namespace/nsdump.c head/sys/contrib/dev/acpica/components/namespace/nsdumpdv.c head/sys/contrib/dev/acpica/components/namespace/nseval.c head/sys/contrib/dev/acpica/components/namespace/nsinit.c head/sys/contrib/dev/acpica/components/namespace/nsload.c head/sys/contrib/dev/acpica/components/namespace/nsnames.c head/sys/contrib/dev/acpica/components/namespace/nsobject.c head/sys/contrib/dev/acpica/components/namespace/nsparse.c head/sys/contrib/dev/acpica/components/namespace/nspredef.c head/sys/contrib/dev/acpica/components/namespace/nsprepkg.c head/sys/contrib/dev/acpica/components/namespace/nsrepair.c head/sys/contrib/dev/acpica/components/namespace/nsrepair2.c head/sys/contrib/dev/acpica/components/namespace/nssearch.c head/sys/contrib/dev/acpica/components/namespace/nsutils.c head/sys/contrib/dev/acpica/components/namespace/nswalk.c head/sys/contrib/dev/acpica/components/namespace/nsxfeval.c head/sys/contrib/dev/acpica/components/namespace/nsxfname.c head/sys/contrib/dev/acpica/components/namespace/nsxfobj.c head/sys/contrib/dev/acpica/components/parser/psargs.c head/sys/contrib/dev/acpica/components/parser/psloop.c head/sys/contrib/dev/acpica/components/parser/psobject.c head/sys/contrib/dev/acpica/components/parser/psopcode.c head/sys/contrib/dev/acpica/components/parser/psopinfo.c head/sys/contrib/dev/acpica/components/parser/psparse.c head/sys/contrib/dev/acpica/components/parser/psscope.c head/sys/contrib/dev/acpica/components/parser/pstree.c head/sys/contrib/dev/acpica/components/parser/psutils.c head/sys/contrib/dev/acpica/components/parser/pswalk.c head/sys/contrib/dev/acpica/components/parser/psxface.c head/sys/contrib/dev/acpica/components/resources/rsaddr.c head/sys/contrib/dev/acpica/components/resources/rscalc.c head/sys/contrib/dev/acpica/components/resources/rscreate.c head/sys/contrib/dev/acpica/components/resources/rsdump.c head/sys/contrib/dev/acpica/components/resources/rsdumpinfo.c head/sys/contrib/dev/acpica/components/resources/rsinfo.c head/sys/contrib/dev/acpica/components/resources/rsio.c head/sys/contrib/dev/acpica/components/resources/rsirq.c head/sys/contrib/dev/acpica/components/resources/rslist.c head/sys/contrib/dev/acpica/components/resources/rsmemory.c head/sys/contrib/dev/acpica/components/resources/rsmisc.c head/sys/contrib/dev/acpica/components/resources/rsserial.c head/sys/contrib/dev/acpica/components/resources/rsutils.c head/sys/contrib/dev/acpica/components/resources/rsxface.c head/sys/contrib/dev/acpica/components/tables/tbdata.c head/sys/contrib/dev/acpica/components/tables/tbfadt.c head/sys/contrib/dev/acpica/components/tables/tbfind.c head/sys/contrib/dev/acpica/components/tables/tbinstal.c head/sys/contrib/dev/acpica/components/tables/tbprint.c head/sys/contrib/dev/acpica/components/tables/tbutils.c head/sys/contrib/dev/acpica/components/tables/tbxface.c head/sys/contrib/dev/acpica/components/tables/tbxfload.c head/sys/contrib/dev/acpica/components/tables/tbxfroot.c head/sys/contrib/dev/acpica/components/utilities/utaddress.c head/sys/contrib/dev/acpica/components/utilities/utalloc.c head/sys/contrib/dev/acpica/components/utilities/utascii.c head/sys/contrib/dev/acpica/components/utilities/utbuffer.c head/sys/contrib/dev/acpica/components/utilities/utcache.c head/sys/contrib/dev/acpica/components/utilities/utcopy.c head/sys/contrib/dev/acpica/components/utilities/utdebug.c head/sys/contrib/dev/acpica/components/utilities/utdecode.c head/sys/contrib/dev/acpica/components/utilities/utdelete.c head/sys/contrib/dev/acpica/components/utilities/uterror.c head/sys/contrib/dev/acpica/components/utilities/uteval.c head/sys/contrib/dev/acpica/components/utilities/utexcep.c head/sys/contrib/dev/acpica/components/utilities/utglobal.c head/sys/contrib/dev/acpica/components/utilities/uthex.c head/sys/contrib/dev/acpica/components/utilities/utids.c head/sys/contrib/dev/acpica/components/utilities/utinit.c head/sys/contrib/dev/acpica/components/utilities/utlock.c head/sys/contrib/dev/acpica/components/utilities/utmath.c head/sys/contrib/dev/acpica/components/utilities/utmisc.c head/sys/contrib/dev/acpica/components/utilities/utmutex.c head/sys/contrib/dev/acpica/components/utilities/utnonansi.c head/sys/contrib/dev/acpica/components/utilities/utobject.c head/sys/contrib/dev/acpica/components/utilities/utosi.c head/sys/contrib/dev/acpica/components/utilities/utownerid.c head/sys/contrib/dev/acpica/components/utilities/utpredef.c head/sys/contrib/dev/acpica/components/utilities/utresdecode.c head/sys/contrib/dev/acpica/components/utilities/utresrc.c head/sys/contrib/dev/acpica/components/utilities/utstate.c head/sys/contrib/dev/acpica/components/utilities/utstring.c head/sys/contrib/dev/acpica/components/utilities/utstrsuppt.c head/sys/contrib/dev/acpica/components/utilities/utstrtoul64.c head/sys/contrib/dev/acpica/components/utilities/uttrack.c head/sys/contrib/dev/acpica/components/utilities/utuuid.c head/sys/contrib/dev/acpica/components/utilities/utxface.c head/sys/contrib/dev/acpica/components/utilities/utxferror.c head/sys/contrib/dev/acpica/components/utilities/utxfinit.c head/sys/contrib/dev/acpica/components/utilities/utxfmutex.c head/sys/contrib/dev/acpica/include/acapps.h head/sys/contrib/dev/acpica/include/acbuffer.h head/sys/contrib/dev/acpica/include/acclib.h head/sys/contrib/dev/acpica/include/accommon.h head/sys/contrib/dev/acpica/include/acconfig.h head/sys/contrib/dev/acpica/include/acconvert.h head/sys/contrib/dev/acpica/include/acdebug.h head/sys/contrib/dev/acpica/include/acdisasm.h head/sys/contrib/dev/acpica/include/acdispat.h head/sys/contrib/dev/acpica/include/acevents.h head/sys/contrib/dev/acpica/include/acexcep.h head/sys/contrib/dev/acpica/include/acglobal.h head/sys/contrib/dev/acpica/include/achware.h head/sys/contrib/dev/acpica/include/acinterp.h head/sys/contrib/dev/acpica/include/aclocal.h head/sys/contrib/dev/acpica/include/acmacros.h head/sys/contrib/dev/acpica/include/acnames.h head/sys/contrib/dev/acpica/include/acnamesp.h head/sys/contrib/dev/acpica/include/acobject.h head/sys/contrib/dev/acpica/include/acopcode.h head/sys/contrib/dev/acpica/include/acoutput.h head/sys/contrib/dev/acpica/include/acparser.h head/sys/contrib/dev/acpica/include/acpi.h head/sys/contrib/dev/acpica/include/acpiosxf.h head/sys/contrib/dev/acpica/include/acpixf.h head/sys/contrib/dev/acpica/include/acpredef.h head/sys/contrib/dev/acpica/include/acresrc.h head/sys/contrib/dev/acpica/include/acrestyp.h head/sys/contrib/dev/acpica/include/acstruct.h head/sys/contrib/dev/acpica/include/actables.h head/sys/contrib/dev/acpica/include/actbinfo.h head/sys/contrib/dev/acpica/include/actbl.h head/sys/contrib/dev/acpica/include/actbl1.h head/sys/contrib/dev/acpica/include/actbl2.h head/sys/contrib/dev/acpica/include/actbl3.h head/sys/contrib/dev/acpica/include/actypes.h head/sys/contrib/dev/acpica/include/acutils.h head/sys/contrib/dev/acpica/include/acuuid.h head/sys/contrib/dev/acpica/include/amlcode.h head/sys/contrib/dev/acpica/include/amlresrc.h head/sys/contrib/dev/acpica/include/platform/acenv.h head/sys/contrib/dev/acpica/include/platform/acenvex.h head/sys/contrib/dev/acpica/include/platform/acfreebsd.h head/sys/contrib/dev/acpica/include/platform/acgcc.h head/sys/contrib/dev/acpica/include/platform/acgccex.h head/sys/contrib/dev/acpica/os_specific/service_layers/osunixxf.c Directory Properties: head/sys/contrib/dev/acpica/ (props changed) Modified: head/sys/contrib/dev/acpica/changes.txt ============================================================================== --- head/sys/contrib/dev/acpica/changes.txt Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/changes.txt Wed Jan 9 00:31:10 2019 (r342869) @@ -1,4 +1,29 @@ ---------------------------------------- +08 January 2019. Summary of changes for version 20190108: + +This release is available at https://acpica.org/downloads + + +1) ACPICA kernel-resident subsystem: + +Updated all copyrights to 2019. This affects all source code modules. + + +2) iASL Compiler/Disassembler and Tools: + +ASL test suite (ASLTS): Updated all copyrights to 2019. + +Tools: Updated all signon copyrights to 2019. + +AcpiExec: Added a new option to dump extra information concerning any +memory leaks detected by the internal object/cache tracking mechanism. - +va + +iASL: Updated the table template for the TPM2 table to the newest version +of the table (Revision 4) + + +---------------------------------------- 13 December 2018. Summary of changes for version 20181213: Modified: head/sys/contrib/dev/acpica/common/acfileio.c ============================================================================== --- head/sys/contrib/dev/acpica/common/acfileio.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/common/acfileio.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/acgetline.c ============================================================================== --- head/sys/contrib/dev/acpica/common/acgetline.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/common/acgetline.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/adfile.c ============================================================================== --- head/sys/contrib/dev/acpica/common/adfile.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/common/adfile.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/adisasm.c ============================================================================== --- head/sys/contrib/dev/acpica/common/adisasm.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/common/adisasm.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/adwalk.c ============================================================================== --- head/sys/contrib/dev/acpica/common/adwalk.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/common/adwalk.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/ahids.c ============================================================================== --- head/sys/contrib/dev/acpica/common/ahids.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/common/ahids.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/ahpredef.c ============================================================================== --- head/sys/contrib/dev/acpica/common/ahpredef.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/common/ahpredef.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/ahtable.c ============================================================================== --- head/sys/contrib/dev/acpica/common/ahtable.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/common/ahtable.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/ahuuids.c ============================================================================== --- head/sys/contrib/dev/acpica/common/ahuuids.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/common/ahuuids.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/cmfsize.c ============================================================================== --- head/sys/contrib/dev/acpica/common/cmfsize.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/common/cmfsize.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/dmextern.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmextern.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/common/dmextern.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/dmrestag.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmrestag.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/common/dmrestag.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/dmswitch.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmswitch.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/common/dmswitch.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/dmtable.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtable.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/common/dmtable.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/dmtables.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtables.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/common/dmtables.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/dmtbdump.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtbdump.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/common/dmtbdump.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/dmtbdump1.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtbdump1.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/common/dmtbdump1.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/dmtbdump2.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtbdump2.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/common/dmtbdump2.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/dmtbdump3.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtbdump3.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/common/dmtbdump3.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/dmtbinfo.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtbinfo.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/common/dmtbinfo.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/dmtbinfo1.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtbinfo1.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/common/dmtbinfo1.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/dmtbinfo2.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtbinfo2.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/common/dmtbinfo2.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/dmtbinfo3.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtbinfo3.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/common/dmtbinfo3.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/getopt.c ============================================================================== --- head/sys/contrib/dev/acpica/common/getopt.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/common/getopt.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslallocate.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslallocate.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslallocate.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslanalyze.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslanalyze.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslanalyze.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslascii.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslascii.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslascii.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslbtypes.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslbtypes.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslbtypes.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslcache.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcache.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslcache.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslcodegen.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcodegen.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslcodegen.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslcompile.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompile.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslcompile.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslcompiler.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompiler.h Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslcompiler.h Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslcompiler.l ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompiler.l Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslcompiler.l Wed Jan 9 00:31:10 2019 (r342869) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslcstyle.y ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcstyle.y Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslcstyle.y Wed Jan 9 00:31:10 2019 (r342869) @@ -9,7 +9,7 @@ NoEcho(' * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/asldebug.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asldebug.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/asldebug.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/asldefine.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asldefine.h Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/asldefine.h Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslerror.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslerror.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslerror.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslexternal.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslexternal.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslexternal.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslfileio.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslfileio.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslfileio.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslfiles.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslfiles.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslfiles.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslfold.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslfold.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslfold.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslglobal.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslglobal.h Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslglobal.h Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslhelp.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslhelp.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslhelp.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslhelpers.y ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslhelpers.y Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslhelpers.y Wed Jan 9 00:31:10 2019 (r342869) @@ -9,7 +9,7 @@ NoEcho(' * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslhex.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslhex.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslhex.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslkeywords.y ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslkeywords.y Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslkeywords.y Wed Jan 9 00:31:10 2019 (r342869) @@ -9,7 +9,7 @@ NoEcho(' * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/asllength.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asllength.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/asllength.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/asllisting.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asllisting.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/asllisting.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/asllistsup.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asllistsup.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/asllistsup.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslload.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslload.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslload.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/asllookup.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asllookup.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/asllookup.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslmain.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslmain.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslmain.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslmap.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslmap.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslmap.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslmapenter.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslmapenter.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslmapenter.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslmapoutput.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslmapoutput.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslmapoutput.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslmaputils.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslmaputils.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslmaputils.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslmessages.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslmessages.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslmessages.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslmessages.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslmessages.h Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslmessages.h Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslmethod.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslmethod.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslmethod.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslnamesp.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslnamesp.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslnamesp.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/asloffset.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asloffset.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/asloffset.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslopcodes.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslopcodes.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslopcodes.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/asloperands.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asloperands.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/asloperands.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslopt.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslopt.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslopt.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/asloptions.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asloptions.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/asloptions.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslparseop.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslparseop.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslparseop.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslparser.y ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslparser.y Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslparser.y Wed Jan 9 00:31:10 2019 (r342869) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslpld.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslpld.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslpld.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslpredef.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslpredef.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslpredef.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslprepkg.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslprepkg.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslprepkg.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslprimaries.y ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslprimaries.y Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslprimaries.y Wed Jan 9 00:31:10 2019 (r342869) @@ -11,7 +11,7 @@ NoEcho(' * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslprintf.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslprintf.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslprintf.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslprune.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslprune.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslprune.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslresource.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslresource.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslresource.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslresources.y ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslresources.y Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslresources.y Wed Jan 9 00:31:10 2019 (r342869) @@ -11,7 +11,7 @@ NoEcho(' * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslrestype1.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslrestype1.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslrestype1.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslrestype1i.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslrestype1i.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslrestype1i.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslrestype2.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslrestype2.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslrestype2.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslrestype2d.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslrestype2d.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslrestype2d.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslrestype2e.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslrestype2e.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslrestype2e.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslrestype2q.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslrestype2q.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslrestype2q.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslrestype2s.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslrestype2s.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslrestype2s.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslrestype2w.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslrestype2w.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslrestype2w.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslrules.y ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslrules.y Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslrules.y Wed Jan 9 00:31:10 2019 (r342869) @@ -11,7 +11,7 @@ NoEcho(' * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslstartup.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslstartup.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslstartup.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslstubs.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslstubs.c Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslstubs.c Wed Jan 9 00:31:10 2019 (r342869) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslsupport.l ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslsupport.l Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslsupport.l Wed Jan 9 00:31:10 2019 (r342869) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslsupport.y ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslsupport.y Tue Jan 8 21:49:27 2019 (r342868) +++ head/sys/contrib/dev/acpica/compiler/aslsupport.y Wed Jan 9 00:31:10 2019 (r342869) @@ -9,7 +9,7 @@ NoEcho(' * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2019, Intel Corp. * All rights reserved. * * 2. License *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Wed Jan 9 00:38:17 2019 Return-Path: Delivered-To: svn-src-head@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 6B68A1490665; Wed, 9 Jan 2019 00:38:17 +0000 (UTC) (envelope-from glebius@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 0EC189363B; Wed, 9 Jan 2019 00:38:17 +0000 (UTC) (envelope-from glebius@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 F22A8C538; Wed, 9 Jan 2019 00:38:16 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x090cGoV037478; Wed, 9 Jan 2019 00:38:16 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x090cGST037477; Wed, 9 Jan 2019 00:38:16 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201901090038.x090cGST037477@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 9 Jan 2019 00:38:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342870 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 342870 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0EC189363B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.949,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2019 00:38:17 -0000 Author: glebius Date: Wed Jan 9 00:38:16 2019 New Revision: 342870 URL: https://svnweb.freebsd.org/changeset/base/342870 Log: Remove part of comment that doesn't match reality. Modified: head/sys/net/if.c Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Wed Jan 9 00:31:10 2019 (r342869) +++ head/sys/net/if.c Wed Jan 9 00:38:16 2019 (r342870) @@ -2048,9 +2048,7 @@ ifa_ifwithnet(const struct sockaddr *addr, int ignore_ /* * Scan though each interface, looking for ones that have addresses - * in this address family and the requested fib. Maintain a reference - * on ifa_maybe once we find one, as we release the IF_ADDR_RLOCK() that - * kept it stable when we move onto the next interface. + * in this address family and the requested fib. */ CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) { if ((fibnum != RT_ALL_FIBS) && (ifp->if_fib != fibnum)) From owner-svn-src-head@freebsd.org Wed Jan 9 01:09:43 2019 Return-Path: Delivered-To: svn-src-head@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 49657149110F; Wed, 9 Jan 2019 01:09:43 +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 DF60294468; Wed, 9 Jan 2019 01:09:42 +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 C56E9CA42; Wed, 9 Jan 2019 01:09:42 +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 x0919gfA053128; Wed, 9 Jan 2019 01:09:42 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0919gms053127; Wed, 9 Jan 2019 01:09:42 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201901090109.x0919gms053127@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 9 Jan 2019 01:09:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342871 - head/crypto/heimdal/lib/sqlite X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/crypto/heimdal/lib/sqlite X-SVN-Commit-Revision: 342871 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DF60294468 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.946,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2019 01:09:43 -0000 Author: cy Date: Wed Jan 9 01:09:42 2019 New Revision: 342871 URL: https://svnweb.freebsd.org/changeset/base/342871 Log: Remove unused sqlite3 bundled with heimdal. Reported by: delphij@ Deleted: head/crypto/heimdal/lib/sqlite/Makefile.am head/crypto/heimdal/lib/sqlite/Makefile.in head/crypto/heimdal/lib/sqlite/NTMakefile head/crypto/heimdal/lib/sqlite/sqlite3.c head/crypto/heimdal/lib/sqlite/sqlite3.h head/crypto/heimdal/lib/sqlite/sqlite3ext.h From owner-svn-src-head@freebsd.org Wed Jan 9 01:11:22 2019 Return-Path: Delivered-To: svn-src-head@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 75D4C149123B; Wed, 9 Jan 2019 01:11:22 +0000 (UTC) (envelope-from glebius@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 ECDF9946C0; Wed, 9 Jan 2019 01:11:21 +0000 (UTC) (envelope-from glebius@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 C7674CA82; Wed, 9 Jan 2019 01:11:21 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x091BL2x055544; Wed, 9 Jan 2019 01:11:21 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x091BJrW055532; Wed, 9 Jan 2019 01:11:19 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201901090111.x091BJrW055532@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 9 Jan 2019 01:11:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342872 - in head/sys: compat/linuxkpi/common/include/linux dev/wtap net net/altq netinet netinet/netdump netinet6 netpfil/pf ofed/drivers/infiniband/core ofed/drivers/infiniband/ulp/ipoib X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: in head/sys: compat/linuxkpi/common/include/linux dev/wtap net net/altq netinet netinet/netdump netinet6 netpfil/pf ofed/drivers/infiniband/core ofed/drivers/infiniband/ulp/ipoib X-SVN-Commit-Revision: 342872 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: ECDF9946C0 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.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2019 01:11:22 -0000 Author: glebius Date: Wed Jan 9 01:11:19 2019 New Revision: 342872 URL: https://svnweb.freebsd.org/changeset/base/342872 Log: Mechanical cleanup of epoch(9) usage in network stack. - Remove macros that covertly create epoch_tracker on thread stack. Such macros a quite unsafe, e.g. will produce a buggy code if same macro is used in embedded scopes. Explicitly declare epoch_tracker always. - Unmask interface list IFNET_RLOCK_NOSLEEP(), interface address list IF_ADDR_RLOCK() and interface AF specific data IF_AFDATA_RLOCK() read locking macros to what they actually are - the net_epoch. Keeping them as is is very misleading. They all are named FOO_RLOCK(), while they no longer have lock semantics. Now they allow recursion and what's more important they now no longer guarantee protection against their companion WLOCK macros. Note: INP_HASH_RLOCK() has same problems, but not touched by this commit. This is non functional mechanical change. The only functionally changed functions are ni6_addrs() and ni6_store_addrs(), where we no longer enter epoch recursively. Discussed with: jtl, gallatin Modified: head/sys/compat/linuxkpi/common/include/linux/inetdevice.h head/sys/dev/wtap/if_wtap.c head/sys/net/altq/altq_subr.c head/sys/net/bridgestp.c head/sys/net/if.c head/sys/net/if_llatbl.c head/sys/net/if_var.h head/sys/net/if_vlan.c head/sys/net/route.c head/sys/net/rtsock.c head/sys/netinet/if_ether.c head/sys/netinet/igmp.c head/sys/netinet/in.c head/sys/netinet/in_mcast.c head/sys/netinet/in_pcb.c head/sys/netinet/in_pcb.h head/sys/netinet/ip_carp.c head/sys/netinet/ip_divert.c head/sys/netinet/ip_icmp.c head/sys/netinet/ip_input.c head/sys/netinet/ip_mroute.c head/sys/netinet/ip_options.c head/sys/netinet/ip_output.c head/sys/netinet/netdump/netdump_client.c head/sys/netinet/sctp_bsd_addr.c head/sys/netinet6/icmp6.c head/sys/netinet6/in6.c head/sys/netinet6/in6_ifattach.c head/sys/netinet6/in6_mcast.c head/sys/netinet6/in6_pcb.c head/sys/netinet6/in6_var.h head/sys/netinet6/mld6.c head/sys/netinet6/nd6.c head/sys/netinet6/nd6_nbr.c head/sys/netinet6/nd6_rtr.c head/sys/netinet6/raw_ip6.c head/sys/netinet6/scope6.c head/sys/netpfil/pf/pf_if.c head/sys/ofed/drivers/infiniband/core/ib_roce_gid_mgmt.c head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Modified: head/sys/compat/linuxkpi/common/include/linux/inetdevice.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/inetdevice.h Wed Jan 9 01:09:42 2019 (r342871) +++ head/sys/compat/linuxkpi/common/include/linux/inetdevice.h Wed Jan 9 01:11:19 2019 (r342872) @@ -37,6 +37,7 @@ static inline struct net_device * ip_dev_find(struct vnet *vnet, uint32_t addr) { struct sockaddr_in sin; + struct epoch_tracker et; struct ifaddr *ifa; struct ifnet *ifp; @@ -44,7 +45,7 @@ ip_dev_find(struct vnet *vnet, uint32_t addr) sin.sin_addr.s_addr = addr; sin.sin_len = sizeof(sin); sin.sin_family = AF_INET; - NET_EPOCH_ENTER(); + NET_EPOCH_ENTER(et); CURVNET_SET_QUIET(vnet); ifa = ifa_ifwithaddr((struct sockaddr *)&sin); CURVNET_RESTORE(); @@ -54,7 +55,7 @@ ip_dev_find(struct vnet *vnet, uint32_t addr) } else { ifp = NULL; } - NET_EPOCH_EXIT(); + NET_EPOCH_EXIT(et); return (ifp); } @@ -62,6 +63,7 @@ static inline struct net_device * ip6_dev_find(struct vnet *vnet, struct in6_addr addr, uint16_t scope_id) { struct sockaddr_in6 sin6; + struct epoch_tracker et; struct ifaddr *ifa; struct ifnet *ifp; @@ -74,7 +76,7 @@ ip6_dev_find(struct vnet *vnet, struct in6_addr addr, /* embed the IPv6 scope ID */ sin6.sin6_addr.s6_addr16[1] = htons(scope_id); } - NET_EPOCH_ENTER(); + NET_EPOCH_ENTER(et); CURVNET_SET_QUIET(vnet); ifa = ifa_ifwithaddr((struct sockaddr *)&sin6); CURVNET_RESTORE(); @@ -84,7 +86,7 @@ ip6_dev_find(struct vnet *vnet, struct in6_addr addr, } else { ifp = NULL; } - NET_EPOCH_EXIT(); + NET_EPOCH_EXIT(et); return (ifp); } Modified: head/sys/dev/wtap/if_wtap.c ============================================================================== --- head/sys/dev/wtap/if_wtap.c Wed Jan 9 01:09:42 2019 (r342871) +++ head/sys/dev/wtap/if_wtap.c Wed Jan 9 01:11:19 2019 (r342872) @@ -91,6 +91,7 @@ wtap_node_write(struct cdev *dev, struct uio *uio, int struct ifnet *ifp; struct wtap_softc *sc; uint8_t buf[1024]; + struct epoch_tracker et; int buf_len; uprintf("write device %s \"echo.\"\n", devtoname(dev)); @@ -106,7 +107,7 @@ wtap_node_write(struct cdev *dev, struct uio *uio, int m_copyback(m, 0, buf_len, buf); CURVNET_SET(TD_TO_VNET(curthread)); - IFNET_RLOCK_NOSLEEP(); + NET_EPOCH_ENTER(et); CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) { printf("ifp->if_xname = %s\n", ifp->if_xname); @@ -119,7 +120,7 @@ wtap_node_write(struct cdev *dev, struct uio *uio, int } } - IFNET_RUNLOCK_NOSLEEP(); + NET_EPOCH_EXIT(et); CURVNET_RESTORE(); return(err); Modified: head/sys/net/altq/altq_subr.c ============================================================================== --- head/sys/net/altq/altq_subr.c Wed Jan 9 01:09:42 2019 (r342871) +++ head/sys/net/altq/altq_subr.c Wed Jan 9 01:11:19 2019 (r342872) @@ -410,11 +410,11 @@ tbr_timeout(arg) { VNET_ITERATOR_DECL(vnet_iter); struct ifnet *ifp; - int active, s; + struct epoch_tracker et; + int active; active = 0; - s = splnet(); - IFNET_RLOCK_NOSLEEP(); + NET_EPOCH_ENTER(et); VNET_LIST_RLOCK_NOSLEEP(); VNET_FOREACH(vnet_iter) { CURVNET_SET(vnet_iter); @@ -431,8 +431,7 @@ tbr_timeout(arg) CURVNET_RESTORE(); } VNET_LIST_RUNLOCK_NOSLEEP(); - IFNET_RUNLOCK_NOSLEEP(); - splx(s); + NET_EPOCH_EXIT(et); if (active > 0) CALLOUT_RESET(&tbr_callout, 1, tbr_timeout, (void *)0); else Modified: head/sys/net/bridgestp.c ============================================================================== --- head/sys/net/bridgestp.c Wed Jan 9 01:09:42 2019 (r342871) +++ head/sys/net/bridgestp.c Wed Jan 9 01:11:19 2019 (r342872) @@ -2022,6 +2022,7 @@ bstp_same_bridgeid(uint64_t id1, uint64_t id2) void bstp_reinit(struct bstp_state *bs) { + struct epoch_tracker et; struct bstp_port *bp; struct ifnet *ifp, *mif; u_char *e_addr; @@ -2042,7 +2043,7 @@ bstp_reinit(struct bstp_state *bs) * from is part of this bridge, so we can have more than one independent * bridges in the same STP domain. */ - IFNET_RLOCK_NOSLEEP(); + NET_EPOCH_ENTER(et); CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) { if (ifp->if_type != IFT_ETHER) continue; /* Not Ethernet */ @@ -2062,7 +2063,7 @@ bstp_reinit(struct bstp_state *bs) continue; } } - IFNET_RUNLOCK_NOSLEEP(); + NET_EPOCH_EXIT(et); if (mif == NULL) goto disablestp; Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Wed Jan 9 01:09:42 2019 (r342871) +++ head/sys/net/if.c Wed Jan 9 01:11:19 2019 (r342872) @@ -351,16 +351,17 @@ ifnet_byindex(u_short idx) struct ifnet * ifnet_byindex_ref(u_short idx) { + struct epoch_tracker et; struct ifnet *ifp; - IFNET_RLOCK_NOSLEEP(); + NET_EPOCH_ENTER(et); ifp = ifnet_byindex_locked(idx); if (ifp == NULL || (ifp->if_flags & IFF_DYING)) { - IFNET_RUNLOCK_NOSLEEP(); + NET_EPOCH_EXIT(et); return (NULL); } if_ref(ifp); - IFNET_RUNLOCK_NOSLEEP(); + NET_EPOCH_EXIT(et); return (ifp); } @@ -424,14 +425,15 @@ ifnet_setbyindex(u_short idx, struct ifnet *ifp) struct ifaddr * ifaddr_byindex(u_short idx) { + struct epoch_tracker et; struct ifnet *ifp; struct ifaddr *ifa = NULL; - IFNET_RLOCK_NOSLEEP(); + NET_EPOCH_ENTER(et); ifp = ifnet_byindex_locked(idx); if (ifp != NULL && (ifa = ifp->if_addr) != NULL) ifa_ref(ifa); - IFNET_RUNLOCK_NOSLEEP(); + NET_EPOCH_EXIT(et); return (ifa); } @@ -967,12 +969,14 @@ if_purgeaddrs(struct ifnet *ifp) struct ifaddr *ifa; while (1) { - NET_EPOCH_ENTER(); + struct epoch_tracker et; + + NET_EPOCH_ENTER(et); CK_STAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { if (ifa->ifa_addr->sa_family != AF_LINK) break; } - NET_EPOCH_EXIT(); + NET_EPOCH_EXIT(et); if (ifa == NULL) break; @@ -1609,38 +1613,39 @@ ifgr_groups_get(void *ifgrp) static int if_getgroup(struct ifgroupreq *ifgr, struct ifnet *ifp) { + struct epoch_tracker et; int len, error; struct ifg_list *ifgl; struct ifg_req ifgrq, *ifgp; if (ifgr->ifgr_len == 0) { - IF_ADDR_RLOCK(ifp); + NET_EPOCH_ENTER(et); CK_STAILQ_FOREACH(ifgl, &ifp->if_groups, ifgl_next) ifgr->ifgr_len += sizeof(struct ifg_req); - IF_ADDR_RUNLOCK(ifp); + NET_EPOCH_EXIT(et); return (0); } len = ifgr->ifgr_len; ifgp = ifgr_groups_get(ifgr); /* XXX: wire */ - IF_ADDR_RLOCK(ifp); + NET_EPOCH_ENTER(et); CK_STAILQ_FOREACH(ifgl, &ifp->if_groups, ifgl_next) { if (len < sizeof(ifgrq)) { - IF_ADDR_RUNLOCK(ifp); + NET_EPOCH_EXIT(et); return (EINVAL); } bzero(&ifgrq, sizeof ifgrq); strlcpy(ifgrq.ifgrq_group, ifgl->ifgl_group->ifg_group, sizeof(ifgrq.ifgrq_group)); if ((error = copyout(&ifgrq, ifgp, sizeof(struct ifg_req)))) { - IF_ADDR_RUNLOCK(ifp); + NET_EPOCH_EXIT(et); return (error); } len -= sizeof(ifgrq); ifgp++; } - IF_ADDR_RUNLOCK(ifp); + NET_EPOCH_EXIT(et); return (0); } @@ -1954,11 +1959,12 @@ done: int ifa_ifwithaddr_check(const struct sockaddr *addr) { + struct epoch_tracker et; int rc; - NET_EPOCH_ENTER(); + NET_EPOCH_ENTER(et); rc = (ifa_ifwithaddr(addr) != NULL); - NET_EPOCH_EXIT(); + NET_EPOCH_EXIT(et); return (rc); } @@ -2187,6 +2193,7 @@ ifa_preferred(struct ifaddr *cur, struct ifaddr *next) static void link_rtrequest(int cmd, struct rtentry *rt, struct rt_addrinfo *info) { + struct epoch_tracker et; struct ifaddr *ifa, *oifa; struct sockaddr *dst; struct ifnet *ifp; @@ -2194,7 +2201,7 @@ link_rtrequest(int cmd, struct rtentry *rt, struct rt_ if (cmd != RTM_ADD || ((ifa = rt->rt_ifa) == NULL) || ((ifp = ifa->ifa_ifp) == NULL) || ((dst = rt_key(rt)) == NULL)) return; - NET_EPOCH_ENTER(); + NET_EPOCH_ENTER(et); ifa = ifaof_ifpforaddr(dst, ifp); if (ifa) { oifa = rt->rt_ifa; @@ -2206,7 +2213,7 @@ link_rtrequest(int cmd, struct rtentry *rt, struct rt_ if (ifa->ifa_rtrequest && ifa->ifa_rtrequest != link_rtrequest) ifa->ifa_rtrequest(cmd, rt, info); } - NET_EPOCH_EXIT(); + NET_EPOCH_EXIT(et); } struct sockaddr_dl * @@ -2407,9 +2414,10 @@ if_qflush(struct ifnet *ifp) struct ifnet * ifunit_ref(const char *name) { + struct epoch_tracker et; struct ifnet *ifp; - IFNET_RLOCK_NOSLEEP(); + NET_EPOCH_ENTER(et); CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) { if (strncmp(name, ifp->if_xname, IFNAMSIZ) == 0 && !(ifp->if_flags & IFF_DYING)) @@ -2417,21 +2425,22 @@ ifunit_ref(const char *name) } if (ifp != NULL) if_ref(ifp); - IFNET_RUNLOCK_NOSLEEP(); + NET_EPOCH_EXIT(et); return (ifp); } struct ifnet * ifunit(const char *name) { + struct epoch_tracker et; struct ifnet *ifp; - IFNET_RLOCK_NOSLEEP(); + NET_EPOCH_ENTER(et); CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) { if (strncmp(name, ifp->if_xname, IFNAMSIZ) == 0) break; } - IFNET_RUNLOCK_NOSLEEP(); + NET_EPOCH_EXIT(et); return (ifp); } @@ -2819,6 +2828,7 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, caddr_t data, return (EINVAL); if (cmd == SIOCADDMULTI) { + struct epoch_tracker et; struct ifmultiaddr *ifma; /* @@ -2828,9 +2838,9 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, caddr_t data, * lose a race while we check if the membership * already exists. */ - IF_ADDR_RLOCK(ifp); + NET_EPOCH_ENTER(et); ifma = if_findmulti(ifp, &ifr->ifr_addr); - IF_ADDR_RUNLOCK(ifp); + NET_EPOCH_EXIT(et); if (ifma != NULL) error = EADDRINUSE; else @@ -3253,6 +3263,7 @@ again: IFNET_RLOCK(); CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) { + struct epoch_tracker et; int addrs; /* @@ -3269,7 +3280,7 @@ again: } addrs = 0; - IF_ADDR_RLOCK(ifp); + NET_EPOCH_ENTER(et); CK_STAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { struct sockaddr *sa = ifa->ifa_addr; @@ -3297,7 +3308,7 @@ again: if (sbuf_error(sb) == 0) valid_len = sbuf_len(sb); } - IF_ADDR_RUNLOCK(ifp); + NET_EPOCH_EXIT(et); if (addrs == 0) { sbuf_bcat(sb, &ifr, sizeof(ifr)); max_len += sizeof(ifr); @@ -3604,15 +3615,16 @@ if_delmulti(struct ifnet *ifp, struct sockaddr *sa) struct ifmultiaddr *ifma; int lastref; #ifdef INVARIANTS + struct epoch_tracker et; struct ifnet *oifp; - IFNET_RLOCK_NOSLEEP(); + NET_EPOCH_ENTER(et); CK_STAILQ_FOREACH(oifp, &V_ifnet, if_link) if (ifp == oifp) break; if (ifp != oifp) ifp = NULL; - IFNET_RUNLOCK_NOSLEEP(); + NET_EPOCH_EXIT(et); KASSERT(ifp != NULL, ("%s: ifnet went away", __func__)); #endif @@ -3678,15 +3690,16 @@ if_delmulti_ifma_flags(struct ifmultiaddr *ifma, int f if (ifp == NULL) { printf("%s: ifma_ifp seems to be detached\n", __func__); } else { + struct epoch_tracker et; struct ifnet *oifp; - IFNET_RLOCK_NOSLEEP(); + NET_EPOCH_ENTER(et); CK_STAILQ_FOREACH(oifp, &V_ifnet, if_link) if (ifp == oifp) break; if (ifp != oifp) ifp = NULL; - IFNET_RUNLOCK_NOSLEEP(); + NET_EPOCH_EXIT(et); } #endif /* @@ -3810,10 +3823,11 @@ if_setlladdr(struct ifnet *ifp, const u_char *lladdr, struct sockaddr_dl *sdl; struct ifaddr *ifa; struct ifreq ifr; + struct epoch_tracker et; int rc; rc = 0; - NET_EPOCH_ENTER(); + NET_EPOCH_ENTER(et); ifa = ifp->if_addr; if (ifa == NULL) { rc = EINVAL; @@ -3847,7 +3861,7 @@ if_setlladdr(struct ifnet *ifp, const u_char *lladdr, * to re-init it in order to reprogram its * address filter. */ - NET_EPOCH_EXIT(); + NET_EPOCH_EXIT(et); if ((ifp->if_flags & IFF_UP) != 0) { if (ifp->if_ioctl) { ifp->if_flags &= ~IFF_UP; @@ -3863,7 +3877,7 @@ if_setlladdr(struct ifnet *ifp, const u_char *lladdr, EVENTHANDLER_INVOKE(iflladdr_event, ifp); return (0); out: - NET_EPOCH_EXIT(); + NET_EPOCH_EXIT(et); return (rc); } Modified: head/sys/net/if_llatbl.c ============================================================================== --- head/sys/net/if_llatbl.c Wed Jan 9 01:09:42 2019 (r342871) +++ head/sys/net/if_llatbl.c Wed Jan 9 01:11:19 2019 (r342872) @@ -90,6 +90,7 @@ static int htable_foreach_lle(struct lltable *llt, llt static int lltable_dump_af(struct lltable *llt, struct sysctl_req *wr) { + struct epoch_tracker et; int error; LLTABLE_LIST_LOCK_ASSERT(); @@ -98,10 +99,10 @@ lltable_dump_af(struct lltable *llt, struct sysctl_req return (0); error = 0; - IF_AFDATA_RLOCK(llt->llt_ifp); + NET_EPOCH_ENTER(et); error = lltable_foreach_lle(llt, (llt_foreach_cb_t *)llt->llt_dump_entry, wr); - IF_AFDATA_RUNLOCK(llt->llt_ifp); + NET_EPOCH_EXIT(et); return (error); } @@ -453,11 +454,12 @@ struct llentry * llentry_alloc(struct ifnet *ifp, struct lltable *lt, struct sockaddr_storage *dst) { + struct epoch_tracker et; struct llentry *la, *la_tmp; - IF_AFDATA_RLOCK(ifp); + NET_EPOCH_ENTER(et); la = lla_lookup(lt, LLE_EXCLUSIVE, (struct sockaddr *)dst); - IF_AFDATA_RUNLOCK(ifp); + NET_EPOCH_EXIT(et); if (la != NULL) { LLE_ADDREF(la); Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Wed Jan 9 01:09:42 2019 (r342871) +++ head/sys/net/if_var.h Wed Jan 9 01:11:19 2019 (r342872) @@ -398,20 +398,16 @@ struct ifnet { */ #define IF_ADDR_LOCK_INIT(if) mtx_init(&(if)->if_addr_lock, "if_addr_lock", NULL, MTX_DEF) #define IF_ADDR_LOCK_DESTROY(if) mtx_destroy(&(if)->if_addr_lock) -#define IF_ADDR_RLOCK(if) struct epoch_tracker if_addr_et; epoch_enter_preempt(net_epoch_preempt, &if_addr_et); -#define IF_ADDR_RUNLOCK(if) epoch_exit_preempt(net_epoch_preempt, &if_addr_et); #define IF_ADDR_WLOCK(if) mtx_lock(&(if)->if_addr_lock) #define IF_ADDR_WUNLOCK(if) mtx_unlock(&(if)->if_addr_lock) #define IF_ADDR_LOCK_ASSERT(if) MPASS(in_epoch(net_epoch_preempt) || mtx_owned(&(if)->if_addr_lock)) #define IF_ADDR_WLOCK_ASSERT(if) mtx_assert(&(if)->if_addr_lock, MA_OWNED) -#define NET_EPOCH_ENTER() struct epoch_tracker nep_et; epoch_enter_preempt(net_epoch_preempt, &nep_et) -#define NET_EPOCH_ENTER_ET(et) epoch_enter_preempt(net_epoch_preempt, &(et)) -#define NET_EPOCH_EXIT() epoch_exit_preempt(net_epoch_preempt, &nep_et) -#define NET_EPOCH_EXIT_ET(et) epoch_exit_preempt(net_epoch_preempt, &(et)) -#define NET_EPOCH_WAIT() epoch_wait_preempt(net_epoch_preempt) +#define NET_EPOCH_ENTER(et) epoch_enter_preempt(net_epoch_preempt, &(et)) +#define NET_EPOCH_EXIT(et) epoch_exit_preempt(net_epoch_preempt, &(et)) +#define NET_EPOCH_WAIT() epoch_wait_preempt(net_epoch_preempt) +#define NET_EPOCH_ASSERT() MPASS(in_epoch(net_epoch_preempt)) - /* * Function variations on locking macros intended to be used by loadable * kernel modules in order to divorce them from the internals of address list @@ -490,16 +486,13 @@ EVENTHANDLER_DECLARE(group_change_event, group_change_ mtx_init(&(ifp)->if_afdata_lock, "if_afdata", NULL, MTX_DEF) #define IF_AFDATA_WLOCK(ifp) mtx_lock(&(ifp)->if_afdata_lock) -#define IF_AFDATA_RLOCK(ifp) struct epoch_tracker if_afdata_et; epoch_enter_preempt(net_epoch_preempt, &if_afdata_et) #define IF_AFDATA_WUNLOCK(ifp) mtx_unlock(&(ifp)->if_afdata_lock) -#define IF_AFDATA_RUNLOCK(ifp) epoch_exit_preempt(net_epoch_preempt, &if_afdata_et) #define IF_AFDATA_LOCK(ifp) IF_AFDATA_WLOCK(ifp) #define IF_AFDATA_UNLOCK(ifp) IF_AFDATA_WUNLOCK(ifp) #define IF_AFDATA_TRYLOCK(ifp) mtx_trylock(&(ifp)->if_afdata_lock) #define IF_AFDATA_DESTROY(ifp) mtx_destroy(&(ifp)->if_afdata_lock) #define IF_AFDATA_LOCK_ASSERT(ifp) MPASS(in_epoch(net_epoch_preempt) || mtx_owned(&(ifp)->if_afdata_lock)) -#define IF_AFDATA_RLOCK_ASSERT(ifp) MPASS(in_epoch(net_epoch_preempt)); #define IF_AFDATA_WLOCK_ASSERT(ifp) mtx_assert(&(ifp)->if_afdata_lock, MA_OWNED) #define IF_AFDATA_UNLOCK_ASSERT(ifp) mtx_assert(&(ifp)->if_afdata_lock, MA_NOTOWNED) @@ -583,16 +576,13 @@ extern struct sx ifnet_sxlock; * write, but also whether it was acquired with sleep support or not. */ #define IFNET_RLOCK_ASSERT() sx_assert(&ifnet_sxlock, SA_SLOCKED) -#define IFNET_RLOCK_NOSLEEP_ASSERT() MPASS(in_epoch(net_epoch_preempt)) #define IFNET_WLOCK_ASSERT() do { \ sx_assert(&ifnet_sxlock, SA_XLOCKED); \ rw_assert(&ifnet_rwlock, RA_WLOCKED); \ } while (0) #define IFNET_RLOCK() sx_slock(&ifnet_sxlock) -#define IFNET_RLOCK_NOSLEEP() struct epoch_tracker ifnet_rlock_et; epoch_enter_preempt(net_epoch_preempt, &ifnet_rlock_et) #define IFNET_RUNLOCK() sx_sunlock(&ifnet_sxlock) -#define IFNET_RUNLOCK_NOSLEEP() epoch_exit_preempt(net_epoch_preempt, &ifnet_rlock_et) /* * Look up an ifnet given its index; the _ref variant also acquires a Modified: head/sys/net/if_vlan.c ============================================================================== --- head/sys/net/if_vlan.c Wed Jan 9 01:09:42 2019 (r342871) +++ head/sys/net/if_vlan.c Wed Jan 9 01:11:19 2019 (r342872) @@ -233,10 +233,6 @@ static struct sx _VLAN_SX_ID; #define VLAN_LOCKING_DESTROY() \ sx_destroy(&_VLAN_SX_ID) -#define VLAN_RLOCK() NET_EPOCH_ENTER(); -#define VLAN_RUNLOCK() NET_EPOCH_EXIT(); -#define VLAN_RLOCK_ASSERT() MPASS(in_epoch(net_epoch_preempt)) - #define VLAN_SLOCK() sx_slock(&_VLAN_SX_ID) #define VLAN_SUNLOCK() sx_sunlock(&_VLAN_SX_ID) #define VLAN_XLOCK() sx_xlock(&_VLAN_SX_ID) @@ -252,11 +248,8 @@ static struct sx _VLAN_SX_ID; */ #define TRUNK_LOCK_INIT(trunk) mtx_init(&(trunk)->lock, vlanname, NULL, MTX_DEF) #define TRUNK_LOCK_DESTROY(trunk) mtx_destroy(&(trunk)->lock) -#define TRUNK_RLOCK(trunk) NET_EPOCH_ENTER() #define TRUNK_WLOCK(trunk) mtx_lock(&(trunk)->lock) -#define TRUNK_RUNLOCK(trunk) NET_EPOCH_EXIT(); #define TRUNK_WUNLOCK(trunk) mtx_unlock(&(trunk)->lock) -#define TRUNK_RLOCK_ASSERT(trunk) MPASS(in_epoch(net_epoch_preempt)) #define TRUNK_LOCK_ASSERT(trunk) MPASS(in_epoch(net_epoch_preempt) || mtx_owned(&(trunk)->lock)) #define TRUNK_WLOCK_ASSERT(trunk) mtx_assert(&(trunk)->lock, MA_OWNED); @@ -472,7 +465,7 @@ vlan_gethash(struct ifvlantrunk *trunk, uint16_t vid) { struct ifvlan *ifv; - TRUNK_RLOCK_ASSERT(trunk); + NET_EPOCH_ASSERT(); CK_SLIST_FOREACH(ifv, &trunk->hash[HASH(vid, trunk->hmask)], ifv_list) if (ifv->ifv_vid == vid) @@ -617,16 +610,17 @@ vlan_setmulti(struct ifnet *ifp) static void vlan_iflladdr(void *arg __unused, struct ifnet *ifp) { + struct epoch_tracker et; struct ifvlan *ifv; struct ifnet *ifv_ifp; struct ifvlantrunk *trunk; struct sockaddr_dl *sdl; /* Need the rmlock since this is run on taskqueue_swi. */ - VLAN_RLOCK(); + NET_EPOCH_ENTER(et); trunk = ifp->if_vlantrunk; if (trunk == NULL) { - VLAN_RUNLOCK(); + NET_EPOCH_EXIT(et); return; } @@ -652,7 +646,7 @@ vlan_iflladdr(void *arg __unused, struct ifnet *ifp) taskqueue_enqueue(taskqueue_thread, &ifv->lladdr_task); } TRUNK_WUNLOCK(trunk); - VLAN_RUNLOCK(); + NET_EPOCH_EXIT(et); } /* @@ -698,17 +692,18 @@ vlan_ifdetach(void *arg __unused, struct ifnet *ifp) static struct ifnet * vlan_trunkdev(struct ifnet *ifp) { + struct epoch_tracker et; struct ifvlan *ifv; if (ifp->if_type != IFT_L2VLAN) return (NULL); - VLAN_RLOCK(); + NET_EPOCH_ENTER(et); ifv = ifp->if_softc; ifp = NULL; if (ifv->ifv_trunk) ifp = PARENT(ifv); - VLAN_RUNLOCK(); + NET_EPOCH_EXIT(et); return (ifp); } @@ -780,20 +775,21 @@ vlan_setcookie(struct ifnet *ifp, void *cookie) static struct ifnet * vlan_devat(struct ifnet *ifp, uint16_t vid) { + struct epoch_tracker et; struct ifvlantrunk *trunk; struct ifvlan *ifv; - VLAN_RLOCK(); + NET_EPOCH_ENTER(et); trunk = ifp->if_vlantrunk; if (trunk == NULL) { - VLAN_RUNLOCK(); + NET_EPOCH_EXIT(et); return (NULL); } ifp = NULL; ifv = vlan_gethash(trunk, vid); if (ifv) ifp = ifv->ifv_ifp; - VLAN_RUNLOCK(); + NET_EPOCH_EXIT(et); return (ifp); } @@ -1133,15 +1129,16 @@ vlan_init(void *foo __unused) static int vlan_transmit(struct ifnet *ifp, struct mbuf *m) { + struct epoch_tracker et; struct ifvlan *ifv; struct ifnet *p; int error, len, mcast; - VLAN_RLOCK(); + NET_EPOCH_ENTER(et); ifv = ifp->if_softc; if (TRUNK(ifv) == NULL) { if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); - VLAN_RUNLOCK(); + NET_EPOCH_EXIT(et); m_freem(m); return (ENETDOWN); } @@ -1157,14 +1154,14 @@ vlan_transmit(struct ifnet *ifp, struct mbuf *m) */ if (!UP_AND_RUNNING(p)) { if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); - VLAN_RUNLOCK(); + NET_EPOCH_EXIT(et); m_freem(m); return (ENETDOWN); } if (!ether_8021q_frame(&m, ifp, p, ifv->ifv_vid, ifv->ifv_pcp)) { if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); - VLAN_RUNLOCK(); + NET_EPOCH_EXIT(et); return (0); } @@ -1178,7 +1175,7 @@ vlan_transmit(struct ifnet *ifp, struct mbuf *m) if_inc_counter(ifp, IFCOUNTER_OMCASTS, mcast); } else if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); - VLAN_RUNLOCK(); + NET_EPOCH_EXIT(et); return (error); } @@ -1193,15 +1190,16 @@ vlan_qflush(struct ifnet *ifp __unused) static void vlan_input(struct ifnet *ifp, struct mbuf *m) { + struct epoch_tracker et; struct ifvlantrunk *trunk; struct ifvlan *ifv; struct m_tag *mtag; uint16_t vid, tag; - VLAN_RLOCK(); + NET_EPOCH_ENTER(et); trunk = ifp->if_vlantrunk; if (trunk == NULL) { - VLAN_RUNLOCK(); + NET_EPOCH_EXIT(et); m_freem(m); return; } @@ -1224,7 +1222,7 @@ vlan_input(struct ifnet *ifp, struct mbuf *m) if (m->m_len < sizeof(*evl) && (m = m_pullup(m, sizeof(*evl))) == NULL) { if_printf(ifp, "cannot pullup VLAN header\n"); - VLAN_RUNLOCK(); + NET_EPOCH_EXIT(et); return; } evl = mtod(m, struct ether_vlan_header *); @@ -1247,7 +1245,7 @@ vlan_input(struct ifnet *ifp, struct mbuf *m) __func__, ifp->if_xname, ifp->if_type); #endif if_inc_counter(ifp, IFCOUNTER_NOPROTO, 1); - VLAN_RUNLOCK(); + NET_EPOCH_EXIT(et); m_freem(m); return; } @@ -1257,7 +1255,7 @@ vlan_input(struct ifnet *ifp, struct mbuf *m) ifv = vlan_gethash(trunk, vid); if (ifv == NULL || !UP_AND_RUNNING(ifv->ifv_ifp)) { - VLAN_RUNLOCK(); + NET_EPOCH_EXIT(et); if_inc_counter(ifp, IFCOUNTER_NOPROTO, 1); m_freem(m); return; @@ -1277,7 +1275,7 @@ vlan_input(struct ifnet *ifp, struct mbuf *m) sizeof(uint8_t), M_NOWAIT); if (mtag == NULL) { if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); - VLAN_RUNLOCK(); + NET_EPOCH_EXIT(et); m_freem(m); return; } @@ -1288,7 +1286,7 @@ vlan_input(struct ifnet *ifp, struct mbuf *m) m->m_pkthdr.rcvif = ifv->ifv_ifp; if_inc_counter(ifv->ifv_ifp, IFCOUNTER_IPACKETS, 1); - VLAN_RUNLOCK(); + NET_EPOCH_EXIT(et); /* Pass it back through the parent's input routine. */ (*ifv->ifv_ifp->if_input)(ifv->ifv_ifp, m); @@ -1314,6 +1312,7 @@ vlan_lladdr_fn(void *arg, int pending __unused) static int vlan_config(struct ifvlan *ifv, struct ifnet *p, uint16_t vid) { + struct epoch_tracker et; struct ifvlantrunk *trunk; struct ifnet *ifp; int error = 0; @@ -1413,9 +1412,9 @@ vlan_config(struct ifvlan *ifv, struct ifnet *p, uint1 ifp->if_link_state = p->if_link_state; - TRUNK_RLOCK(TRUNK(ifv)); + NET_EPOCH_ENTER(et); vlan_capabilities(ifv); - TRUNK_RUNLOCK(TRUNK(ifv)); + NET_EPOCH_EXIT(et); /* * Set up our interface address to reflect the underlying @@ -1587,14 +1586,15 @@ vlan_setflags(struct ifnet *ifp, int status) static void vlan_link_state(struct ifnet *ifp) { + struct epoch_tracker et; struct ifvlantrunk *trunk; struct ifvlan *ifv; /* Called from a taskqueue_swi task, so we cannot sleep. */ - VLAN_RLOCK(); + NET_EPOCH_ENTER(et); trunk = ifp->if_vlantrunk; if (trunk == NULL) { - VLAN_RUNLOCK(); + NET_EPOCH_EXIT(et); return; } @@ -1605,7 +1605,7 @@ vlan_link_state(struct ifnet *ifp) trunk->parent->if_link_state); } TRUNK_WUNLOCK(trunk); - VLAN_RUNLOCK(); + NET_EPOCH_EXIT(et); } static void @@ -1618,7 +1618,7 @@ vlan_capabilities(struct ifvlan *ifv) u_long hwa = 0; VLAN_SXLOCK_ASSERT(); - TRUNK_RLOCK_ASSERT(TRUNK(ifv)); + NET_EPOCH_ASSERT(); p = PARENT(ifv); ifp = ifv->ifv_ifp; @@ -1710,6 +1710,7 @@ vlan_capabilities(struct ifvlan *ifv) static void vlan_trunk_capabilities(struct ifnet *ifp) { + struct epoch_tracker et; struct ifvlantrunk *trunk; struct ifvlan *ifv; @@ -1719,11 +1720,11 @@ vlan_trunk_capabilities(struct ifnet *ifp) VLAN_SUNLOCK(); return; } - TRUNK_RLOCK(trunk); + NET_EPOCH_ENTER(et); VLAN_FOREACH(ifv, trunk) { vlan_capabilities(ifv); } - TRUNK_RUNLOCK(trunk); + NET_EPOCH_EXIT(et); VLAN_SUNLOCK(); } @@ -1915,9 +1916,11 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data ifv->ifv_capenable = ifr->ifr_reqcap; trunk = TRUNK(ifv); if (trunk != NULL) { - TRUNK_RLOCK(trunk); + struct epoch_tracker et; + + NET_EPOCH_ENTER(et); vlan_capabilities(ifv); - TRUNK_RUNLOCK(trunk); + NET_EPOCH_EXIT(et); } VLAN_SUNLOCK(); break; Modified: head/sys/net/route.c ============================================================================== --- head/sys/net/route.c Wed Jan 9 01:09:42 2019 (r342871) +++ head/sys/net/route.c Wed Jan 9 01:11:19 2019 (r342872) @@ -593,11 +593,12 @@ rtredirect_fib(struct sockaddr *dst, int error = 0; short *stat = NULL; struct rt_addrinfo info; + struct epoch_tracker et; struct ifaddr *ifa; struct rib_head *rnh; ifa = NULL; - NET_EPOCH_ENTER(); + NET_EPOCH_ENTER(et); rnh = rt_tables_get_rnh(fibnum, dst->sa_family); if (rnh == NULL) { error = EAFNOSUPPORT; @@ -692,7 +693,7 @@ done: if (rt) RTFREE_LOCKED(rt); out: - NET_EPOCH_EXIT(); + NET_EPOCH_EXIT(et); if (error) V_rtstat.rts_badredirect++; else if (stat != NULL) @@ -1279,6 +1280,7 @@ rt_notifydelete(struct rtentry *rt, struct rt_addrinfo int rt_getifa_fib(struct rt_addrinfo *info, u_int fibnum) { + struct epoch_tracker et; struct ifaddr *ifa; int needref, error; @@ -1288,7 +1290,7 @@ rt_getifa_fib(struct rt_addrinfo *info, u_int fibnum) */ error = 0; needref = (info->rti_ifa == NULL); - NET_EPOCH_ENTER(); + NET_EPOCH_ENTER(et); if (info->rti_ifp == NULL && ifpaddr != NULL && ifpaddr->sa_family == AF_LINK && (ifa = ifa_ifwithnet(ifpaddr, 0, fibnum)) != NULL) { @@ -1316,7 +1318,7 @@ rt_getifa_fib(struct rt_addrinfo *info, u_int fibnum) ifa_ref(info->rti_ifa); } else error = ENETUNREACH; - NET_EPOCH_EXIT(); + NET_EPOCH_EXIT(et); return (error); } Modified: head/sys/net/rtsock.c ============================================================================== --- head/sys/net/rtsock.c Wed Jan 9 01:09:42 2019 (r342871) +++ head/sys/net/rtsock.c Wed Jan 9 01:11:19 2019 (r342872) @@ -440,6 +440,9 @@ static int rtm_get_jailed(struct rt_addrinfo *info, struct ifnet *ifp, struct rtentry *rt, union sockaddr_union *saun, struct ucred *cred) { +#if defined(INET) || defined(INET6) + struct epoch_tracker et; +#endif /* First, see if the returned address is part of the jail. */ if (prison_if(cred, rt->rt_ifa->ifa_addr) == 0) { @@ -460,7 +463,7 @@ rtm_get_jailed(struct rt_addrinfo *info, struct ifnet * Try to find an address on the given outgoing interface * that belongs to the jail. */ - IF_ADDR_RLOCK(ifp); + NET_EPOCH_ENTER(et); CK_STAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { struct sockaddr *sa; sa = ifa->ifa_addr; @@ -472,7 +475,7 @@ rtm_get_jailed(struct rt_addrinfo *info, struct ifnet break; } } - IF_ADDR_RUNLOCK(ifp); + NET_EPOCH_EXIT(et); if (!found) { /* * As a last resort return the 'default' jail address. @@ -502,7 +505,7 @@ rtm_get_jailed(struct rt_addrinfo *info, struct ifnet * Try to find an address on the given outgoing interface * that belongs to the jail. */ - IF_ADDR_RLOCK(ifp); + NET_EPOCH_ENTER(et); CK_STAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { struct sockaddr *sa; sa = ifa->ifa_addr; @@ -515,7 +518,7 @@ rtm_get_jailed(struct rt_addrinfo *info, struct ifnet break; } } - IF_ADDR_RUNLOCK(ifp); + NET_EPOCH_EXIT(et); if (!found) { /* * As a last resort return the 'default' jail address. @@ -786,16 +789,17 @@ route_output(struct mbuf *m, struct socket *so, ...) if (rt->rt_ifp != NULL && rt->rt_ifp->if_type == IFT_PROPVIRTUAL) { + struct epoch_tracker et; struct ifaddr *ifa; - NET_EPOCH_ENTER(); + NET_EPOCH_ENTER(et); ifa = ifa_ifwithnet(info.rti_info[RTAX_DST], 1, RT_ALL_FIBS); if (ifa != NULL) rt_maskedcopy(ifa->ifa_addr, &laddr, ifa->ifa_netmask); - NET_EPOCH_EXIT(); + NET_EPOCH_EXIT(et); } else rt_maskedcopy(rt->rt_ifa->ifa_addr, &laddr, @@ -1559,7 +1563,7 @@ sysctl_dumpentry(struct radix_node *rn, void *vw) struct rt_addrinfo info; struct sockaddr_storage ss; - IFNET_RLOCK_NOSLEEP_ASSERT(); + NET_EPOCH_ASSERT(); if (w->w_op == NET_RT_FLAGS && !(rt->rt_flags & w->w_arg)) return 0; @@ -1753,7 +1757,7 @@ sysctl_iflist(int af, struct walkarg *w) bzero((caddr_t)&info, sizeof(info)); bzero(&ifd, sizeof(ifd)); - NET_EPOCH_ENTER_ET(et); + NET_EPOCH_ENTER(et); CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) { if (w->w_arg && w->w_arg != ifp->if_index) continue; @@ -1803,7 +1807,7 @@ sysctl_iflist(int af, struct walkarg *w) info.rti_info[RTAX_BRD] = NULL; } done: - NET_EPOCH_EXIT_ET(et); + NET_EPOCH_EXIT(et); return (error); } @@ -1811,6 +1815,7 @@ static int sysctl_ifmalist(int af, struct walkarg *w) { struct rt_addrinfo info; + struct epoch_tracker et; struct ifaddr *ifa; struct ifmultiaddr *ifma; struct ifnet *ifp; @@ -1819,13 +1824,13 @@ sysctl_ifmalist(int af, struct walkarg *w) error = 0; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Wed Jan 9 01:16:36 2019 Return-Path: Delivered-To: svn-src-head@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 C96151491686; Wed, 9 Jan 2019 01:16:36 +0000 (UTC) (envelope-from pjd@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 6E50494B6C; Wed, 9 Jan 2019 01:16:36 +0000 (UTC) (envelope-from pjd@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 573BACBF6; Wed, 9 Jan 2019 01:16:36 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x091GavX058037; Wed, 9 Jan 2019 01:16:36 GMT (envelope-from pjd@FreeBSD.org) Received: (from pjd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x091GaSZ058036; Wed, 9 Jan 2019 01:16:36 GMT (envelope-from pjd@FreeBSD.org) Message-Id: <201901090116.x091GaSZ058036@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pjd set sender to pjd@FreeBSD.org using -f From: Pawel Jakub Dawidek Date: Wed, 9 Jan 2019 01:16:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342873 - head/contrib/openbsm/libauditd X-SVN-Group: head X-SVN-Commit-Author: pjd X-SVN-Commit-Paths: head/contrib/openbsm/libauditd X-SVN-Commit-Revision: 342873 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6E50494B6C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.949,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2019 01:16:37 -0000 Author: pjd Date: Wed Jan 9 01:16:35 2019 New Revision: 342873 URL: https://svnweb.freebsd.org/changeset/base/342873 Log: In r316006 the getstrfromtype_locked() function was modified to return an empty string, instead of NULL, if an entry is missing in the audit_control file. Because of that change the getachost() function started to return success even if the host name was not defined in the audit_control. This in turn led to auditd_hostlen always being set (for an empty host it was set to 0). If auditd_hostlen was not equal to -1 we were trying to append the host name to trail file name. All this led to situation where when host name is not defined in audit_control, auditd will create trail files with a leading '.', which breaks auditdistd as it doesn't work with longer audit trail file names. Fix this by appending host name to the trail file name only if the host name is not empty. Modified: head/contrib/openbsm/libauditd/auditd_lib.c Modified: head/contrib/openbsm/libauditd/auditd_lib.c ============================================================================== --- head/contrib/openbsm/libauditd/auditd_lib.c Wed Jan 9 01:11:19 2019 (r342872) +++ head/contrib/openbsm/libauditd/auditd_lib.c Wed Jan 9 01:16:35 2019 (r342873) @@ -193,7 +193,7 @@ affixdir(char *name, struct dir_ent *dirent) /* * If the host is set then also add the hostname to the filename. */ - if (auditd_hostlen != -1) + if (auditd_hostlen > 0) asprintf(&fn, "%s/%s.%s", dirent->dirname, name, auditd_host); else asprintf(&fn, "%s/%s", dirent->dirname, name); From owner-svn-src-head@freebsd.org Wed Jan 9 02:47:08 2019 Return-Path: Delivered-To: svn-src-head@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 CE5F51493458; Wed, 9 Jan 2019 02:47:08 +0000 (UTC) (envelope-from kevans@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 75A719704B; Wed, 9 Jan 2019 02:47:08 +0000 (UTC) (envelope-from kevans@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 68A76DB13; Wed, 9 Jan 2019 02:47:08 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x092l830004582; Wed, 9 Jan 2019 02:47:08 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x092l8qA004581; Wed, 9 Jan 2019 02:47:08 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201901090247.x092l8qA004581@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 9 Jan 2019 02:47:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342874 - head/usr.bin/grep X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/usr.bin/grep X-SVN-Commit-Revision: 342874 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 75A719704B 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.998,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2019 02:47:09 -0000 Author: kevans Date: Wed Jan 9 02:47:07 2019 New Revision: 342874 URL: https://svnweb.freebsd.org/changeset/base/342874 Log: Fix bsdgrep manpage clobbering grep(1) with default build options The default build should install bsdgrep(1) and grep(1), with the latter being gnugrep(1). WITH_BSD_GREP flips this situation such that we have gnugrep(1) and grep(1), with the latter being bsdgrep(1). Changes to start installing the zgrep script out of usr.bin/grep inadvertently altered the default build such that grep(1) was being installed, and it was bsdgrep(1). Correct the typo. Reported by: bcran MFC after: 3 days Modified: head/usr.bin/grep/Makefile Modified: head/usr.bin/grep/Makefile ============================================================================== --- head/usr.bin/grep/Makefile Wed Jan 9 01:16:35 2019 (r342873) +++ head/usr.bin/grep/Makefile Wed Jan 9 02:47:07 2019 (r342874) @@ -10,7 +10,7 @@ MAN1= grep.1 zgrep.1 .else PROG= bsdgrep CLEANFILES+= bsdgrep.1 -MAN1= grep.1 zgrep.1 +MAN1= bsdgrep.1 zgrep.1 bsdgrep.1: grep.1 ${CP} ${.ALLSRC} ${.TARGET} From owner-svn-src-head@freebsd.org Wed Jan 9 03:55:26 2019 Return-Path: Delivered-To: svn-src-head@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 B8C8E14950DF; Wed, 9 Jan 2019 03:55:26 +0000 (UTC) (envelope-from cperciva@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 604F76ADE3; Wed, 9 Jan 2019 03:55:26 +0000 (UTC) (envelope-from cperciva@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 54D2FE7AA; Wed, 9 Jan 2019 03:55:26 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x093tQsM042316; Wed, 9 Jan 2019 03:55:26 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x093tQ8Q042315; Wed, 9 Jan 2019 03:55:26 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201901090355.x093tQ8Q042315@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Wed, 9 Jan 2019 03:55:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342875 - head/release/tools X-SVN-Group: head X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: head/release/tools X-SVN-Commit-Revision: 342875 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 604F76ADE3 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.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2019 03:55:26 -0000 Author: cperciva Date: Wed Jan 9 03:55:25 2019 New Revision: 342875 URL: https://svnweb.freebsd.org/changeset/base/342875 Log: Turn off ec2_ephemeralswap for now This script broke around FreeBSD 11.0 as a result of SWAPMETA no longer being reported by vmstat -z; but it also needs to be reworked due to the arrival in EC2 of nvme ephemeral disks. I'll turn this option back on after I've found time to rewrite the script in question. PR: 234686 Reported by: meta@ MFC after: 1 week Modified: head/release/tools/ec2.conf Modified: head/release/tools/ec2.conf ============================================================================== --- head/release/tools/ec2.conf Wed Jan 9 02:47:07 2019 (r342874) +++ head/release/tools/ec2.conf Wed Jan 9 03:55:25 2019 (r342875) @@ -9,7 +9,7 @@ export VM_EXTRA_PACKAGES="ec2-scripts firstboot-freebsd-update firstboot-pkgs dual-dhclient amazon-ssm-agent" # Set to a list of third-party software to enable in rc.conf(5). -export VM_RC_LIST="ec2_configinit ec2_fetchkey ec2_ephemeralswap ec2_loghostkey firstboot_freebsd_update firstboot_pkgs ntpd" +export VM_RC_LIST="ec2_configinit ec2_fetchkey ec2_loghostkey firstboot_freebsd_update firstboot_pkgs ntpd" # Build with a 3 GB UFS partition; the growfs rc.d script will expand # the partition to fill the root disk after the EC2 instance is launched. From owner-svn-src-head@freebsd.org Wed Jan 9 05:30:47 2019 Return-Path: Delivered-To: svn-src-head@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 1A7F9149736E; Wed, 9 Jan 2019 05:30:47 +0000 (UTC) (envelope-from delphij@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 B39F36DBFE; Wed, 9 Jan 2019 05:30:46 +0000 (UTC) (envelope-from delphij@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 A6FFAF72F; Wed, 9 Jan 2019 05:30:46 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x095Uk8q089703; Wed, 9 Jan 2019 05:30:46 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x095UkW7089702; Wed, 9 Jan 2019 05:30:46 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201901090530.x095UkW7089702@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 9 Jan 2019 05:30:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342876 - head/lib/liblzma X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/lib/liblzma X-SVN-Commit-Revision: 342876 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B39F36DBFE 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.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.984,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2019 05:30:47 -0000 Author: delphij Date: Wed Jan 9 05:30:46 2019 New Revision: 342876 URL: https://svnweb.freebsd.org/changeset/base/342876 Log: Enable use of Capsicum sandbox when there is only one input file (or the input is stdin) and we are not creating output file. Reported by: Lasse Collin MFC after: 1 month Modified: head/lib/liblzma/config.h Modified: head/lib/liblzma/config.h ============================================================================== --- head/lib/liblzma/config.h Wed Jan 9 03:55:25 2019 (r342875) +++ head/lib/liblzma/config.h Wed Jan 9 05:30:46 2019 (r342876) @@ -26,7 +26,7 @@ /* #undef HAVE_BYTESWAP_H */ /* Define to 1 if Capsicum is available. */ -/* #undef HAVE_CAPSICUM */ +#define HAVE_CAPSICUM 1 /* Define to 1 if the system has the type `CC_SHA256_CTX'. */ /* #undef HAVE_CC_SHA256_CTX */ @@ -261,7 +261,7 @@ /* #undef HAVE_SYS_BYTEORDER_H */ /* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_CAPSICUM_H */ +#define HAVE_SYS_CAPSICUM_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_ENDIAN_H 1 From owner-svn-src-head@freebsd.org Wed Jan 9 05:54:00 2019 Return-Path: Delivered-To: svn-src-head@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 0DF301497848; Wed, 9 Jan 2019 05:54:00 +0000 (UTC) (envelope-from glebius@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 A4E056E603; Wed, 9 Jan 2019 05:53:59 +0000 (UTC) (envelope-from glebius@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 92DF8FC16; Wed, 9 Jan 2019 05:53:59 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x095rx9q003923; Wed, 9 Jan 2019 05:53:59 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x095rxQB003922; Wed, 9 Jan 2019 05:53:59 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201901090553.x095rxQB003922@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 9 Jan 2019 05:53:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342877 - head/contrib/bsnmp/snmp_mibII X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/contrib/bsnmp/snmp_mibII X-SVN-Commit-Revision: 342877 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A4E056E603 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.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.984,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2019 05:54:00 -0000 Author: glebius Date: Wed Jan 9 05:53:59 2019 New Revision: 342877 URL: https://svnweb.freebsd.org/changeset/base/342877 Log: Timer interval is correctly counted in ticks (1/100 s) in mibif_reset_hc_timer(). Multiplication by 10 is erroneous and is probably a blind copy and paste from next function. PR: 132993 Submitted by: Vitezslav Novy Modified: head/contrib/bsnmp/snmp_mibII/mibII.c Modified: head/contrib/bsnmp/snmp_mibII/mibII.c ============================================================================== --- head/contrib/bsnmp/snmp_mibII/mibII.c Wed Jan 9 05:30:46 2019 (r342876) +++ head/contrib/bsnmp/snmp_mibII/mibII.c Wed Jan 9 05:53:59 2019 (r342877) @@ -411,7 +411,7 @@ mibif_reset_hc_timer(void) hc_update_timer = NULL; } update_hc_counters(NULL); - if ((hc_update_timer = timer_start_repeat(ticks * 10, ticks * 10, + if ((hc_update_timer = timer_start_repeat(ticks, ticks, update_hc_counters, NULL, module)) == NULL) { syslog(LOG_ERR, "timer_start(%u): %m", ticks); return; From owner-svn-src-head@freebsd.org Wed Jan 9 06:21:50 2019 Return-Path: Delivered-To: svn-src-head@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 7D90C14982BD; Wed, 9 Jan 2019 06:21:50 +0000 (UTC) (envelope-from imp@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 1F0196F430; Wed, 9 Jan 2019 06:21:50 +0000 (UTC) (envelope-from imp@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 115A1FFC4; Wed, 9 Jan 2019 06:21:50 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x096Ln0H016362; Wed, 9 Jan 2019 06:21:49 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x096Ln0U016361; Wed, 9 Jan 2019 06:21:49 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201901090621.x096Ln0U016361@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 9 Jan 2019 06:21:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342878 - head/sys/dev/usb/quirk X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/usb/quirk X-SVN-Commit-Revision: 342878 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1F0196F430 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.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.984,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2019 06:21:50 -0000 Author: imp Date: Wed Jan 9 06:21:49 2019 New Revision: 342878 URL: https://svnweb.freebsd.org/changeset/base/342878 Log: Add quirk for 128MB Creative Nomad. PR: 78984 Submitted by: Mark Kirkwood Modified: head/sys/dev/usb/quirk/usb_quirk.c Modified: head/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- head/sys/dev/usb/quirk/usb_quirk.c Wed Jan 9 05:53:59 2019 (r342877) +++ head/sys/dev/usb/quirk/usb_quirk.c Wed Jan 9 06:21:49 2019 (r342878) @@ -186,6 +186,8 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRK USB_QUIRK(CENTURY, EX35QUAT, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_FORCE_SHORT_INQ, UQ_MSC_NO_START_STOP, UQ_MSC_IGNORE_RESIDUE), + USB_QUIRK(CREATIVE, NOMAD, 0x0001, 0xffff, UQ_MSC_FORCE_WIRE_BBB, + UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_READ_CAP_OFFBY1), USB_QUIRK(CYPRESS, XX6830XX, 0x0000, 0xffff, UQ_MSC_NO_GETMAXLUN, UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(DESKNOTE, UCR_61S2B, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, From owner-svn-src-head@freebsd.org Wed Jan 9 06:36:58 2019 Return-Path: Delivered-To: svn-src-head@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 B72D414987C4; Wed, 9 Jan 2019 06:36:58 +0000 (UTC) (envelope-from tuexen@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 3094F6FAA8; Wed, 9 Jan 2019 06:36:58 +0000 (UTC) (envelope-from tuexen@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 1F51E182DE; Wed, 9 Jan 2019 06:36:58 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x096aviD024710; Wed, 9 Jan 2019 06:36:57 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x096av7Y024709; Wed, 9 Jan 2019 06:36:57 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201901090636.x096av7Y024709@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 9 Jan 2019 06:36:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342879 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 342879 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3094F6FAA8 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.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.984,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2019 06:36:58 -0000 Author: tuexen Date: Wed Jan 9 06:36:57 2019 New Revision: 342879 URL: https://svnweb.freebsd.org/changeset/base/342879 Log: Fix getsockopt() for IP_OPTIONS/IP_RETOPTS. r336616 copies inp->inp_options using the m_dup() function. However, this function expects an mbuf packet header at the beginning, which is not true in this case. Therefore, use m_copym() instead of m_dup(). This issue was found by syzkaller. Reviewed by: mmacy@ MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D18753 Modified: head/sys/netinet/ip_output.c Modified: head/sys/netinet/ip_output.c ============================================================================== --- head/sys/netinet/ip_output.c Wed Jan 9 06:21:49 2019 (r342878) +++ head/sys/netinet/ip_output.c Wed Jan 9 06:36:57 2019 (r342879) @@ -1263,7 +1263,8 @@ ip_ctloutput(struct socket *so, struct sockopt *sopt) if (inp->inp_options) { struct mbuf *options; - options = m_dup(inp->inp_options, M_NOWAIT); + options = m_copym(inp->inp_options, 0, + M_COPYALL, M_NOWAIT); INP_RUNLOCK(inp); if (options != NULL) { error = sooptcopyout(sopt, From owner-svn-src-head@freebsd.org Wed Jan 9 09:36:55 2019 Return-Path: Delivered-To: svn-src-head@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 835C0149CF82; Wed, 9 Jan 2019 09:36: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 2963175585; Wed, 9 Jan 2019 09:36: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 187F81A116; Wed, 9 Jan 2019 09:36: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 x099asqr018627; Wed, 9 Jan 2019 09:36:54 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x099as4S018624; Wed, 9 Jan 2019 09:36:54 GMT (envelope-from des@FreeBSD.org) Message-Id: <201901090936.x099as4S018624@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: Wed, 9 Jan 2019 09:36:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342880 - in head/bin/sh: . tests/expansion X-SVN-Group: head X-SVN-Commit-Author: des X-SVN-Commit-Paths: in head/bin/sh: . tests/expansion X-SVN-Commit-Revision: 342880 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2963175585 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.998,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2019 09:36:55 -0000 Author: des Date: Wed Jan 9 09:36:54 2019 New Revision: 342880 URL: https://svnweb.freebsd.org/changeset/base/342880 Log: Fix an edge case when parsing large numbers which resulted in inconsistent results between an expression that refers to a variable by name and the same expression that includes the same variable by value. Submitted by: se@ MFC after: 1 week Added: head/bin/sh/tests/expansion/arith15.0 (contents, props changed) Modified: head/bin/sh/shell.h head/bin/sh/tests/expansion/Makefile Modified: head/bin/sh/shell.h ============================================================================== --- head/bin/sh/shell.h Wed Jan 9 06:36:57 2019 (r342879) +++ head/bin/sh/shell.h Wed Jan 9 09:36:54 2019 (r342880) @@ -59,8 +59,7 @@ */ typedef intmax_t arith_t; #define ARITH_FORMAT_STR "%" PRIdMAX -#define atoarith_t(arg) strtoimax(arg, NULL, 0) -#define strtoarith_t(nptr, endptr, base) strtoimax(nptr, endptr, base) +#define strtoarith_t(nptr, endptr, base) (intmax_t)strtoumax(nptr, endptr, base) #define ARITH_MIN INTMAX_MIN #define ARITH_MAX INTMAX_MAX Modified: head/bin/sh/tests/expansion/Makefile ============================================================================== --- head/bin/sh/tests/expansion/Makefile Wed Jan 9 06:36:57 2019 (r342879) +++ head/bin/sh/tests/expansion/Makefile Wed Jan 9 09:36:54 2019 (r342880) @@ -21,6 +21,7 @@ ${PACKAGE}FILES+= arith11.0 ${PACKAGE}FILES+= arith12.0 ${PACKAGE}FILES+= arith13.0 ${PACKAGE}FILES+= arith14.0 +${PACKAGE}FILES+= arith15.0 ${PACKAGE}FILES+= assign1.0 ${PACKAGE}FILES+= cmdsubst1.0 ${PACKAGE}FILES+= cmdsubst2.0 Added: head/bin/sh/tests/expansion/arith15.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/expansion/arith15.0 Wed Jan 9 09:36:54 2019 (r342880) @@ -0,0 +1,20 @@ +# $FreeBSD$ + +failures=0 + +check() { + if [ $(($1)) != $2 ]; then + failures=$((failures+1)) + echo "For $1, expected $2 actual $(($1))" + fi +} + +XXX=-9223372036854775808 +check "XXX" -9223372036854775808 +check "XXX - 1" 9223372036854775807 +check $(($XXX - 1)) 9223372036854775807 +check $(($XXX - 2)) 9223372036854775806 +check $((0x8000000000000000 == 0x7fffffffffffffff)) \ + 0 + +exit $((failures != 0)) From owner-svn-src-head@freebsd.org Wed Jan 9 11:04:28 2019 Return-Path: Delivered-To: svn-src-head@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 94F06149F6C5; Wed, 9 Jan 2019 11:04:28 +0000 (UTC) (envelope-from trasz@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 369BB80DF3; Wed, 9 Jan 2019 11:04:28 +0000 (UTC) (envelope-from trasz@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 25C641B0BE; Wed, 9 Jan 2019 11:04:28 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x09B4Sd9065657; Wed, 9 Jan 2019 11:04:28 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x09B4SVZ065656; Wed, 9 Jan 2019 11:04:28 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201901091104.x09B4SVZ065656@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 9 Jan 2019 11:04:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342881 - head/share/skel X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/share/skel X-SVN-Commit-Revision: 342881 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 369BB80DF3 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.94)[-0.941,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2019 11:04:28 -0000 Author: trasz Date: Wed Jan 9 11:04:27 2019 New Revision: 342881 URL: https://svnweb.freebsd.org/changeset/base/342881 Log: Make sh(1) recognize the default $HOME. By default /home is a symlink; without this change, when you log in, sh(1) won't realize the current directory (eg '/usr/home/test') is the same as $HOME ('/home/test'). Reviewed by: jilles MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D18775 Modified: head/share/skel/dot.profile Modified: head/share/skel/dot.profile ============================================================================== --- head/share/skel/dot.profile Wed Jan 9 09:36:54 2019 (r342880) +++ head/share/skel/dot.profile Wed Jan 9 11:04:27 2019 (r342881) @@ -21,6 +21,9 @@ PAGER=less; export PAGER # set ENV to a file invoked each time sh is started for interactive use. ENV=$HOME/.shrc; export ENV +# Let sh(1) know it's at home, despite /home being a symlink. +if [ "$PWD" != "$HOME" ] && [ "$PWD" -ef "$HOME" ] ; then cd ; fi + # Query terminal size; useful for serial lines. if [ -x /usr/bin/resizewin ] ; then /usr/bin/resizewin -z ; fi From owner-svn-src-head@freebsd.org Wed Jan 9 11:13:06 2019 Return-Path: Delivered-To: svn-src-head@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 0F2CE149FB6D; Wed, 9 Jan 2019 11:13:06 +0000 (UTC) (envelope-from arichardson@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 A85D681533; Wed, 9 Jan 2019 11:13:05 +0000 (UTC) (envelope-from arichardson@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 9C4371B282; Wed, 9 Jan 2019 11:13:05 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x09BD5ef070824; Wed, 9 Jan 2019 11:13:05 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x09BD5Od070823; Wed, 9 Jan 2019 11:13:05 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <201901091113.x09BD5Od070823@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Wed, 9 Jan 2019 11:13:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342882 - head/gnu/usr.bin/binutils/ld X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head/gnu/usr.bin/binutils/ld X-SVN-Commit-Revision: 342882 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A85D681533 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.94)[-0.941,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2019 11:13:06 -0000 Author: arichardson Date: Wed Jan 9 11:13:05 2019 New Revision: 342882 URL: https://svnweb.freebsd.org/changeset/base/342882 Log: Avoid bsd.files.mk duplicate rule warning for bfd ldscripts Without this change I get lots of warning: duplicate script for target "_FILESINS_ldscripts/elf64btsmip_fbsd.xw" ignored message for every tree walk. Reviewed By: imp, emaste Differential Revision: https://reviews.freebsd.org/D18783 Modified: head/gnu/usr.bin/binutils/ld/Makefile head/gnu/usr.bin/binutils/ld/Makefile.mips Modified: head/gnu/usr.bin/binutils/ld/Makefile ============================================================================== --- head/gnu/usr.bin/binutils/ld/Makefile Wed Jan 9 11:04:27 2019 (r342881) +++ head/gnu/usr.bin/binutils/ld/Makefile Wed Jan 9 11:13:05 2019 (r342882) @@ -63,6 +63,9 @@ FILESDIR= ${SCRIPTDIR} HOST= ${TARGET_TUPLE} LIBSEARCHPATH= \"=/lib\":\"=/usr/lib\" .for ext in ${ELF_SCR_EXT} +.if !empty(LDSCRIPTS) && ${LDSCRIPTS:M${NATIVE_EMULATION}.${ext}} != "" +.error "NATIVE_EMULATION scripts were added to LDSCRIPTS: ${LDSCRIPTS:M${NATIVE_EMULATION}.${ext}}" +.endif LDSCRIPTS+= ${NATIVE_EMULATION}.${ext} ldscripts/${NATIVE_EMULATION}.${ext}: e${NATIVE_EMULATION}.c .endfor Modified: head/gnu/usr.bin/binutils/ld/Makefile.mips ============================================================================== --- head/gnu/usr.bin/binutils/ld/Makefile.mips Wed Jan 9 11:04:27 2019 (r342881) +++ head/gnu/usr.bin/binutils/ld/Makefile.mips Wed Jan 9 11:13:05 2019 (r342882) @@ -18,14 +18,14 @@ NATIVE_EMULATION?=elf32${_EMULATION_ENDIAN}tsmip_fbsd MIPS_ABIS=elf32btsmip_fbsd elf32ltsmip_fbsd elf64btsmip_fbsd elf64ltsmip_fbsd \ elf32btsmipn32_fbsd elf32ltsmipn32_fbsd .for abi in ${MIPS_ABIS} -#.if (${abi} != ${NATIVE_EMULATION}) EMS+= ${abi} -#.endif +.if ${abi} != ${NATIVE_EMULATION} .for ext in ${ELF_SCR_EXT} LDSCRIPTS+= ${abi}.${ext} ldscripts/${abi}.${ext}: e${abi}.c .endfor -SRCS+= e${abi}.c +.endif +SRCS+= e${abi}.c CLEANFILES+= e${abi}.c # nb: elf32 handles both elf32 and elf64 targets e${abi}.c: ${.CURDIR}/${abi}.sh emultempl/elf32.em \ From owner-svn-src-head@freebsd.org Wed Jan 9 12:50:25 2019 Return-Path: Delivered-To: svn-src-head@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 DE93314A2471; Wed, 9 Jan 2019 12:50:25 +0000 (UTC) (envelope-from avos@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 80E6884A0A; Wed, 9 Jan 2019 12:50:25 +0000 (UTC) (envelope-from avos@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 6E2DF1C254; Wed, 9 Jan 2019 12:50:25 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x09CoPTe018908; Wed, 9 Jan 2019 12:50:25 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x09CoPi2018907; Wed, 9 Jan 2019 12:50:25 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201901091250.x09CoPi2018907@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Wed, 9 Jan 2019 12:50:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342883 - head/sys/net80211 X-SVN-Group: head X-SVN-Commit-Author: avos X-SVN-Commit-Paths: head/sys/net80211 X-SVN-Commit-Revision: 342883 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 80E6884A0A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.957,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2019 12:50:26 -0000 Author: avos Date: Wed Jan 9 12:50:24 2019 New Revision: 342883 URL: https://svnweb.freebsd.org/changeset/base/342883 Log: net80211: fix panic when device is removed during initialization if_dead() is called during device detach - check if interface is still exists before trying to refresh vap MAC address (IF_LLADDR will trigger page fault otherwise). MFC after: 5 days Modified: head/sys/net80211/ieee80211_ioctl.c Modified: head/sys/net80211/ieee80211_ioctl.c ============================================================================== --- head/sys/net80211/ieee80211_ioctl.c Wed Jan 9 11:13:05 2019 (r342882) +++ head/sys/net80211/ieee80211_ioctl.c Wed Jan 9 12:50:24 2019 (r342883) @@ -3537,9 +3537,13 @@ ieee80211_ioctl(struct ifnet *ifp, u_long cmd, caddr_t /* * Check if the MAC address was changed * via SIOCSIFLLADDR ioctl. + * + * NB: device may be detached during initialization; + * use if_ioctl for existence check. */ if_addr_rlock(ifp); - if ((ifp->if_flags & IFF_UP) == 0 && + if (ifp->if_ioctl == ieee80211_ioctl && + (ifp->if_flags & IFF_UP) == 0 && !IEEE80211_ADDR_EQ(vap->iv_myaddr, IF_LLADDR(ifp))) IEEE80211_ADDR_COPY(vap->iv_myaddr, IF_LLADDR(ifp)); From owner-svn-src-head@freebsd.org Wed Jan 9 13:00:21 2019 Return-Path: Delivered-To: svn-src-head@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 E674014A2910; Wed, 9 Jan 2019 13:00:20 +0000 (UTC) (envelope-from andriyvos@gmail.com) Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5FE2E851E3; Wed, 9 Jan 2019 13:00:20 +0000 (UTC) (envelope-from andriyvos@gmail.com) Received: by mail-lf1-f43.google.com with SMTP id y14so5536722lfg.13; Wed, 09 Jan 2019 05:00:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:subject:references:date:mime-version :content-transfer-encoding:from:message-id:in-reply-to:user-agent; bh=1TK0AAolir/bJxPnq1XhMRbos5mH5JdJY+ANtvxSTKk=; b=sFUUyHF9StmV50xVWTNYX0oGnE9z/MH5bO+zvCFUYfTlhnCnZmax0kR1FWRoz11Liy Z1FJ6Ui+lfHC6jHYLKgM0JPIDuQ64a8uHIu7EwMnKCnNejrHnVjaGR68+6v2Ia5haNuE dJp9Un2RoizCWoy3bbOs+uANw9GEHKYPM6lF6H3iHVAoVVlytVRihox1MxAK8e2qy6jB lW+OTkPvFqCmDYKHGhXEp0aac1F/BG0m18Y5E8yTwP4CCFwVxIYRW4XbFWngX93VR9OP w0oc6lO0SwCnCTLmaqJkcv0KjeBhN6HAeNPzkm/ZOitunz/vczKvg7UP9EixLeHk/vJK CQ7w== X-Gm-Message-State: AJcUukevrRo0VXnUKU2yEPFnj6AyoG09lhGx/y6ZwujwXOQW7FsZn20a IivBJ0g/u0DUinMvf5UZ2gLzp4SU X-Google-Smtp-Source: ALg8bN5CnZugik9R1ROsPkL7tecaWhalyzSbBpaS/1Em7f67nYq8oVMzBNVsYzc6XhqJXt98kX0fGw== X-Received: by 2002:a19:db54:: with SMTP id s81mr3735927lfg.102.1547038812317; Wed, 09 Jan 2019 05:00:12 -0800 (PST) Received: from localhost (46-133-48-215.dialup.umc.net.ua. [46.133.48.215]) by smtp.gmail.com with ESMTPSA id c15-v6sm443710ljf.76.2019.01.09.05.00.09 (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 09 Jan 2019 05:00:10 -0800 (PST) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r342883 - head/sys/net80211 References: <201901091250.x09CoPi2018907@repo.freebsd.org> Date: Wed, 09 Jan 2019 12:59:47 +0200 MIME-Version: 1.0 Content-Transfer-Encoding: Base64 From: "Andriy Voskoboinyk" Message-ID: In-Reply-To: <201901091250.x09CoPi2018907@repo.freebsd.org> User-Agent: Opera Mail/12.15 (FreeBSD) X-Rspamd-Queue-Id: 5FE2E851E3 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.96)[-0.959,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2019 13:00:21 -0000 V2VkLCAwOSBKYW4gMjAxOSAxNDo1MDoyNSArMDIwMCDQsdGD0LvQviDQvdCw0L/Q uNGB0LDQvdC+IEFuZHJpeSBWb3Nrb2JvaW55ayAgDQo8YXZvc0BmcmVlYnNkLm9y Zz46DQoNClRlc3RlZCB3aXRoOglBc3VzIFVTQi1OMTAgKHJzdSg0KSksIFNUQSBt b2RlLg== From owner-svn-src-head@freebsd.org Wed Jan 9 14:28:09 2019 Return-Path: Delivered-To: svn-src-head@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 36FAB14815F9; Wed, 9 Jan 2019 14:28:09 +0000 (UTC) (envelope-from hselasky@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 CCDA88805D; Wed, 9 Jan 2019 14:28:08 +0000 (UTC) (envelope-from hselasky@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 BF7F21D387; Wed, 9 Jan 2019 14:28:08 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x09ES8sS070615; Wed, 9 Jan 2019 14:28:08 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x09ES8BD070614; Wed, 9 Jan 2019 14:28:08 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201901091428.x09ES8BD070614@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 9 Jan 2019 14:28:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342884 - head/sys/netinet6 X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/netinet6 X-SVN-Commit-Revision: 342884 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CCDA88805D 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)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2019 14:28:09 -0000 Author: hselasky Date: Wed Jan 9 14:28:08 2019 New Revision: 342884 URL: https://svnweb.freebsd.org/changeset/base/342884 Log: Fix loopback traffic when using non-lo0 link local IPv6 addresses. The loopback interface can only receive packets with a single scope ID, namely the scope ID of the loopback interface itself. To mitigate this packets which use the scope ID are appearing as received by the real network interface, see "origifp" in the patch. The current code would drop packets which are designated for loopback which use a link-local scope ID in the destination address or source address, because they won't match the lo0's scope ID. To fix this restore the network interface pointer from the scope ID in the destination address for the problematic cases. See comments added in patch for a more detailed description. This issue was introduced with route caching (ae@). Reviewed by: bz (network) Differential Revision: https://reviews.freebsd.org/D18769 MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/netinet6/ip6_output.c Modified: head/sys/netinet6/ip6_output.c ============================================================================== --- head/sys/netinet6/ip6_output.c Wed Jan 9 12:50:24 2019 (r342883) +++ head/sys/netinet6/ip6_output.c Wed Jan 9 14:28:08 2019 (r342884) @@ -571,52 +571,72 @@ again: counter_u64_add(rt->rt_pksent, 1); } - - /* - * The outgoing interface must be in the zone of source and - * destination addresses. - */ - origifp = ifp; - + /* Setup data structures for scope ID checks. */ src0 = ip6->ip6_src; - if (in6_setscope(&src0, origifp, &zone)) - goto badscope; bzero(&src_sa, sizeof(src_sa)); src_sa.sin6_family = AF_INET6; src_sa.sin6_len = sizeof(src_sa); src_sa.sin6_addr = ip6->ip6_src; - if (sa6_recoverscope(&src_sa) || zone != src_sa.sin6_scope_id) - goto badscope; dst0 = ip6->ip6_dst; - if (in6_setscope(&dst0, origifp, &zone)) - goto badscope; /* re-initialize to be sure */ bzero(&dst_sa, sizeof(dst_sa)); dst_sa.sin6_family = AF_INET6; dst_sa.sin6_len = sizeof(dst_sa); dst_sa.sin6_addr = ip6->ip6_dst; - if (sa6_recoverscope(&dst_sa) || zone != dst_sa.sin6_scope_id) { - goto badscope; - } - /* We should use ia_ifp to support the case of - * sending packets to an address of our own. - */ - if (ia != NULL && ia->ia_ifp) - ifp = ia->ia_ifp; + /* Check for valid scope ID. */ + if (in6_setscope(&src0, ifp, &zone) == 0 && + sa6_recoverscope(&src_sa) == 0 && zone == src_sa.sin6_scope_id && + in6_setscope(&dst0, ifp, &zone) == 0 && + sa6_recoverscope(&dst_sa) == 0 && zone == dst_sa.sin6_scope_id) { + /* + * The outgoing interface is in the zone of the source + * and destination addresses. + * + * Because the loopback interface cannot receive + * packets with a different scope ID than its own, + * there is a trick is to pretend the outgoing packet + * was received by the real network interface, by + * setting "origifp" different from "ifp". This is + * only allowed when "ifp" is a loopback network + * interface. Refer to code in nd6_output_ifp() for + * more details. + */ + origifp = ifp; + + /* + * We should use ia_ifp to support the case of sending + * packets to an address of our own. + */ + if (ia != NULL && ia->ia_ifp) + ifp = ia->ia_ifp; - /* scope check is done. */ - goto routefound; + } else if ((ifp->if_flags & IFF_LOOPBACK) == 0 || + sa6_recoverscope(&src_sa) != 0 || + sa6_recoverscope(&dst_sa) != 0 || + dst_sa.sin6_scope_id == 0 || + (src_sa.sin6_scope_id != 0 && + src_sa.sin6_scope_id != dst_sa.sin6_scope_id) || + (origifp = ifnet_byindex(dst_sa.sin6_scope_id)) == NULL) { + /* + * If the destination network interface is not a + * loopback interface, or the destination network + * address has no scope ID, or the source address has + * a scope ID set which is different from the + * destination address one, or there is no network + * interface representing this scope ID, the address + * pair is considered invalid. + */ + IP6STAT_INC(ip6s_badscope); + in6_ifstat_inc(ifp, ifs6_out_discard); + if (error == 0) + error = EHOSTUNREACH; /* XXX */ + goto bad; + } - badscope: - IP6STAT_INC(ip6s_badscope); - in6_ifstat_inc(origifp, ifs6_out_discard); - if (error == 0) - error = EHOSTUNREACH; /* XXX */ - goto bad; + /* All scope ID checks are successful. */ - routefound: if (rt && !IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { if (opt && opt->ip6po_nextroute.ro_rt) { /* From owner-svn-src-head@freebsd.org Wed Jan 9 14:54:30 2019 Return-Path: Delivered-To: svn-src-head@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 863111482600; Wed, 9 Jan 2019 14:54:30 +0000 (UTC) (envelope-from vmaffione@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 1D0198A0DB; Wed, 9 Jan 2019 14:54:30 +0000 (UTC) (envelope-from vmaffione@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 2CB0F1D8D0; Wed, 9 Jan 2019 14:54:25 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x09EsP1g088491; Wed, 9 Jan 2019 14:54:25 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x09EsPCS088490; Wed, 9 Jan 2019 14:54:25 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <201901091454.x09EsPCS088490@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Wed, 9 Jan 2019 14:54:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342885 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 342885 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1D0198A0DB 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.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2019 14:54:30 -0000 Author: vmaffione Date: Wed Jan 9 14:54:24 2019 New Revision: 342885 URL: https://svnweb.freebsd.org/changeset/base/342885 Log: netmap: fix sysctl variable in vale(4) PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212333 MFC after: 3 days Modified: head/share/man/man4/vale.4 Modified: head/share/man/man4/vale.4 ============================================================================== --- head/share/man/man4/vale.4 Wed Jan 9 14:28:08 2019 (r342884) +++ head/share/man/man4/vale.4 Wed Jan 9 14:54:24 2019 (r342885) @@ -28,7 +28,7 @@ .\" $FreeBSD$ .\" $Id: $ .\" -.Dd July 27, 2012 +.Dd Jan 9, 2019 .Dt VALE 4 .Os .Sh NAME @@ -85,7 +85,7 @@ changed to sysctl variables in future releases. .Nm uses the following sysctl variables to control operation: .Bl -tag -width dev.netmap.verbose -.It dev.netmap.bridge +.It dev.netmap.bridge_batch The maximum number of packets processed internally in each iteration. Defaults to 1024, use lower values to trade latency From owner-svn-src-head@freebsd.org Wed Jan 9 15:03:55 2019 Return-Path: Delivered-To: svn-src-head@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 2DE5E14829E6; Wed, 9 Jan 2019 15:03:55 +0000 (UTC) (envelope-from vmaffione@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 C667E8AB0E; Wed, 9 Jan 2019 15:03:54 +0000 (UTC) (envelope-from vmaffione@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 B5FBE1DA99; Wed, 9 Jan 2019 15:03:54 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x09F3sb4093883; Wed, 9 Jan 2019 15:03:54 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x09F3s4r093882; Wed, 9 Jan 2019 15:03:54 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <201901091503.x09F3s4r093882@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Wed, 9 Jan 2019 15:03:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342886 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 342886 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C667E8AB0E 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.965,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2019 15:03:55 -0000 Author: vmaffione Date: Wed Jan 9 15:03:54 2019 New Revision: 342886 URL: https://svnweb.freebsd.org/changeset/base/342886 Log: netmap: fix bridge example in netmap(4) PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194872 Reported by: adrian MFC after: 3 days Modified: head/share/man/man4/netmap.4 Modified: head/share/man/man4/netmap.4 ============================================================================== --- head/share/man/man4/netmap.4 Wed Jan 9 14:54:24 2019 (r342885) +++ head/share/man/man4/netmap.4 Wed Jan 9 15:03:54 2019 (r342886) @@ -981,9 +981,9 @@ is another test program which interconnects two ports. It can be used for transparent forwarding between interfaces, as in -.Dl bridge -i ix0 -i ix1 +.Dl bridge -i netmap:ix0 -i netmap:ix1 or even connect the NIC to the host stack using netmap -.Dl bridge -i ix0 -i ix0 +.Dl bridge -i netmap:ix0 .Ss USING THE NATIVE API The following code implements a traffic generator .Pp From owner-svn-src-head@freebsd.org Wed Jan 9 16:41:44 2019 Return-Path: Delivered-To: svn-src-head@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 E2C24148682A; Wed, 9 Jan 2019 16:41:43 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DAAC3680B5; Wed, 9 Jan 2019 16:41:42 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x09Gfc58009117; Wed, 9 Jan 2019 08:41:38 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id x09Gfcc3009116; Wed, 9 Jan 2019 08:41:38 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201901091641.x09Gfcc3009116@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r342881 - head/share/skel In-Reply-To: <201901091104.x09B4SVZ065656@repo.freebsd.org> To: Edward Tomasz Napierala Date: Wed, 9 Jan 2019 08:41:38 -0800 (PST) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: DAAC3680B5 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.93 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.93)[-0.927,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2019 16:41:44 -0000 > Author: trasz > Date: Wed Jan 9 11:04:27 2019 > New Revision: 342881 > URL: https://svnweb.freebsd.org/changeset/base/342881 > > Log: > Make sh(1) recognize the default $HOME. By default /home > is a symlink; without this change, when you log in, sh(1) > won't realize the current directory (eg '/usr/home/test') > is the same as $HOME ('/home/test'). Arguably it shouldnt know any of that. Or that $Home is ~ either I hate that if I "cd home" and there is not a directory where I am at called home it takes me to ~/$home,s that also has caused a few script debugging to be a royal Pita having to force ./$variable to stop home from being treated special. > > Reviewed by: jilles > MFC after: 2 weeks > Sponsored by: DARPA, AFRL > Differential Revision: https://reviews.freebsd.org/D18775 > > Modified: > head/share/skel/dot.profile > > Modified: head/share/skel/dot.profile > ============================================================================== > --- head/share/skel/dot.profile Wed Jan 9 09:36:54 2019 (r342880) > +++ head/share/skel/dot.profile Wed Jan 9 11:04:27 2019 (r342881) > @@ -21,6 +21,9 @@ PAGER=less; export PAGER > # set ENV to a file invoked each time sh is started for interactive use. > ENV=$HOME/.shrc; export ENV > > +# Let sh(1) know it's at home, despite /home being a symlink. > +if [ "$PWD" != "$HOME" ] && [ "$PWD" -ef "$HOME" ] ; then cd ; fi > + > # Query terminal size; useful for serial lines. > if [ -x /usr/bin/resizewin ] ; then /usr/bin/resizewin -z ; fi > > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Wed Jan 9 16:47:17 2019 Return-Path: Delivered-To: svn-src-head@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 204761486B53; Wed, 9 Jan 2019 16:47:17 +0000 (UTC) (envelope-from markj@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 A94C768563; Wed, 9 Jan 2019 16:47:16 +0000 (UTC) (envelope-from markj@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 9A6511EB9F; Wed, 9 Jan 2019 16:47:16 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x09GlG1F047301; Wed, 9 Jan 2019 16:47:16 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x09GlGuk047300; Wed, 9 Jan 2019 16:47:16 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201901091647.x09GlGuk047300@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 9 Jan 2019 16:47:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342887 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 342887 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A94C768563 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.947,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2019 16:47:17 -0000 Author: markj Date: Wed Jan 9 16:47:16 2019 New Revision: 342887 URL: https://svnweb.freebsd.org/changeset/base/342887 Log: Stop setting if_linkmib in vlan(4) ifnets. There are several reasons: - The structure being exported via IFDATA_LINKSPECIFIC doesn't appear to be a standard MIB. - The structure being exported is private to the kernel and always has been. - No other drivers in common use set the if_linkmib field. - Because IFDATA_LINKSPECIFIC can be used to overwrite the linkmib structure, a privileged user could use it to corrupt internal vlan(4) state. [1] PR: 219472 Reported by: CTurt [1] Reviewed by: kp (previous version) MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D18779 Modified: head/sys/net/if_vlan.c Modified: head/sys/net/if_vlan.c ============================================================================== --- head/sys/net/if_vlan.c Wed Jan 9 15:03:54 2019 (r342886) +++ head/sys/net/if_vlan.c Wed Jan 9 16:47:16 2019 (r342887) @@ -156,7 +156,7 @@ struct vlan_mc_entry { struct epoch_context mc_epoch_ctx; }; -struct ifvlan { +struct ifvlan { struct ifvlantrunk *ifv_trunk; struct ifnet *ifv_ifp; #define TRUNK(ifv) ((ifv)->ifv_trunk) @@ -164,28 +164,19 @@ struct ifvlan { void *ifv_cookie; int ifv_pflags; /* special flags we have set on parent */ int ifv_capenable; - struct ifv_linkmib { - int ifvm_encaplen; /* encapsulation length */ - int ifvm_mtufudge; /* MTU fudged by this much */ - int ifvm_mintu; /* min transmission unit */ - uint16_t ifvm_proto; /* encapsulation ethertype */ - uint16_t ifvm_tag; /* tag to apply on packets leaving if */ - uint16_t ifvm_vid; /* VLAN ID */ - uint8_t ifvm_pcp; /* Priority Code Point (PCP). */ - } ifv_mib; + int ifv_encaplen; /* encapsulation length */ + int ifv_mtufudge; /* MTU fudged by this much */ + int ifv_mintu; /* min transmission unit */ + uint16_t ifv_proto; /* encapsulation ethertype */ + uint16_t ifv_tag; /* tag to apply on packets leaving if */ + uint16_t ifv_vid; /* VLAN ID */ + uint8_t ifv_pcp; /* Priority Code Point (PCP). */ struct task lladdr_task; CK_SLIST_HEAD(, vlan_mc_entry) vlan_mc_listhead; #ifndef VLAN_ARRAY CK_SLIST_ENTRY(ifvlan) ifv_list; #endif }; -#define ifv_proto ifv_mib.ifvm_proto -#define ifv_tag ifv_mib.ifvm_tag -#define ifv_vid ifv_mib.ifvm_vid -#define ifv_pcp ifv_mib.ifvm_pcp -#define ifv_encaplen ifv_mib.ifvm_encaplen -#define ifv_mtufudge ifv_mib.ifvm_mtufudge -#define ifv_mintu ifv_mib.ifvm_mintu /* Special flags we should propagate to parent. */ static struct { @@ -1049,10 +1040,6 @@ vlan_clone_create(struct if_clone *ifc, char *name, si strlcpy(ifp->if_xname, name, IFNAMSIZ); ifp->if_dname = vlanname; ifp->if_dunit = unit; - /* NB: flags are not set here */ - ifp->if_linkmib = &ifv->ifv_mib; - ifp->if_linkmiblen = sizeof(ifv->ifv_mib); - /* NB: mtu is not set here */ ifp->if_init = vlan_init; ifp->if_transmit = vlan_transmit; From owner-svn-src-head@freebsd.org Wed Jan 9 17:05:23 2019 Return-Path: Delivered-To: svn-src-head@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 64B701487601; Wed, 9 Jan 2019 17:05:23 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-oi1-f170.google.com (mail-oi1-f170.google.com [209.85.167.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F09086A856; Wed, 9 Jan 2019 17:05:22 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-oi1-f170.google.com with SMTP id y1so6851717oie.12; Wed, 09 Jan 2019 09:05:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=U31Ar9eqq2K6Hzh4pTsKC/w2QPDVrgDmdxehBhjZPqI=; b=CPvr61lB1AgxSM3mdTIjdhgyH6GMJoDIsAZ4vpKcEBBZo3qfy53xXrgBwXvQwPhIaL /B2S9ew8dkEV9zWtSDMUmuZR+xkBSZNqlhhXxO9KjHygrUVlU2kEOu+y6B74PnWnzf5Z lTkSqYHrH6k4kujV6jM6lOwg4aznnTzSXms9xfULwKtDa6R5M440Ao/c9KST8QdoXVaE d309VK6uDipkTQoAT0cNIgFQ/0YBm/qfUakWr4s1x+A6egRDQDXvWEOtEiybzld4CGCM Bvuh4jgi16tFFqQhokC14J3RLXb5R9d8+OmrDXoplXSNMd37NIgWcndn3H01ZOu93+H5 sHag== X-Gm-Message-State: AJcUukeh2MiicI98Dl0CcVkWP9uOJDj+dQDMHypqQHatIIPuEJuxgPi5 uTv++6NRaBjyuHaUN0u6Ahcvyb5JAgv5iUvzv+32kw== X-Google-Smtp-Source: ALg8bN6Fgfo4ycWsJ+motv7GNuUGDxNY0a1vl1fYMACYkf0SYo9OqUwHzNB4tqh3MH/NaK58EnNUKEDP6fXgddCdOjc= X-Received: by 2002:aca:50cf:: with SMTP id e198mr4553116oib.343.1547053085274; Wed, 09 Jan 2019 08:58:05 -0800 (PST) MIME-Version: 1.0 References: <201901091104.x09B4SVZ065656@repo.freebsd.org> <201901091641.x09Gfcc3009116@pdx.rh.CN85.dnsmgr.net> In-Reply-To: <201901091641.x09Gfcc3009116@pdx.rh.CN85.dnsmgr.net> From: Edward Napierala Date: Wed, 9 Jan 2019 16:57:53 +0000 Message-ID: Subject: Re: svn commit: r342881 - head/share/skel To: rgrimes@freebsd.org Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: F09086A856 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.90 / 15.00]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.90)[-0.898,0]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2019 17:05:23 -0000 =C5=9Br., 9 sty 2019 o 16:41 Rodney W. Grimes napisa=C5=82(a): > > > Author: trasz > > Date: Wed Jan 9 11:04:27 2019 > > New Revision: 342881 > > URL: https://svnweb.freebsd.org/changeset/base/342881 > > > > Log: > > Make sh(1) recognize the default $HOME. By default /home > > is a symlink; without this change, when you log in, sh(1) > > won't realize the current directory (eg '/usr/home/test') > > is the same as $HOME ('/home/test'). > > Arguably it shouldnt know any of that. sh(1) needs to know that in order to properly shorten the current directory path (in prompt) to "~" when you're there. > Or that $Home is ~ either > I hate that if I "cd home" and there is not a directory > where I am at called home it takes me to ~/$home,s > that also has caused a few script debugging to be > a royal Pita having to force ./$variable to stop > home from being treated special. But none of that seems related to the change above, does it? All the patch does is: if your current directory is $HOME, but it's spelled differently, run "cd". The only thing that does, in turn, is making sh(1) set the $ENV variable, which it uses to track the current "logical working directory", eg /home/test. It cannot obtain that information otherwise, because getcwd(3) in that directory returns its "physical path", eg /usr/home/test. From owner-svn-src-head@freebsd.org Wed Jan 9 17:23:10 2019 Return-Path: Delivered-To: svn-src-head@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 08B2E1487BED; Wed, 9 Jan 2019 17:23:10 +0000 (UTC) (envelope-from markj@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 962B96B13A; Wed, 9 Jan 2019 17:23:09 +0000 (UTC) (envelope-from markj@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 88A8D1F27B; Wed, 9 Jan 2019 17:23:09 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x09HN938067663; Wed, 9 Jan 2019 17:23:09 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x09HN91W067662; Wed, 9 Jan 2019 17:23:09 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201901091723.x09HN91W067662@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 9 Jan 2019 17:23:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342888 - head/sys/dev/drm2/radeon X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/dev/drm2/radeon X-SVN-Commit-Revision: 342888 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 962B96B13A 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)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2019 17:23:10 -0000 Author: markj Date: Wed Jan 9 17:23:08 2019 New Revision: 342888 URL: https://svnweb.freebsd.org/changeset/base/342888 Log: Complete the removal of obsolete ioctl handlers. PR: 234706 Reviewed by: imp MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D18778 Modified: head/sys/dev/drm2/radeon/radeon_drv.c head/sys/dev/drm2/radeon/radeon_drv.h Modified: head/sys/dev/drm2/radeon/radeon_drv.c ============================================================================== --- head/sys/dev/drm2/radeon/radeon_drv.c Wed Jan 9 16:47:16 2019 (r342887) +++ head/sys/dev/drm2/radeon/radeon_drv.c Wed Jan 9 17:23:08 2019 (r342888) @@ -329,10 +329,6 @@ radeon_attach(device_t kdev) if (radeon_modeset == 1) { kms_driver.driver_features |= DRIVER_MODESET; kms_driver.num_ioctls = radeon_max_kms_ioctl; -#ifdef COMPAT_FREEBSD32 - kms_driver.compat_ioctls = radeon_compat_ioctls; - kms_driver.num_compat_ioctls = &radeon_num_compat_ioctls; -#endif radeon_register_atpx_handler(); } return (-drm_attach_helper(kdev, pciidlist, &kms_driver)); Modified: head/sys/dev/drm2/radeon/radeon_drv.h ============================================================================== --- head/sys/dev/drm2/radeon/radeon_drv.h Wed Jan 9 16:47:16 2019 (r342887) +++ head/sys/dev/drm2/radeon/radeon_drv.h Wed Jan 9 17:23:08 2019 (r342888) @@ -328,10 +328,6 @@ typedef struct drm_radeon_kcmd_buffer { extern int radeon_no_wb; extern struct drm_ioctl_desc radeon_ioctls[]; extern int radeon_max_ioctl; -#ifdef COMPAT_FREEBSD32 -extern struct drm_ioctl_desc radeon_compat_ioctls[]; -extern int radeon_num_compat_ioctls; -#endif extern u32 radeon_get_ring_head(drm_radeon_private_t *dev_priv); extern void radeon_set_ring_head(drm_radeon_private_t *dev_priv, u32 val); From owner-svn-src-head@freebsd.org Wed Jan 9 17:24:00 2019 Return-Path: Delivered-To: svn-src-head@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 2489C1487C6E; Wed, 9 Jan 2019 17:24:00 +0000 (UTC) (envelope-from brooks@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 BAECC6B2B4; Wed, 9 Jan 2019 17:23:59 +0000 (UTC) (envelope-from brooks@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 AA3571F27F; Wed, 9 Jan 2019 17:23:59 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x09HNxnZ067750; Wed, 9 Jan 2019 17:23:59 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x09HNxYx067749; Wed, 9 Jan 2019 17:23:59 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201901091723.x09HNxYx067749@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Wed, 9 Jan 2019 17:23:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342889 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 342889 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BAECC6B2B4 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.973,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2019 17:24:00 -0000 Author: brooks Date: Wed Jan 9 17:23:59 2019 New Revision: 342889 URL: https://svnweb.freebsd.org/changeset/base/342889 Log: style(9): fix the indent of a return. Modified: head/sys/kern/vfs_syscalls.c Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Wed Jan 9 17:23:08 2019 (r342888) +++ head/sys/kern/vfs_syscalls.c Wed Jan 9 17:23:59 2019 (r342889) @@ -4195,7 +4195,7 @@ sys_getfhat(struct thread *td, struct getfhat_args *ua { if ((uap->flags & ~(AT_SYMLINK_NOFOLLOW | AT_BENEATH)) != 0) - return (EINVAL); + return (EINVAL); return (kern_getfhat(td, uap->flags, uap->fd, uap->path, UIO_USERSPACE, uap->fhp)); } From owner-svn-src-head@freebsd.org Wed Jan 9 18:08:11 2019 Return-Path: Delivered-To: svn-src-head@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 ED9ED1488F8C; Wed, 9 Jan 2019 18:08:10 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE42F6CD31; Wed, 9 Jan 2019 18:08:09 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x09I81OV009441; Wed, 9 Jan 2019 10:08:01 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id x09I81S1009440; Wed, 9 Jan 2019 10:08:01 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201901091808.x09I81S1009440@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r342881 - head/share/skel In-Reply-To: To: Edward Napierala Date: Wed, 9 Jan 2019 10:08:01 -0800 (PST) CC: rgrimes@freebsd.org, src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: DE42F6CD31 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.93 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.93)[-0.930,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2019 18:08:11 -0000 > ?r., 9 sty 2019 o 16:41 Rodney W. Grimes > napisa?(a): > > > > > Author: trasz > > > Date: Wed Jan 9 11:04:27 2019 > > > New Revision: 342881 > > > URL: https://svnweb.freebsd.org/changeset/base/342881 > > > > > > Log: > > > Make sh(1) recognize the default $HOME. By default /home > > > is a symlink; without this change, when you log in, sh(1) > > > won't realize the current directory (eg '/usr/home/test') > > > is the same as $HOME ('/home/test'). > > > > Arguably it shouldnt know any of that. > > sh(1) needs to know that in order to properly shorten the current > directory path (in prompt) to "~" when you're there. And imho it should not be doing that.... that is what leads to all this other un needed cruft. ~ is a human input shortcut, not a computer output shortcut > > > Or that $Home is ~ either > > I hate that if I "cd home" and there is not a directory > > where I am at called home it takes me to ~/$home,s > > that also has caused a few script debugging to be > > a royal Pita having to force ./$variable to stop > > home from being treated special. > > But none of that seems related to the change above, does it? It is all related as this is outgrowth of trying to make the prompt spit out ~ when you are in $HOME. > All the patch does is: if your current directory is $HOME, but > it's spelled differently, run "cd". The only thing that does, in turn, > is making sh(1) set the $ENV variable, which it uses to track > the current "logical working directory", eg /home/test. It cannot > obtain that information otherwise, because getcwd(3) in that > directory returns its "physical path", eg /usr/home/test. It SHOULD spit out the results of getcwd and not some logical interpretation of variables. Do any OTHER cd's through a symbolic link do such magic? -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Wed Jan 9 18:55:49 2019 Return-Path: Delivered-To: svn-src-head@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 EE695148AC09 for ; Wed, 9 Jan 2019 18:55:48 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1.eu.mailhop.org (outbound1.eu.mailhop.org [52.28.251.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B1E16F58A for ; Wed, 9 Jan 2019 18:55:48 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1547060137; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=fHtV/c2rVVJy3B+Hpkfh3PQQOPdi0YKY3vjqXaJw3WJnkpnbOvAkkuPrB98aQ+UouwaJo7tjWv2jm 5VOiBOkv43pObpWKcO9VbUkOBWYdb4JwuGIqIdXk/YgI1osQSdn6YP2o7kY2uZdZWfteZXAPgeC6Bo 7voVrPHoVhLZk9w130T8WINYvkpLWQiPKEvnXi/qeBc7DSZtTipnLZqQpBAjeQdBGuMqTjbikq2i8T 0roiLPi5Eeziw7bTqjAQLJPVSZ944oHzCoWwIpK9sDEHz3PJcqKildjzjycqVzbd83M1XnunzhuhL9 QS5xlaY1oF0S1nJtOL6qzjRninIvw/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=cW006eDID+90p5Ft56Oygzu5F3esxAsMplRatGWdt0Y=; b=iixnA2UD3rg5wuomrKMTyWc4SeNljqbpTVSEc/TdOEaUlM6Dv/NxJX3Mpze6RUS5AiC3B496Ua5zY J5U7NAu306zV8iYJ1nCNXN0yw2rgLlNN4UL4BBhsVKRUzvRdAMviHPM5rMXK/sepI0CZjBymm1ujZV ImQvnigGaitd930CqliBNoArONi/j+4raBDaJbkPU/O2VaT1/V3Ua55iW6D9xJnIEJAgpMBEnD7Yxr L+pqvEzTRAvcl7sjYDW+KtBC24J08g9jVbB0W1HUbLSyCUGUOnrzyfxuODaKFSwcn9Sjk4SDogfPTI Jm8EAlKMlnl0PuOAFCErjBUikhO4ohQ== ARC-Authentication-Results: i=1; outbound3.eu.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=cW006eDID+90p5Ft56Oygzu5F3esxAsMplRatGWdt0Y=; b=duZsAf4aj1gpZTG7V4jjyiYsaNVmAChYLWJTGfYob5UbhoYPOEGt1VG8V4xlvjWr6kzI1Q0eIvZw5 DDT31lV5wR7diqIm6N0bod+CyoyLc+t7FkBWw3ren4suxYsAvxqfcOfBDm2LhdWDvM1pTmR1J5xj8E SLAZQCRBFqBcL/+XZ8N5L07aMbptuxJ+8CvkvfZt/lxhNCj3y051lnfNflvS6ouCrSx7FQG325dla1 QTyVBFXkYVwvbtxNLoyPgSLMDWRf1JKBhpnRFQ+PQ7o5muCB1i3Mi4HnLHbhRMl9CQQ4AY03QHBIyF qfwzi2lrXh07h0UbLeT7uJBF4tZMJmw== X-MHO-RoutePath: aGlwcGll X-MHO-User: 24e7eb6b-1440-11e9-8a28-a1efd8da9a94 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound3.eu.mailhop.org (Halon) with ESMTPSA id 24e7eb6b-1440-11e9-8a28-a1efd8da9a94; Wed, 09 Jan 2019 18:55:35 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x09ItXT3056348; Wed, 9 Jan 2019 11:55:33 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <8065ff94389d86d5c427e5cca14af3a37311fa0e.camel@freebsd.org> Subject: Re: svn commit: r342881 - head/share/skel From: Ian Lepore To: rgrimes@freebsd.org, Edward Napierala Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Wed, 09 Jan 2019 11:55:33 -0700 In-Reply-To: <201901091808.x09I81S1009440@pdx.rh.CN85.dnsmgr.net> References: <201901091808.x09I81S1009440@pdx.rh.CN85.dnsmgr.net> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 3B1E16F58A X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.985,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2019 18:55:49 -0000 On Wed, 2019-01-09 at 10:08 -0800, Rodney W. Grimes wrote: > > ?r., 9 sty 2019 o 16:41 Rodney W. Grimes > > napisa?(a): > > > > > > > Author: trasz > > > > Date: Wed Jan 9 11:04:27 2019 > > > > New Revision: 342881 > > > > URL: https://svnweb.freebsd.org/changeset/base/342881 > > > > > > > > Log: > > > > Make sh(1) recognize the default $HOME. By default /home > > > > is a symlink; without this change, when you log in, sh(1) > > > > won't realize the current directory (eg '/usr/home/test') > > > > is the same as $HOME ('/home/test'). > > > > > > Arguably it shouldnt know any of that. > > > > sh(1) needs to know that in order to properly shorten the current > > directory path (in prompt) to "~" when you're there. > > And imho it should not be doing that.... > that is what leads to all this other un needed cruft. > > ~ is a human input shortcut, not a computer output shortcut > > > > > > Or that $Home is ~ either > > > I hate that if I "cd home" and there is not a directory > > > where I am at called home it takes me to ~/$home,s > > > that also has caused a few script debugging to be > > > a royal Pita having to force ./$variable to stop > > > home from being treated special. > > > > But none of that seems related to the change above, does it? > > It is all related as this is outgrowth of trying to make > the prompt spit out ~ when you are in $HOME. > > > All the patch does is: if your current directory is $HOME, but > > it's spelled differently, run "cd". The only thing that does, in > > turn, > > is making sh(1) set the $ENV variable, which it uses to track > > the current "logical working directory", eg /home/test. It cannot > > obtain that information otherwise, because getcwd(3) in that > > directory returns its "physical path", eg /usr/home/test. > > It SHOULD spit out the results of getcwd and not some > logical interpretation of variables. Do any OTHER cd's > through a symbolic link do such magic? > ALL cd's through a symlink "do such magic". It's the difference between physical and logical path in bourne shell (and its descendents). revolution > mkdir /tmp/ian revolution > cd /tmp/ian revolution > mkdir -p a/b/c revolution > ln -s a/b/c c revolution > cd /tmp/ian/a/b/c; pwd -L; pwd -P /tmp/ian/a/b/c /tmp/ian/a/b/c revolution > cd /tmp/ian/c; pwd -L; pwd -P /tmp/ian/c /tmp/ian/a/b/c revolution > cd /tmp/ian/a/b/c; cd ..; pwd -P /tmp/ian/a/b revolution > cd /tmp/ian/c; cd ..; pwd -P /tmp/ian -- Ian From owner-svn-src-head@freebsd.org Wed Jan 9 22:31:12 2019 Return-Path: Delivered-To: svn-src-head@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 2C7AE14923E8; Wed, 9 Jan 2019 22:31:12 +0000 (UTC) (envelope-from kevans@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 C357E81570; Wed, 9 Jan 2019 22:31:11 +0000 (UTC) (envelope-from kevans@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 AE57822624; Wed, 9 Jan 2019 22:31:11 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x09MVBmH033784; Wed, 9 Jan 2019 22:31:11 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x09MVBYh033782; Wed, 9 Jan 2019 22:31:11 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201901092231.x09MVBYh033782@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 9 Jan 2019 22:31:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342903 - head/lib/libbe X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/lib/libbe X-SVN-Commit-Revision: 342903 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C357E81570 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.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2019 22:31:12 -0000 Author: kevans Date: Wed Jan 9 22:31:10 2019 New Revision: 342903 URL: https://svnweb.freebsd.org/changeset/base/342903 Log: libbe(3): move altroot augmentation bits around a little bit We could perhaps have a method that does this given a dataset, but it's yet clear that we'll always want to bypass the altroot when we grab the mountpoint. For now, we'll refactor things a bit so we grab the altroot length when libbe is initialized and have a common method that does the necessary augmentation (replace with / if it's the root, return a pointer to later in the string if not). This will be used in some upcoming work to make be_mount work properly for deep BEs. MFC after: 1 week Modified: head/lib/libbe/be.c head/lib/libbe/be_access.c head/lib/libbe/be_impl.h Modified: head/lib/libbe/be.c ============================================================================== --- head/lib/libbe/be.c Wed Jan 9 20:19:34 2019 (r342902) +++ head/lib/libbe/be.c Wed Jan 9 22:31:10 2019 (r342903) @@ -90,6 +90,7 @@ be_locate_rootfs(libbe_handle_t *lbh) libbe_handle_t * libbe_init(const char *root) { + char altroot[MAXPATHLEN]; libbe_handle_t *lbh; char *poolname, *pos; int pnamelen; @@ -140,6 +141,11 @@ libbe_init(const char *root) sizeof(lbh->bootfs), NULL, true) != 0) goto err; + if (zpool_get_prop(lbh->active_phandle, ZPOOL_PROP_ALTROOT, + altroot, sizeof(altroot), NULL, true) == 0 && + strcmp(altroot, "-") != 0) + lbh->altroot_len = strlen(altroot); + return (lbh); err: if (lbh != NULL) { @@ -314,7 +320,6 @@ be_create(libbe_handle_t *lbh, const char *name) return (set_error(lbh, err)); } - static int be_deep_clone_prop(int prop, void *cb) { @@ -345,12 +350,9 @@ be_deep_clone_prop(int prop, void *cb) /* Augment mountpoint with altroot, if needed */ val = pval; - if (prop == ZFS_PROP_MOUNTPOINT && *dccb->altroot != '\0') { - if (pval[strlen(dccb->altroot)] == '\0') - strlcpy(pval, "/", sizeof(pval)); - else - val = pval + strlen(dccb->altroot); - } + if (prop == ZFS_PROP_MOUNTPOINT) + val = be_mountpoint_augmented(dccb->lbh, val); + nvlist_add_string(dccb->props, zfs_prop_to_name(prop), val); return (ZPROP_CONT); @@ -392,12 +394,9 @@ be_deep_clone(zfs_handle_t *ds, void *data) nvlist_alloc(&props, NV_UNIQUE_NAME, KM_SLEEP); nvlist_add_string(props, "canmount", "noauto"); + dccb.lbh = isdc->lbh; dccb.zhp = ds; dccb.props = props; - if (zpool_get_prop(isdc->lbh->active_phandle, ZPOOL_PROP_ALTROOT, - dccb.altroot, sizeof(dccb.altroot), NULL, true) != 0 || - strcmp(dccb.altroot, "-") == 0) - *dccb.altroot = '\0'; if (zprop_iter(be_deep_clone_prop, &dccb, B_FALSE, B_FALSE, ZFS_TYPE_FILESYSTEM) == ZPROP_INVAL) return (-1); Modified: head/lib/libbe/be_access.c ============================================================================== --- head/lib/libbe/be_access.c Wed Jan 9 20:19:34 2019 (r342902) +++ head/lib/libbe/be_access.c Wed Jan 9 22:31:10 2019 (r342903) @@ -195,3 +195,25 @@ be_unmount(libbe_handle_t *lbh, char *bootenv, int fla return (BE_ERR_SUCCESS); } + +/* + * This function will blow away the input buffer as needed if we're discovered + * to be looking at a root-mount. If the mountpoint is naturally beyond the + * root, however, the buffer may be left intact and a pointer to the section + * past altroot will be returned instead for the caller's perusal. + */ +char * +be_mountpoint_augmented(libbe_handle_t *lbh, char *mountpoint) +{ + + if (lbh->altroot_len == 0) + return (mountpoint); + if (mountpoint == NULL || *mountpoint == '\0') + return (mountpoint); + + if (mountpoint[lbh->altroot_len] == '\0') { + *(mountpoint + 1) = '\0'; + return (mountpoint); + } else + return (mountpoint + lbh->altroot_len); +} Modified: head/lib/libbe/be_impl.h ============================================================================== --- head/lib/libbe/be_impl.h Wed Jan 9 20:19:34 2019 (r342902) +++ head/lib/libbe/be_impl.h Wed Jan 9 22:31:10 2019 (r342903) @@ -36,11 +36,12 @@ #include "be.h" struct libbe_handle { - libzfs_handle_t *lzh; - zpool_handle_t *active_phandle; char root[BE_MAXPATHLEN]; char rootfs[BE_MAXPATHLEN]; char bootfs[BE_MAXPATHLEN]; + size_t altroot_len; + zpool_handle_t *active_phandle; + libzfs_handle_t *lzh; be_error_t error; bool print_on_err; }; @@ -53,9 +54,9 @@ struct libbe_deep_clone { }; struct libbe_dccb { + libbe_handle_t *lbh; zfs_handle_t *zhp; nvlist_t *props; - char altroot[MAXPATHLEN]; }; typedef struct prop_data { @@ -66,6 +67,8 @@ typedef struct prop_data { int prop_list_builder_cb(zfs_handle_t *, void *); int be_proplist_update(prop_data_t *); + +char *be_mountpoint_augmented(libbe_handle_t *lbh, char *mountpoint); /* Clobbers any previous errors */ int set_error(libbe_handle_t *, be_error_t); From owner-svn-src-head@freebsd.org Thu Jan 10 00:10:13 2019 Return-Path: Delivered-To: svn-src-head@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 08D4A1494469; Thu, 10 Jan 2019 00:10:13 +0000 (UTC) (envelope-from ngie@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 9F63A847A0; Thu, 10 Jan 2019 00:10:12 +0000 (UTC) (envelope-from ngie@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 8FFA823737; Thu, 10 Jan 2019 00:10:12 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0A0ACCn082555; Thu, 10 Jan 2019 00:10:12 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0A0ACAd082554; Thu, 10 Jan 2019 00:10:12 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201901100010.x0A0ACAd082554@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Thu, 10 Jan 2019 00:10:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342904 - head/sbin/route X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/sbin/route X-SVN-Commit-Revision: 342904 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9F63A847A0 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)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jan 2019 00:10:13 -0000 Author: ngie Date: Thu Jan 10 00:10:12 2019 New Revision: 342904 URL: https://svnweb.freebsd.org/changeset/base/342904 Log: route(8): clarify -prefixlen description Try to reword -prefixlen section to more clearly and accurately describe how the -prefixlen modifier works. While here, fix a word that igor considered a typo: aggregatable addresses is a valid technical term per RFC-2374, however, it was superseded by the term "aggregator" in RFC-3587. MFC after: 1 week Reviewed by: 0mp, crees Approved by: emaste (mentor) Differential Revision: https://reviews.freebsd.org/D10087 Modified: head/sbin/route/route.8 Modified: head/sbin/route/route.8 ============================================================================== --- head/sbin/route/route.8 Wed Jan 9 22:31:10 2019 (r342903) +++ head/sbin/route/route.8 Thu Jan 10 00:10:12 2019 (r342904) @@ -28,7 +28,7 @@ .\" @(#)route.8 8.3 (Berkeley) 3/19/94 .\" $FreeBSD$ .\" -.Dd February 16, 2018 +.Dd January 9, 2019 .Dt ROUTE 8 .Os .Sh NAME @@ -303,14 +303,14 @@ is available instead of the qualifier because non-continuous masks are not allowed in IPv6. For example, .Fl prefixlen Li 32 -specifies network mask of +specifies that a network mask of .Li ffff:ffff:0000:0000:0000:0000:0000:0000 -to be used. -The default value of prefixlen is 64 to get along with -the aggregatable address. -But 0 is assumed if +will be used. +The default prefixlen is 64. +However, it is assumed to be 0 if .Cm default -is specified. +is specified for +.Ar destination . Note that the qualifier works only for .Dv AF_INET6 address family. From owner-svn-src-head@freebsd.org Thu Jan 10 00:25:14 2019 Return-Path: Delivered-To: svn-src-head@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 E6C7C1494A12; Thu, 10 Jan 2019 00:25:13 +0000 (UTC) (envelope-from glebius@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 88D9C8521A; Thu, 10 Jan 2019 00:25:13 +0000 (UTC) (envelope-from glebius@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 4CE9123AE3; Thu, 10 Jan 2019 00:25:13 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0A0PDma093053; Thu, 10 Jan 2019 00:25:13 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0A0PDGf093052; Thu, 10 Jan 2019 00:25:13 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201901100025.x0A0PDGf093052@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 10 Jan 2019 00:25:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342905 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 342905 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 88D9C8521A 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.999,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)[-0.998,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jan 2019 00:25:14 -0000 Author: glebius Date: Thu Jan 10 00:25:12 2019 New Revision: 342905 URL: https://svnweb.freebsd.org/changeset/base/342905 Log: Simplify sosetopt() so that function has single return point. No functional change. Modified: head/sys/kern/uipc_socket.c Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Thu Jan 10 00:10:12 2019 (r342904) +++ head/sys/kern/uipc_socket.c Thu Jan 10 00:25:12 2019 (r342905) @@ -2755,12 +2755,10 @@ sosetopt(struct socket *so, struct sockopt *sopt) CURVNET_SET(so->so_vnet); error = 0; if (sopt->sopt_level != SOL_SOCKET) { - if (so->so_proto->pr_ctloutput != NULL) { + if (so->so_proto->pr_ctloutput != NULL) error = (*so->so_proto->pr_ctloutput)(so, sopt); - CURVNET_RESTORE(); - return (error); - } - error = ENOPROTOOPT; + else + error = ENOPROTOOPT; } else { switch (sopt->sopt_name) { case SO_ACCEPTFILTER: From owner-svn-src-head@freebsd.org Thu Jan 10 00:37:15 2019 Return-Path: Delivered-To: svn-src-head@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 C4D3F1494D01; Thu, 10 Jan 2019 00:37:15 +0000 (UTC) (envelope-from glebius@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 66167857C4; Thu, 10 Jan 2019 00:37:15 +0000 (UTC) (envelope-from glebius@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 5942A23CAF; Thu, 10 Jan 2019 00:37:15 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0A0bETo098328; Thu, 10 Jan 2019 00:37:14 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0A0bE88098327; Thu, 10 Jan 2019 00:37:14 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201901100037.x0A0bE88098327@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 10 Jan 2019 00:37:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342906 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 342906 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 66167857C4 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.999,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)[-0.998,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jan 2019 00:37:15 -0000 Author: glebius Date: Thu Jan 10 00:37:14 2019 New Revision: 342906 URL: https://svnweb.freebsd.org/changeset/base/342906 Log: Bring the comment up to date. Modified: head/sys/net/if_vlan.c Modified: head/sys/net/if_vlan.c ============================================================================== --- head/sys/net/if_vlan.c Thu Jan 10 00:25:12 2019 (r342905) +++ head/sys/net/if_vlan.c Thu Jan 10 00:37:14 2019 (r342906) @@ -607,7 +607,7 @@ vlan_iflladdr(void *arg __unused, struct ifnet *ifp) struct ifvlantrunk *trunk; struct sockaddr_dl *sdl; - /* Need the rmlock since this is run on taskqueue_swi. */ + /* Need the epoch since this is run on taskqueue_swi. */ NET_EPOCH_ENTER(et); trunk = ifp->if_vlantrunk; if (trunk == NULL) { From owner-svn-src-head@freebsd.org Thu Jan 10 00:52:07 2019 Return-Path: Delivered-To: svn-src-head@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 6168C149525A; Thu, 10 Jan 2019 00:52:07 +0000 (UTC) (envelope-from glebius@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 0209D86387; Thu, 10 Jan 2019 00:52:07 +0000 (UTC) (envelope-from glebius@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 E9A902401E; Thu, 10 Jan 2019 00:52:06 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0A0q6jl008990; Thu, 10 Jan 2019 00:52:06 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0A0q6FU008989; Thu, 10 Jan 2019 00:52:06 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201901100052.x0A0q6FU008989@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 10 Jan 2019 00:52:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342907 - head/sys/netinet6 X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sys/netinet6 X-SVN-Commit-Revision: 342907 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0209D86387 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.999,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)[-0.998,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jan 2019 00:52:07 -0000 Author: glebius Date: Thu Jan 10 00:52:06 2019 New Revision: 342907 URL: https://svnweb.freebsd.org/changeset/base/342907 Log: Remove unnecessary ifdef. With INVARIANTS all KASSERTs are empty statements, so won't be compiled in. Modified: head/sys/netinet6/in6_mcast.c Modified: head/sys/netinet6/in6_mcast.c ============================================================================== --- head/sys/netinet6/in6_mcast.c Thu Jan 10 00:37:14 2019 (r342906) +++ head/sys/netinet6/in6_mcast.c Thu Jan 10 00:52:06 2019 (r342907) @@ -1262,7 +1262,6 @@ in6_joingroup_locked(struct ifnet *ifp, const struct i char ip6tbuf[INET6_ADDRSTRLEN]; #endif -#ifdef INVARIANTS /* * Sanity: Check scope zone ID was set for ifp, if and * only if group is scoped to an interface. @@ -1274,7 +1273,6 @@ in6_joingroup_locked(struct ifnet *ifp, const struct i KASSERT(mcaddr->s6_addr16[1] != 0, ("%s: scope zone ID not set", __func__)); } -#endif IN6_MULTI_LOCK_ASSERT(); IN6_MULTI_LIST_UNLOCK_ASSERT(); From owner-svn-src-head@freebsd.org Thu Jan 10 01:47:58 2019 Return-Path: Delivered-To: svn-src-head@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 7F2F01496409; Thu, 10 Jan 2019 01:47:58 +0000 (UTC) (envelope-from ae@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 3025E87F53; Thu, 10 Jan 2019 01:47:58 +0000 (UTC) (envelope-from ae@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 21C982498A; Thu, 10 Jan 2019 01:47:58 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0A1lwav035639; Thu, 10 Jan 2019 01:47:58 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0A1lvQX035635; Thu, 10 Jan 2019 01:47:57 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201901100147.x0A1lvQX035635@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 10 Jan 2019 01:47:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342908 - head/sys/netpfil/ipfw X-SVN-Group: head X-SVN-Commit-Author: ae X-SVN-Commit-Paths: head/sys/netpfil/ipfw X-SVN-Commit-Revision: 342908 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3025E87F53 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.952,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jan 2019 01:47:58 -0000 Author: ae Date: Thu Jan 10 01:47:57 2019 New Revision: 342908 URL: https://svnweb.freebsd.org/changeset/base/342908 Log: Reduce the size of struct ip_fw_args from 240 to 128 bytes on amd64. And refactor the code to avoid unneeded initialization to reduce overhead of per-packet processing. ipfw(4) can be invoked by pfil(9) framework for each packet several times. Each call uses on-stack variable of type struct ip_fw_args to keep the state of ipfw(4) processing. Currently this variable has 240 bytes size on amd64. Each time ipfw(4) does bzero() on it, and then it initializes some fields. glebius@ has reported that they at Netflix discovered, that initialization of this variable produces significant overhead on packet processing. After patching I managed to increase performance of packet processing on simple routing with ipfw(4) firewalling to about 11% from 9.8Mpps up to 11Mpps (Xeon E5-2660 v4@ + Mellanox 100G card). Introduced new field flags, it is used to keep track of what fields was initialized. Some fields were moved into the anonymous union, to reduce the size. They all are mutually exclusive. dummypar field was unused, and therefore it is removed. The hopstore6 field type was changed from sockaddr_in6 to a bit smaller struct ip_fw_nh6. And now the size of struct ip_fw_args is 128 bytes. ipfw_chk() was modified to properly handle ip_fw_args.flags instead of rely on checking for NULL pointers. Reviewed by: gallatin Obtained from: Yandex LLC MFC after: 1 month Sponsored by: Yandex LLC Differential Revision: https://reviews.freebsd.org/D18690 Modified: head/sys/netpfil/ipfw/ip_fw2.c head/sys/netpfil/ipfw/ip_fw_log.c head/sys/netpfil/ipfw/ip_fw_pfil.c head/sys/netpfil/ipfw/ip_fw_private.h Modified: head/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw2.c Thu Jan 10 00:52:06 2019 (r342907) +++ head/sys/netpfil/ipfw/ip_fw2.c Thu Jan 10 01:47:57 2019 (r342908) @@ -1191,6 +1191,7 @@ set_match(struct ip_fw_args *args, int slot, args->rule.slot = slot + 1; /* we use 0 as a marker */ args->rule.rule_id = 1 + chain->map[slot]->id; args->rule.rulenum = chain->map[slot]->rulenum; + args->flags |= IPFW_ARGS_REF; } #ifndef LINEAR_SKIPTO @@ -1376,17 +1377,12 @@ ipfw_chk(struct ip_fw_args *args) * Only valid for IPv4 packets. */ uint8_t proto; - uint16_t src_port = 0, dst_port = 0; /* NOTE: host format */ + uint16_t src_port, dst_port; /* NOTE: host format */ struct in_addr src_ip, dst_ip; /* NOTE: network format */ int iplen = 0; int pktlen; - uint16_t etype = 0; /* Host order stored ether type */ + uint16_t etype; /* Host order stored ether type */ - /* - * dyn_dir = MATCH_UNKNOWN when rules unchecked, - * MATCH_NONE when checked and not matched (q = NULL), - * MATCH_FORWARD or MATCH_REVERSE otherwise (q != NULL) - */ struct ipfw_dyn_info dyn_info; struct ip_fw *q = NULL; struct ip_fw_chain *chain = &V_layer3_chain; @@ -1415,9 +1411,6 @@ ipfw_chk(struct ip_fw_args *args) dst_ip.s_addr = 0; /* make sure it is initialized */ src_ip.s_addr = 0; /* make sure it is initialized */ pktlen = m->m_pkthdr.len; - args->f_id.fib = M_GETFIB(m); /* note mbuf not altered) */ - proto = args->f_id.proto = 0; /* mark f_id invalid */ - /* XXX 0 is a valid proto: IP/IPv6 Hop-by-Hop Option */ DYN_INFO_INIT(&dyn_info); /* @@ -1441,18 +1434,19 @@ do { \ /* * if we have an ether header, */ - if (args->eh) + if (args->flags & IPFW_ARGS_ETHER) etype = ntohs(args->eh->ether_type); + else + etype = 0; /* Identify IP packets and fill up variables. */ if (pktlen >= sizeof(struct ip6_hdr) && - (args->eh == NULL || etype == ETHERTYPE_IPV6) && ip->ip_v == 6) { + (etype == 0 || etype == ETHERTYPE_IPV6) && ip->ip_v == 6) { struct ip6_hdr *ip6 = (struct ip6_hdr *)ip; + is_ipv6 = 1; - args->f_id.addr_type = 6; hlen = sizeof(struct ip6_hdr); proto = ip6->ip6_nxt; - /* Search extension headers to find upper layer protocols */ while (ulp == NULL && offset == 0) { switch (proto) { @@ -1627,20 +1621,18 @@ do { \ } ip = mtod(m, struct ip *); ip6 = (struct ip6_hdr *)ip; + args->f_id.addr_type = 6; args->f_id.src_ip6 = ip6->ip6_src; args->f_id.dst_ip6 = ip6->ip6_dst; - args->f_id.src_ip = 0; - args->f_id.dst_ip = 0; args->f_id.flow_id6 = ntohl(ip6->ip6_flow); iplen = ntohs(ip6->ip6_plen) + sizeof(*ip6); } else if (pktlen >= sizeof(struct ip) && - (args->eh == NULL || etype == ETHERTYPE_IP) && ip->ip_v == 4) { - is_ipv4 = 1; + (etype == 0 || etype == ETHERTYPE_IP) && ip->ip_v == 4) { + is_ipv4 = 1; hlen = ip->ip_hl << 2; - args->f_id.addr_type = 4; - /* - * Collect parameters into local variables for faster matching. + * Collect parameters into local variables for faster + * matching. */ proto = ip->ip_p; src_ip = ip->ip_src; @@ -1693,23 +1685,31 @@ do { \ } ip = mtod(m, struct ip *); + args->f_id.addr_type = 4; args->f_id.src_ip = ntohl(src_ip.s_addr); args->f_id.dst_ip = ntohl(dst_ip.s_addr); + } else { + proto = 0; + src_port = dst_port = 0; + dst_ip.s_addr = src_ip.s_addr = 0; + + args->f_id.addr_type = 1; /* XXX */ } #undef PULLUP_TO pktlen = iplen < pktlen ? iplen: pktlen; - if (proto) { /* we may have port numbers, store them */ - args->f_id.proto = proto; - args->f_id.src_port = src_port = ntohs(src_port); - args->f_id.dst_port = dst_port = ntohs(dst_port); - } + /* Properly initialize the rest of f_id */ + args->f_id.proto = proto; + args->f_id.src_port = src_port = ntohs(src_port); + args->f_id.dst_port = dst_port = ntohs(dst_port); + args->f_id.fib = M_GETFIB(m); + IPFW_PF_RLOCK(chain); if (! V_ipfw_vnet_ready) { /* shutting down, leave NOW. */ IPFW_PF_RUNLOCK(chain); return (IP_FW_PASS); /* accept */ } - if (args->rule.slot) { + if (args->flags & IPFW_ARGS_REF) { /* * Packet has already been tagged as a result of a previous * match on rule args->rule aka args->rule_id (PIPE, QUEUE, @@ -1837,7 +1837,7 @@ do { \ break; case O_MACADDR2: - if (args->eh != NULL) { /* have MAC header */ + if (args->flags & IPFW_ARGS_ETHER) { u_int32_t *want = (u_int32_t *) ((ipfw_insn_mac *)cmd)->addr; u_int32_t *mask = (u_int32_t *) @@ -1852,7 +1852,7 @@ do { \ break; case O_MAC_TYPE: - if (args->eh != NULL) { + if (args->flags & IPFW_ARGS_ETHER) { u_int16_t *p = ((ipfw_insn_u16 *)cmd)->ports; int i; @@ -1873,19 +1873,21 @@ do { \ break; case O_LAYER2: - match = (args->eh != NULL); + match = (args->flags & IPFW_ARGS_ETHER); break; case O_DIVERTED: - { - /* For diverted packets, args->rule.info + if ((args->flags & IPFW_ARGS_REF) == 0) + break; + /* + * For diverted packets, args->rule.info * contains the divert port (in host format) * reason and direction. */ - uint32_t i = args->rule.info; - match = (i&IPFW_IS_MASK) == IPFW_IS_DIVERT && - cmd->arg1 & ((i & IPFW_INFO_IN) ? 1 : 2); - } + match = ((args->rule.info & IPFW_IS_MASK) == + IPFW_IS_DIVERT) && ( + ((args->rule.info & IPFW_INFO_IN) ? + 1: 2) & cmd->arg1); break; case O_PROTO: @@ -2057,7 +2059,8 @@ do { \ #ifdef INET6 /* FALLTHROUGH */ case O_IP6_SRC_ME: - match= is_ipv6 && ipfw_localip6(&args->f_id.src_ip6); + match = is_ipv6 && + ipfw_localip6(&args->f_id.src_ip6); #endif break; @@ -2093,7 +2096,8 @@ do { \ #ifdef INET6 /* FALLTHROUGH */ case O_IP6_DST_ME: - match= is_ipv6 && ipfw_localip6(&args->f_id.dst_ip6); + match = is_ipv6 && + ipfw_localip6(&args->f_id.dst_ip6); #endif break; @@ -2691,8 +2695,8 @@ do { \ case O_DIVERT: case O_TEE: - if (args->eh) /* not on layer 2 */ - break; + if (args->flags & IPFW_ARGS_ETHER) + break; /* not on layer 2 */ /* otherwise this is terminal */ l = 0; /* exit inner loop */ done = 1; /* exit outer loop */ @@ -2868,8 +2872,8 @@ do { \ break; case O_FORWARD_IP: - if (args->eh) /* not valid on layer2 pkts */ - break; + if (args->flags & IPFW_ARGS_ETHER) + break; /* not valid on layer2 pkts */ if (q != f || dyn_info.direction == MATCH_FORWARD) { struct sockaddr_in *sa; @@ -2886,32 +2890,22 @@ do { \ * table_value as next_hop6 address. */ if (is_ipv6) { - struct sockaddr_in6 *sa6; + struct ip_fw_nh6 *nh6; - sa6 = args->next_hop6 = - &args->hopstore6; - sa6->sin6_family = AF_INET6; - sa6->sin6_len = sizeof(*sa6); - sa6->sin6_addr = TARG_VAL( + args->flags |= IPFW_ARGS_NH6; + nh6 = &args->hopstore6; + nh6->sin6_addr = TARG_VAL( chain, tablearg, nh6); - sa6->sin6_port = sa->sin_port; - /* - * Set sin6_scope_id only for - * link-local unicast addresses. - */ - if (IN6_IS_ADDR_LINKLOCAL( - &sa6->sin6_addr)) - sa6->sin6_scope_id = - TARG_VAL(chain, - tablearg, - zoneid); + nh6->sin6_port = sa->sin_port; + nh6->sin6_scope_id = TARG_VAL( + chain, tablearg, zoneid); } else #endif { + args->flags |= IPFW_ARGS_NH4; args->hopstore.sin_port = sa->sin_port; - sa = args->next_hop = - &args->hopstore; + sa = &args->hopstore; sa->sin_family = AF_INET; sa->sin_len = sizeof(*sa); sa->sin_addr.s_addr = htonl( @@ -2919,7 +2913,8 @@ do { \ nh4)); } } else { - args->next_hop = sa; + args->flags |= IPFW_ARGS_NH4PTR; + args->next_hop = sa; } } retval = IP_FW_PASS; @@ -2929,13 +2924,14 @@ do { \ #ifdef INET6 case O_FORWARD_IP6: - if (args->eh) /* not valid on layer2 pkts */ - break; + if (args->flags & IPFW_ARGS_ETHER) + break; /* not valid on layer2 pkts */ if (q != f || dyn_info.direction == MATCH_FORWARD) { struct sockaddr_in6 *sin6; sin6 = &(((ipfw_insn_sa6 *)cmd)->sa); + args->flags |= IPFW_ARGS_NH6PTR; args->next_hop6 = sin6; } retval = IP_FW_PASS; @@ -2964,7 +2960,7 @@ do { \ if (fib >= rt_numfibs) fib = 0; M_SETFIB(m, fib); - args->f_id.fib = fib; + args->f_id.fib = fib; /* XXX */ l = 0; /* exit inner loop */ break; } @@ -3011,6 +3007,7 @@ do { \ struct cfg_nat *t; int nat_id; + args->rule.info = 0; set_match(args, f_pos, chain); /* Check if this is 'global' nat rule */ if (cmd->arg1 == IP_FW_NAT44_GLOBAL) { @@ -3063,6 +3060,7 @@ do { \ else ip->ip_sum = in_cksum(m, hlen); retval = IP_FW_REASS; + args->rule.info = 0; set_match(args, f_pos, chain); } done = 1; /* exit outer loop */ Modified: head/sys/netpfil/ipfw/ip_fw_log.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_log.c Thu Jan 10 00:52:06 2019 (r342907) +++ head/sys/netpfil/ipfw/ip_fw_log.c Thu Jan 10 01:47:57 2019 (r342908) @@ -107,7 +107,7 @@ ipfw_log(struct ip_fw_chain *chain, struct ip_fw *f, u char action2[92], proto[128], fragment[32]; if (V_fw_verbose == 0) { - if (args->eh) /* layer2, use orig hdr */ + if (args->flags & IPFW_ARGS_ETHER) /* layer2, use orig hdr */ ipfw_bpf_mtap2(args->eh, ETHER_HDR_LEN, m); else { /* Add fake header. Later we will store Modified: head/sys/netpfil/ipfw/ip_fw_pfil.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_pfil.c Thu Jan 10 00:52:06 2019 (r342907) +++ head/sys/netpfil/ipfw/ip_fw_pfil.c Thu Jan 10 01:47:57 2019 (r342908) @@ -126,13 +126,11 @@ ipfw_check_packet(void *arg, struct mbuf **m0, struct { struct ip_fw_args args; struct m_tag *tag; - int ipfw; - int ret; + int ipfw, ret; /* convert dir to IPFW values */ dir = (dir == PFIL_IN) ? DIR_IN : DIR_OUT; - bzero(&args, sizeof(args)); - + args.flags = 0; again: /* * extract and remove the tag if present. If we are left @@ -144,6 +142,7 @@ again: m_tag_delete(*m0, tag); if (args.rule.info & IPFW_ONEPASS) return (0); + args.flags |= IPFW_ARGS_REF; } args.m = *m0; @@ -157,53 +156,82 @@ again: __func__)); /* breaking out of the switch means drop */ - ret = 0; /* default return value for pass */ switch (ipfw) { case IP_FW_PASS: /* next_hop may be set by ipfw_chk */ - if (args.next_hop == NULL && args.next_hop6 == NULL) - break; /* pass */ + if ((args.flags & (IPFW_ARGS_NH4 | IPFW_ARGS_NH4PTR | + IPFW_ARGS_NH6 | IPFW_ARGS_NH6PTR)) == 0) { + ret = 0; + break; + } #if (!defined(INET6) && !defined(INET)) ret = EACCES; #else { - struct m_tag *fwd_tag; + void *psa; size_t len; - - KASSERT(args.next_hop == NULL || args.next_hop6 == NULL, - ("%s: both next_hop=%p and next_hop6=%p not NULL", __func__, - args.next_hop, args.next_hop6)); -#ifdef INET6 - if (args.next_hop6 != NULL) - len = sizeof(struct sockaddr_in6); -#endif #ifdef INET - if (args.next_hop != NULL) + if (args.flags & (IPFW_ARGS_NH4 | IPFW_ARGS_NH4PTR)) { + MPASS((args.flags & (IPFW_ARGS_NH4 | + IPFW_ARGS_NH4PTR)) != (IPFW_ARGS_NH4 | + IPFW_ARGS_NH4PTR)); + MPASS((args.flags & (IPFW_ARGS_NH6 | + IPFW_ARGS_NH6PTR)) == 0); len = sizeof(struct sockaddr_in); -#endif - - /* Incoming packets should not be tagged so we do not + psa = (args.flags & IPFW_ARGS_NH4) ? + &args.hopstore : args.next_hop; + if (in_localip(satosin(psa)->sin_addr)) + (*m0)->m_flags |= M_FASTFWD_OURS; + (*m0)->m_flags |= M_IP_NEXTHOP; + } +#endif /* INET */ +#ifdef INET6 + if (args.flags & (IPFW_ARGS_NH6 | IPFW_ARGS_NH6PTR)) { + MPASS((args.flags & (IPFW_ARGS_NH6 | + IPFW_ARGS_NH6PTR)) != (IPFW_ARGS_NH6 | + IPFW_ARGS_NH6PTR)); + MPASS((args.flags & (IPFW_ARGS_NH4 | + IPFW_ARGS_NH4PTR)) == 0); + len = sizeof(struct sockaddr_in6); + psa = args.next_hop6; + (*m0)->m_flags |= M_IP6_NEXTHOP; + } +#endif /* INET6 */ + /* + * Incoming packets should not be tagged so we do not * m_tag_find. Outgoing packets may be tagged, so we * reuse the tag if present. */ - fwd_tag = (dir == DIR_IN) ? NULL : + tag = (dir == DIR_IN) ? NULL : m_tag_find(*m0, PACKET_TAG_IPFORWARD, NULL); - if (fwd_tag != NULL) { - m_tag_unlink(*m0, fwd_tag); + if (tag != NULL) { + m_tag_unlink(*m0, tag); } else { - fwd_tag = m_tag_get(PACKET_TAG_IPFORWARD, len, + tag = m_tag_get(PACKET_TAG_IPFORWARD, len, M_NOWAIT); - if (fwd_tag == NULL) { + if (tag == NULL) { ret = EACCES; break; /* i.e. drop */ } } + if ((args.flags & IPFW_ARGS_NH6) == 0) + bcopy(psa, tag + 1, len); + m_tag_prepend(*m0, tag); + ret = 0; #ifdef INET6 - if (args.next_hop6 != NULL) { + /* IPv6 next hop needs additional handling */ + if (args.flags & (IPFW_ARGS_NH6 | IPFW_ARGS_NH6PTR)) { struct sockaddr_in6 *sa6; - sa6 = (struct sockaddr_in6 *)(fwd_tag + 1); - bcopy(args.next_hop6, sa6, len); + sa6 = satosin6(tag + 1); + if (args.flags & IPFW_ARGS_NH6) { + sa6->sin6_family = AF_INET6; + sa6->sin6_len = sizeof(*sa6); + sa6->sin6_addr = args.hopstore6.sin6_addr; + sa6->sin6_port = args.hopstore6.sin6_port; + sa6->sin6_scope_id = + args.hopstore6.sin6_scope_id; + } /* * If nh6 address is link-local we should convert * it to kernel internal form before doing any @@ -215,18 +243,8 @@ again: } if (in6_localip(&sa6->sin6_addr)) (*m0)->m_flags |= M_FASTFWD_OURS; - (*m0)->m_flags |= M_IP6_NEXTHOP; } -#endif -#ifdef INET - if (args.next_hop != NULL) { - bcopy(args.next_hop, (fwd_tag+1), len); - if (in_localip(args.next_hop->sin_addr)) - (*m0)->m_flags |= M_FASTFWD_OURS; - (*m0)->m_flags |= M_IP_NEXTHOP; - } -#endif - m_tag_prepend(*m0, fwd_tag); +#endif /* INET6 */ } #endif /* INET || INET6 */ break; @@ -239,6 +257,7 @@ again: ret = EACCES; if (ip_dn_io_ptr == NULL) break; /* i.e. drop */ + MPASS(args->flags & IPFW_ARGS_REF); if (mtod(*m0, struct ip *)->ip_v == 4) ret = ip_dn_io_ptr(m0, dir, &args); else if (mtod(*m0, struct ip *)->ip_v == 6) @@ -262,6 +281,7 @@ again: ret = EACCES; break; /* i.e. drop */ } + MPASS(args->flags & IPFW_ARGS_REF); ret = ipfw_divert(m0, dir, &args.rule, (ipfw == IP_FW_TEE) ? 1 : 0); /* continue processing for the original packet (tee). */ @@ -275,6 +295,7 @@ again: ret = EACCES; break; /* i.e. drop */ } + MPASS(args->flags & IPFW_ARGS_REF); ret = ng_ipfw_input_p(m0, dir, &args, (ipfw == IP_FW_NGTEE) ? 1 : 0); if (ipfw == IP_FW_NGTEE) /* ignore errors for NGTEE */ @@ -283,13 +304,15 @@ again: case IP_FW_NAT: /* honor one-pass in case of successful nat */ - if (V_fw_one_pass) - break; /* ret is already 0 */ + if (V_fw_one_pass) { + ret = 0; + break; + } goto again; case IP_FW_REASS: goto again; /* continue with packet */ - + default: KASSERT(0, ("%s: unknown retval", __func__)); } @@ -300,7 +323,7 @@ again: *m0 = NULL; } - return ret; + return (ret); } /* @@ -310,15 +333,14 @@ int ipfw_check_frame(void *arg, struct mbuf **m0, struct ifnet *ifp, int dir, struct inpcb *inp) { - struct ether_header *eh; + struct ip_fw_args args; struct ether_header save_eh; + struct ether_header *eh; + struct m_tag *mtag; struct mbuf *m; int i, ret; - struct ip_fw_args args; - struct m_tag *mtag; - bzero(&args, sizeof(args)); - + args.flags = IPFW_ARGS_ETHER; again: /* fetch start point from rule, if any. remove the tag if present. */ mtag = m_tag_locate(*m0, MTAG_IPFW_RULE, 0, NULL); @@ -327,6 +349,7 @@ again: m_tag_delete(*m0, mtag); if (args.rule.info & IPFW_ONEPASS) return (0); + args.flags |= IPFW_ARGS_REF; } /* I need some amt of data to be contiguous */ @@ -345,10 +368,8 @@ again: args.m = m; /* the packet we are looking at */ args.oif = dir == PFIL_OUT ? ifp: NULL; /* destination, if any */ - args.next_hop = NULL; /* we do not support forward yet */ - args.next_hop6 = NULL; /* we do not support forward yet */ args.eh = &save_eh; /* MAC header for bridged/MAC packets */ - args.inp = NULL; /* used by ipfw uid/gid/jail rules */ + args.inp = inp; /* used by ipfw uid/gid/jail rules */ i = ipfw_chk(&args); m = args.m; if (m != NULL) { @@ -379,14 +400,14 @@ again: case IP_FW_DUMMYNET: ret = EACCES; - int dir2; if (ip_dn_io_ptr == NULL) break; /* i.e. drop */ *m0 = NULL; - dir2 = (dir == PFIL_IN) ? DIR_IN : DIR_OUT; - ip_dn_io_ptr(&m, dir2 | PROTO_LAYER2, &args); + dir = (dir == PFIL_IN) ? DIR_IN : DIR_OUT; + MPASS(args->flags & IPFW_ARGS_REF); + ip_dn_io_ptr(&m, dir | PROTO_LAYER2, &args); return 0; case IP_FW_NGTEE: @@ -395,6 +416,7 @@ again: ret = EACCES; break; /* i.e. drop */ } + MPASS(args->flags & IPFW_ARGS_REF); ret = ng_ipfw_input_p(m0, (dir == PFIL_IN) ? DIR_IN : DIR_OUT, &args, (i == IP_FW_NGTEE) ? 1 : 0); if (i == IP_FW_NGTEE) /* ignore errors for NGTEE */ @@ -411,7 +433,7 @@ again: *m0 = NULL; } - return ret; + return (ret); } /* do the divert, return 1 on error 0 on success */ Modified: head/sys/netpfil/ipfw/ip_fw_private.h ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_private.h Thu Jan 10 00:52:06 2019 (r342907) +++ head/sys/netpfil/ipfw/ip_fw_private.h Thu Jan 10 01:47:57 2019 (r342908) @@ -83,11 +83,13 @@ struct _ip6dn_args { * efficient to pass variables around and extend the interface. */ struct ip_fw_args { - struct mbuf *m; /* the mbuf chain */ - struct ifnet *oif; /* output interface */ - struct sockaddr_in *next_hop; /* forward address */ - struct sockaddr_in6 *next_hop6; /* ipv6 forward address */ - + uint32_t flags; +#define IPFW_ARGS_ETHER 0x0001 /* has valid ethernet header */ +#define IPFW_ARGS_NH4 0x0002 /* has IPv4 next hop in hopstore */ +#define IPFW_ARGS_NH6 0x0004 /* has IPv6 next hop in hopstore */ +#define IPFW_ARGS_NH4PTR 0x0008 /* has IPv4 next hop in next_hop */ +#define IPFW_ARGS_NH6PTR 0x0010 /* has IPv6 next hop in next_hop6 */ +#define IPFW_ARGS_REF 0x0020 /* has valid ipfw_rule_ref */ /* * On return, it points to the matching rule. * On entry, rule.slot > 0 means the info is valid and @@ -95,19 +97,33 @@ struct ip_fw_args { * If chain_id == chain->id && slot >0 then jump to that slot. * Otherwise, we locate the first rule >= rulenum:rule_id */ - struct ipfw_rule_ref rule; /* match/restart info */ + struct ipfw_rule_ref rule; /* match/restart info */ - struct ether_header *eh; /* for bridged packets */ - - struct ipfw_flow_id f_id; /* grabbed from IP header */ - //uint32_t cookie; /* a cookie depending on rule action */ - struct inpcb *inp; - - struct _ip6dn_args dummypar; /* dummynet->ip6_output */ - union { /* store here if cannot use a pointer */ - struct sockaddr_in hopstore; - struct sockaddr_in6 hopstore6; + struct ifnet *oif; /* output interface */ + struct inpcb *inp; + union { + /* + * We don't support forwarding on layer2, thus we can + * keep eh pointer in this union. + * next_hop[6] pointers can be used to point to next hop + * stored in rule's opcode to avoid copying into hopstore. + * Also, it is expected that all 0x1-0x10 flags are mutually + * exclusive. + */ + struct ether_header *eh; /* for bridged packets */ + struct sockaddr_in *next_hop; + struct sockaddr_in6 *next_hop6; + /* ipfw next hop storage */ + struct sockaddr_in hopstore; + struct ip_fw_nh6 { + struct in6_addr sin6_addr; + uint32_t sin6_scope_id; + uint16_t sin6_port; + } hopstore6; }; + + struct mbuf *m; /* the mbuf chain */ + struct ipfw_flow_id f_id; /* grabbed from IP header */ }; MALLOC_DECLARE(M_IPFW); From owner-svn-src-head@freebsd.org Thu Jan 10 02:01:21 2019 Return-Path: Delivered-To: svn-src-head@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 CE22A1496D6E; Thu, 10 Jan 2019 02:01:21 +0000 (UTC) (envelope-from ae@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 75C5988A51; Thu, 10 Jan 2019 02:01:21 +0000 (UTC) (envelope-from ae@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 307D924CBA; Thu, 10 Jan 2019 02:01:21 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0A21KFu044658; Thu, 10 Jan 2019 02:01:20 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0A21K8M044657; Thu, 10 Jan 2019 02:01:20 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201901100201.x0A21K8M044657@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 10 Jan 2019 02:01:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342909 - head/sys/netpfil/ipfw X-SVN-Group: head X-SVN-Commit-Author: ae X-SVN-Commit-Paths: head/sys/netpfil/ipfw X-SVN-Commit-Revision: 342909 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 75C5988A51 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.948,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jan 2019 02:01:22 -0000 Author: ae Date: Thu Jan 10 02:01:20 2019 New Revision: 342909 URL: https://svnweb.freebsd.org/changeset/base/342909 Log: Fix the build with INVARIANTS. MFC after: 1 month Modified: head/sys/netpfil/ipfw/ip_fw_pfil.c Modified: head/sys/netpfil/ipfw/ip_fw_pfil.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_pfil.c Thu Jan 10 01:47:57 2019 (r342908) +++ head/sys/netpfil/ipfw/ip_fw_pfil.c Thu Jan 10 02:01:20 2019 (r342909) @@ -257,7 +257,7 @@ again: ret = EACCES; if (ip_dn_io_ptr == NULL) break; /* i.e. drop */ - MPASS(args->flags & IPFW_ARGS_REF); + MPASS(args.flags & IPFW_ARGS_REF); if (mtod(*m0, struct ip *)->ip_v == 4) ret = ip_dn_io_ptr(m0, dir, &args); else if (mtod(*m0, struct ip *)->ip_v == 6) @@ -281,7 +281,7 @@ again: ret = EACCES; break; /* i.e. drop */ } - MPASS(args->flags & IPFW_ARGS_REF); + MPASS(args.flags & IPFW_ARGS_REF); ret = ipfw_divert(m0, dir, &args.rule, (ipfw == IP_FW_TEE) ? 1 : 0); /* continue processing for the original packet (tee). */ @@ -295,7 +295,7 @@ again: ret = EACCES; break; /* i.e. drop */ } - MPASS(args->flags & IPFW_ARGS_REF); + MPASS(args.flags & IPFW_ARGS_REF); ret = ng_ipfw_input_p(m0, dir, &args, (ipfw == IP_FW_NGTEE) ? 1 : 0); if (ipfw == IP_FW_NGTEE) /* ignore errors for NGTEE */ @@ -406,7 +406,7 @@ again: *m0 = NULL; dir = (dir == PFIL_IN) ? DIR_IN : DIR_OUT; - MPASS(args->flags & IPFW_ARGS_REF); + MPASS(args.flags & IPFW_ARGS_REF); ip_dn_io_ptr(&m, dir | PROTO_LAYER2, &args); return 0; @@ -416,7 +416,7 @@ again: ret = EACCES; break; /* i.e. drop */ } - MPASS(args->flags & IPFW_ARGS_REF); + MPASS(args.flags & IPFW_ARGS_REF); ret = ng_ipfw_input_p(m0, (dir == PFIL_IN) ? DIR_IN : DIR_OUT, &args, (i == IP_FW_NGTEE) ? 1 : 0); if (i == IP_FW_NGTEE) /* ignore errors for NGTEE */ From owner-svn-src-head@freebsd.org Thu Jan 10 02:59:20 2019 Return-Path: Delivered-To: svn-src-head@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 C77131498635; Thu, 10 Jan 2019 02:59:20 +0000 (UTC) (envelope-from pfg@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 6E1068AA5C; Thu, 10 Jan 2019 02:59:20 +0000 (UTC) (envelope-from pfg@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 61659255DE; Thu, 10 Jan 2019 02:59:20 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0A2xKNr072908; Thu, 10 Jan 2019 02:59:20 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0A2xKSZ072907; Thu, 10 Jan 2019 02:59:20 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201901100259.x0A2xKSZ072907@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 10 Jan 2019 02:59:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342910 - head/gnu/usr.bin/grep X-SVN-Group: head X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: head/gnu/usr.bin/grep X-SVN-Commit-Revision: 342910 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6E1068AA5C 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.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jan 2019 02:59:21 -0000 Author: pfg Date: Thu Jan 10 02:59:19 2019 New Revision: 342910 URL: https://svnweb.freebsd.org/changeset/base/342910 Log: grep(1) outputs NOT-matched lines with multi-byte characters PR 113343 MFC after: 2 months Modified: head/gnu/usr.bin/grep/search.c Modified: head/gnu/usr.bin/grep/search.c ============================================================================== --- head/gnu/usr.bin/grep/search.c Thu Jan 10 02:01:20 2019 (r342909) +++ head/gnu/usr.bin/grep/search.c Thu Jan 10 02:59:19 2019 (r342910) @@ -401,9 +401,12 @@ EGexecute (char const *buf, size_t size, size_t *match } if (mlen == (size_t) -2) - /* Offset points inside multibyte character: - * no good. */ - break; + { + /* Offset points inside multibyte character: + * no good. */ + memset (&mbs, '\0', sizeof (mbstate_t)); + break; + } beg += mlen; bytes_left -= mlen; @@ -463,9 +466,12 @@ EGexecute (char const *buf, size_t size, size_t *match } if (mlen == (size_t) -2) - /* Offset points inside multibyte character: - * no good. */ - break; + { + /* Offset points inside multibyte character: + * no good. */ + memset (&mbs, '\0', sizeof (mbstate_t)); + break; + } beg += mlen; bytes_left -= mlen; @@ -926,15 +932,21 @@ Fexecute (char const *buf, size_t size, size_t *match_ } if (mlen == (size_t) -2) - /* Offset points inside multibyte character: no good. */ - break; + { + /* Offset points inside multibyte character: no good. */ + memset (&mbs, '\0', sizeof (mbstate_t)); + break; + } beg += mlen; bytes_left -= mlen; } if (bytes_left) - continue; + { + beg += bytes_left; + continue; + } } else #endif /* MBS_SUPPORT */ @@ -1052,6 +1064,7 @@ Fexecute (char const *buf, size_t size, size_t *match_ { /* Offset points inside multibyte character: * no good. */ + memset (&mbs, '\0', sizeof (mbstate_t)); break; } From owner-svn-src-head@freebsd.org Thu Jan 10 03:27:22 2019 Return-Path: Delivered-To: svn-src-head@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 30F2114999A7; Thu, 10 Jan 2019 03:27:22 +0000 (UTC) (envelope-from kevans@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 C6C888C5C5; Thu, 10 Jan 2019 03:27:21 +0000 (UTC) (envelope-from kevans@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 B88E825CE1; Thu, 10 Jan 2019 03:27:21 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0A3RLkl089244; Thu, 10 Jan 2019 03:27:21 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0A3RKPk089240; Thu, 10 Jan 2019 03:27:20 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201901100327.x0A3RKPk089240@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 10 Jan 2019 03:27:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342911 - in head: lib/libbe sbin/bectl sbin/bectl/tests X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head: lib/libbe sbin/bectl sbin/bectl/tests X-SVN-Commit-Revision: 342911 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C6C888C5C5 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.971,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jan 2019 03:27:22 -0000 Author: kevans Date: Thu Jan 10 03:27:20 2019 New Revision: 342911 URL: https://svnweb.freebsd.org/changeset/base/342911 Log: libbe(3): Change be_mount to mount/unmount child datasets This set of changes is geared towards making bectl respect deep boot environments when they exist and are mounted. The deep BE composition functionality (`bectl add`) remains disabled for the time being. This set of changes has no effect for the average user. but allows deep BE users to upgrade properly with their current setup. libbe(3): Open the target boot environment and get a zfs handle, then pass that with the target mountpoint to be_mount_iter; If the BE_MNT_DEEP flag is set call zfs_iter_filesystems and mount the child datasets. Similar logic is employed when unmounting the datasets, save for children are unmounted first. bectl(8): Change bectl_cmd_jail to pass the BE_MNT_DEEP flag when calling be_mount as well as call be_unmount when cleaning up after the jail has exited instead of umount(2) directly. PR: 234795 Submitted by: Wes Maag (test additions by kevans) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D18796 Modified: head/lib/libbe/be_access.c head/sbin/bectl/bectl.c head/sbin/bectl/bectl_jail.c head/sbin/bectl/tests/bectl_test.sh Modified: head/lib/libbe/be_access.c ============================================================================== --- head/lib/libbe/be_access.c Thu Jan 10 02:59:19 2019 (r342910) +++ head/lib/libbe/be_access.c Thu Jan 10 03:27:20 2019 (r342911) @@ -3,6 +3,7 @@ * * Copyright (c) 2017 Kyle J. Kneitinger * Copyright (c) 2018 Kyle Evans + * Copyright (c) 2019 Wes Maag * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -38,6 +39,14 @@ struct be_mountcheck_info { char *name; }; +struct be_mount_info { + libbe_handle_t *lbh; + const char *be; + const char *mountpoint; + int mntflags; + int deepmount; +}; + static int be_mountcheck_cb(zfs_handle_t *zfs_hdl, void *data) { @@ -59,6 +68,105 @@ be_mountcheck_cb(zfs_handle_t *zfs_hdl, void *data) } /* + * Called from be_mount, uses the given zfs_handle and attempts to + * mount it at the passed mountpoint. If the deepmount flag is set, continue + * calling the function for each child dataset. + */ +static int +be_mount_iter(zfs_handle_t *zfs_hdl, void *data) +{ + int err; + char *mountpoint; + char tmp[BE_MAXPATHLEN], zfs_mnt[BE_MAXPATHLEN]; + struct be_mount_info *info; + + info = (struct be_mount_info *)data; + + if (zfs_is_mounted(zfs_hdl, &mountpoint)) { + free(mountpoint); + return (0); + } + + if (zfs_prop_get_int(zfs_hdl, ZFS_PROP_CANMOUNT) == ZFS_CANMOUNT_OFF) + return (0); + + if (zfs_prop_get(zfs_hdl, ZFS_PROP_MOUNTPOINT, zfs_mnt, BE_MAXPATHLEN, + NULL, NULL, 0, 1)) + return (1); + + if (strcmp("none", zfs_mnt) != 0) { + char opt = '\0'; + + mountpoint = be_mountpoint_augmented(info->lbh, zfs_mnt); + + snprintf(tmp, BE_MAXPATHLEN, "%s%s", info->mountpoint, + mountpoint); + + if ((err = zmount(zfs_get_name(zfs_hdl), tmp, info->mntflags, + __DECONST(char *, MNTTYPE_ZFS), NULL, 0, &opt, 1)) != 0) { + switch (errno) { + case ENAMETOOLONG: + return (set_error(info->lbh, BE_ERR_PATHLEN)); + case ELOOP: + case ENOENT: + case ENOTDIR: + return (set_error(info->lbh, BE_ERR_BADPATH)); + case EPERM: + return (set_error(info->lbh, BE_ERR_PERMS)); + case EBUSY: + return (set_error(info->lbh, BE_ERR_PATHBUSY)); + default: + return (set_error(info->lbh, BE_ERR_UNKNOWN)); + } + } + } + + if (!info->deepmount) + return (0); + + return (zfs_iter_filesystems(zfs_hdl, be_mount_iter, info)); +} + + +static int +be_umount_iter(zfs_handle_t *zfs_hdl, void *data) +{ + + int err; + char *mountpoint; + struct be_mount_info *info; + + info = (struct be_mount_info *)data; + + if((err = zfs_iter_filesystems(zfs_hdl, be_umount_iter, info)) != 0) { + return (err); + } + + if (!zfs_is_mounted(zfs_hdl, &mountpoint)) { + return (0); + } + free(mountpoint); + + if (zfs_unmount(zfs_hdl, NULL, info->mntflags) != 0) { + switch (errno) { + case ENAMETOOLONG: + return (set_error(info->lbh, BE_ERR_PATHLEN)); + case ELOOP: + case ENOENT: + case ENOTDIR: + return (set_error(info->lbh, BE_ERR_BADPATH)); + case EPERM: + return (set_error(info->lbh, BE_ERR_PERMS)); + case EBUSY: + return (set_error(info->lbh, BE_ERR_PATHBUSY)); + default: + return (set_error(info->lbh, BE_ERR_UNKNOWN)); + } + } + return (0); +} + +/* * usage */ int @@ -108,8 +216,10 @@ be_mount(libbe_handle_t *lbh, char *bootenv, char *mou { char be[BE_MAXPATHLEN]; char mnt_temp[BE_MAXPATHLEN]; - int mntflags; + int mntflags, mntdeep; int err; + struct be_mount_info info; + zfs_handle_t *zhdl; if ((err = be_root_concat(lbh, bootenv, be)) != 0) return (set_error(lbh, err)); @@ -120,6 +230,7 @@ be_mount(libbe_handle_t *lbh, char *bootenv, char *mou if (is_mounted(lbh->lzh, be, NULL)) return (set_error(lbh, BE_ERR_MOUNTED)); + mntdeep = (flags & BE_MNT_DEEP) ? 1 : 0; mntflags = (flags & BE_MNT_FORCE) ? MNT_FORCE : 0; /* Create mountpoint if it is not specified */ @@ -129,24 +240,20 @@ be_mount(libbe_handle_t *lbh, char *bootenv, char *mou return (set_error(lbh, BE_ERR_IO)); } - char opt = '\0'; - if ((err = zmount(be, (mountpoint == NULL) ? mnt_temp : mountpoint, - mntflags, __DECONST(char *, MNTTYPE_ZFS), NULL, 0, &opt, 1)) != 0) { - switch (errno) { - case ENAMETOOLONG: - return (set_error(lbh, BE_ERR_PATHLEN)); - case ELOOP: - case ENOENT: - case ENOTDIR: - return (set_error(lbh, BE_ERR_BADPATH)); - case EPERM: - return (set_error(lbh, BE_ERR_PERMS)); - case EBUSY: - return (set_error(lbh, BE_ERR_PATHBUSY)); - default: - return (set_error(lbh, BE_ERR_UNKNOWN)); - } + if ((zhdl = zfs_open(lbh->lzh, be, ZFS_TYPE_FILESYSTEM)) == NULL) + return (set_error(lbh, BE_ERR_ZFSOPEN)); + + info.lbh = lbh; + info.be = be; + info.mountpoint = (mountpoint == NULL) ? mnt_temp : mountpoint; + info.mntflags = mntflags; + info.deepmount = mntdeep; + + if((err = be_mount_iter(zhdl, &info) != 0)) { + zfs_close(zhdl); + return (err); } + zfs_close(zhdl); if (result_loc != NULL) strlcpy(result_loc, mountpoint == NULL ? mnt_temp : mountpoint, @@ -155,16 +262,16 @@ be_mount(libbe_handle_t *lbh, char *bootenv, char *mou return (BE_ERR_SUCCESS); } - /* * usage */ int be_unmount(libbe_handle_t *lbh, char *bootenv, int flags) { - int err, mntflags; + int err; char be[BE_MAXPATHLEN]; zfs_handle_t *root_hdl; + struct be_mount_info info; if ((err = be_root_concat(lbh, bootenv, be)) != 0) return (set_error(lbh, err)); @@ -172,27 +279,17 @@ be_unmount(libbe_handle_t *lbh, char *bootenv, int fla if ((root_hdl = zfs_open(lbh->lzh, be, ZFS_TYPE_FILESYSTEM)) == NULL) return (set_error(lbh, BE_ERR_ZFSOPEN)); - mntflags = (flags & BE_MNT_FORCE) ? MS_FORCE : 0; + info.lbh = lbh; + info.be = be; + info.mountpoint = NULL; + info.mntflags = (flags & BE_MNT_FORCE) ? MS_FORCE : 0; - if (zfs_unmount(root_hdl, NULL, mntflags) != 0) { + if ((err = be_umount_iter(root_hdl, &info)) != 0) { zfs_close(root_hdl); - switch (errno) { - case ENAMETOOLONG: - return (set_error(lbh, BE_ERR_PATHLEN)); - case ELOOP: - case ENOENT: - case ENOTDIR: - return (set_error(lbh, BE_ERR_BADPATH)); - case EPERM: - return (set_error(lbh, BE_ERR_PERMS)); - case EBUSY: - return (set_error(lbh, BE_ERR_PATHBUSY)); - default: - return (set_error(lbh, BE_ERR_UNKNOWN)); - } + return (err); } - zfs_close(root_hdl); + zfs_close(root_hdl); return (BE_ERR_SUCCESS); } Modified: head/sbin/bectl/bectl.c ============================================================================== --- head/sbin/bectl/bectl.c Thu Jan 10 02:59:19 2019 (r342910) +++ head/sbin/bectl/bectl.c Thu Jan 10 03:27:20 2019 (r342911) @@ -378,8 +378,10 @@ bectl_cmd_mount(int argc, char *argv[]) { char result_loc[BE_MAXPATHLEN]; char *bootenv, *mountpoint; - int err; + int err, mntflags; + /* XXX TODO: Allow shallow */ + mntflags = BE_MNT_DEEP; if (argc < 2) { fprintf(stderr, "bectl mount: missing argument(s)\n"); return (usage(false)); @@ -393,7 +395,7 @@ bectl_cmd_mount(int argc, char *argv[]) bootenv = argv[1]; mountpoint = ((argc == 3) ? argv[2] : NULL); - err = be_mount(be, bootenv, mountpoint, 0, result_loc); + err = be_mount(be, bootenv, mountpoint, mntflags, result_loc); switch (err) { case BE_ERR_SUCCESS: Modified: head/sbin/bectl/bectl_jail.c ============================================================================== --- head/sbin/bectl/bectl_jail.c Thu Jan 10 02:59:19 2019 (r342910) +++ head/sbin/bectl/bectl_jail.c Thu Jan 10 03:27:20 2019 (r342911) @@ -180,10 +180,12 @@ int bectl_cmd_jail(int argc, char *argv[]) { char *bootenv, *mountpoint; - int jid, opt, ret; + int jid, mntflags, opt, ret; bool default_hostname, interactive, unjail; pid_t pid; + /* XXX TODO: Allow shallow */ + mntflags = BE_MNT_DEEP; default_hostname = interactive = unjail = true; jpcnt = INIT_PARAMCOUNT; jp = malloc(jpcnt * sizeof(*jp)); @@ -250,7 +252,7 @@ bectl_cmd_jail(int argc, char *argv[]) mountpoint = NULL; else mountpoint = mnt_loc; - if (be_mount(be, bootenv, mountpoint, 0, mnt_loc) != BE_ERR_SUCCESS) { + if (be_mount(be, bootenv, mountpoint, mntflags, mnt_loc) != BE_ERR_SUCCESS) { fprintf(stderr, "could not mount bootenv\n"); return (1); } @@ -301,7 +303,7 @@ bectl_cmd_jail(int argc, char *argv[]) if (unjail) { jail_remove(jid); - unmount(mnt_loc, 0); + be_unmount(be, bootenv, 0); } return (0); @@ -415,7 +417,7 @@ bectl_cmd_unjail(int argc, char *argv[]) } jail_remove(jid); - unmount(path, 0); + be_unmount(be, target, 0); return (0); } Modified: head/sbin/bectl/tests/bectl_test.sh ============================================================================== --- head/sbin/bectl/tests/bectl_test.sh Thu Jan 10 02:59:19 2019 (r342910) +++ head/sbin/bectl/tests/bectl_test.sh Thu Jan 10 03:27:20 2019 (r342911) @@ -42,7 +42,21 @@ bectl_create_setup() atf_check zfs create -o mountpoint=/ -o canmount=noauto \ ${zpool}/ROOT/default } +bectl_create_deep_setup() +{ + zpool=$1 + disk=$2 + mnt=$3 + bectl_create_setup ${zpool} ${disk} ${mnt} + atf_check mkdir -p ${root} + atf_check -o ignore bectl -r ${zpool}/ROOT mount default ${root} + atf_check mkdir -p ${root}/usr + atf_check zfs create -o mountpoint=/usr -o canmount=noauto \ + ${zpool}/ROOT/default/usr + atf_check -o ignore bectl -r ${zpool}/ROOT umount default +} + bectl_cleanup() { zpool=$1 @@ -183,7 +197,7 @@ bectl_mount_body() mount=${cwd}/mnt root=${mount}/root - bectl_create_setup ${zpool} ${disk} ${mount} + bectl_create_deep_setup ${zpool} ${disk} ${mount} atf_check mkdir -p ${root} # Test unmount first... atf_check -o not-empty bectl -r ${zpool}/ROOT mount default ${root} @@ -246,7 +260,7 @@ bectl_jail_body() if [ ! -f /rescue/rescue ]; then atf_skip "This test requires a rescue binary" fi - bectl_create_setup ${zpool} ${disk} ${mount} + bectl_create_deep_setup ${zpool} ${disk} ${mount} # Prepare our minimal BE... plop a rescue binary into it atf_check mkdir -p ${root} atf_check -o ignore bectl -r ${zpool}/ROOT mount default ${root} @@ -263,9 +277,9 @@ bectl_jail_body() atf_check -o empty -s exit:0 bectl -r ${zpool}/ROOT unjail default # Basic command-mode tests, with and without jail cleanup - atf_check -o inline:"rescue\n" bectl -r ${zpool}/ROOT \ + atf_check -o inline:"rescue\nusr\n" bectl -r ${zpool}/ROOT \ jail default /rescue/rescue ls -1 - atf_check -o inline:"rescue\n" bectl -r ${zpool}/ROOT \ + atf_check -o inline:"rescue\nusr\n" bectl -r ${zpool}/ROOT \ jail -Uo path=${root} default /rescue/rescue ls -1 atf_check [ -f ${root}/rescue/rescue ] atf_check bectl -r ${zpool}/ROOT ujail default From owner-svn-src-head@freebsd.org Thu Jan 10 05:49:49 2019 Return-Path: Delivered-To: svn-src-head@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 E2E4C149EA59; Thu, 10 Jan 2019 05:49:48 +0000 (UTC) (envelope-from avos@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 89B7E6ACA9; Thu, 10 Jan 2019 05:49:48 +0000 (UTC) (envelope-from avos@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 619CE2764A; Thu, 10 Jan 2019 05:49:48 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0A5nmmo062050; Thu, 10 Jan 2019 05:49:48 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0A5nmIe062048; Thu, 10 Jan 2019 05:49:48 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201901100549.x0A5nmIe062048@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Thu, 10 Jan 2019 05:49:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342912 - in head/sys/dev/rtwn/rtl8192c: . usb X-SVN-Group: head X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in head/sys/dev/rtwn/rtl8192c: . usb X-SVN-Commit-Revision: 342912 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 89B7E6ACA9 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.98)[-0.976,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jan 2019 05:49:49 -0000 Author: avos Date: Thu Jan 10 05:49:47 2019 New Revision: 342912 URL: https://svnweb.freebsd.org/changeset/base/342912 Log: rtwn_usb(4): add IQ calibration support for RTL8192CU The code is similar to the one for RTL8188E* and probably should be shared with RTL8188CE (needs to be tested). Checked with RTL8188CUS, STA mode. MFC after: 5 days Modified: head/sys/dev/rtwn/rtl8192c/r92c_calib.c head/sys/dev/rtwn/rtl8192c/usb/r92cu_attach.c Modified: head/sys/dev/rtwn/rtl8192c/r92c_calib.c ============================================================================== --- head/sys/dev/rtwn/rtl8192c/r92c_calib.c Thu Jan 10 03:27:20 2019 (r342911) +++ head/sys/dev/rtwn/rtl8192c/r92c_calib.c Thu Jan 10 05:49:47 2019 (r342912) @@ -46,16 +46,366 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include +/* Registers to save and restore during IQ calibration. */ +struct r92c_iq_cal_reg_vals { + uint32_t adda[16]; + uint8_t txpause; + uint8_t bcn_ctrl[2]; + uint32_t gpio_muxcfg; + uint32_t cck0_afesetting; + uint32_t ofdm0_trxpathena; + uint32_t ofdm0_trmuxpar; + uint32_t fpga0_rfifacesw0; + uint32_t fpga0_rfifacesw1; + uint32_t fpga0_rfifaceoe0; + uint32_t fpga0_rfifaceoe1; + uint32_t config_ant0; + uint32_t config_ant1; +}; + +/* XXX TODO: merge */ +static int +r92c_iq_calib_chain(struct rtwn_softc *sc, int chain, uint16_t tx[2], + uint16_t rx[2]) +{ + uint32_t status; + + if (chain == 0) { /* IQ calibration for chain 0. */ + /* IQ calibration settings for chain 0. */ + rtwn_bb_write(sc, R92C_TX_IQK_TONE(0), 0x10008c1f); + rtwn_bb_write(sc, R92C_RX_IQK_TONE(0), 0x10008c1f); + rtwn_bb_write(sc, R92C_TX_IQK_PI(0), 0x82140102); + + if (sc->ntxchains > 1) { + rtwn_bb_write(sc, R92C_RX_IQK_PI(0), 0x28160202); + /* IQ calibration settings for chain 1. */ + rtwn_bb_write(sc, R92C_TX_IQK_TONE(1), 0x10008c22); + rtwn_bb_write(sc, R92C_RX_IQK_TONE(1), 0x10008c22); + rtwn_bb_write(sc, R92C_TX_IQK_PI(1), 0x82140102); + rtwn_bb_write(sc, R92C_RX_IQK_PI(1), 0x28160202); + } else + rtwn_bb_write(sc, R92C_RX_IQK_PI(0), 0x28160502); + + /* LO calibration settings. */ + rtwn_bb_write(sc, R92C_IQK_AGC_RSP, 0x001028d1); + /* We're doing LO and IQ calibration in one shot. */ + rtwn_bb_write(sc, R92C_IQK_AGC_PTS, 0xf9000000); + rtwn_bb_write(sc, R92C_IQK_AGC_PTS, 0xf8000000); + + } else { /* IQ calibration for chain 1. */ + /* We're doing LO and IQ calibration in one shot. */ + rtwn_bb_write(sc, R92C_IQK_AGC_CONT, 2); + rtwn_bb_write(sc, R92C_IQK_AGC_CONT, 0); + } + + /* Give LO and IQ calibrations the time to complete. */ + rtwn_delay(sc, 10000); + + /* Read IQ calibration status. */ + status = rtwn_bb_read(sc, R92C_RX_POWER_IQK_AFTER(0)); + + if (status & (1 << (28 + chain * 3))) + return (0); /* Tx failed. */ + /* Read Tx IQ calibration results. */ + tx[0] = MS(rtwn_bb_read(sc, R92C_TX_POWER_IQK_BEFORE(chain)), + R92C_POWER_IQK_RESULT); + tx[1] = MS(rtwn_bb_read(sc, R92C_TX_POWER_IQK_AFTER(chain)), + R92C_POWER_IQK_RESULT); + if (tx[0] == 0x142 || tx[1] == 0x042) + return (0); /* Tx failed. */ + + if (status & (1 << (27 + chain * 3))) + return (1); /* Rx failed. */ + /* Read Rx IQ calibration results. */ + rx[0] = MS(rtwn_bb_read(sc, R92C_RX_POWER_IQK_BEFORE(chain)), + R92C_POWER_IQK_RESULT); + rx[1] = MS(rtwn_bb_read(sc, R92C_RX_POWER_IQK_AFTER(chain)), + R92C_POWER_IQK_RESULT); + if (rx[0] == 0x132 || rx[1] == 0x036) + return (1); /* Rx failed. */ + + return (3); /* Both Tx and Rx succeeded. */ +} + +static void +r92c_iq_calib_run(struct rtwn_softc *sc, int n, uint16_t tx[2][2], + uint16_t rx[2][2], struct r92c_iq_cal_reg_vals *vals) +{ + /* Registers to save and restore during IQ calibration. */ + static const uint16_t reg_adda[16] = { + 0x85c, 0xe6c, 0xe70, 0xe74, + 0xe78, 0xe7c, 0xe80, 0xe84, + 0xe88, 0xe8c, 0xed0, 0xed4, + 0xed8, 0xedc, 0xee0, 0xeec + }; + int i, chain; + uint32_t hssi_param1; + + if (n == 0) { + for (i = 0; i < nitems(reg_adda); i++) + vals->adda[i] = rtwn_bb_read(sc, reg_adda[i]); + + vals->txpause = rtwn_read_1(sc, R92C_TXPAUSE); + vals->bcn_ctrl[0] = rtwn_read_1(sc, R92C_BCN_CTRL(0)); + vals->bcn_ctrl[1] = rtwn_read_1(sc, R92C_BCN_CTRL(1)); + vals->gpio_muxcfg = rtwn_read_4(sc, R92C_GPIO_MUXCFG); + } + + if (sc->ntxchains == 1) { + rtwn_bb_write(sc, reg_adda[0], 0x0b1b25a0); + for (i = 1; i < nitems(reg_adda); i++) + rtwn_bb_write(sc, reg_adda[i], 0x0bdb25a0); + } else { + for (i = 0; i < nitems(reg_adda); i++) + rtwn_bb_write(sc, reg_adda[i], 0x04db25a4); + } + + hssi_param1 = rtwn_bb_read(sc, R92C_HSSI_PARAM1(0)); + if (!(hssi_param1 & R92C_HSSI_PARAM1_PI)) { + rtwn_bb_write(sc, R92C_HSSI_PARAM1(0), + hssi_param1 | R92C_HSSI_PARAM1_PI); + rtwn_bb_write(sc, R92C_HSSI_PARAM1(1), + hssi_param1 | R92C_HSSI_PARAM1_PI); + } + + if (n == 0) { + vals->cck0_afesetting = rtwn_bb_read(sc, R92C_CCK0_AFESETTING); + vals->ofdm0_trxpathena = + rtwn_bb_read(sc, R92C_OFDM0_TRXPATHENA); + vals->ofdm0_trmuxpar = rtwn_bb_read(sc, R92C_OFDM0_TRMUXPAR); + vals->fpga0_rfifacesw0 = + rtwn_bb_read(sc, R92C_FPGA0_RFIFACESW(0)); + vals->fpga0_rfifacesw1 = + rtwn_bb_read(sc, R92C_FPGA0_RFIFACESW(1)); + vals->fpga0_rfifaceoe0 = + rtwn_bb_read(sc, R92C_FPGA0_RFIFACEOE(0)); + vals->fpga0_rfifaceoe1 = + rtwn_bb_read(sc, R92C_FPGA0_RFIFACEOE(1)); + vals->config_ant0 = rtwn_bb_read(sc, R92C_CONFIG_ANT(0)); + vals->config_ant1 = rtwn_bb_read(sc, R92C_CONFIG_ANT(1)); + } + + rtwn_bb_setbits(sc, R92C_CCK0_AFESETTING, 0, 0x0f000000); + rtwn_bb_write(sc, R92C_OFDM0_TRXPATHENA, 0x03a05600); + rtwn_bb_write(sc, R92C_OFDM0_TRMUXPAR, 0x000800e4); + rtwn_bb_write(sc, R92C_FPGA0_RFIFACESW(1), 0x22204000); + rtwn_bb_setbits(sc, R92C_FPGA0_RFIFACESW(0), 0, 0x04000400); + rtwn_bb_setbits(sc, R92C_FPGA0_RFIFACEOE(0), 0x400, 0); + rtwn_bb_setbits(sc, R92C_FPGA0_RFIFACEOE(1), 0x400, 0); + + if (sc->ntxchains > 1) { + rtwn_bb_write(sc, R92C_LSSI_PARAM(0), 0x00010000); + rtwn_bb_write(sc, R92C_LSSI_PARAM(1), 0x00010000); + } + + rtwn_write_1(sc, R92C_TXPAUSE, + R92C_TX_QUEUE_AC | R92C_TX_QUEUE_MGT | R92C_TX_QUEUE_HIGH); + rtwn_write_1(sc, R92C_BCN_CTRL(0), + vals->bcn_ctrl[0] & ~R92C_BCN_CTRL_EN_BCN); + rtwn_write_1(sc, R92C_BCN_CTRL(1), + vals->bcn_ctrl[1] & ~R92C_BCN_CTRL_EN_BCN); + rtwn_write_1(sc, R92C_GPIO_MUXCFG, + vals->gpio_muxcfg & ~R92C_GPIO_MUXCFG_ENBT); + + rtwn_bb_write(sc, R92C_CONFIG_ANT(0), 0x00080000); + if (sc->ntxchains > 1) + rtwn_bb_write(sc, R92C_CONFIG_ANT(1), 0x00080000); + + rtwn_bb_write(sc, R92C_FPGA0_IQK, 0x80800000); + rtwn_bb_write(sc, R92C_TX_IQK, 0x01007c00); + rtwn_bb_write(sc, R92C_RX_IQK, 0x01004800); + + for (chain = 0; chain < sc->ntxchains; chain++) { + if (chain > 0) { + /* Put chain 0 on standby. */ + rtwn_bb_write(sc, R92C_FPGA0_IQK, 0); + rtwn_bb_write(sc, R92C_LSSI_PARAM(0), 0x00010000); + rtwn_bb_write(sc, R92C_FPGA0_IQK, 0x80800000); + + /* Enable chain 1. */ + for (i = 0; i < nitems(reg_adda); i++) + rtwn_bb_write(sc, reg_adda[i], 0x0b1b25a4); + } + + /* Run IQ calibration twice. */ + for (i = 0; i < 2; i++) { + int ret; + + ret = r92c_iq_calib_chain(sc, chain, + tx[chain], rx[chain]); + if (ret == 0) { + RTWN_DPRINTF(sc, RTWN_DEBUG_CALIB, + "%s: chain %d: Tx failed.\n", + __func__, chain); + tx[chain][0] = 0xff; + tx[chain][1] = 0xff; + rx[chain][0] = 0xff; + rx[chain][1] = 0xff; + } else if (ret == 1) { + RTWN_DPRINTF(sc, RTWN_DEBUG_CALIB, + "%s: chain %d: Rx failed.\n", + __func__, chain); + rx[chain][0] = 0xff; + rx[chain][1] = 0xff; + } else if (ret == 3) { + RTWN_DPRINTF(sc, RTWN_DEBUG_CALIB, + "%s: chain %d: Both Tx and Rx " + "succeeded.\n", __func__, chain); + } + } + + RTWN_DPRINTF(sc, RTWN_DEBUG_CALIB, + "%s: results for run %d chain %d: tx[0] 0x%x, " + "tx[1] 0x%x, rx[0] 0x%x, rx[1] 0x%x\n", __func__, n, chain, + tx[chain][0], tx[chain][1], rx[chain][0], rx[chain][1]); + } + + rtwn_bb_write(sc, R92C_CCK0_AFESETTING, vals->cck0_afesetting); + rtwn_bb_write(sc, R92C_OFDM0_TRXPATHENA, vals->ofdm0_trxpathena); + rtwn_bb_write(sc, R92C_FPGA0_RFIFACESW(0), vals->fpga0_rfifacesw0); + rtwn_bb_write(sc, R92C_FPGA0_RFIFACESW(1), vals->fpga0_rfifacesw1); + rtwn_bb_write(sc, R92C_OFDM0_TRMUXPAR, vals->ofdm0_trmuxpar); + rtwn_bb_write(sc, R92C_FPGA0_RFIFACEOE(0), vals->fpga0_rfifaceoe0); + rtwn_bb_write(sc, R92C_FPGA0_RFIFACEOE(1), vals->fpga0_rfifaceoe1); + rtwn_bb_write(sc, R92C_CONFIG_ANT(0), vals->config_ant0); + rtwn_bb_write(sc, R92C_CONFIG_ANT(1), vals->config_ant1); + + rtwn_bb_write(sc, R92C_FPGA0_IQK, 0); + rtwn_bb_write(sc, R92C_LSSI_PARAM(0), 0x00032ed3); + if (sc->ntxchains > 1) + rtwn_bb_write(sc, R92C_LSSI_PARAM(1), 0x00032ed3); + + if (n != 0) { + if (!(hssi_param1 & R92C_HSSI_PARAM1_PI)) { + rtwn_bb_write(sc, R92C_HSSI_PARAM1(0), hssi_param1); + rtwn_bb_write(sc, R92C_HSSI_PARAM1(1), hssi_param1); + } + + for (i = 0; i < nitems(reg_adda); i++) + rtwn_bb_write(sc, reg_adda[i], vals->adda[i]); + + rtwn_write_1(sc, R92C_TXPAUSE, vals->txpause); + rtwn_write_1(sc, R92C_BCN_CTRL(0), vals->bcn_ctrl[0]); + rtwn_write_1(sc, R92C_BCN_CTRL(1), vals->bcn_ctrl[1]); + rtwn_write_4(sc, R92C_GPIO_MUXCFG, vals->gpio_muxcfg); + + rtwn_bb_write(sc, R92C_TX_IQK_TONE(0), 0x01008c00); + rtwn_bb_write(sc, R92C_RX_IQK_TONE(0), 0x01008c00); + } +} + +#define RTWN_IQ_CAL_MAX_TOLERANCE 5 +static int +r92c_iq_calib_compare_results(struct rtwn_softc *sc, uint16_t tx1[2][2], + uint16_t rx1[2][2], uint16_t tx2[2][2], uint16_t rx2[2][2]) +{ + int chain, i, tx_ok[2], rx_ok[2]; + + tx_ok[0] = tx_ok[1] = rx_ok[0] = rx_ok[1] = 0; + for (chain = 0; chain < sc->ntxchains; chain++) { + for (i = 0; i < 2; i++) { + if (tx1[chain][i] == 0xff || tx2[chain][i] == 0xff || + rx1[chain][i] == 0xff || rx2[chain][i] == 0xff) + continue; + + tx_ok[chain] = (abs(tx1[chain][i] - tx2[chain][i]) <= + RTWN_IQ_CAL_MAX_TOLERANCE); + + rx_ok[chain] = (abs(rx1[chain][i] - rx2[chain][i]) <= + RTWN_IQ_CAL_MAX_TOLERANCE); + } + } + + if (sc->ntxchains > 1) + return (tx_ok[0] && tx_ok[1] && rx_ok[0] && rx_ok[1]); + else + return (tx_ok[0] && rx_ok[0]); +} +#undef RTWN_IQ_CAL_MAX_TOLERANCE + +static void +r92c_iq_calib_write_results(struct rtwn_softc *sc, uint16_t tx[2], + uint16_t rx[2], int chain) +{ + uint32_t reg, val, x; + long y, tx_c; + + if (tx[0] == 0xff || tx[1] == 0xff) + return; + + reg = rtwn_bb_read(sc, R92C_OFDM0_TXIQIMBALANCE(chain)); + val = ((reg >> 22) & 0x3ff); + x = tx[0]; + if (x & 0x00000200) + x |= 0xfffffc00; + reg = (((x * val) >> 8) & 0x3ff); + rtwn_bb_setbits(sc, R92C_OFDM0_TXIQIMBALANCE(chain), 0x3ff, reg); + rtwn_bb_setbits(sc, R92C_OFDM0_ECCATHRESHOLD, 0x80000000, + ((x * val) & 0x80) << 24); + + y = tx[1]; + if (y & 0x00000200) + y |= 0xfffffc00; + tx_c = (y * val) >> 8; + rtwn_bb_setbits(sc, R92C_OFDM0_TXAFE(chain), 0xf0000000, + (tx_c & 0x3c0) << 22); + rtwn_bb_setbits(sc, R92C_OFDM0_TXIQIMBALANCE(chain), 0x003f0000, + (tx_c & 0x3f) << 16); + rtwn_bb_setbits(sc, R92C_OFDM0_ECCATHRESHOLD, 0x20000000, + ((y * val) & 0x80) << 22); + + if (rx[0] == 0xff || rx[1] == 0xff) + return; + + rtwn_bb_setbits(sc, R92C_OFDM0_RXIQIMBALANCE(chain), 0x3ff, + rx[0] & 0x3ff); + rtwn_bb_setbits(sc, R92C_OFDM0_RXIQIMBALANCE(chain), 0xfc00, + (rx[1] & 0x3f) << 10); + + if (chain == 0) { + rtwn_bb_setbits(sc, R92C_OFDM0_RXIQEXTANTA, 0xf0000000, + (rx[1] & 0x3c0) << 22); + } else { + rtwn_bb_setbits(sc, R92C_OFDM0_AGCRSSITABLE, 0xf000, + (rx[1] & 0x3c0) << 6); + } +} + +#define RTWN_IQ_CAL_NRUN 3 void r92c_iq_calib(struct rtwn_softc *sc) { - /* XXX TODO */ + struct r92c_iq_cal_reg_vals vals; + uint16_t tx[RTWN_IQ_CAL_NRUN][2][2], rx[RTWN_IQ_CAL_NRUN][2][2]; + int n, valid; + + valid = 0; + for (n = 0; n < RTWN_IQ_CAL_NRUN; n++) { + r92c_iq_calib_run(sc, n, tx[n], rx[n], &vals); + + if (n == 0) + continue; + + /* Valid results remain stable after consecutive runs. */ + valid = r92c_iq_calib_compare_results(sc, tx[n - 1], + rx[n - 1], tx[n], rx[n]); + if (valid) + break; + } + + if (valid) { + r92c_iq_calib_write_results(sc, tx[n][0], rx[n][0], 0); + if (sc->ntxchains > 1) + r92c_iq_calib_write_results(sc, tx[n][1], rx[n][1], 1); + } } +#undef RTWN_IQ_CAL_NRUN void r92c_lc_calib(struct rtwn_softc *sc) Modified: head/sys/dev/rtwn/rtl8192c/usb/r92cu_attach.c ============================================================================== --- head/sys/dev/rtwn/rtl8192c/usb/r92cu_attach.c Thu Jan 10 03:27:20 2019 (r342911) +++ head/sys/dev/rtwn/rtl8192c/usb/r92cu_attach.c Thu Jan 10 05:49:47 2019 (r342912) @@ -187,7 +187,7 @@ r92cu_attach(struct rtwn_usb_softc *uc) sc->sc_llt_init = r92c_llt_init; sc->sc_set_page_size = r92c_set_page_size; sc->sc_lc_calib = r92c_lc_calib; - sc->sc_iq_calib = r92c_iq_calib; /* XXX TODO */ + sc->sc_iq_calib = r92c_iq_calib; sc->sc_read_chipid_vendor = r92c_read_chipid_vendor; sc->sc_adj_devcaps = r92cu_adj_devcaps; sc->sc_vap_preattach = rtwn_nop_softc_vap; From owner-svn-src-head@freebsd.org Thu Jan 10 07:38:36 2019 Return-Path: Delivered-To: svn-src-head@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 E78A114A24CF; Thu, 10 Jan 2019 07:38:35 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (glebi.us [198.45.61.253]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 7AF9D6EA62; Thu, 10 Jan 2019 07:38:35 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id x0A7cRwv017195 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 9 Jan 2019 23:38:28 -0800 (PST) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id x0A7cRER017194; Wed, 9 Jan 2019 23:38:27 -0800 (PST) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@freebsd.org using -f Date: Wed, 9 Jan 2019 23:38:27 -0800 From: Gleb Smirnoff To: "Andrey V. Elsukov" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r342908 - head/sys/netpfil/ipfw Message-ID: <20190110073827.GE18452@FreeBSD.org> References: <201901100147.x0A1lvQX035635@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201901100147.x0A1lvQX035635@repo.freebsd.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: 7AF9D6EA62 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.985,0]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jan 2019 07:38:36 -0000 On Thu, Jan 10, 2019 at 01:47:57AM +0000, Andrey V. Elsukov wrote: A> glebius@ has reported that they at Netflix discovered, that initialization A> of this variable produces significant overhead on packet processing. A> After patching I managed to increase performance of packet processing on A> simple routing with ipfw(4) firewalling to about 11% from 9.8Mpps up to A> 11Mpps (Xeon E5-2660 v4@ + Mellanox 100G card). And with ipfw being processed at driver level, rather than ip_input() the boost is even more dramatic than 11%. https://github.com/glebius/FreeBSD/commits/pfil Soon to reach FreeBSD head :) -- Gleb Smirnoff From owner-svn-src-head@freebsd.org Thu Jan 10 08:45:32 2019 Return-Path: Delivered-To: svn-src-head@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 3967F1481399; Thu, 10 Jan 2019 08:45:32 +0000 (UTC) (envelope-from srs0=uzpj=ps=vega.codepro.be=kp@codepro.be) Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.codepro.be", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C0E2F70E91; Thu, 10 Jan 2019 08:45:31 +0000 (UTC) (envelope-from srs0=uzpj=ps=vega.codepro.be=kp@codepro.be) Received: from vega.codepro.be (unknown [172.16.1.3]) by venus.codepro.be (Postfix) with ESMTP id 5F3E612CEC; Thu, 10 Jan 2019 09:45:24 +0100 (CET) Received: by vega.codepro.be (Postfix, from userid 1001) id 59ED67BA6F; Thu, 10 Jan 2019 09:45:24 +0100 (CET) Date: Thu, 10 Jan 2019 09:45:24 +0100 From: Kristof Provost To: Gleb Smirnoff Cc: "Andrey V. Elsukov" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r342908 - head/sys/netpfil/ipfw Message-ID: <20190110084524.GH49515@vega.codepro.be> References: <201901100147.x0A1lvQX035635@repo.freebsd.org> <20190110073827.GE18452@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190110073827.GE18452@FreeBSD.org> X-Checked-By-NSA: Probably User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: C0E2F70E91 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.94 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.943,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jan 2019 08:45:32 -0000 On 2019-01-09 23:38:27 (-0800), Gleb Smirnoff wrote: > On Thu, Jan 10, 2019 at 01:47:57AM +0000, Andrey V. Elsukov wrote: > A> glebius@ has reported that they at Netflix discovered, that initialization > A> of this variable produces significant overhead on packet processing. > A> After patching I managed to increase performance of packet processing on > A> simple routing with ipfw(4) firewalling to about 11% from 9.8Mpps up to > A> 11Mpps (Xeon E5-2660 v4@ + Mellanox 100G card). > > And with ipfw being processed at driver level, rather than ip_input() > the boost is even more dramatic than 11%. > > https://github.com/glebius/FreeBSD/commits/pfil > > Soon to reach FreeBSD head :) > Nice! That pfil epoch-ification change should help pf too. Kristof From owner-svn-src-head@freebsd.org Thu Jan 10 14:35:29 2019 Return-Path: Delivered-To: svn-src-head@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 59E20148D653; Thu, 10 Jan 2019 14:35:29 +0000 (UTC) (envelope-from emaste@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 026E88642D; Thu, 10 Jan 2019 14:35:29 +0000 (UTC) (envelope-from emaste@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 CE2A856F8; Thu, 10 Jan 2019 14:35:28 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0AEZS38040228; Thu, 10 Jan 2019 14:35:28 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0AEZOnh040206; Thu, 10 Jan 2019 14:35:24 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201901101435.x0AEZOnh040206@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 10 Jan 2019 14:35:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342918 - in head: contrib/elftoolchain contrib/elftoolchain/addr2line contrib/elftoolchain/ar contrib/elftoolchain/common contrib/elftoolchain/cxxfilt contrib/elftoolchain/elfcopy cont... X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head: contrib/elftoolchain contrib/elftoolchain/addr2line contrib/elftoolchain/ar contrib/elftoolchain/common contrib/elftoolchain/cxxfilt contrib/elftoolchain/elfcopy contrib/elftoolchain/libdwarf... X-SVN-Commit-Revision: 342918 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 026E88642D 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)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jan 2019 14:35:29 -0000 Author: emaste Date: Thu Jan 10 14:35:23 2019 New Revision: 342918 URL: https://svnweb.freebsd.org/changeset/base/342918 Log: Update to ELF Tool Chain r3668 Highlights: - Make sure that only TLS sections are sorted into TLS segment. - Fixed multiple errors in "Section to Segment mapping". - Man page updates - ar improvements - elfcopy: avoid filter_reloc uninitialized variable for rela - elfcopy: avoid stripping relocations from static binaries - readelf: avoid printing directory in front of absolute path - readelf: add NT_FREEBSD_FEATURE_CTL FreeBSD note type - test improvements NOTES: Some of these changes originated in FreeBSD and simply reduce diffs between contrib and vendor. ELF Tool Chain ar is not (currently) used in FreeBSD, and there are improvements in both FreeBSD and ELF Tool Chain ar that are not in the other. Sponsored by: The FreeBSD Foundation Added: head/contrib/elftoolchain/README.rst - copied unchanged from r342916, vendor/elftoolchain/dist/README.rst head/contrib/elftoolchain/libelf/libelf_elfmachine.c - copied unchanged from r342916, vendor/elftoolchain/dist/libelf/libelf_elfmachine.c Modified: head/contrib/elftoolchain/addr2line/addr2line.1 head/contrib/elftoolchain/addr2line/addr2line.c head/contrib/elftoolchain/ar/ar.1 head/contrib/elftoolchain/ar/ar.5 head/contrib/elftoolchain/ar/ar.c head/contrib/elftoolchain/ar/ar.h head/contrib/elftoolchain/ar/ranlib.1 head/contrib/elftoolchain/ar/read.c head/contrib/elftoolchain/ar/write.c head/contrib/elftoolchain/common/native-elf-format head/contrib/elftoolchain/cxxfilt/c++filt.1 head/contrib/elftoolchain/elfcopy/elfcopy.1 head/contrib/elftoolchain/elfcopy/elfcopy.h head/contrib/elftoolchain/elfcopy/mcs.1 head/contrib/elftoolchain/elfcopy/sections.c head/contrib/elftoolchain/elfcopy/segments.c head/contrib/elftoolchain/elfcopy/strip.1 head/contrib/elftoolchain/libdwarf/dwarf.3 head/contrib/elftoolchain/libdwarf/dwarf_add_AT_comp_dir.3 head/contrib/elftoolchain/libdwarf/dwarf_add_AT_const_value_string.3 head/contrib/elftoolchain/libdwarf/dwarf_add_AT_dataref.3 head/contrib/elftoolchain/libdwarf/dwarf_add_AT_flag.3 head/contrib/elftoolchain/libdwarf/dwarf_add_AT_location_expr.3 head/contrib/elftoolchain/libdwarf/dwarf_add_AT_name.3 head/contrib/elftoolchain/libdwarf/dwarf_add_AT_producer.3 head/contrib/elftoolchain/libdwarf/dwarf_add_AT_ref_address.3 head/contrib/elftoolchain/libdwarf/dwarf_add_AT_reference.3 head/contrib/elftoolchain/libdwarf/dwarf_add_AT_signed_const.3 head/contrib/elftoolchain/libdwarf/dwarf_add_AT_string.3 head/contrib/elftoolchain/libdwarf/dwarf_add_AT_targ_address.3 head/contrib/elftoolchain/libdwarf/dwarf_add_arange.3 head/contrib/elftoolchain/libdwarf/dwarf_add_die_to_debug.3 head/contrib/elftoolchain/libdwarf/dwarf_add_directory_decl.3 head/contrib/elftoolchain/libdwarf/dwarf_add_expr_addr.3 head/contrib/elftoolchain/libdwarf/dwarf_add_expr_gen.3 head/contrib/elftoolchain/libdwarf/dwarf_add_fde_inst.3 head/contrib/elftoolchain/libdwarf/dwarf_add_file_decl.3 head/contrib/elftoolchain/libdwarf/dwarf_add_frame_cie.3 head/contrib/elftoolchain/libdwarf/dwarf_add_frame_fde.3 head/contrib/elftoolchain/libdwarf/dwarf_add_funcname.3 head/contrib/elftoolchain/libdwarf/dwarf_add_line_entry.3 head/contrib/elftoolchain/libdwarf/dwarf_add_pubname.3 head/contrib/elftoolchain/libdwarf/dwarf_add_typename.3 head/contrib/elftoolchain/libdwarf/dwarf_add_varname.3 head/contrib/elftoolchain/libdwarf/dwarf_add_weakname.3 head/contrib/elftoolchain/libdwarf/dwarf_attr.3 head/contrib/elftoolchain/libdwarf/dwarf_attrlist.3 head/contrib/elftoolchain/libdwarf/dwarf_attroffset.3 head/contrib/elftoolchain/libdwarf/dwarf_attrval_signed.3 head/contrib/elftoolchain/libdwarf/dwarf_child.3 head/contrib/elftoolchain/libdwarf/dwarf_dealloc.3 head/contrib/elftoolchain/libdwarf/dwarf_def_macro.3 head/contrib/elftoolchain/libdwarf/dwarf_die_abbrev_code.3 head/contrib/elftoolchain/libdwarf/dwarf_die_link.3 head/contrib/elftoolchain/libdwarf/dwarf_diename.3 head/contrib/elftoolchain/libdwarf/dwarf_dieoffset.3 head/contrib/elftoolchain/libdwarf/dwarf_end_macro_file.3 head/contrib/elftoolchain/libdwarf/dwarf_errmsg.3 head/contrib/elftoolchain/libdwarf/dwarf_errno.3 head/contrib/elftoolchain/libdwarf/dwarf_expand_frame_instructions.3 head/contrib/elftoolchain/libdwarf/dwarf_expr_current_offset.3 head/contrib/elftoolchain/libdwarf/dwarf_expr_into_block.3 head/contrib/elftoolchain/libdwarf/dwarf_fde_cfa_offset.3 head/contrib/elftoolchain/libdwarf/dwarf_find_macro_value_start.3 head/contrib/elftoolchain/libdwarf/dwarf_finish.3 head/contrib/elftoolchain/libdwarf/dwarf_formaddr.3 head/contrib/elftoolchain/libdwarf/dwarf_formblock.3 head/contrib/elftoolchain/libdwarf/dwarf_formexprloc.3 head/contrib/elftoolchain/libdwarf/dwarf_formflag.3 head/contrib/elftoolchain/libdwarf/dwarf_formref.3 head/contrib/elftoolchain/libdwarf/dwarf_formsig8.3 head/contrib/elftoolchain/libdwarf/dwarf_formstring.3 head/contrib/elftoolchain/libdwarf/dwarf_formudata.3 head/contrib/elftoolchain/libdwarf/dwarf_get_AT_name.3 head/contrib/elftoolchain/libdwarf/dwarf_get_abbrev.3 head/contrib/elftoolchain/libdwarf/dwarf_get_abbrev_children_flag.3 head/contrib/elftoolchain/libdwarf/dwarf_get_abbrev_code.3 head/contrib/elftoolchain/libdwarf/dwarf_get_abbrev_entry.3 head/contrib/elftoolchain/libdwarf/dwarf_get_abbrev_tag.3 head/contrib/elftoolchain/libdwarf/dwarf_get_address_size.3 head/contrib/elftoolchain/libdwarf/dwarf_get_arange.3 head/contrib/elftoolchain/libdwarf/dwarf_get_arange_info.3 head/contrib/elftoolchain/libdwarf/dwarf_get_aranges.3 head/contrib/elftoolchain/libdwarf/dwarf_get_cie_index.3 head/contrib/elftoolchain/libdwarf/dwarf_get_cie_info.3 head/contrib/elftoolchain/libdwarf/dwarf_get_cie_of_fde.3 head/contrib/elftoolchain/libdwarf/dwarf_get_cu_die_offset.3 head/contrib/elftoolchain/libdwarf/dwarf_get_die_infotypes_flag.3 head/contrib/elftoolchain/libdwarf/dwarf_get_elf.3 head/contrib/elftoolchain/libdwarf/dwarf_get_fde_at_pc.3 head/contrib/elftoolchain/libdwarf/dwarf_get_fde_info_for_all_regs.3 head/contrib/elftoolchain/libdwarf/dwarf_get_fde_info_for_all_regs3.3 head/contrib/elftoolchain/libdwarf/dwarf_get_fde_info_for_cfa_reg3.3 head/contrib/elftoolchain/libdwarf/dwarf_get_fde_info_for_reg.3 head/contrib/elftoolchain/libdwarf/dwarf_get_fde_info_for_reg3.3 head/contrib/elftoolchain/libdwarf/dwarf_get_fde_instr_bytes.3 head/contrib/elftoolchain/libdwarf/dwarf_get_fde_list.3 head/contrib/elftoolchain/libdwarf/dwarf_get_fde_n.3 head/contrib/elftoolchain/libdwarf/dwarf_get_fde_range.3 head/contrib/elftoolchain/libdwarf/dwarf_get_form_class.3 head/contrib/elftoolchain/libdwarf/dwarf_get_funcs.3 head/contrib/elftoolchain/libdwarf/dwarf_get_globals.3 head/contrib/elftoolchain/libdwarf/dwarf_get_loclist_entry.3 head/contrib/elftoolchain/libdwarf/dwarf_get_macro_details.3 head/contrib/elftoolchain/libdwarf/dwarf_get_pubtypes.3 head/contrib/elftoolchain/libdwarf/dwarf_get_ranges.3 head/contrib/elftoolchain/libdwarf/dwarf_get_relocation_info.3 head/contrib/elftoolchain/libdwarf/dwarf_get_relocation_info_count.3 head/contrib/elftoolchain/libdwarf/dwarf_get_section_bytes.3 head/contrib/elftoolchain/libdwarf/dwarf_get_section_max_offsets.3 head/contrib/elftoolchain/libdwarf/dwarf_get_str.3 head/contrib/elftoolchain/libdwarf/dwarf_get_types.3 head/contrib/elftoolchain/libdwarf/dwarf_get_vars.3 head/contrib/elftoolchain/libdwarf/dwarf_get_weaks.3 head/contrib/elftoolchain/libdwarf/dwarf_hasattr.3 head/contrib/elftoolchain/libdwarf/dwarf_hasform.3 head/contrib/elftoolchain/libdwarf/dwarf_highpc.3 head/contrib/elftoolchain/libdwarf/dwarf_init.3 head/contrib/elftoolchain/libdwarf/dwarf_lineno.3 head/contrib/elftoolchain/libdwarf/dwarf_lne_end_sequence.3 head/contrib/elftoolchain/libdwarf/dwarf_lne_set_address.3 head/contrib/elftoolchain/libdwarf/dwarf_loclist.3 head/contrib/elftoolchain/libdwarf/dwarf_loclist_from_expr.3 head/contrib/elftoolchain/libdwarf/dwarf_new_die.3 head/contrib/elftoolchain/libdwarf/dwarf_new_expr.3 head/contrib/elftoolchain/libdwarf/dwarf_new_fde.3 head/contrib/elftoolchain/libdwarf/dwarf_next_cu_header.3 head/contrib/elftoolchain/libdwarf/dwarf_next_types_section.3 head/contrib/elftoolchain/libdwarf/dwarf_object_init.3 head/contrib/elftoolchain/libdwarf/dwarf_producer_init.3 head/contrib/elftoolchain/libdwarf/dwarf_producer_set_isa.3 head/contrib/elftoolchain/libdwarf/dwarf_reset_section_bytes.3 head/contrib/elftoolchain/libdwarf/dwarf_set_frame_cfa_value.3 head/contrib/elftoolchain/libdwarf/dwarf_set_reloc_application.3 head/contrib/elftoolchain/libdwarf/dwarf_seterrarg.3 head/contrib/elftoolchain/libdwarf/dwarf_srcfiles.3 head/contrib/elftoolchain/libdwarf/dwarf_srclines.3 head/contrib/elftoolchain/libdwarf/dwarf_start_macro_file.3 head/contrib/elftoolchain/libdwarf/dwarf_tag.3 head/contrib/elftoolchain/libdwarf/dwarf_transform_to_disk_form.3 head/contrib/elftoolchain/libdwarf/dwarf_undef_macro.3 head/contrib/elftoolchain/libdwarf/dwarf_vendor_ext.3 head/contrib/elftoolchain/libdwarf/dwarf_whatattr.3 head/contrib/elftoolchain/libelf/Makefile head/contrib/elftoolchain/libelf/_libelf.h head/contrib/elftoolchain/libelf/elf.3 head/contrib/elftoolchain/libelf/elf_begin.3 head/contrib/elftoolchain/libelf/elf_cntl.3 head/contrib/elftoolchain/libelf/elf_data.c head/contrib/elftoolchain/libelf/elf_end.3 head/contrib/elftoolchain/libelf/elf_errmsg.3 head/contrib/elftoolchain/libelf/elf_fill.3 head/contrib/elftoolchain/libelf/elf_flagdata.3 head/contrib/elftoolchain/libelf/elf_getarhdr.3 head/contrib/elftoolchain/libelf/elf_getarsym.3 head/contrib/elftoolchain/libelf/elf_getbase.3 head/contrib/elftoolchain/libelf/elf_getdata.3 head/contrib/elftoolchain/libelf/elf_getident.3 head/contrib/elftoolchain/libelf/elf_getphdrnum.3 head/contrib/elftoolchain/libelf/elf_getphnum.3 head/contrib/elftoolchain/libelf/elf_getscn.3 head/contrib/elftoolchain/libelf/elf_getshdrnum.3 head/contrib/elftoolchain/libelf/elf_getshdrstrndx.3 head/contrib/elftoolchain/libelf/elf_getshnum.3 head/contrib/elftoolchain/libelf/elf_getshstrndx.3 head/contrib/elftoolchain/libelf/elf_hash.3 head/contrib/elftoolchain/libelf/elf_kind.3 head/contrib/elftoolchain/libelf/elf_memory.3 head/contrib/elftoolchain/libelf/elf_next.3 head/contrib/elftoolchain/libelf/elf_open.3 head/contrib/elftoolchain/libelf/elf_rand.3 head/contrib/elftoolchain/libelf/elf_rawfile.3 head/contrib/elftoolchain/libelf/elf_scn.c head/contrib/elftoolchain/libelf/elf_strptr.3 head/contrib/elftoolchain/libelf/elf_update.3 head/contrib/elftoolchain/libelf/elf_update.c head/contrib/elftoolchain/libelf/elf_version.3 head/contrib/elftoolchain/libelf/gelf.3 head/contrib/elftoolchain/libelf/gelf_checksum.3 head/contrib/elftoolchain/libelf/gelf_fsize.3 head/contrib/elftoolchain/libelf/gelf_getcap.3 head/contrib/elftoolchain/libelf/gelf_getclass.3 head/contrib/elftoolchain/libelf/gelf_getdyn.3 head/contrib/elftoolchain/libelf/gelf_getehdr.3 head/contrib/elftoolchain/libelf/gelf_getmove.3 head/contrib/elftoolchain/libelf/gelf_getphdr.3 head/contrib/elftoolchain/libelf/gelf_getrel.3 head/contrib/elftoolchain/libelf/gelf_getrela.3 head/contrib/elftoolchain/libelf/gelf_getshdr.3 head/contrib/elftoolchain/libelf/gelf_getsym.3 head/contrib/elftoolchain/libelf/gelf_getsyminfo.3 head/contrib/elftoolchain/libelf/gelf_getsymshndx.3 head/contrib/elftoolchain/libelf/gelf_newehdr.3 head/contrib/elftoolchain/libelf/gelf_newphdr.3 head/contrib/elftoolchain/libelf/gelf_update_ehdr.3 head/contrib/elftoolchain/libelf/gelf_xlate.c head/contrib/elftoolchain/libelf/gelf_xlatetof.3 head/contrib/elftoolchain/libelf/libelf_convert.m4 head/contrib/elftoolchain/libelf/libelf_ehdr.c head/contrib/elftoolchain/libelf/libelf_phdr.c head/contrib/elftoolchain/libelf/libelf_xlate.c head/contrib/elftoolchain/libelftc/elftc.3 head/contrib/elftoolchain/libelftc/elftc_bfd_find_target.3 head/contrib/elftoolchain/libelftc/elftc_copyfile.3 head/contrib/elftoolchain/libelftc/elftc_demangle.3 head/contrib/elftoolchain/libelftc/elftc_reloc_type_str.3 head/contrib/elftoolchain/libelftc/elftc_set_timestamps.3 head/contrib/elftoolchain/libelftc/elftc_string_table_create.3 head/contrib/elftoolchain/libelftc/elftc_timestamp.3 head/contrib/elftoolchain/libelftc/elftc_version.3 head/contrib/elftoolchain/nm/nm.1 head/contrib/elftoolchain/readelf/readelf.1 head/contrib/elftoolchain/readelf/readelf.c head/contrib/elftoolchain/strings/strings.c head/lib/libelf/Makefile head/lib/libelftc/elftc_version.c Directory Properties: head/contrib/elftoolchain/ (props changed) head/contrib/elftoolchain/ar/ (props changed) Copied: head/contrib/elftoolchain/README.rst (from r342916, vendor/elftoolchain/dist/README.rst) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/elftoolchain/README.rst Thu Jan 10 14:35:23 2019 (r342918, copy of r342916, vendor/elftoolchain/dist/README.rst) @@ -0,0 +1,126 @@ +The Elftoolchain Project +======================== + +.. contents:: Table of Contents + +Description +----------- + +This software implements essential compilation tools and libraries for: + +- managing program objects conforming to the ELF_ object format, and +- for managing DWARF_ debugging information in ELF objects. + +The project currently implements the following utilities and +libraries: + +=========== ============================================ +Name Description +=========== ============================================ +ar Archive manager. +addr2line Debug tool. +brandelf Manage the ELF brand on executables. +c++filt Translate encoded symbols. +elfcopy Copy and translate between object formats. +elfdump Diagnostic tool. +findtextrel Find undesired text relocations. +libdwarf DWARF access library. +libelf ELF access library. +mcs Manage comment sections. +nm List symbols in an ELF object. +ranlib Add archive symbol tables to an archive. +readelf Display ELF information. +size List object sizes. +strings Extract printable strings. +strip Discard information from ELF objects. +=========== ============================================ + +.. _ELF: http://en.wikipedia.org/wiki/Executable_and_Linkable_Format +.. _DWARF: http://www.dwarfstd.org/ + + +Project Documentation +--------------------- + +- Release notes for released versions of this software are present in + the file ``RELEASE-NOTES`` in the current directory. +- The file ``INSTALL`` in the current directory contains instructions + on building and installing this software. +- Reference documentation in the form of manual pages is provided for + the utilities and libraries developed by the project. +- Additional tutorial documentation is present in the + ``documentation`` directory. + + +Tracking Ongoing Development +---------------------------- + +The project uses subversion_ for its version control system. + +.. _subversion: https://subversion.apache.org/ + +The subversion branch for the current set of sources may be accessed +at the following URL:: + + https://elftoolchain.svn.sourceforge.net/svnroot/elftoolchain/trunk + +The project's source tree may be checked out from its repository by +using the ``svn checkout`` command:: + + % svn checkout https://elftoolchain.svn.sourceforge.net/svnroot/elftoolchain/trunk + +Checked-out sources may be kept upto-date by running ``svn update`` +inside the source directory:: + + % svn update + + +Instructions on building and installing the software are given in the +file ``INSTALL`` in the current directory. + +Downloading Released Software +----------------------------- + +Released versions of the project's software may also be downloaded +from SourceForge's `file release system`_. + +.. _file release system: http://sourceforge.net/projects/elftoolchain/files/ + +Copyright and License +--------------------- + +This code is copyright its authors, and is distributed under the `BSD +License`_. + +.. _BSD License: http://www.opensource.org/licenses/bsd-license.php + + +Developer Community +------------------- + +The project's developers may be contacted using the mailing list: +````. + + +Reporting Bugs +-------------- + +Please use our `Trac instance`_ for viewing existing bug reports and +for submitting new bug reports. + +.. _`Trac instance`: http://sourceforge.net/apps/trac/elftoolchain/report + + +Additional Information +---------------------- + +Additional information about the project may be found on the `project +website`_. + +.. _project website: http://elftoolchain.sourceforge.net/ + +.. $Id: README.rst 3656 2018-12-26 09:46:24Z jkoshy $ + +.. Local Variables: +.. mode: rst +.. End: Modified: head/contrib/elftoolchain/addr2line/addr2line.1 ============================================================================== --- head/contrib/elftoolchain/addr2line/addr2line.1 Thu Jan 10 14:19:22 2019 (r342917) +++ head/contrib/elftoolchain/addr2line/addr2line.1 Thu Jan 10 14:35:23 2019 (r342918) @@ -22,11 +22,11 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $Id: addr2line.1 3263 2015-11-30 04:25:54Z kaiwang27 $ +.\" $Id: addr2line.1 3642 2018-10-14 14:24:28Z jkoshy $ .\" .Dd November 30, 2015 -.Os .Dt ADDR2LINE 1 +.Os .Sh NAME .Nm addr2line .Nd translate program addresses to source file names and line numbers Modified: head/contrib/elftoolchain/addr2line/addr2line.c ============================================================================== --- head/contrib/elftoolchain/addr2line/addr2line.c Thu Jan 10 14:19:22 2019 (r342917) +++ head/contrib/elftoolchain/addr2line/addr2line.c Thu Jan 10 14:35:23 2019 (r342918) @@ -40,7 +40,7 @@ #include "uthash.h" #include "_elftc.h" -ELFTC_VCSID("$Id: addr2line.c 3499 2016-11-25 16:06:29Z emaste $"); +ELFTC_VCSID("$Id: addr2line.c 3544 2017-06-05 14:51:44Z emaste $"); struct Func { char *name; Modified: head/contrib/elftoolchain/ar/ar.1 ============================================================================== --- head/contrib/elftoolchain/ar/ar.1 Thu Jan 10 14:19:22 2019 (r342917) +++ head/contrib/elftoolchain/ar/ar.1 Thu Jan 10 14:35:23 2019 (r342918) @@ -21,51 +21,52 @@ .\" out of the use of this software, even if advised of the possibility of .\" such damage. .\" -.\" $Id: ar.1 3230 2015-07-27 17:11:38Z emaste $ +.\" $Id: ar.1 3642 2018-10-14 14:24:28Z jkoshy $ .\" -.Dd July 27, 2015 -.Os +.Dd September 30, 2018 .Dt AR 1 +.Os .Sh NAME .Nm ar .Nd manage archives .Sh SYNOPSIS .Nm .Fl d -.Op Fl T .Op Fl f .Op Fl j +.Op Fl T .Op Fl v .Op Fl z .Ar archive .Ar .Nm .Fl m -.Op Fl T .Op Fl a Ar position-after .Op Fl b Ar position-before .Op Fl f .Op Fl i Ar position-before .Op Fl j .Op Fl s | Fl S +.Op Fl T .Op Fl z .Ar archive .Ar .Nm .Fl p -.Op Fl T .Op Fl f +.Op Fl s +.Op Fl T .Op Fl v .Ar archive .Op Ar .Nm .Fl q -.Op Fl T .Op Fl c .Op Fl D .Op Fl f .Op Fl F Ar flavor | Fl -flavor Ar flavor .Op Fl s | Fl S +.Op Fl T .Op Fl U .Op Fl v .Op Fl z @@ -73,7 +74,6 @@ .Ar .Nm .Fl r -.Op Fl T .Op Fl a Ar position-after .Op Fl b Ar position-before .Op Fl c @@ -83,6 +83,7 @@ .Op Fl i Ar position-before .Op Fl j .Op Fl s | Fl S +.Op Fl T .Op Fl u .Op Fl U .Op Fl v @@ -99,6 +100,7 @@ .Nm .Fl t .Op Fl f +.Op Fl s .Op Fl T .Op Fl v .Ar archive @@ -106,9 +108,10 @@ .Nm .Fl x .Op Fl C -.Op Fl T .Op Fl f .Op Fl o +.Op Fl s +.Op Fl T .Op Fl u .Op Fl v .Ar archive Modified: head/contrib/elftoolchain/ar/ar.5 ============================================================================== --- head/contrib/elftoolchain/ar/ar.5 Thu Jan 10 14:19:22 2019 (r342917) +++ head/contrib/elftoolchain/ar/ar.5 Thu Jan 10 14:35:23 2019 (r342918) @@ -21,11 +21,11 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: ar.5 3182 2015-04-10 16:08:10Z emaste $ +.\" $Id: ar.5 3642 2018-10-14 14:24:28Z jkoshy $ .\" -.Dd November 28, 2010 -.Os +.Dd September 30, 2018 .Dt AR 5 +.Os .Sh NAME .Nm ar .Nd archive file format for @@ -84,6 +84,8 @@ An archive header comprises the following fixed sized .Bl -tag -width "Li ar_name" .It Ar ar_name (16 bytes) The file name of the archive member. +This field names a leaf file; absolute paths and relative paths containing +directory names are not supported. The format of this field varies between the BSD and SVR4/GNU formats and is described in more detail in the section .Sx "Representing File Names" Modified: head/contrib/elftoolchain/ar/ar.c ============================================================================== --- head/contrib/elftoolchain/ar/ar.c Thu Jan 10 14:19:22 2019 (r342917) +++ head/contrib/elftoolchain/ar/ar.c Thu Jan 10 14:35:23 2019 (r342918) @@ -72,7 +72,7 @@ #include "ar.h" -ELFTC_VCSID("$Id: ar.c 3319 2016-01-13 21:37:53Z jkoshy $"); +ELFTC_VCSID("$Id: ar.c 3629 2018-09-30 19:26:28Z jkoshy $"); enum options { @@ -100,11 +100,12 @@ main(int argc, char **argv) struct bsdar *bsdar, bsdar_storage; char *arcmd, *argv1_saved; size_t len; - int i, opt; + int exitcode, i, opt; bsdar = &bsdar_storage; memset(bsdar, 0, sizeof(*bsdar)); + exitcode = EXIT_SUCCESS; arcmd = argv1_saved = NULL; bsdar->output = stdout; @@ -152,9 +153,9 @@ main(int argc, char **argv) bsdar->options |= AR_S; while ((bsdar->filename = *argv++) != NULL) - ar_write_archive(bsdar, 's'); + exitcode |= ar_write_archive(bsdar, 's'); - exit(EXIT_SUCCESS); + exit(exitcode); } else { if (argc < 2) bsdar_usage(); @@ -331,30 +332,33 @@ main(int argc, char **argv) if ((!bsdar->mode || strchr("ptx", bsdar->mode)) && bsdar->options & AR_S) { - ar_write_archive(bsdar, 's'); + exitcode = ar_write_archive(bsdar, 's'); if (!bsdar->mode) - exit(EXIT_SUCCESS); + exit(exitcode); } switch(bsdar->mode) { case 'd': case 'm': case 'q': case 'r': - ar_write_archive(bsdar, bsdar->mode); + exitcode = ar_write_archive(bsdar, bsdar->mode); break; case 'p': case 't': case 'x': - ar_read_archive(bsdar, bsdar->mode); + exitcode = ar_read_archive(bsdar, bsdar->mode); break; default: bsdar_usage(); /* NOTREACHED */ } - for (i = 0; i < bsdar->argc; i++) - if (bsdar->argv[i] != NULL) + for (i = 0; i < bsdar->argc; i++) { + if (bsdar->argv[i] != NULL) { bsdar_warnc(bsdar, 0, "%s: not found in archive", bsdar->argv[i]); + exitcode = EXIT_FAILURE; + } + } - exit(EXIT_SUCCESS); + exit(exitcode); } static void Modified: head/contrib/elftoolchain/ar/ar.h ============================================================================== --- head/contrib/elftoolchain/ar/ar.h Thu Jan 10 14:19:22 2019 (r342917) +++ head/contrib/elftoolchain/ar/ar.h Thu Jan 10 14:35:23 2019 (r342918) @@ -23,7 +23,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. * - * $Id: ar.h 2496 2012-04-24 02:33:40Z jkoshy $ + * $Id: ar.h 3629 2018-09-30 19:26:28Z jkoshy $ */ #include @@ -135,8 +135,8 @@ struct bsdar { }; void ar_mode_script(struct bsdar *ar); -void ar_read_archive(struct bsdar *_ar, int _mode); -void ar_write_archive(struct bsdar *_ar, int _mode); +int ar_read_archive(struct bsdar *_ar, int _mode); +int ar_write_archive(struct bsdar *_ar, int _mode); void bsdar_errc(struct bsdar *, int _code, const char *fmt, ...); int bsdar_is_pseudomember(struct bsdar *_ar, const char *_name); const char *bsdar_strmode(mode_t m); Modified: head/contrib/elftoolchain/ar/ranlib.1 ============================================================================== --- head/contrib/elftoolchain/ar/ranlib.1 Thu Jan 10 14:19:22 2019 (r342917) +++ head/contrib/elftoolchain/ar/ranlib.1 Thu Jan 10 14:35:23 2019 (r342918) @@ -21,11 +21,11 @@ .\" out of the use of this software, even if advised of the possibility of .\" such damage. .\" -.\" $Id: ranlib.1 3195 2015-05-12 17:22:19Z emaste $ +.\" $Id: ranlib.1 3642 2018-10-14 14:24:28Z jkoshy $ .\" .Dd December 9, 2012 -.Os .Dt RANLIB 1 +.Os .Sh NAME .Nm ranlib .Nd update archive symbol tables Modified: head/contrib/elftoolchain/ar/read.c ============================================================================== --- head/contrib/elftoolchain/ar/read.c Thu Jan 10 14:19:22 2019 (r342917) +++ head/contrib/elftoolchain/ar/read.c Thu Jan 10 14:35:23 2019 (r342918) @@ -34,16 +34,20 @@ #include #include #include +#include #include #include "ar.h" -ELFTC_VCSID("$Id: read.c 3180 2015-04-09 15:13:57Z emaste $"); +ELFTC_VCSID("$Id: read.c 3629 2018-09-30 19:26:28Z jkoshy $"); /* * Handle read modes: 'x', 't' and 'p'. + * + * Returns EXIT_SUCCESS if all operations completed successfully or returns + * EXIT_FAILURE otherwise. */ -void +int ar_read_archive(struct bsdar *bsdar, int mode) { FILE *out; @@ -60,8 +64,8 @@ ar_read_archive(struct bsdar *bsdar, int mode) gid_t gid; char **av; char buf[25]; - char find; - int i, flags, r; + int found; + int exitcode, i, flags, r; assert(mode == 'p' || mode == 't' || mode == 'x'); @@ -70,6 +74,7 @@ ar_read_archive(struct bsdar *bsdar, int mode) archive_read_support_format_ar(a); AC(archive_read_open_filename(a, bsdar->filename, DEF_BLKSZ)); + exitcode = EXIT_SUCCESS; out = bsdar->output; for (;;) { @@ -96,12 +101,27 @@ ar_read_archive(struct bsdar *bsdar, int mode) if (bsdar_is_pseudomember(bsdar, name)) continue; + /* The ar(5) format only supports 'leaf' file names. */ + if (strchr(name, '/')) { + bsdar_warnc(bsdar, 0, "ignoring entry: %s", + name); + continue; + } + + /* + * If we had been given a list of file names to process, check + * that the current entry is present in this list. + */ if (bsdar->argc > 0) { - find = 0; + found = 0; for(i = 0; i < bsdar->argc; i++) { av = &bsdar->argv[i]; if (*av == NULL) continue; + /* + * Per POSIX, only the basename of a file + * argument should be compared. + */ if ((bname = basename(*av)) == NULL) bsdar_errc(bsdar, errno, "basename failed"); @@ -109,10 +129,10 @@ ar_read_archive(struct bsdar *bsdar, int mode) continue; *av = NULL; - find = 1; + found = 1; break; } - if (!find) + if (!found) continue; } @@ -157,7 +177,7 @@ ar_read_archive(struct bsdar *bsdar, int mode) /* mode == 'x' */ if (stat(name, &sb) != 0) { if (errno != ENOENT) { - bsdar_warnc(bsdar, 0, + bsdar_warnc(bsdar, errno, "stat %s failed", bsdar->filename); continue; @@ -174,12 +194,6 @@ ar_read_archive(struct bsdar *bsdar, int mode) if (bsdar->options & AR_V) (void)fprintf(out, "x - %s\n", name); - /* Disallow absolute paths. */ - if (name[0] == '/') { - bsdar_warnc(bsdar, 0, - "Absolute path '%s'", name); - continue; - } /* Basic path security flags. */ flags = ARCHIVE_EXTRACT_SECURE_SYMLINKS | ARCHIVE_EXTRACT_SECURE_NODOTDOT; @@ -189,11 +203,19 @@ ar_read_archive(struct bsdar *bsdar, int mode) r = archive_read_extract(a, entry, flags); } - if (r) + if (r) { bsdar_warnc(bsdar, 0, "%s", archive_error_string(a)); + exitcode = EXIT_FAILURE; + } } } + + if (r == ARCHIVE_FATAL) + exitcode = EXIT_FAILURE; + AC(archive_read_close(a)); ACV(archive_read_free(a)); + + return (exitcode); } Modified: head/contrib/elftoolchain/ar/write.c ============================================================================== --- head/contrib/elftoolchain/ar/write.c Thu Jan 10 14:19:22 2019 (r342917) +++ head/contrib/elftoolchain/ar/write.c Thu Jan 10 14:35:23 2019 (r342918) @@ -40,7 +40,7 @@ #include "ar.h" -ELFTC_VCSID("$Id: write.c 3183 2015-04-10 16:18:42Z emaste $"); +ELFTC_VCSID("$Id: write.c 3629 2018-09-30 19:26:28Z jkoshy $"); #define _ARMAG_LEN 8 /* length of the magic string */ #define _ARHDR_LEN 60 /* length of the archive header */ @@ -352,17 +352,20 @@ read_objs(struct bsdar *bsdar, const char *archive, in /* * Write an archive. + * + * Returns EXIT_SUCCESS if the write succeeded or EXIT_FAILURE otherwise. */ -void +int ar_write_archive(struct bsdar *bsdar, int mode) { struct ar_obj *nobj, *obj, *obj_temp, *pos; struct stat sb; const char *bname; char **av; - int i; + int exitcode, i; TAILQ_INIT(&bsdar->v_obj); + exitcode = EXIT_SUCCESS; nobj = NULL; pos = NULL; memset(&sb, 0, sizeof(sb)); @@ -376,16 +379,16 @@ ar_write_archive(struct bsdar *bsdar, int mode) */ if (stat(bsdar->filename, &sb) != 0) { if (errno != ENOENT) { - bsdar_warnc(bsdar, 0, "stat %s failed", + bsdar_warnc(bsdar, errno, "stat %s failed", bsdar->filename); - return; + return (EXIT_FAILURE); } /* We do not create archive in mode 'd', 'm' and 's'. */ if (mode != 'r' && mode != 'q') { bsdar_warnc(bsdar, 0, "%s: no such file", bsdar->filename); - return; + return (EXIT_FAILURE); } /* Issue a message if the '-c' option was not specified. */ @@ -474,8 +477,10 @@ ar_write_archive(struct bsdar *bsdar, int mode) */ nobj = create_obj_from_file(bsdar, *av, obj->mtime); - if (nobj == NULL) + if (nobj == NULL) { + exitcode = EXIT_FAILURE; goto skip_obj; + } } if (bsdar->options & AR_V) @@ -510,9 +515,13 @@ new_archive: av = &bsdar->argv[i]; if (*av != NULL && (mode == 'r' || mode == 'q')) { nobj = create_obj_from_file(bsdar, *av, 0); - if (nobj != NULL) - insert_obj(bsdar, nobj, pos); - if (bsdar->options & AR_V && nobj != NULL) + if (nobj == NULL) { + exitcode = EXIT_FAILURE; + *av = NULL; + continue; + } + insert_obj(bsdar, nobj, pos); + if (bsdar->options & AR_V) (void)fprintf(bsdar->output, "a - %s\n", *av); *av = NULL; } @@ -521,6 +530,8 @@ new_archive: write_objs: write_objs(bsdar); write_cleanup(bsdar); + + return (exitcode); } /* Modified: head/contrib/elftoolchain/common/native-elf-format ============================================================================== --- head/contrib/elftoolchain/common/native-elf-format Thu Jan 10 14:19:22 2019 (r342917) +++ head/contrib/elftoolchain/common/native-elf-format Thu Jan 10 14:35:23 2019 (r342918) @@ -1,6 +1,6 @@ #!/bin/sh # -# $Id: native-elf-format 3293 2016-01-07 19:26:27Z emaste $ +# $Id: native-elf-format 3650 2018-11-25 12:06:28Z jkoshy $ # # Find the native ELF format for a host platform by compiling a # test object and examining the resulting object. @@ -35,7 +35,7 @@ $1 ~ "Machine:" { elfarch = "EM_386"; } else if (match($0, "MIPS")) { elfarch = "EM_MIPS"; - } else if (match($0, ".*[xX]86-64")) { + } else if (match($0, ".*[xX]86[-_]64")) { elfarch = "EM_X86_64"; } else { elfarch = "unknown"; Modified: head/contrib/elftoolchain/cxxfilt/c++filt.1 ============================================================================== --- head/contrib/elftoolchain/cxxfilt/c++filt.1 Thu Jan 10 14:19:22 2019 (r342917) +++ head/contrib/elftoolchain/cxxfilt/c++filt.1 Thu Jan 10 14:35:23 2019 (r342918) @@ -22,11 +22,11 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $Id: c++filt.1 3195 2015-05-12 17:22:19Z emaste $ +.\" $Id: c++filt.1 3642 2018-10-14 14:24:28Z jkoshy $ .\" .Dd August 24, 2011 -.Os .Dt C++FILT 1 +.Os .Sh NAME .Nm c++filt .Nd decode C++ symbols Modified: head/contrib/elftoolchain/elfcopy/elfcopy.1 ============================================================================== --- head/contrib/elftoolchain/elfcopy/elfcopy.1 Thu Jan 10 14:19:22 2019 (r342917) +++ head/contrib/elftoolchain/elfcopy/elfcopy.1 Thu Jan 10 14:35:23 2019 (r342918) @@ -21,11 +21,11 @@ .\" out of the use of this software, even if advised of the possibility of .\" such damage. .\" -.\" $Id: elfcopy.1 3565 2017-08-31 02:24:19Z emaste $ +.\" $Id: elfcopy.1 3642 2018-10-14 14:24:28Z jkoshy $ .\" .Dd August 30, 2017 -.Os .Dt ELFCOPY 1 +.Os .Sh NAME .Nm elfcopy , .Nm objcopy Modified: head/contrib/elftoolchain/elfcopy/elfcopy.h ============================================================================== --- head/contrib/elftoolchain/elfcopy/elfcopy.h Thu Jan 10 14:19:22 2019 (r342917) +++ head/contrib/elftoolchain/elfcopy/elfcopy.h Thu Jan 10 14:35:23 2019 (r342918) @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: elfcopy.h 3446 2016-05-03 01:31:17Z emaste $ + * $Id: elfcopy.h 3615 2018-05-17 04:12:24Z kaiwang27 $ */ #include Modified: head/contrib/elftoolchain/elfcopy/mcs.1 ============================================================================== --- head/contrib/elftoolchain/elfcopy/mcs.1 Thu Jan 10 14:19:22 2019 (r342917) +++ head/contrib/elftoolchain/elfcopy/mcs.1 Thu Jan 10 14:35:23 2019 (r342918) @@ -21,11 +21,11 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: mcs.1 2247 2011-11-29 08:41:34Z jkoshy $ +.\" $Id: mcs.1 3642 2018-10-14 14:24:28Z jkoshy $ .\" .Dd November 29, 2011 -.Os .Dt MCS 1 +.Os .Sh NAME .Nm mcs .Nd manipulate the comment section of an ELF object Modified: head/contrib/elftoolchain/elfcopy/sections.c ============================================================================== --- head/contrib/elftoolchain/elfcopy/sections.c Thu Jan 10 14:19:22 2019 (r342917) +++ head/contrib/elftoolchain/elfcopy/sections.c Thu Jan 10 14:35:23 2019 (r342918) @@ -34,7 +34,7 @@ #include "elfcopy.h" -ELFTC_VCSID("$Id: sections.c 3443 2016-04-15 18:57:54Z kaiwang27 $"); +ELFTC_VCSID("$Id: sections.c 3646 2018-10-27 02:25:39Z emaste $"); static void add_gnu_debuglink(struct elfcopy *ecp); static uint32_t calc_crc32(const char *p, size_t len, uint32_t crc); Modified: head/contrib/elftoolchain/elfcopy/segments.c ============================================================================== --- head/contrib/elftoolchain/elfcopy/segments.c Thu Jan 10 14:19:22 2019 (r342917) +++ head/contrib/elftoolchain/elfcopy/segments.c Thu Jan 10 14:35:23 2019 (r342918) @@ -34,7 +34,7 @@ #include "elfcopy.h" -ELFTC_VCSID("$Id: segments.c 3449 2016-05-03 13:59:29Z emaste $"); +ELFTC_VCSID("$Id: segments.c 3615 2018-05-17 04:12:24Z kaiwang27 $"); static void insert_to_inseg_list(struct segment *seg, struct section *sec); Modified: head/contrib/elftoolchain/elfcopy/strip.1 ============================================================================== --- head/contrib/elftoolchain/elfcopy/strip.1 Thu Jan 10 14:19:22 2019 (r342917) +++ head/contrib/elftoolchain/elfcopy/strip.1 Thu Jan 10 14:35:23 2019 (r342918) @@ -21,11 +21,11 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: strip.1 2069 2011-10-26 15:53:48Z jkoshy $ +.\" $Id: strip.1 3642 2018-10-14 14:24:28Z jkoshy $ .\" .Dd September 17, 2011 -.Os .Dt STRIP 1 +.Os .Sh NAME .Nm strip .Nd discard information from ELF objects Modified: head/contrib/elftoolchain/libdwarf/dwarf.3 ============================================================================== --- head/contrib/elftoolchain/libdwarf/dwarf.3 Thu Jan 10 14:19:22 2019 (r342917) +++ head/contrib/elftoolchain/libdwarf/dwarf.3 Thu Jan 10 14:35:23 2019 (r342918) @@ -21,11 +21,11 @@ .\" out of the use of this software, even if advised of the possibility of .\" such damage. .\" -.\" $Id: dwarf.3 3295 2016-01-08 22:08:10Z jkoshy $ +.\" $Id: dwarf.3 3644 2018-10-15 19:55:01Z jkoshy $ .\" .Dd December 21, 2014 -.Os .Dt DWARF 3 +.Os .Sh NAME .Nm dwarf .Nd access debugging information in object files @@ -34,7 +34,6 @@ .Sh SYNOPSIS .In libdwarf.h .Sh DESCRIPTION -.Pp The .Lb libdwarf provides functions that allow an application to read and write debugging @@ -129,7 +128,6 @@ A descriptor representing a static variable. A descriptor representing a weak name. .El .Ss Error Handling -.Pp Library functions that encounter an error will return with a value other than .Dv DW_DLV_OK . @@ -173,7 +171,7 @@ below. .Pp .Bl -tag -compact -width "CCCC" .It Abbreviations -.Bl -tag -compact +.Bl -tag -compact -width indent .It Fn dwarf_get_abbrev Retrieve abbreviation information at a given offset. .It Fn dwarf_get_abbrev_children_flag @@ -187,7 +185,7 @@ descriptor. Retrieve the tag for an abbreviation entry. .El .It Addresses -.Bl -tag -compact +.Bl -tag -compact -width indent .It Fn dwarf_get_address_size Return the number of bytes needed to represent an address. .It Fn dwarf_get_arange @@ -206,7 +204,7 @@ Retrieve information about non-contiguous address rang a debugging information entry. .El .It Attributes -.Bl -tag -compact +.Bl -tag -compact -width indent .It Fn dwarf_arrayorder Retrieve the value of a .Dv DW_AT_ordering @@ -279,7 +277,7 @@ Retrieve the attribute code for an attribute. Retrieve the form of an attribute. .El .It Call Information Entries and Frame Descriptor Entries -.Bl -tag -compact +.Bl -tag -compact -width indent .It Fn dwarf_get_cie_index Retrieve the index for a CIE descriptor. .It Fn dwarf_get_cie_info @@ -308,7 +306,7 @@ Retrieve an FDE descriptor. Retrieve range information from an FDE descriptor. .El .It Compilation Units -.Bl -tag -compact +.Bl -tag -compact -width indent .It Xo .Fn dwarf_get_cu_die_offset_given_cu_header_offset , .Fn dwarf_get_cu_die_offset_given_cu_header_offset_b @@ -323,7 +321,7 @@ compilation or type unit. Step through compilation units in a debug context. .El .It Debugging Information Entries -.Bl -tag -compact +.Bl -tag -compact -width indent .It Fn dwarf_child Returns the child of a debugging information entry. .It Fn dwarf_die_abbrev_code @@ -353,7 +351,7 @@ entry. Retrieve the tag for a debugging information entry. .El .It Functions -.Bl -tag -compact +.Bl -tag -compact -width indent .It Fn dwarf_func_cu_offset Retrieves the offset for the compilation unit for a function. .It Fn dwarf_func_die_offset @@ -367,7 +365,7 @@ Retrieve both the name and offsets for a function. Retrieve information about static functions. .El .It Globals -.Bl -tag -compact +.Bl -tag -compact -width indent .It Fn dwarf_get_globals Retrieve a list of globals. .It Fn dwarf_global_cu_offset @@ -396,7 +394,7 @@ and allow an application to specify alternate low-level file access routines. .It Line Numbers -.Bl -tag -compact +.Bl -tag -compact -width indent .It Fn dwarf_lineaddr Retrieve the program address for a source line. .It Fn dwarf_linebeginstatement @@ -420,7 +418,7 @@ Retrieve source files for a compilation unit. Return line number information for a compilation unit. .El .It Location Lists -.Bl -tag -compact +.Bl -tag -compact -width indent .It Fn dwarf_get_loclist_entry Retrieve a location list entry. .It Fn dwarf_loclist , Fn dwarf_loclist_n @@ -433,7 +431,7 @@ Retrieve location expressions. Translate a location expression into a location descriptor. .El .It Error Handling -.Bl -tag -compact +.Bl -tag -compact -width indent .It Fn dwarf_errmsg Retrieve a human-readable error message. .It Fn dwarf_errno @@ -444,7 +442,7 @@ Set the argument passed to a callback error handler. Set the callback handler to be called in case of an error. .El .It Frame Handling -.Bl -tag -compact +.Bl -tag -compact -width indent .It Fn dwarf_expand_frame_instructions Translate frame instruction bytes. .It Fn dwarf_set_frame_cfa_value @@ -464,7 +462,7 @@ Set the register number representing the rule. .El .It Macros -.Bl -tag -compact +.Bl -tag -compact -width indent .It Fn dwarf_find_macro_value_start Return the macro value part of a macro string. .It Fn dwarf_get_macro_details @@ -523,7 +521,7 @@ for DWARF constants: and .Fn dwarf_get_VIS_name . .It Types -.Bl -tag -compact +.Bl -tag -compact -width indent .It Fn dwarf_get_pubtypes , Fn dwarf_get_types Retrieve descriptors for user-defined types. .It Fn dwarf_next_types_section @@ -540,7 +538,7 @@ Retrieve the name of a type. Retrieve the name and offsets for a type. .El .It Variables -.Bl -tag -compact +.Bl -tag -compact -width indent .It Fn dwarf_get_vars Retrieve descriptors for static variables. .It Fn dwarf_var_cu_offset @@ -553,7 +551,7 @@ Retrieve the name of a variable. Retrieve the name and offsets for a variable. .El .It Weak Symbols -.Bl -tag -compact +.Bl -tag -compact -width indent .It Fn dwarf_get_weaks Retrieve information about weak symbols. .It Fn dwarf_weak_cu_offset @@ -566,7 +564,7 @@ Retrieve the name of a weak symbol. Retrieve the name and offsets for a weak symbol. .El .It Miscellaneous -.Bl -tag -compact +.Bl -tag -compact -width indent .It Fn dwarf_get_elf Retrieve the ELF descriptor for a debug context, see .Xr elf 3 . @@ -605,7 +603,7 @@ information entry: and .Fn dwarf_add_AT_unsigned_const . .It Debugging Information Entry Management -.Bl -tag -compact +.Bl -tag -compact -width indent .It Fn dwarf_add_die_to_debug Set the root debugging information entry for a DWARF producer instance. .It Fn dwarf_die_link @@ -623,7 +621,7 @@ are used to initialize a producer instance. When done, applications release resources using the function .Fn dwarf_producer_finish . .It Relocations and Sections -.Bl -tag -compact +.Bl -tag -compact -width indent .It Fn dwarf_get_relocation_info Retrieve a relocation array from a producer instance. .It Fn dwarf_get_relocation_info_count @@ -636,7 +634,7 @@ Reset internal state for a producer instance. Prepare byte streams for writing out. .El .It Macros -.Bl -tag -compact +.Bl -tag -compact -width indent .It Fn dwarf_def_macro Add a macro definition. .It Fn dwarf_end_macro_file , Fn dwarf_start_macro_file @@ -647,7 +645,7 @@ Note the removal of a macro definition. Enables storing macro information as specified in the DWARF standard. .El .It Symbols, Expressions, Addresses and Offsets -.Bl -tag -compact +.Bl -tag -compact -width indent .It Fn dwarf_add_arange , Fn dwarf_add_arange_b Add address range information. .It Fn dwarf_add_directory_decl @@ -741,7 +739,9 @@ The DWARF(3) API originated at Silicon Graphics Inc. .Pp A BSD-licensed implementation of a subset of the API was written by .An John Birrell Aq Mt jb@FreeBSD.org -for the FreeBSD project. +for the +.Fx +project. The implementation was subsequently revised and completed by .An Kai Wang Aq Mt kaiwang27@users.sourceforge.net . .Pp Modified: head/contrib/elftoolchain/libdwarf/dwarf_add_AT_comp_dir.3 ============================================================================== --- head/contrib/elftoolchain/libdwarf/dwarf_add_AT_comp_dir.3 Thu Jan 10 14:19:22 2019 (r342917) +++ head/contrib/elftoolchain/libdwarf/dwarf_add_AT_comp_dir.3 Thu Jan 10 14:35:23 2019 (r342918) @@ -22,11 +22,11 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: dwarf_add_AT_comp_dir.3 2072 2011-10-27 03:26:49Z jkoshy $ +.\" $Id: dwarf_add_AT_comp_dir.3 3640 2018-10-14 14:09:13Z jkoshy $ .\" .Dd September 4, 2011 -.Os .Dt DWARF_ADD_AT_COMP_DIR 3 +.Os .Sh NAME .Nm dwarf_add_AT_comp_dir .Nd create and attach a DW_AT_comp_dir attribute Modified: head/contrib/elftoolchain/libdwarf/dwarf_add_AT_const_value_string.3 ============================================================================== --- head/contrib/elftoolchain/libdwarf/dwarf_add_AT_const_value_string.3 Thu Jan 10 14:19:22 2019 (r342917) +++ head/contrib/elftoolchain/libdwarf/dwarf_add_AT_const_value_string.3 Thu Jan 10 14:35:23 2019 (r342918) @@ -22,11 +22,11 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: dwarf_add_AT_const_value_string.3 2072 2011-10-27 03:26:49Z jkoshy $ +.\" $Id: dwarf_add_AT_const_value_string.3 3640 2018-10-14 14:09:13Z jkoshy $ .\" .Dd September 4, 2011 -.Os .Dt DWARF_ADD_AT_CONST_VALUE_STRING 3 +.Os .Sh NAME .Nm dwarf_add_AT_const_value_signedint , .Nm dwarf_add_AT_const_value_string , Modified: head/contrib/elftoolchain/libdwarf/dwarf_add_AT_dataref.3 ============================================================================== --- head/contrib/elftoolchain/libdwarf/dwarf_add_AT_dataref.3 Thu Jan 10 14:19:22 2019 (r342917) +++ head/contrib/elftoolchain/libdwarf/dwarf_add_AT_dataref.3 Thu Jan 10 14:35:23 2019 (r342918) @@ -22,11 +22,11 @@ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Thu Jan 10 16:31:08 2019 Return-Path: Delivered-To: svn-src-head@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 C2ABF149142D; Thu, 10 Jan 2019 16:31:08 +0000 (UTC) (envelope-from andrew@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 68C088AF1F; Thu, 10 Jan 2019 16:31:08 +0000 (UTC) (envelope-from andrew@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 5CCC06AEF; Thu, 10 Jan 2019 16:31:08 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0AGV8QX002204; Thu, 10 Jan 2019 16:31:08 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0AGV8JG002203; Thu, 10 Jan 2019 16:31:08 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201901101631.x0AGV8JG002203@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 10 Jan 2019 16:31:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342919 - head/sys/arm64/include X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm64/include X-SVN-Commit-Revision: 342919 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 68C088AF1F 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.999,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)[-0.998,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jan 2019 16:31:08 -0000 Author: andrew Date: Thu Jan 10 16:31:07 2019 New Revision: 342919 URL: https://svnweb.freebsd.org/changeset/base/342919 Log: Fix a comment, pushed onto is two words. While here make the comments sentences. Sponsored by: DARPA, AFRL Modified: head/sys/arm64/include/frame.h Modified: head/sys/arm64/include/frame.h ============================================================================== --- head/sys/arm64/include/frame.h Thu Jan 10 14:35:23 2019 (r342918) +++ head/sys/arm64/include/frame.h Thu Jan 10 16:31:07 2019 (r342919) @@ -56,7 +56,7 @@ struct arm64_frame { }; /* - * Signal frame, pushedonto the user stack + * Signal frame, pushed onto the user stack. */ struct sigframe { siginfo_t sf_si; /* actual saved siginfo */ @@ -64,7 +64,7 @@ struct sigframe { }; /* - * There is no fixed frame layout, other than to be 16-byte aligned + * There is no fixed frame layout, other than to be 16-byte aligned. */ struct frame { int dummy; From owner-svn-src-head@freebsd.org Thu Jan 10 17:27:48 2019 Return-Path: Delivered-To: svn-src-head@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 014121493279; Thu, 10 Jan 2019 17:27:48 +0000 (UTC) (envelope-from ngie@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 998EA8D63E; Thu, 10 Jan 2019 17:27:47 +0000 (UTC) (envelope-from ngie@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 87595758F; Thu, 10 Jan 2019 17:27:47 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0AHRldO030285; Thu, 10 Jan 2019 17:27:47 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0AHRlRB030284; Thu, 10 Jan 2019 17:27:47 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201901101727.x0AHRlRB030284@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Thu, 10 Jan 2019 17:27:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342920 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 342920 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 998EA8D63E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.948,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jan 2019 17:27:48 -0000 Author: ngie Date: Thu Jan 10 17:27:47 2019 New Revision: 342920 URL: https://svnweb.freebsd.org/changeset/base/342920 Log: Update my committer name and add my new mentor relationship ## Regarding the name change A few years ago I changed my legal name to "Enji Cooper". When I rejoined the project, I requested that accounts@ use my legal name instead of my [previous] nickname. This change syncs up a reference to use the proper name for clarity. ## Regarding the new mentor relationship @emaste and @jtl graciously accepted my request to mentor me this time around with my src commits while I get up to speed. I am leaving my previous mentorship details in committers-src.dot for historical reasons, per @emaste's request. -- Thank you very much @jmmv and @rpaulo for the help with my previous mentorship; I really appreciate it! Approved by: emaste (mentor) Differential Revision: https://reviews.freebsd.org/D18644 Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Thu Jan 10 16:31:07 2019 (r342919) +++ head/share/misc/committers-src.dot Thu Jan 10 17:27:47 2019 (r342920) @@ -266,7 +266,7 @@ mr [label="Michael Reifenberger\nmr@FreeBSD.org\n2001/ mw [label="Marcin Wojtas\nmw@FreeBSD.org\n2017/07/18"] neel [label="Neel Natu\nneel@FreeBSD.org\n2009/09/20"] netchild [label="Alexander Leidinger\nnetchild@FreeBSD.org\n2005/03/31"] -ngie [label="Ngie Cooper\nngie@FreeBSD.org\n2014/07/27"] +ngie [label="Enji Cooper\nngie@FreeBSD.org\n2014/07/27"] nork [label="Norikatsu Shigemura\nnork@FreeBSD.org\n2009/06/09"] np [label="Navdeep Parhar\nnp@FreeBSD.org\n2009/06/05"] nwhitehorn [label="Nathan Whitehorn\nnwhitehorn@FreeBSD.org\n2008/07/03"] @@ -503,6 +503,7 @@ emaste -> dteske emaste -> kevans emaste -> lwhsu emaste -> markj +emaste -> ngie emaste -> rstone emax -> markus @@ -637,6 +638,7 @@ joerg -> le joerg -> netchild joerg -> schweikh +jtl -> ngie jtl -> thj julian -> glebius From owner-svn-src-head@freebsd.org Thu Jan 10 23:27:30 2019 Return-Path: Delivered-To: svn-src-head@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 26DA5149CEC2; Thu, 10 Jan 2019 23:27:30 +0000 (UTC) (envelope-from glebius@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 C2C5C7530E; Thu, 10 Jan 2019 23:27:29 +0000 (UTC) (envelope-from glebius@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 B8CB9B356; Thu, 10 Jan 2019 23:27:29 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0ANRTEH027636; Thu, 10 Jan 2019 23:27:29 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0ANRThW027635; Thu, 10 Jan 2019 23:27:29 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201901102327.x0ANRThW027635@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 10 Jan 2019 23:27:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342922 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 342922 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C2C5C7530E 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.958,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jan 2019 23:27:30 -0000 Author: glebius Date: Thu Jan 10 23:27:29 2019 New Revision: 342922 URL: https://svnweb.freebsd.org/changeset/base/342922 Log: Remove support for FreeBSD 9 kernel, which used to change byte order of packet headers. Modified: head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Modified: head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Thu Jan 10 17:42:45 2019 (r342921) +++ head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Thu Jan 10 23:27:29 2019 (r342922) @@ -132,24 +132,10 @@ ipf_check_wrapper(void *arg, struct mbuf **mp, struct struct ip *ip = mtod(*mp, struct ip *); int rv; - /* - * IPFilter expects evreything in network byte order - */ -#if (__FreeBSD_version < 1000019) - ip->ip_len = htons(ip->ip_len); - ip->ip_off = htons(ip->ip_off); -#endif CURVNET_SET(ifp->if_vnet); rv = ipf_check(&V_ipfmain, ip, ip->ip_hl << 2, ifp, (dir == PFIL_OUT), mp); CURVNET_RESTORE(); -#if (__FreeBSD_version < 1000019) - if ((rv == 0) && (*mp != NULL)) { - ip = mtod(*mp, struct ip *); - ip->ip_len = ntohs(ip->ip_len); - ip->ip_off = ntohs(ip->ip_off); - } -#endif return rv; } From owner-svn-src-head@freebsd.org Fri Jan 11 00:45:23 2019 Return-Path: Delivered-To: svn-src-head@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 3D339149F640; Fri, 11 Jan 2019 00:45:23 +0000 (UTC) (envelope-from glebius@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 94D7177BEC; Fri, 11 Jan 2019 00:45:22 +0000 (UTC) (envelope-from glebius@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 8AA36C2A9; Fri, 11 Jan 2019 00:45:22 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0B0jMHF069107; Fri, 11 Jan 2019 00:45:22 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0B0jMwi069106; Fri, 11 Jan 2019 00:45:22 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201901110045.x0B0jMwi069106@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 11 Jan 2019 00:45:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342923 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 342923 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 94D7177BEC 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.958,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2019 00:45:23 -0000 Author: glebius Date: Fri Jan 11 00:45:22 2019 New Revision: 342923 URL: https://svnweb.freebsd.org/changeset/base/342923 Log: Remove recursive NET_EPOCH_ENTER() from sysctl_ifmalist(), missed in r342872. Modified: head/sys/net/rtsock.c Modified: head/sys/net/rtsock.c ============================================================================== --- head/sys/net/rtsock.c Thu Jan 10 23:27:29 2019 (r342922) +++ head/sys/net/rtsock.c Fri Jan 11 00:45:22 2019 (r342923) @@ -1830,7 +1830,6 @@ sysctl_ifmalist(int af, struct walkarg *w) continue; ifa = ifp->if_addr; info.rti_info[RTAX_IFP] = ifa ? ifa->ifa_addr : NULL; - NET_EPOCH_ENTER(et); CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { if (af && af != ifma->ifma_addr->sa_family) continue; @@ -1857,7 +1856,6 @@ sysctl_ifmalist(int af, struct walkarg *w) break; } } - NET_EPOCH_EXIT(et); if (error != 0) break; } From owner-svn-src-head@freebsd.org Fri Jan 11 01:42:48 2019 Return-Path: Delivered-To: svn-src-head@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 93B2714A0DB7; Fri, 11 Jan 2019 01:42:48 +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 3AD4282412; Fri, 11 Jan 2019 01:42:48 +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 2E40ECCE8; Fri, 11 Jan 2019 01:42:48 +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 x0B1gmsC099818; Fri, 11 Jan 2019 01:42:48 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0B1gm37099817; Fri, 11 Jan 2019 01:42:48 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201901110142.x0B1gm37099817@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 11 Jan 2019 01:42:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342924 - head/sys/modules/dtb/allwinner X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/modules/dtb/allwinner X-SVN-Commit-Revision: 342924 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3AD4282412 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.952,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2019 01:42:48 -0000 Author: manu Date: Fri Jan 11 01:42:47 2019 New Revision: 342924 URL: https://svnweb.freebsd.org/changeset/base/342924 Log: dtb: allwinner: Add orangepi-pc to the build PR: 226011 Submitted by: Greg V MFC after: 1 week Modified: head/sys/modules/dtb/allwinner/Makefile Modified: head/sys/modules/dtb/allwinner/Makefile ============================================================================== --- head/sys/modules/dtb/allwinner/Makefile Fri Jan 11 00:45:22 2019 (r342923) +++ head/sys/modules/dtb/allwinner/Makefile Fri Jan 11 01:42:47 2019 (r342924) @@ -20,6 +20,7 @@ DTS= \ sun8i-h3-nanopi-m1-plus.dts \ sun8i-h3-nanopi-neo.dts \ sun8i-h3-orangepi-one.dts \ + sun8i-h3-orangepi-pc.dts \ sun8i-h3-orangepi-plus2e.dts DTSO= sun8i-a83t-sid.dtso \ From owner-svn-src-head@freebsd.org Fri Jan 11 01:54:16 2019 Return-Path: Delivered-To: svn-src-head@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 4B52614A1302; Fri, 11 Jan 2019 01:54:16 +0000 (UTC) (envelope-from ae@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 E5CD382B56; Fri, 11 Jan 2019 01:54:15 +0000 (UTC) (envelope-from ae@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 D8F60CEAB; Fri, 11 Jan 2019 01:54:15 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0B1sFZW005101; Fri, 11 Jan 2019 01:54:15 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0B1sFpZ005100; Fri, 11 Jan 2019 01:54:15 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201901110154.x0B1sFpZ005100@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Fri, 11 Jan 2019 01:54:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342925 - head/sys/netpfil/ipfw X-SVN-Group: head X-SVN-Commit-Author: ae X-SVN-Commit-Paths: head/sys/netpfil/ipfw X-SVN-Commit-Revision: 342925 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E5CD382B56 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.952,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2019 01:54:16 -0000 Author: ae Date: Fri Jan 11 01:54:15 2019 New Revision: 342925 URL: https://svnweb.freebsd.org/changeset/base/342925 Log: Relax requirement to packet size of CARP protocol and remove version check. CARP shares protocol number 112 with VRRP (RFC 5798). And the size of VRRP packet may be smaller than CARP. ipfw_chk() does m_pullup() to at least sizeof(struct carp_header) and can fail when packet is VRRP. This leads to packet drop and message about failed pullup attempt. Also, RFC 5798 defines version 3 of VRRP protocol, this version number also unsupported by CARP and such check leads to packet drop. carp_input() does its own checks for protocol version and packet size, so we can remove these checks to be able pass VRRP packets. PR: 234207 MFC after: 1 week Modified: head/sys/netpfil/ipfw/ip_fw2.c Modified: head/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw2.c Fri Jan 11 01:42:47 2019 (r342924) +++ head/sys/netpfil/ipfw/ip_fw2.c Fri Jan 11 01:54:15 2019 (r342925) @@ -1591,12 +1591,10 @@ do { \ break; case IPPROTO_CARP: - PULLUP_TO(hlen, ulp, struct carp_header); - if (((struct carp_header *)ulp)->carp_version != - CARP_VERSION) - return (IP_FW_DENY); - if (((struct carp_header *)ulp)->carp_type != - CARP_ADVERTISEMENT) + PULLUP_TO(hlen, ulp, offsetof( + struct carp_header, carp_counter)); + if (CARP_ADVERTISEMENT != + ((struct carp_header *)ulp)->carp_type) return (IP_FW_DENY); break; From owner-svn-src-head@freebsd.org Fri Jan 11 02:53:47 2019 Return-Path: Delivered-To: svn-src-head@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 DFEBA14A2C96; Fri, 11 Jan 2019 02:53:46 +0000 (UTC) (envelope-from sef@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 7917F84BBE; Fri, 11 Jan 2019 02:53:46 +0000 (UTC) (envelope-from sef@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 6D99AD8D7; Fri, 11 Jan 2019 02:53:46 +0000 (UTC) (envelope-from sef@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0B2rknS037377; Fri, 11 Jan 2019 02:53:46 GMT (envelope-from sef@FreeBSD.org) Received: (from sef@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0B2rkQD037376; Fri, 11 Jan 2019 02:53:46 GMT (envelope-from sef@FreeBSD.org) Message-Id: <201901110253.x0B2rkQD037376@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sef set sender to sef@FreeBSD.org using -f From: Sean Eric Fagan Date: Fri, 11 Jan 2019 02:53:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342928 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: sef X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 342928 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7917F84BBE 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)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2019 02:53:47 -0000 Author: sef Date: Fri Jan 11 02:53:46 2019 New Revision: 342928 URL: https://svnweb.freebsd.org/changeset/base/342928 Log: Change ZFS quotas to return EINVAL when not present (matches man page). UFS will return EINVAL when quotas are not enabled on a filesystem; ZFS' equivalent involves not having quotas (there is not way to enable or disable quotas as such). My initial implementation had it return ENOENT, but quotactl(2) indicates EINVAL is more appropriate. MFC after: 2 weeks Approved by: mav Reviewed by: markj Reported by: Emrion Sponsored by: iXsystems Inc PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234413 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Fri Jan 11 02:09:48 2019 (r342927) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Fri Jan 11 02:53:46 2019 (r342928) @@ -144,7 +144,7 @@ zfs_getquota(zfsvfs_t *zfsvfs, uid_t id, int isgroup, quotaobj = isgroup ? zfsvfs->z_groupquota_obj : zfsvfs->z_userquota_obj; if (quotaobj == 0 || zfsvfs->z_replay) { - error = ENOENT; + error = EINVAL; goto done; } (void)sprintf(buf, "%llx", (longlong_t)id); From owner-svn-src-head@freebsd.org Fri Jan 11 07:58:27 2019 Return-Path: Delivered-To: svn-src-head@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 8CC31148506B; Fri, 11 Jan 2019 07:58:27 +0000 (UTC) (envelope-from fsu@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 2D1588DE1F; Fri, 11 Jan 2019 07:58:27 +0000 (UTC) (envelope-from fsu@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 1B7FE18C3F; Fri, 11 Jan 2019 07:58:27 +0000 (UTC) (envelope-from fsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0B7wQEx096334; Fri, 11 Jan 2019 07:58:26 GMT (envelope-from fsu@FreeBSD.org) Received: (from fsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0B7wQJ9096329; Fri, 11 Jan 2019 07:58:26 GMT (envelope-from fsu@FreeBSD.org) Message-Id: <201901110758.x0B7wQJ9096329@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fsu set sender to fsu@FreeBSD.org using -f From: Fedor Uporov Date: Fri, 11 Jan 2019 07:58:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342933 - in head/sys: amd64/linux amd64/linux32 arm64/linux i386/linux X-SVN-Group: head X-SVN-Commit-Author: fsu X-SVN-Commit-Paths: in head/sys: amd64/linux amd64/linux32 arm64/linux i386/linux X-SVN-Commit-Revision: 342933 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2D1588DE1F 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.972,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2019 07:58:27 -0000 Author: fsu Date: Fri Jan 11 07:58:25 2019 New Revision: 342933 URL: https://svnweb.freebsd.org/changeset/base/342933 Log: Fix errno values returned from DUMMY_XATTR linuxulator calls Reported by: weiss@uni-mainz.de Reviewed by: markj MFC after: 1 day Differential Revision: https://reviews.freebsd.org/D18812 Modified: head/sys/amd64/linux/linux_dummy.c head/sys/amd64/linux32/linux32_dummy.c head/sys/arm64/linux/linux_dummy.c head/sys/i386/linux/linux_dummy.c Modified: head/sys/amd64/linux/linux_dummy.c ============================================================================== --- head/sys/amd64/linux/linux_dummy.c Fri Jan 11 05:41:46 2019 (r342932) +++ head/sys/amd64/linux/linux_dummy.c Fri Jan 11 07:58:25 2019 (r342933) @@ -162,7 +162,7 @@ linux_ ## s ## xattr( \ struct thread *td, struct linux_ ## s ## xattr_args *arg) \ { \ \ - return (ENOATTR); \ + return (EOPNOTSUPP); \ } DUMMY_XATTR(set); DUMMY_XATTR(lset); Modified: head/sys/amd64/linux32/linux32_dummy.c ============================================================================== --- head/sys/amd64/linux32/linux32_dummy.c Fri Jan 11 05:41:46 2019 (r342932) +++ head/sys/amd64/linux32/linux32_dummy.c Fri Jan 11 07:58:25 2019 (r342933) @@ -168,7 +168,7 @@ linux_ ## s ## xattr( \ struct thread *td, struct linux_ ## s ## xattr_args *arg) \ { \ \ - return (ENOATTR); \ + return (EOPNOTSUPP); \ } DUMMY_XATTR(set); DUMMY_XATTR(lset); Modified: head/sys/arm64/linux/linux_dummy.c ============================================================================== --- head/sys/arm64/linux/linux_dummy.c Fri Jan 11 05:41:46 2019 (r342932) +++ head/sys/arm64/linux/linux_dummy.c Fri Jan 11 07:58:25 2019 (r342933) @@ -161,7 +161,7 @@ linux_ ## s ## xattr( \ struct thread *td, struct linux_ ## s ## xattr_args *arg) \ { \ \ - return (ENOATTR); \ + return (EOPNOTSUPP); \ } DUMMY_XATTR(set); DUMMY_XATTR(lset); Modified: head/sys/i386/linux/linux_dummy.c ============================================================================== --- head/sys/i386/linux/linux_dummy.c Fri Jan 11 05:41:46 2019 (r342932) +++ head/sys/i386/linux/linux_dummy.c Fri Jan 11 07:58:25 2019 (r342933) @@ -164,7 +164,7 @@ linux_ ## s ## xattr( \ struct thread *td, struct linux_ ## s ## xattr_args *arg) \ { \ \ - return (ENOATTR); \ + return (EOPNOTSUPP); \ } DUMMY_XATTR(set); DUMMY_XATTR(lset); From owner-svn-src-head@freebsd.org Fri Jan 11 08:35:50 2019 Return-Path: Delivered-To: svn-src-head@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 AD90A1486004; Fri, 11 Jan 2019 08:35:50 +0000 (UTC) (envelope-from kib@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 4C9998EFAC; Fri, 11 Jan 2019 08:35:50 +0000 (UTC) (envelope-from kib@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 416C319308; Fri, 11 Jan 2019 08:35:50 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0B8ZoMd017157; Fri, 11 Jan 2019 08:35:50 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0B8Zoto017156; Fri, 11 Jan 2019 08:35:50 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201901110835.x0B8Zoto017156@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 11 Jan 2019 08:35:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342934 - head/usr.sbin/cpucontrol X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/usr.sbin/cpucontrol X-SVN-Commit-Revision: 342934 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4C9998EFAC 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.972,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2019 08:35:50 -0000 Author: kib Date: Fri Jan 11 08:35:49 2019 New Revision: 342934 URL: https://svnweb.freebsd.org/changeset/base/342934 Log: cpucontrol: check for the supposed firmware file type and skip non-regular entry. do_update() skips entries with DT_DIR type. This does not eliminate other entries that might exist in the directory. More, since NFS might fill d_type with DT_UNKNOWN, dot and dotdot entries are not skipped, then mmap(2) call failed for them when update microcode files are located on NFS. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/usr.sbin/cpucontrol/cpucontrol.c Modified: head/usr.sbin/cpucontrol/cpucontrol.c ============================================================================== --- head/usr.sbin/cpucontrol/cpucontrol.c Fri Jan 11 07:58:25 2019 (r342933) +++ head/usr.sbin/cpucontrol/cpucontrol.c Fri Jan 11 08:35:49 2019 (r342934) @@ -369,6 +369,8 @@ try_a_fw_image(const char *dev_path, int devfd, int fw rc = 0; goto out; } + if (!S_ISREG(st.st_mode)) + goto out; if (st.st_size <= 0) { WARN(0, "%s: empty", fw_path); goto out; From owner-svn-src-head@freebsd.org Fri Jan 11 09:20:23 2019 Return-Path: Delivered-To: svn-src-head@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 F28BE1487575; Fri, 11 Jan 2019 09:20:22 +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 A00B390610; Fri, 11 Jan 2019 09:20:22 +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 8C96C199FE; Fri, 11 Jan 2019 09:20:22 +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 x0B9KMrA039301; Fri, 11 Jan 2019 09:20:22 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0B9KJS7039283; Fri, 11 Jan 2019 09:20:19 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201901110920.x0B9KJS7039283@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 11 Jan 2019 09:20:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342935 - in head/sys/gnu/dts/include/dt-bindings: bus clock dma gce genpd iio/adc memory pinctrl regulator reset soc usb X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head/sys/gnu/dts/include/dt-bindings: bus clock dma gce genpd iio/adc memory pinctrl regulator reset soc usb X-SVN-Commit-Revision: 342935 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A00B390610 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.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.99)[-0.985,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2019 09:20:23 -0000 Author: manu Date: Fri Jan 11 09:20:18 2019 New Revision: 342935 URL: https://svnweb.freebsd.org/changeset/base/342935 Log: Import DTS includes from 4.19 This was missed in r340337 MFC after: 3 days Added: - copied unchanged from r340335, vendor/device-tree/dist/include/dt-bindings/clock/actions,s700-cmu.h - copied unchanged from r340335, vendor/device-tree/dist/include/dt-bindings/clock/axg-audio-clkc.h - copied unchanged from r340335, vendor/device-tree/dist/include/dt-bindings/clock/maxim,max9485.h - copied unchanged from r340335, vendor/device-tree/dist/include/dt-bindings/clock/px30-cru.h - copied unchanged from r340335, vendor/device-tree/dist/include/dt-bindings/clock/qcom,dispcc-sdm845.h - copied unchanged from r340335, vendor/device-tree/dist/include/dt-bindings/clock/r9a06g032-sysctrl.h - copied unchanged from r340335, vendor/device-tree/dist/include/dt-bindings/clock/rk3399-ddr.h - copied unchanged from r340335, vendor/device-tree/dist/include/dt-bindings/clock/sun8i-tcon-top.h head/sys/gnu/dts/include/dt-bindings/dma/jz4780-dma.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/gce/ - copied from r340335, vendor/device-tree/dist/include/dt-bindings/gce/ head/sys/gnu/dts/include/dt-bindings/genpd/ - copied unchanged from r340335, vendor/device-tree/dist/include/dt-bindings/iio/adc/at91-sama5d2_adc.h - copied unchanged from r340335, vendor/device-tree/dist/include/dt-bindings/memory/mt2712-larb-port.h - copied unchanged from r340335, vendor/device-tree/dist/include/dt-bindings/regulator/qcom,rpmh-regulator.h - copied unchanged from r340335, vendor/device-tree/dist/include/dt-bindings/reset/amlogic,meson-axg-audio-arb.h - copied unchanged from r340335, vendor/device-tree/dist/include/dt-bindings/reset/qcom,sdm845-aoss.h - copied unchanged from r340335, vendor/device-tree/dist/include/dt-bindings/soc/qcom,rpmh-rsc.h head/sys/gnu/dts/include/dt-bindings/usb/ - copied from r340335, vendor/device-tree/dist/include/dt-bindings/usb/ Directory Properties: head/sys/gnu/dts/include/dt-bindings/clock/actions,s700-cmu.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/axg-audio-clkc.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/maxim,max9485.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/px30-cru.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/qcom,dispcc-sdm845.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/r9a06g032-sysctrl.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/rk3399-ddr.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/sun8i-tcon-top.h (props changed) head/sys/gnu/dts/include/dt-bindings/iio/adc/at91-sama5d2_adc.h (props changed) head/sys/gnu/dts/include/dt-bindings/memory/mt2712-larb-port.h (props changed) head/sys/gnu/dts/include/dt-bindings/regulator/qcom,rpmh-regulator.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/amlogic,meson-axg-audio-arb.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/qcom,sdm845-aoss.h (props changed) head/sys/gnu/dts/include/dt-bindings/soc/qcom,rpmh-rsc.h (props changed) Deleted: head/sys/gnu/dts/include/dt-bindings/clock/exynos5440.h Modified: head/sys/gnu/dts/include/dt-bindings/bus/ti-sysc.h head/sys/gnu/dts/include/dt-bindings/clock/aspeed-clock.h head/sys/gnu/dts/include/dt-bindings/clock/axg-clkc.h head/sys/gnu/dts/include/dt-bindings/clock/dra7.h head/sys/gnu/dts/include/dt-bindings/clock/gxbb-clkc.h head/sys/gnu/dts/include/dt-bindings/clock/imx6sll-clock.h head/sys/gnu/dts/include/dt-bindings/clock/imx6ul-clock.h head/sys/gnu/dts/include/dt-bindings/clock/pxa-clock.h head/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-sdm845.h head/sys/gnu/dts/include/dt-bindings/clock/sun8i-r40-ccu.h head/sys/gnu/dts/include/dt-bindings/pinctrl/at91.h head/sys/gnu/dts/include/dt-bindings/pinctrl/samsung.h head/sys/gnu/dts/include/dt-bindings/regulator/maxim,max77802.h Directory Properties: head/sys/gnu/dts/include/ (props changed) head/sys/gnu/dts/include/dt-bindings/gce/mt8173-gce.h (props changed) head/sys/gnu/dts/include/dt-bindings/usb/pd.h (props changed) Modified: head/sys/gnu/dts/include/dt-bindings/bus/ti-sysc.h ============================================================================== --- head/sys/gnu/dts/include/dt-bindings/bus/ti-sysc.h Fri Jan 11 08:35:49 2019 (r342934) +++ head/sys/gnu/dts/include/dt-bindings/bus/ti-sysc.h Fri Jan 11 09:20:18 2019 (r342935) @@ -15,6 +15,8 @@ /* SmartReflex sysc found on 36xx and later */ #define SYSC_OMAP3_SR_ENAWAKEUP (1 << 26) +#define SYSC_DRA7_MCAN_ENAWAKEUP (1 << 4) + /* SYSCONFIG STANDBYMODE/MIDLEMODE/SIDLEMODE supported by hardware */ #define SYSC_IDLE_FORCE 0 #define SYSC_IDLE_NO 1 Copied: head/sys/gnu/dts/include/dt-bindings/clock/actions,s700-cmu.h (from r340335, vendor/device-tree/dist/include/dt-bindings/clock/actions,s700-cmu.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/gnu/dts/include/dt-bindings/clock/actions,s700-cmu.h Fri Jan 11 09:20:18 2019 (r342935, copy of r340335, vendor/device-tree/dist/include/dt-bindings/clock/actions,s700-cmu.h) @@ -0,0 +1,118 @@ +/* SPDX-License-Identifier: GPL-2.0 + * + * Device Tree binding constants for Actions Semi S700 Clock Management Unit + * + * Copyright (c) 2014 Actions Semi Inc. + * Author: David Liu + * + * Author: Pathiban Nallathambi + * Author: Saravanan Sekar + */ + +#ifndef __DT_BINDINGS_CLOCK_S700_H +#define __DT_BINDINGS_CLOCK_S700_H + +#define CLK_NONE 0 + +/* pll clocks */ +#define CLK_CORE_PLL 1 +#define CLK_DEV_PLL 2 +#define CLK_DDR_PLL 3 +#define CLK_NAND_PLL 4 +#define CLK_DISPLAY_PLL 5 +#define CLK_TVOUT_PLL 6 +#define CLK_CVBS_PLL 7 +#define CLK_AUDIO_PLL 8 +#define CLK_ETHERNET_PLL 9 + +/* system clock */ +#define CLK_CPU 10 +#define CLK_DEV 11 +#define CLK_AHB 12 +#define CLK_APB 13 +#define CLK_DMAC 14 +#define CLK_NOC0_CLK_MUX 15 +#define CLK_NOC1_CLK_MUX 16 +#define CLK_HP_CLK_MUX 17 +#define CLK_HP_CLK_DIV 18 +#define CLK_NOC1_CLK_DIV 19 +#define CLK_NOC0 20 +#define CLK_NOC1 21 +#define CLK_SENOR_SRC 22 + +/* peripheral device clock */ +#define CLK_GPIO 23 +#define CLK_TIMER 24 +#define CLK_DSI 25 +#define CLK_CSI 26 +#define CLK_SI 27 +#define CLK_DE 28 +#define CLK_HDE 29 +#define CLK_VDE 30 +#define CLK_VCE 31 +#define CLK_NAND 32 +#define CLK_SD0 33 +#define CLK_SD1 34 +#define CLK_SD2 35 + +#define CLK_UART0 36 +#define CLK_UART1 37 +#define CLK_UART2 38 +#define CLK_UART3 39 +#define CLK_UART4 40 +#define CLK_UART5 41 +#define CLK_UART6 42 + +#define CLK_PWM0 43 +#define CLK_PWM1 44 +#define CLK_PWM2 45 +#define CLK_PWM3 46 +#define CLK_PWM4 47 +#define CLK_PWM5 48 +#define CLK_GPU3D 49 + +#define CLK_I2C0 50 +#define CLK_I2C1 51 +#define CLK_I2C2 52 +#define CLK_I2C3 53 + +#define CLK_SPI0 54 +#define CLK_SPI1 55 +#define CLK_SPI2 56 +#define CLK_SPI3 57 + +#define CLK_USB3_480MPLL0 58 +#define CLK_USB3_480MPHY0 59 +#define CLK_USB3_5GPHY 60 +#define CLK_USB3_CCE 61 +#define CLK_USB3_MAC 62 + +#define CLK_LCD 63 +#define CLK_HDMI_AUDIO 64 +#define CLK_I2SRX 65 +#define CLK_I2STX 66 + +#define CLK_SENSOR0 67 +#define CLK_SENSOR1 68 + +#define CLK_HDMI_DEV 69 + +#define CLK_ETHERNET 70 +#define CLK_RMII_REF 71 + +#define CLK_USB2H0_PLLEN 72 +#define CLK_USB2H0_PHY 73 +#define CLK_USB2H0_CCE 74 +#define CLK_USB2H1_PLLEN 75 +#define CLK_USB2H1_PHY 76 +#define CLK_USB2H1_CCE 77 + +#define CLK_TVOUT 78 + +#define CLK_THERMAL_SENSOR 79 + +#define CLK_IRC_SWITCH 80 +#define CLK_PCM1 81 +#define CLK_NR_CLKS (CLK_PCM1 + 1) + +#endif /* __DT_BINDINGS_CLOCK_S700_H */ Modified: head/sys/gnu/dts/include/dt-bindings/clock/aspeed-clock.h ============================================================================== --- head/sys/gnu/dts/include/dt-bindings/clock/aspeed-clock.h Fri Jan 11 08:35:49 2019 (r342934) +++ head/sys/gnu/dts/include/dt-bindings/clock/aspeed-clock.h Fri Jan 11 09:20:18 2019 (r342935) @@ -25,7 +25,7 @@ #define ASPEED_CLK_GATE_RSACLK 19 #define ASPEED_CLK_GATE_UART3CLK 20 #define ASPEED_CLK_GATE_UART4CLK 21 -#define ASPEED_CLK_GATE_SDCLKCLK 22 +#define ASPEED_CLK_GATE_SDCLK 22 #define ASPEED_CLK_GATE_LHCCLK 23 #define ASPEED_CLK_HPLL 24 #define ASPEED_CLK_AHB 25 Copied: head/sys/gnu/dts/include/dt-bindings/clock/axg-audio-clkc.h (from r340335, vendor/device-tree/dist/include/dt-bindings/clock/axg-audio-clkc.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/gnu/dts/include/dt-bindings/clock/axg-audio-clkc.h Fri Jan 11 09:20:18 2019 (r342935, copy of r340335, vendor/device-tree/dist/include/dt-bindings/clock/axg-audio-clkc.h) @@ -0,0 +1,94 @@ +/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */ +/* + * Copyright (c) 2018 Baylibre SAS. + * Author: Jerome Brunet + */ + +#ifndef __AXG_AUDIO_CLKC_BINDINGS_H +#define __AXG_AUDIO_CLKC_BINDINGS_H + +#define AUD_CLKID_SLV_SCLK0 9 +#define AUD_CLKID_SLV_SCLK1 10 +#define AUD_CLKID_SLV_SCLK2 11 +#define AUD_CLKID_SLV_SCLK3 12 +#define AUD_CLKID_SLV_SCLK4 13 +#define AUD_CLKID_SLV_SCLK5 14 +#define AUD_CLKID_SLV_SCLK6 15 +#define AUD_CLKID_SLV_SCLK7 16 +#define AUD_CLKID_SLV_SCLK8 17 +#define AUD_CLKID_SLV_SCLK9 18 +#define AUD_CLKID_SLV_LRCLK0 19 +#define AUD_CLKID_SLV_LRCLK1 20 +#define AUD_CLKID_SLV_LRCLK2 21 +#define AUD_CLKID_SLV_LRCLK3 22 +#define AUD_CLKID_SLV_LRCLK4 23 +#define AUD_CLKID_SLV_LRCLK5 24 +#define AUD_CLKID_SLV_LRCLK6 25 +#define AUD_CLKID_SLV_LRCLK7 26 +#define AUD_CLKID_SLV_LRCLK8 27 +#define AUD_CLKID_SLV_LRCLK9 28 +#define AUD_CLKID_DDR_ARB 29 +#define AUD_CLKID_PDM 30 +#define AUD_CLKID_TDMIN_A 31 +#define AUD_CLKID_TDMIN_B 32 +#define AUD_CLKID_TDMIN_C 33 +#define AUD_CLKID_TDMIN_LB 34 +#define AUD_CLKID_TDMOUT_A 35 +#define AUD_CLKID_TDMOUT_B 36 +#define AUD_CLKID_TDMOUT_C 37 +#define AUD_CLKID_FRDDR_A 38 +#define AUD_CLKID_FRDDR_B 39 +#define AUD_CLKID_FRDDR_C 40 +#define AUD_CLKID_TODDR_A 41 +#define AUD_CLKID_TODDR_B 42 +#define AUD_CLKID_TODDR_C 43 +#define AUD_CLKID_LOOPBACK 44 +#define AUD_CLKID_SPDIFIN 45 +#define AUD_CLKID_SPDIFOUT 46 +#define AUD_CLKID_RESAMPLE 47 +#define AUD_CLKID_POWER_DETECT 48 +#define AUD_CLKID_MST_A_MCLK 49 +#define AUD_CLKID_MST_B_MCLK 50 +#define AUD_CLKID_MST_C_MCLK 51 +#define AUD_CLKID_MST_D_MCLK 52 +#define AUD_CLKID_MST_E_MCLK 53 +#define AUD_CLKID_MST_F_MCLK 54 +#define AUD_CLKID_SPDIFOUT_CLK 55 +#define AUD_CLKID_SPDIFIN_CLK 56 +#define AUD_CLKID_PDM_DCLK 57 +#define AUD_CLKID_PDM_SYSCLK 58 +#define AUD_CLKID_MST_A_SCLK 79 +#define AUD_CLKID_MST_B_SCLK 80 +#define AUD_CLKID_MST_C_SCLK 81 +#define AUD_CLKID_MST_D_SCLK 82 +#define AUD_CLKID_MST_E_SCLK 83 +#define AUD_CLKID_MST_F_SCLK 84 +#define AUD_CLKID_MST_A_LRCLK 86 +#define AUD_CLKID_MST_B_LRCLK 87 +#define AUD_CLKID_MST_C_LRCLK 88 +#define AUD_CLKID_MST_D_LRCLK 89 +#define AUD_CLKID_MST_E_LRCLK 90 +#define AUD_CLKID_MST_F_LRCLK 91 +#define AUD_CLKID_TDMIN_A_SCLK_SEL 116 +#define AUD_CLKID_TDMIN_B_SCLK_SEL 117 +#define AUD_CLKID_TDMIN_C_SCLK_SEL 118 +#define AUD_CLKID_TDMIN_LB_SCLK_SEL 119 +#define AUD_CLKID_TDMOUT_A_SCLK_SEL 120 +#define AUD_CLKID_TDMOUT_B_SCLK_SEL 121 +#define AUD_CLKID_TDMOUT_C_SCLK_SEL 122 +#define AUD_CLKID_TDMIN_A_SCLK 123 +#define AUD_CLKID_TDMIN_B_SCLK 124 +#define AUD_CLKID_TDMIN_C_SCLK 125 +#define AUD_CLKID_TDMIN_LB_SCLK 126 +#define AUD_CLKID_TDMOUT_A_SCLK 127 +#define AUD_CLKID_TDMOUT_B_SCLK 128 +#define AUD_CLKID_TDMOUT_C_SCLK 129 +#define AUD_CLKID_TDMIN_A_LRCLK 130 +#define AUD_CLKID_TDMIN_B_LRCLK 131 +#define AUD_CLKID_TDMIN_C_LRCLK 132 +#define AUD_CLKID_TDMIN_LB_LRCLK 133 +#define AUD_CLKID_TDMOUT_A_LRCLK 134 +#define AUD_CLKID_TDMOUT_B_LRCLK 135 +#define AUD_CLKID_TDMOUT_C_LRCLK 136 + +#endif /* __AXG_AUDIO_CLKC_BINDINGS_H */ Modified: head/sys/gnu/dts/include/dt-bindings/clock/axg-clkc.h ============================================================================== --- head/sys/gnu/dts/include/dt-bindings/clock/axg-clkc.h Fri Jan 11 08:35:49 2019 (r342934) +++ head/sys/gnu/dts/include/dt-bindings/clock/axg-clkc.h Fri Jan 11 09:20:18 2019 (r342935) @@ -68,5 +68,9 @@ #define CLKID_SD_EMMC_B_CLK0 59 #define CLKID_SD_EMMC_C_CLK0 60 #define CLKID_HIFI_PLL 69 +#define CLKID_PCIE_CML_EN0 79 +#define CLKID_PCIE_CML_EN1 80 +#define CLKID_MIPI_ENABLE 81 +#define CLKID_GEN_CLK 84 #endif /* __AXG_CLKC_H */ Modified: head/sys/gnu/dts/include/dt-bindings/clock/dra7.h ============================================================================== --- head/sys/gnu/dts/include/dt-bindings/clock/dra7.h Fri Jan 11 08:35:49 2019 (r342934) +++ head/sys/gnu/dts/include/dt-bindings/clock/dra7.h Fri Jan 11 09:20:18 2019 (r342935) @@ -168,5 +168,6 @@ #define DRA7_COUNTER_32K_CLKCTRL DRA7_CLKCTRL_INDEX(0x50) #define DRA7_UART10_CLKCTRL DRA7_CLKCTRL_INDEX(0x80) #define DRA7_DCAN1_CLKCTRL DRA7_CLKCTRL_INDEX(0x88) +#define DRA7_ADC_CLKCTRL DRA7_CLKCTRL_INDEX(0xa0) #endif Modified: head/sys/gnu/dts/include/dt-bindings/clock/gxbb-clkc.h ============================================================================== --- head/sys/gnu/dts/include/dt-bindings/clock/gxbb-clkc.h Fri Jan 11 08:35:49 2019 (r342934) +++ head/sys/gnu/dts/include/dt-bindings/clock/gxbb-clkc.h Fri Jan 11 09:20:18 2019 (r342935) @@ -127,5 +127,6 @@ #define CLKID_VAPB 140 #define CLKID_VDEC_1 153 #define CLKID_VDEC_HEVC 156 +#define CLKID_GEN_CLK 159 #endif /* __GXBB_CLKC_H */ Modified: head/sys/gnu/dts/include/dt-bindings/clock/imx6sll-clock.h ============================================================================== --- head/sys/gnu/dts/include/dt-bindings/clock/imx6sll-clock.h Fri Jan 11 08:35:49 2019 (r342934) +++ head/sys/gnu/dts/include/dt-bindings/clock/imx6sll-clock.h Fri Jan 11 09:20:18 2019 (r342935) @@ -197,6 +197,13 @@ #define IMX6SLL_CLK_EXTERN_AUDIO_PODF 171 #define IMX6SLL_CLK_EXTERN_AUDIO 172 -#define IMX6SLL_CLK_END 173 +#define IMX6SLL_CLK_GPIO1 173 +#define IMX6SLL_CLK_GPIO2 174 +#define IMX6SLL_CLK_GPIO3 175 +#define IMX6SLL_CLK_GPIO4 176 +#define IMX6SLL_CLK_GPIO5 177 +#define IMX6SLL_CLK_GPIO6 178 + +#define IMX6SLL_CLK_END 179 #endif /* __DT_BINDINGS_CLOCK_IMX6SLL_H */ Modified: head/sys/gnu/dts/include/dt-bindings/clock/imx6ul-clock.h ============================================================================== --- head/sys/gnu/dts/include/dt-bindings/clock/imx6ul-clock.h Fri Jan 11 08:35:49 2019 (r342934) +++ head/sys/gnu/dts/include/dt-bindings/clock/imx6ul-clock.h Fri Jan 11 09:20:18 2019 (r342935) @@ -254,6 +254,12 @@ #define IMX6UL_CLK_CKO2_PODF 241 #define IMX6UL_CLK_CKO2 242 #define IMX6UL_CLK_CKO 243 -#define IMX6UL_CLK_END 244 +#define IMX6UL_CLK_GPIO1 244 +#define IMX6UL_CLK_GPIO2 245 +#define IMX6UL_CLK_GPIO3 246 +#define IMX6UL_CLK_GPIO4 247 +#define IMX6UL_CLK_GPIO5 248 + +#define IMX6UL_CLK_END 249 #endif /* __DT_BINDINGS_CLOCK_IMX6UL_H */ Copied: head/sys/gnu/dts/include/dt-bindings/clock/maxim,max9485.h (from r340335, vendor/device-tree/dist/include/dt-bindings/clock/maxim,max9485.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/gnu/dts/include/dt-bindings/clock/maxim,max9485.h Fri Jan 11 09:20:18 2019 (r342935, copy of r340335, vendor/device-tree/dist/include/dt-bindings/clock/maxim,max9485.h) @@ -0,0 +1,18 @@ +/* + * Copyright (C) 2018 Daniel Mack + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ + +#ifndef __DT_BINDINGS_MAX9485_CLK_H +#define __DT_BINDINGS_MAX9485_CLK_H + +#define MAX9485_MCLKOUT 0 +#define MAX9485_CLKOUT 1 +#define MAX9485_CLKOUT1 2 +#define MAX9485_CLKOUT2 3 + +#endif /* __DT_BINDINGS_MAX9485_CLK_H */ Copied: head/sys/gnu/dts/include/dt-bindings/clock/px30-cru.h (from r340335, vendor/device-tree/dist/include/dt-bindings/clock/px30-cru.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/gnu/dts/include/dt-bindings/clock/px30-cru.h Fri Jan 11 09:20:18 2019 (r342935, copy of r340335, vendor/device-tree/dist/include/dt-bindings/clock/px30-cru.h) @@ -0,0 +1,389 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +#ifndef _DT_BINDINGS_CLK_ROCKCHIP_PX30_H +#define _DT_BINDINGS_CLK_ROCKCHIP_PX30_H + +/* core clocks */ +#define PLL_APLL 1 +#define PLL_DPLL 2 +#define PLL_CPLL 3 +#define PLL_NPLL 4 +#define APLL_BOOST_H 5 +#define APLL_BOOST_L 6 +#define ARMCLK 7 + +/* sclk gates (special clocks) */ +#define USB480M 14 +#define SCLK_PDM 15 +#define SCLK_I2S0_TX 16 +#define SCLK_I2S0_TX_OUT 17 +#define SCLK_I2S0_RX 18 +#define SCLK_I2S0_RX_OUT 19 +#define SCLK_I2S1 20 +#define SCLK_I2S1_OUT 21 +#define SCLK_I2S2 22 +#define SCLK_I2S2_OUT 23 +#define SCLK_UART1 24 +#define SCLK_UART2 25 +#define SCLK_UART3 26 +#define SCLK_UART4 27 +#define SCLK_UART5 28 +#define SCLK_I2C0 29 +#define SCLK_I2C1 30 +#define SCLK_I2C2 31 +#define SCLK_I2C3 32 +#define SCLK_I2C4 33 +#define SCLK_PWM0 34 +#define SCLK_PWM1 35 +#define SCLK_SPI0 36 +#define SCLK_SPI1 37 +#define SCLK_TIMER0 38 +#define SCLK_TIMER1 39 +#define SCLK_TIMER2 40 +#define SCLK_TIMER3 41 +#define SCLK_TIMER4 42 +#define SCLK_TIMER5 43 +#define SCLK_TSADC 44 +#define SCLK_SARADC 45 +#define SCLK_OTP 46 +#define SCLK_OTP_USR 47 +#define SCLK_CRYPTO 48 +#define SCLK_CRYPTO_APK 49 +#define SCLK_DDRC 50 +#define SCLK_ISP 51 +#define SCLK_CIF_OUT 52 +#define SCLK_RGA_CORE 53 +#define SCLK_VOPB_PWM 54 +#define SCLK_NANDC 55 +#define SCLK_SDIO 56 +#define SCLK_EMMC 57 +#define SCLK_SFC 58 +#define SCLK_SDMMC 59 +#define SCLK_OTG_ADP 60 +#define SCLK_GMAC_SRC 61 +#define SCLK_GMAC 62 +#define SCLK_GMAC_RX_TX 63 +#define SCLK_MAC_REF 64 +#define SCLK_MAC_REFOUT 65 +#define SCLK_MAC_OUT 66 +#define SCLK_SDMMC_DRV 67 +#define SCLK_SDMMC_SAMPLE 68 +#define SCLK_SDIO_DRV 69 +#define SCLK_SDIO_SAMPLE 70 +#define SCLK_EMMC_DRV 71 +#define SCLK_EMMC_SAMPLE 72 +#define SCLK_GPU 73 +#define SCLK_PVTM 74 +#define SCLK_CORE_VPU 75 +#define SCLK_GMAC_RMII 76 +#define SCLK_UART2_SRC 77 +#define SCLK_NANDC_DIV 78 +#define SCLK_NANDC_DIV50 79 +#define SCLK_SDIO_DIV 80 +#define SCLK_SDIO_DIV50 81 +#define SCLK_EMMC_DIV 82 +#define SCLK_EMMC_DIV50 83 +#define SCLK_DDRCLK 84 +#define SCLK_UART1_SRC 85 + +/* dclk gates */ +#define DCLK_VOPB 150 +#define DCLK_VOPL 151 + +/* aclk gates */ +#define ACLK_GPU 170 +#define ACLK_BUS_PRE 171 +#define ACLK_CRYPTO 172 +#define ACLK_VI_PRE 173 +#define ACLK_VO_PRE 174 +#define ACLK_VPU 175 +#define ACLK_PERI_PRE 176 +#define ACLK_GMAC 178 +#define ACLK_CIF 179 +#define ACLK_ISP 180 +#define ACLK_VOPB 181 +#define ACLK_VOPL 182 +#define ACLK_RGA 183 +#define ACLK_GIC 184 +#define ACLK_DCF 186 +#define ACLK_DMAC 187 +#define ACLK_BUS_SRC 188 +#define ACLK_PERI_SRC 189 + +/* hclk gates */ +#define HCLK_BUS_PRE 240 +#define HCLK_CRYPTO 241 +#define HCLK_VI_PRE 242 +#define HCLK_VO_PRE 243 +#define HCLK_VPU 244 +#define HCLK_PERI_PRE 245 +#define HCLK_MMC_NAND 246 +#define HCLK_SDMMC 247 +#define HCLK_USB 248 +#define HCLK_CIF 249 +#define HCLK_ISP 250 +#define HCLK_VOPB 251 +#define HCLK_VOPL 252 +#define HCLK_RGA 253 +#define HCLK_NANDC 254 +#define HCLK_SDIO 255 +#define HCLK_EMMC 256 +#define HCLK_SFC 257 +#define HCLK_OTG 258 +#define HCLK_HOST 259 +#define HCLK_HOST_ARB 260 +#define HCLK_PDM 261 +#define HCLK_I2S0 262 +#define HCLK_I2S1 263 +#define HCLK_I2S2 264 + +/* pclk gates */ +#define PCLK_BUS_PRE 320 +#define PCLK_DDR 321 +#define PCLK_VO_PRE 322 +#define PCLK_GMAC 323 +#define PCLK_MIPI_DSI 324 +#define PCLK_MIPIDSIPHY 325 +#define PCLK_MIPICSIPHY 326 +#define PCLK_USB_GRF 327 +#define PCLK_DCF 328 +#define PCLK_UART1 329 +#define PCLK_UART2 330 +#define PCLK_UART3 331 +#define PCLK_UART4 332 +#define PCLK_UART5 333 +#define PCLK_I2C0 334 +#define PCLK_I2C1 335 +#define PCLK_I2C2 336 +#define PCLK_I2C3 337 +#define PCLK_I2C4 338 +#define PCLK_PWM0 339 +#define PCLK_PWM1 340 +#define PCLK_SPI0 341 +#define PCLK_SPI1 342 +#define PCLK_SARADC 343 +#define PCLK_TSADC 344 +#define PCLK_TIMER 345 +#define PCLK_OTP_NS 346 +#define PCLK_WDT_NS 347 +#define PCLK_GPIO1 348 +#define PCLK_GPIO2 349 +#define PCLK_GPIO3 350 +#define PCLK_ISP 351 +#define PCLK_CIF 352 +#define PCLK_OTP_PHY 353 + +#define CLK_NR_CLKS (PCLK_OTP_PHY + 1) + +/* pmu-clocks indices */ + +#define PLL_GPLL 1 + +#define SCLK_RTC32K_PMU 4 +#define SCLK_WIFI_PMU 5 +#define SCLK_UART0_PMU 6 +#define SCLK_PVTM_PMU 7 +#define PCLK_PMU_PRE 8 +#define SCLK_REF24M_PMU 9 +#define SCLK_USBPHY_REF 10 +#define SCLK_MIPIDSIPHY_REF 11 + +#define XIN24M_DIV 12 + +#define PCLK_GPIO0_PMU 20 +#define PCLK_UART0_PMU 21 + +#define CLKPMU_NR_CLKS (PCLK_UART0_PMU + 1) + +/* soft-reset indices */ +#define SRST_CORE0_PO 0 +#define SRST_CORE1_PO 1 +#define SRST_CORE2_PO 2 +#define SRST_CORE3_PO 3 +#define SRST_CORE0 4 +#define SRST_CORE1 5 +#define SRST_CORE2 6 +#define SRST_CORE3 7 +#define SRST_CORE0_DBG 8 +#define SRST_CORE1_DBG 9 +#define SRST_CORE2_DBG 10 +#define SRST_CORE3_DBG 11 +#define SRST_TOPDBG 12 +#define SRST_CORE_NOC 13 +#define SRST_STRC_A 14 +#define SRST_L2C 15 + +#define SRST_DAP 16 +#define SRST_CORE_PVTM 17 +#define SRST_GPU 18 +#define SRST_GPU_NIU 19 +#define SRST_UPCTL2 20 +#define SRST_UPCTL2_A 21 +#define SRST_UPCTL2_P 22 +#define SRST_MSCH 23 +#define SRST_MSCH_P 24 +#define SRST_DDRMON_P 25 +#define SRST_DDRSTDBY_P 26 +#define SRST_DDRSTDBY 27 +#define SRST_DDRGRF_p 28 +#define SRST_AXI_SPLIT_A 29 +#define SRST_AXI_CMD_A 30 +#define SRST_AXI_CMD_P 31 + +#define SRST_DDRPHY 32 +#define SRST_DDRPHYDIV 33 +#define SRST_DDRPHY_P 34 +#define SRST_VPU_A 36 +#define SRST_VPU_NIU_A 37 +#define SRST_VPU_H 38 +#define SRST_VPU_NIU_H 39 +#define SRST_VI_NIU_A 40 +#define SRST_VI_NIU_H 41 +#define SRST_ISP_H 42 +#define SRST_ISP 43 +#define SRST_CIF_A 44 +#define SRST_CIF_H 45 +#define SRST_CIF_PCLKIN 46 +#define SRST_MIPICSIPHY_P 47 + +#define SRST_VO_NIU_A 48 +#define SRST_VO_NIU_H 49 +#define SRST_VO_NIU_P 50 +#define SRST_VOPB_A 51 +#define SRST_VOPB_H 52 +#define SRST_VOPB 53 +#define SRST_PWM_VOPB 54 +#define SRST_VOPL_A 55 +#define SRST_VOPL_H 56 +#define SRST_VOPL 57 +#define SRST_RGA_A 58 +#define SRST_RGA_H 59 +#define SRST_RGA 60 +#define SRST_MIPIDSI_HOST_P 61 +#define SRST_MIPIDSIPHY_P 62 +#define SRST_VPU_CORE 63 + +#define SRST_PERI_NIU_A 64 +#define SRST_USB_NIU_H 65 +#define SRST_USB2OTG_H 66 +#define SRST_USB2OTG 67 +#define SRST_USB2OTG_ADP 68 +#define SRST_USB2HOST_H 69 +#define SRST_USB2HOST_ARB_H 70 +#define SRST_USB2HOST_AUX_H 71 +#define SRST_USB2HOST_EHCI 72 +#define SRST_USB2HOST 73 +#define SRST_USBPHYPOR 74 +#define SRST_USBPHY_OTG_PORT 75 +#define SRST_USBPHY_HOST_PORT 76 +#define SRST_USBPHY_GRF 77 +#define SRST_CPU_BOOST_P 78 +#define SRST_CPU_BOOST 79 + +#define SRST_MMC_NAND_NIU_H 80 +#define SRST_SDIO_H 81 +#define SRST_EMMC_H 82 +#define SRST_SFC_H 83 +#define SRST_SFC 84 +#define SRST_SDCARD_NIU_H 85 +#define SRST_SDMMC_H 86 +#define SRST_NANDC_H 89 +#define SRST_NANDC 90 +#define SRST_GMAC_NIU_A 92 +#define SRST_GMAC_NIU_P 93 +#define SRST_GMAC_A 94 + +#define SRST_PMU_NIU_P 96 +#define SRST_PMU_SGRF_P 97 +#define SRST_PMU_GRF_P 98 +#define SRST_PMU 99 +#define SRST_PMU_MEM_P 100 +#define SRST_PMU_GPIO0_P 101 +#define SRST_PMU_UART0_P 102 +#define SRST_PMU_CRU_P 103 +#define SRST_PMU_PVTM 104 +#define SRST_PMU_UART 105 +#define SRST_PMU_NIU_H 106 +#define SRST_PMU_DDR_FAIL_SAVE 107 +#define SRST_PMU_CORE_PERF_A 108 +#define SRST_PMU_CORE_GRF_P 109 +#define SRST_PMU_GPU_PERF_A 110 +#define SRST_PMU_GPU_GRF_P 111 + +#define SRST_CRYPTO_NIU_A 112 +#define SRST_CRYPTO_NIU_H 113 +#define SRST_CRYPTO_A 114 +#define SRST_CRYPTO_H 115 +#define SRST_CRYPTO 116 +#define SRST_CRYPTO_APK 117 +#define SRST_BUS_NIU_H 120 +#define SRST_USB_NIU_P 121 +#define SRST_BUS_TOP_NIU_P 122 +#define SRST_INTMEM_A 123 +#define SRST_GIC_A 124 +#define SRST_ROM_H 126 +#define SRST_DCF_A 127 + +#define SRST_DCF_P 128 +#define SRST_PDM_H 129 +#define SRST_PDM 130 +#define SRST_I2S0_H 131 +#define SRST_I2S0_TX 132 +#define SRST_I2S1_H 133 +#define SRST_I2S1 134 +#define SRST_I2S2_H 135 +#define SRST_I2S2 136 +#define SRST_UART1_P 137 +#define SRST_UART1 138 +#define SRST_UART2_P 139 +#define SRST_UART2 140 +#define SRST_UART3_P 141 +#define SRST_UART3 142 +#define SRST_UART4_P 143 + +#define SRST_UART4 144 +#define SRST_UART5_P 145 +#define SRST_UART5 146 +#define SRST_I2C0_P 147 +#define SRST_I2C0 148 +#define SRST_I2C1_P 149 +#define SRST_I2C1 150 +#define SRST_I2C2_P 151 +#define SRST_I2C2 152 +#define SRST_I2C3_P 153 +#define SRST_I2C3 154 +#define SRST_PWM0_P 157 +#define SRST_PWM0 158 +#define SRST_PWM1_P 159 + +#define SRST_PWM1 160 +#define SRST_SPI0_P 161 +#define SRST_SPI0 162 +#define SRST_SPI1_P 163 +#define SRST_SPI1 164 +#define SRST_SARADC_P 165 +#define SRST_SARADC 166 +#define SRST_TSADC_P 167 +#define SRST_TSADC 168 +#define SRST_TIMER_P 169 +#define SRST_TIMER0 170 +#define SRST_TIMER1 171 +#define SRST_TIMER2 172 +#define SRST_TIMER3 173 +#define SRST_TIMER4 174 +#define SRST_TIMER5 175 + +#define SRST_OTP_NS_P 176 +#define SRST_OTP_NS_SBPI 177 +#define SRST_OTP_NS_USR 178 +#define SRST_OTP_PHY_P 179 +#define SRST_OTP_PHY 180 +#define SRST_WDT_NS_P 181 +#define SRST_GPIO1_P 182 +#define SRST_GPIO2_P 183 +#define SRST_GPIO3_P 184 +#define SRST_SGRF_P 185 +#define SRST_GRF_P 186 +#define SRST_I2S0_RX 191 + +#endif Modified: head/sys/gnu/dts/include/dt-bindings/clock/pxa-clock.h ============================================================================== --- head/sys/gnu/dts/include/dt-bindings/clock/pxa-clock.h Fri Jan 11 08:35:49 2019 (r342934) +++ head/sys/gnu/dts/include/dt-bindings/clock/pxa-clock.h Fri Jan 11 09:20:18 2019 (r342935) @@ -72,6 +72,7 @@ #define CLK_USIM 58 #define CLK_USIM1 59 #define CLK_USMI0 60 -#define CLK_MAX 61 +#define CLK_OSC32k768 61 +#define CLK_MAX 62 #endif Copied: head/sys/gnu/dts/include/dt-bindings/clock/qcom,dispcc-sdm845.h (from r340335, vendor/device-tree/dist/include/dt-bindings/clock/qcom,dispcc-sdm845.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/gnu/dts/include/dt-bindings/clock/qcom,dispcc-sdm845.h Fri Jan 11 09:20:18 2019 (r342935, copy of r340335, vendor/device-tree/dist/include/dt-bindings/clock/qcom,dispcc-sdm845.h) @@ -0,0 +1,45 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (c) 2018, The Linux Foundation. All rights reserved. + */ + +#ifndef _DT_BINDINGS_CLK_SDM_DISP_CC_SDM845_H +#define _DT_BINDINGS_CLK_SDM_DISP_CC_SDM845_H + +/* DISP_CC clock registers */ +#define DISP_CC_MDSS_AHB_CLK 0 +#define DISP_CC_MDSS_AXI_CLK 1 +#define DISP_CC_MDSS_BYTE0_CLK 2 +#define DISP_CC_MDSS_BYTE0_CLK_SRC 3 +#define DISP_CC_MDSS_BYTE0_INTF_CLK 4 +#define DISP_CC_MDSS_BYTE1_CLK 5 +#define DISP_CC_MDSS_BYTE1_CLK_SRC 6 +#define DISP_CC_MDSS_BYTE1_INTF_CLK 7 +#define DISP_CC_MDSS_ESC0_CLK 8 +#define DISP_CC_MDSS_ESC0_CLK_SRC 9 +#define DISP_CC_MDSS_ESC1_CLK 10 +#define DISP_CC_MDSS_ESC1_CLK_SRC 11 +#define DISP_CC_MDSS_MDP_CLK 12 +#define DISP_CC_MDSS_MDP_CLK_SRC 13 +#define DISP_CC_MDSS_MDP_LUT_CLK 14 +#define DISP_CC_MDSS_PCLK0_CLK 15 +#define DISP_CC_MDSS_PCLK0_CLK_SRC 16 +#define DISP_CC_MDSS_PCLK1_CLK 17 +#define DISP_CC_MDSS_PCLK1_CLK_SRC 18 +#define DISP_CC_MDSS_ROT_CLK 19 +#define DISP_CC_MDSS_ROT_CLK_SRC 20 +#define DISP_CC_MDSS_RSCC_AHB_CLK 21 +#define DISP_CC_MDSS_RSCC_VSYNC_CLK 22 +#define DISP_CC_MDSS_VSYNC_CLK 23 +#define DISP_CC_MDSS_VSYNC_CLK_SRC 24 +#define DISP_CC_PLL0 25 +#define DISP_CC_MDSS_BYTE0_DIV_CLK_SRC 26 +#define DISP_CC_MDSS_BYTE1_DIV_CLK_SRC 27 + +/* DISP_CC Reset */ +#define DISP_CC_MDSS_RSCC_BCR 0 + +/* DISP_CC GDSCR */ +#define MDSS_GDSC 0 + +#endif Modified: head/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-sdm845.h ============================================================================== --- head/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-sdm845.h Fri Jan 11 08:35:49 2019 (r342934) +++ head/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-sdm845.h Fri Jan 11 09:20:18 2019 (r342935) @@ -192,6 +192,8 @@ #define GCC_VS_CTRL_CLK_SRC 182 #define GCC_VSENSOR_CLK_SRC 183 #define GPLL4 184 +#define GCC_CPUSS_DVM_BUS_CLK 185 +#define GCC_CPUSS_GNOC_CLK 186 /* GCC Resets */ #define GCC_MMSS_BCR 0 Copied: head/sys/gnu/dts/include/dt-bindings/clock/r9a06g032-sysctrl.h (from r340335, vendor/device-tree/dist/include/dt-bindings/clock/r9a06g032-sysctrl.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/gnu/dts/include/dt-bindings/clock/r9a06g032-sysctrl.h Fri Jan 11 09:20:18 2019 (r342935, copy of r340335, vendor/device-tree/dist/include/dt-bindings/clock/r9a06g032-sysctrl.h) @@ -0,0 +1,148 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * R9A06G032 sysctrl IDs + * + * Copyright (C) 2018 Renesas Electronics Europe Limited + * + * Michel Pollet , + */ + +#ifndef __DT_BINDINGS_R9A06G032_SYSCTRL_H__ +#define __DT_BINDINGS_R9A06G032_SYSCTRL_H__ + +#define R9A06G032_CLK_PLL_USB 1 +#define R9A06G032_CLK_48 1 /* AKA CLK_PLL_USB */ +#define R9A06G032_MSEBIS_CLK 3 /* AKA CLKOUT_D16 */ +#define R9A06G032_MSEBIM_CLK 3 /* AKA CLKOUT_D16 */ +#define R9A06G032_CLK_DDRPHY_PLLCLK 5 /* AKA CLKOUT_D1OR2 */ +#define R9A06G032_CLK50 6 /* AKA CLKOUT_D20 */ +#define R9A06G032_CLK25 7 /* AKA CLKOUT_D40 */ +#define R9A06G032_CLK125 9 /* AKA CLKOUT_D8 */ +#define R9A06G032_CLK_P5_PG1 17 /* AKA DIV_P5_PG */ +#define R9A06G032_CLK_REF_SYNC 21 /* AKA DIV_REF_SYNC */ +#define R9A06G032_CLK_25_PG4 26 +#define R9A06G032_CLK_25_PG5 27 +#define R9A06G032_CLK_25_PG6 28 +#define R9A06G032_CLK_25_PG7 29 +#define R9A06G032_CLK_25_PG8 30 +#define R9A06G032_CLK_ADC 31 +#define R9A06G032_CLK_ECAT100 32 +#define R9A06G032_CLK_HSR100 33 +#define R9A06G032_CLK_I2C0 34 +#define R9A06G032_CLK_I2C1 35 +#define R9A06G032_CLK_MII_REF 36 +#define R9A06G032_CLK_NAND 37 +#define R9A06G032_CLK_NOUSBP2_PG6 38 +#define R9A06G032_CLK_P1_PG2 39 +#define R9A06G032_CLK_P1_PG3 40 +#define R9A06G032_CLK_P1_PG4 41 +#define R9A06G032_CLK_P4_PG3 42 +#define R9A06G032_CLK_P4_PG4 43 +#define R9A06G032_CLK_P6_PG1 44 +#define R9A06G032_CLK_P6_PG2 45 +#define R9A06G032_CLK_P6_PG3 46 +#define R9A06G032_CLK_P6_PG4 47 +#define R9A06G032_CLK_PCI_USB 48 +#define R9A06G032_CLK_QSPI0 49 +#define R9A06G032_CLK_QSPI1 50 +#define R9A06G032_CLK_RGMII_REF 51 +#define R9A06G032_CLK_RMII_REF 52 +#define R9A06G032_CLK_SDIO0 53 +#define R9A06G032_CLK_SDIO1 54 +#define R9A06G032_CLK_SERCOS100 55 +#define R9A06G032_CLK_SLCD 56 +#define R9A06G032_CLK_SPI0 57 +#define R9A06G032_CLK_SPI1 58 +#define R9A06G032_CLK_SPI2 59 +#define R9A06G032_CLK_SPI3 60 +#define R9A06G032_CLK_SPI4 61 +#define R9A06G032_CLK_SPI5 62 +#define R9A06G032_CLK_SWITCH 63 +#define R9A06G032_HCLK_ECAT125 65 +#define R9A06G032_HCLK_PINCONFIG 66 +#define R9A06G032_HCLK_SERCOS 67 +#define R9A06G032_HCLK_SGPIO2 68 +#define R9A06G032_HCLK_SGPIO3 69 +#define R9A06G032_HCLK_SGPIO4 70 +#define R9A06G032_HCLK_TIMER0 71 +#define R9A06G032_HCLK_TIMER1 72 +#define R9A06G032_HCLK_USBF 73 +#define R9A06G032_HCLK_USBH 74 +#define R9A06G032_HCLK_USBPM 75 +#define R9A06G032_CLK_48_PG_F 76 +#define R9A06G032_CLK_48_PG4 77 +#define R9A06G032_CLK_DDRPHY_PCLK 81 /* AKA CLK_REF_SYNC_D4 */ +#define R9A06G032_CLK_FW 81 /* AKA CLK_REF_SYNC_D4 */ +#define R9A06G032_CLK_CRYPTO 81 /* AKA CLK_REF_SYNC_D4 */ +#define R9A06G032_CLK_A7MP 84 /* AKA DIV_CA7 */ +#define R9A06G032_HCLK_CAN0 85 +#define R9A06G032_HCLK_CAN1 86 +#define R9A06G032_HCLK_DELTASIGMA 87 +#define R9A06G032_HCLK_PWMPTO 88 +#define R9A06G032_HCLK_RSV 89 +#define R9A06G032_HCLK_SGPIO0 90 +#define R9A06G032_HCLK_SGPIO1 91 +#define R9A06G032_RTOS_MDC 92 +#define R9A06G032_CLK_CM3 93 +#define R9A06G032_CLK_DDRC 94 +#define R9A06G032_CLK_ECAT25 95 +#define R9A06G032_CLK_HSR50 96 +#define R9A06G032_CLK_HW_RTOS 97 +#define R9A06G032_CLK_SERCOS50 98 +#define R9A06G032_HCLK_ADC 99 +#define R9A06G032_HCLK_CM3 100 +#define R9A06G032_HCLK_CRYPTO_EIP150 101 +#define R9A06G032_HCLK_CRYPTO_EIP93 102 +#define R9A06G032_HCLK_DDRC 103 +#define R9A06G032_HCLK_DMA0 104 +#define R9A06G032_HCLK_DMA1 105 +#define R9A06G032_HCLK_GMAC0 106 +#define R9A06G032_HCLK_GMAC1 107 +#define R9A06G032_HCLK_GPIO0 108 +#define R9A06G032_HCLK_GPIO1 109 +#define R9A06G032_HCLK_GPIO2 110 +#define R9A06G032_HCLK_HSR 111 +#define R9A06G032_HCLK_I2C0 112 +#define R9A06G032_HCLK_I2C1 113 +#define R9A06G032_HCLK_LCD 114 +#define R9A06G032_HCLK_MSEBI_M 115 +#define R9A06G032_HCLK_MSEBI_S 116 +#define R9A06G032_HCLK_NAND 117 +#define R9A06G032_HCLK_PG_I 118 +#define R9A06G032_HCLK_PG19 119 +#define R9A06G032_HCLK_PG20 120 +#define R9A06G032_HCLK_PG3 121 +#define R9A06G032_HCLK_PG4 122 +#define R9A06G032_HCLK_QSPI0 123 +#define R9A06G032_HCLK_QSPI1 124 +#define R9A06G032_HCLK_ROM 125 +#define R9A06G032_HCLK_RTC 126 +#define R9A06G032_HCLK_SDIO0 127 +#define R9A06G032_HCLK_SDIO1 128 +#define R9A06G032_HCLK_SEMAP 129 +#define R9A06G032_HCLK_SPI0 130 +#define R9A06G032_HCLK_SPI1 131 +#define R9A06G032_HCLK_SPI2 132 +#define R9A06G032_HCLK_SPI3 133 +#define R9A06G032_HCLK_SPI4 134 +#define R9A06G032_HCLK_SPI5 135 +#define R9A06G032_HCLK_SWITCH 136 +#define R9A06G032_HCLK_SWITCH_RG 137 +#define R9A06G032_HCLK_UART0 138 +#define R9A06G032_HCLK_UART1 139 +#define R9A06G032_HCLK_UART2 140 +#define R9A06G032_HCLK_UART3 141 +#define R9A06G032_HCLK_UART4 142 +#define R9A06G032_HCLK_UART5 143 +#define R9A06G032_HCLK_UART6 144 +#define R9A06G032_HCLK_UART7 145 +#define R9A06G032_CLK_UART0 146 +#define R9A06G032_CLK_UART1 147 +#define R9A06G032_CLK_UART2 148 +#define R9A06G032_CLK_UART3 149 +#define R9A06G032_CLK_UART4 150 +#define R9A06G032_CLK_UART5 151 +#define R9A06G032_CLK_UART6 152 +#define R9A06G032_CLK_UART7 153 + +#endif /* __DT_BINDINGS_R9A06G032_SYSCTRL_H__ */ Copied: head/sys/gnu/dts/include/dt-bindings/clock/rk3399-ddr.h (from r340335, vendor/device-tree/dist/include/dt-bindings/clock/rk3399-ddr.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/gnu/dts/include/dt-bindings/clock/rk3399-ddr.h Fri Jan 11 09:20:18 2019 (r342935, copy of r340335, vendor/device-tree/dist/include/dt-bindings/clock/rk3399-ddr.h) @@ -0,0 +1,56 @@ +/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */ + +#ifndef DT_BINDINGS_DDR_H +#define DT_BINDINGS_DDR_H + +/* + * DDR3 SDRAM Standard Speed Bins include tCK, tRCD, tRP, tRAS and tRC for + * each corresponding bin. + */ + +/* DDR3-800 (5-5-5) */ +#define DDR3_800D 0 +/* DDR3-800 (6-6-6) */ +#define DDR3_800E 1 +/* DDR3-1066 (6-6-6) */ +#define DDR3_1066E 2 +/* DDR3-1066 (7-7-7) */ +#define DDR3_1066F 3 +/* DDR3-1066 (8-8-8) */ +#define DDR3_1066G 4 +/* DDR3-1333 (7-7-7) */ +#define DDR3_1333F 5 +/* DDR3-1333 (8-8-8) */ +#define DDR3_1333G 6 +/* DDR3-1333 (9-9-9) */ +#define DDR3_1333H 7 +/* DDR3-1333 (10-10-10) */ +#define DDR3_1333J 8 +/* DDR3-1600 (8-8-8) */ +#define DDR3_1600G 9 +/* DDR3-1600 (9-9-9) */ +#define DDR3_1600H 10 +/* DDR3-1600 (10-10-10) */ +#define DDR3_1600J 11 +/* DDR3-1600 (11-11-11) */ +#define DDR3_1600K 12 +/* DDR3-1600 (10-10-10) */ +#define DDR3_1866J 13 +/* DDR3-1866 (11-11-11) */ +#define DDR3_1866K 14 +/* DDR3-1866 (12-12-12) */ +#define DDR3_1866L 15 +/* DDR3-1866 (13-13-13) */ +#define DDR3_1866M 16 +/* DDR3-2133 (11-11-11) */ +#define DDR3_2133K 17 +/* DDR3-2133 (12-12-12) */ +#define DDR3_2133L 18 +/* DDR3-2133 (13-13-13) */ +#define DDR3_2133M 19 +/* DDR3-2133 (14-14-14) */ +#define DDR3_2133N 20 +/* DDR3 ATF default */ +#define DDR3_DEFAULT 21 + +#endif Modified: head/sys/gnu/dts/include/dt-bindings/clock/sun8i-r40-ccu.h ============================================================================== --- head/sys/gnu/dts/include/dt-bindings/clock/sun8i-r40-ccu.h Fri Jan 11 08:35:49 2019 (r342934) +++ head/sys/gnu/dts/include/dt-bindings/clock/sun8i-r40-ccu.h Fri Jan 11 09:20:18 2019 (r342935) @@ -43,6 +43,10 @@ #ifndef _DT_BINDINGS_CLK_SUN8I_R40_H_ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Fri Jan 11 09:40:41 2019 Return-Path: Delivered-To: svn-src-head@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 A68191487C6B; Fri, 11 Jan 2019 09:40:40 +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 4F17E9102E; Fri, 11 Jan 2019 09:40: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 4328119D6B; Fri, 11 Jan 2019 09:40: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 x0B9eepw049672; Fri, 11 Jan 2019 09:40:40 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0B9eZvm049646; Fri, 11 Jan 2019 09:40:35 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201901110940.x0B9eZvm049646@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 11 Jan 2019 09:40:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342936 - in head/sys/gnu/dts: arm arm64/actions arm64/allwinner arm64/altera arm64/amd arm64/amlogic arm64/arm arm64/broadcom arm64/broadcom/northstar2 arm64/broadcom/stingray arm64/ex... X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head/sys/gnu/dts: arm arm64/actions arm64/allwinner arm64/altera arm64/amd arm64/amlogic arm64/arm arm64/broadcom arm64/broadcom/northstar2 arm64/broadcom/stingray arm64/exynos arm64/freescale arm6... X-SVN-Commit-Revision: 342936 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4F17E9102E 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.999,0]; NEURAL_HAM_SHORT(-0.99)[-0.985,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2019 09:40:41 -0000 Author: manu Date: Fri Jan 11 09:40:34 2019 New Revision: 342936 URL: https://svnweb.freebsd.org/changeset/base/342936 Log: Import DTS from Linux 4.20 MFC after: 2 months Added: - copied unchanged from r342930, vendor/device-tree/dist/src/arm/am335x-moxa-uc-2100-common.dtsi - copied unchanged from r342930, vendor/device-tree/dist/src/arm/am335x-moxa-uc-2101.dts - copied unchanged from r342930, vendor/device-tree/dist/src/arm/am3517-evm-ui.dtsi - copied unchanged from r342930, vendor/device-tree/dist/src/arm/armada-385-db-88f6820-amc.dts - copied unchanged from r342930, vendor/device-tree/dist/src/arm/aspeed-bmc-arm-stardragon4800-rep2.dts - copied unchanged from r342930, vendor/device-tree/dist/src/arm/aspeed-bmc-facebook-tiogapass.dts - copied unchanged from r342930, vendor/device-tree/dist/src/arm/bcm2837-rpi-cm3-io3.dts - copied unchanged from r342930, vendor/device-tree/dist/src/arm/bcm2837-rpi-cm3.dtsi - copied unchanged from r342930, vendor/device-tree/dist/src/arm/imx6qdl-icore-1.5.dtsi - copied unchanged from r342930, vendor/device-tree/dist/src/arm/imx6ul-ccimx6ulsbcpro.dts - copied unchanged from r342930, vendor/device-tree/dist/src/arm/imx6ulz-14x14-evk.dts - copied unchanged from r342930, vendor/device-tree/dist/src/arm/imx6ulz.dtsi - copied unchanged from r342930, vendor/device-tree/dist/src/arm/meson8b-ec100.dts - copied unchanged from r342930, vendor/device-tree/dist/src/arm/omap3-gta04a5one.dts - copied unchanged from r342930, vendor/device-tree/dist/src/arm/rk3288-tinker-s.dts - copied unchanged from r342930, vendor/device-tree/dist/src/arm/rk3288-tinker.dtsi - copied unchanged from r342930, vendor/device-tree/dist/src/arm/socfpga_cyclone5_de0_nano_soc.dts - copied unchanged from r342930, vendor/device-tree/dist/src/arm/sun8i-h3-bananapi-m2-plus-v1.2.dts - copied unchanged from r342930, vendor/device-tree/dist/src/arm/sun8i-h3-orangepi-zero-plus2.dts - copied unchanged from r342930, vendor/device-tree/dist/src/arm/sunxi-bananapi-m2-plus-v1.2.dtsi - copied unchanged from r342930, vendor/device-tree/dist/src/arm/sunxi-bananapi-m2-plus.dtsi - copied unchanged from r342930, vendor/device-tree/dist/src/arm/tegra20-colibri-eval-v3.dts - copied unchanged from r342930, vendor/device-tree/dist/src/arm/tegra30-apalis-v1.1-eval.dts - copied unchanged from r342930, vendor/device-tree/dist/src/arm/tegra30-apalis-v1.1.dtsi - copied unchanged from r342930, vendor/device-tree/dist/src/arm64/allwinner/sun50i-a64-pine64-lts.dts - copied unchanged from r342930, vendor/device-tree/dist/src/arm64/allwinner/sun50i-h5-bananapi-m2-plus-v1.2.dts - copied unchanged from r342930, vendor/device-tree/dist/src/arm64/allwinner/sun50i-h5-bananapi-m2-plus.dts - copied unchanged from r342930, vendor/device-tree/dist/src/arm64/allwinner/sun50i-h6-orangepi-one-plus.dts - copied unchanged from r342930, vendor/device-tree/dist/src/arm64/amlogic/meson-g12a-u200.dts - copied unchanged from r342930, vendor/device-tree/dist/src/arm64/amlogic/meson-g12a.dtsi - copied unchanged from r342930, vendor/device-tree/dist/src/arm64/broadcom/bcm2837-rpi-cm3-io3.dts - copied unchanged from r342930, vendor/device-tree/dist/src/arm64/hisilicon/hi3670-hikey970.dts - copied unchanged from r342930, vendor/device-tree/dist/src/arm64/hisilicon/hi3670.dtsi - copied unchanged from r342930, vendor/device-tree/dist/src/arm64/marvell/armada-8040-clearfog-gt-8k.dts - copied unchanged from r342930, vendor/device-tree/dist/src/arm64/mediatek/mt7622-bananapi-bpi-r64.dts - copied unchanged from r342930, vendor/device-tree/dist/src/arm64/qcom/msm8998-mtp.dts - copied unchanged from r342930, vendor/device-tree/dist/src/arm64/qcom/msm8998-mtp.dtsi - copied unchanged from r342930, vendor/device-tree/dist/src/arm64/qcom/msm8998.dtsi - copied unchanged from r342930, vendor/device-tree/dist/src/arm64/qcom/pmi8998.dtsi - copied unchanged from r342930, vendor/device-tree/dist/src/arm64/renesas/r8a774a1.dtsi - copied unchanged from r342930, vendor/device-tree/dist/src/arm64/renesas/r8a77965-m3nulcb-kf.dts - copied unchanged from r342930, vendor/device-tree/dist/src/arm64/renesas/r8a77965-m3nulcb.dts - copied unchanged from r342930, vendor/device-tree/dist/src/arm64/rockchip/px30-evb.dts - copied unchanged from r342930, vendor/device-tree/dist/src/arm64/rockchip/px30.dtsi - copied unchanged from r342930, vendor/device-tree/dist/src/arm64/rockchip/rk3399-roc-pc.dts - copied unchanged from r342930, vendor/device-tree/dist/src/arm64/rockchip/rk3399-rock960.dts - copied unchanged from r342930, vendor/device-tree/dist/src/arm64/rockchip/rk3399-rock960.dtsi - copied unchanged from r342930, vendor/device-tree/dist/src/arm64/rockchip/rk3399-rockpro64.dts - copied unchanged from r342930, vendor/device-tree/dist/src/arm64/synaptics/as370.dtsi - copied unchanged from r342930, vendor/device-tree/dist/src/arm64/ti/k3-am65-mcu.dtsi - copied unchanged from r342930, vendor/device-tree/dist/src/arm64/ti/k3-am65-wakeup.dtsi - copied unchanged from r342930, vendor/device-tree/dist/include/dt-bindings/clock/hi3670-clock.h - copied unchanged from r342930, vendor/device-tree/dist/include/dt-bindings/clock/jz4725b-cgu.h - copied unchanged from r342930, vendor/device-tree/dist/include/dt-bindings/clock/qcom,camcc-sdm845.h - copied unchanged from r342930, vendor/device-tree/dist/include/dt-bindings/clock/qcom,gcc-qcs404.h - copied unchanged from r342930, vendor/device-tree/dist/include/dt-bindings/clock/qcom,gcc-sdm660.h - copied unchanged from r342930, vendor/device-tree/dist/include/dt-bindings/clock/r7s9210-cpg-mssr.h - copied unchanged from r342930, vendor/device-tree/dist/include/dt-bindings/clock/r8a7744-cpg-mssr.h - copied unchanged from r342930, vendor/device-tree/dist/include/dt-bindings/clock/r8a774a1-cpg-mssr.h - copied unchanged from r342930, vendor/device-tree/dist/include/dt-bindings/clock/r8a774c0-cpg-mssr.h - copied unchanged from r342930, vendor/device-tree/dist/include/dt-bindings/clock/xlnx,zynqmp-clk.h - copied unchanged from r342930, vendor/device-tree/dist/include/dt-bindings/gpio/meson-g12a-gpio.h - copied unchanged from r342930, vendor/device-tree/dist/include/dt-bindings/mfd/at91-usart.h - copied unchanged from r342930, vendor/device-tree/dist/include/dt-bindings/phy/phy-ocelot-serdes.h - copied unchanged from r342930, vendor/device-tree/dist/include/dt-bindings/pinctrl/pinctrl-tegra-io-pad.h - copied unchanged from r342930, vendor/device-tree/dist/include/dt-bindings/pinctrl/rzn1-pinctrl.h - copied unchanged from r342930, vendor/device-tree/dist/include/dt-bindings/power/owl-s900-powergate.h - copied unchanged from r342930, vendor/device-tree/dist/include/dt-bindings/power/r8a7744-sysc.h - copied unchanged from r342930, vendor/device-tree/dist/include/dt-bindings/power/r8a774a1-sysc.h - copied unchanged from r342930, vendor/device-tree/dist/include/dt-bindings/power/r8a774c0-sysc.h - copied unchanged from r342930, vendor/device-tree/dist/include/dt-bindings/reset/actions,s700-reset.h - copied unchanged from r342930, vendor/device-tree/dist/include/dt-bindings/reset/actions,s900-reset.h - copied unchanged from r342930, vendor/device-tree/dist/include/dt-bindings/reset/qcom,sdm845-pdc.h Directory Properties: head/sys/gnu/dts/arm/am335x-moxa-uc-2100-common.dtsi (props changed) head/sys/gnu/dts/arm/am335x-moxa-uc-2101.dts (props changed) head/sys/gnu/dts/arm/am3517-evm-ui.dtsi (props changed) head/sys/gnu/dts/arm/armada-385-db-88f6820-amc.dts (props changed) head/sys/gnu/dts/arm/aspeed-bmc-arm-stardragon4800-rep2.dts (props changed) head/sys/gnu/dts/arm/aspeed-bmc-facebook-tiogapass.dts (props changed) head/sys/gnu/dts/arm/bcm2837-rpi-cm3-io3.dts (props changed) head/sys/gnu/dts/arm/bcm2837-rpi-cm3.dtsi (props changed) head/sys/gnu/dts/arm/imx6qdl-icore-1.5.dtsi (props changed) head/sys/gnu/dts/arm/imx6ul-ccimx6ulsbcpro.dts (props changed) head/sys/gnu/dts/arm/imx6ulz-14x14-evk.dts (props changed) head/sys/gnu/dts/arm/imx6ulz.dtsi (props changed) head/sys/gnu/dts/arm/meson8b-ec100.dts (props changed) head/sys/gnu/dts/arm/omap3-gta04a5one.dts (props changed) head/sys/gnu/dts/arm/rk3288-tinker-s.dts (props changed) head/sys/gnu/dts/arm/rk3288-tinker.dtsi (props changed) head/sys/gnu/dts/arm/socfpga_cyclone5_de0_nano_soc.dts (props changed) head/sys/gnu/dts/arm/sun8i-h3-bananapi-m2-plus-v1.2.dts (props changed) head/sys/gnu/dts/arm/sun8i-h3-orangepi-zero-plus2.dts (props changed) head/sys/gnu/dts/arm/sunxi-bananapi-m2-plus-v1.2.dtsi (props changed) head/sys/gnu/dts/arm/sunxi-bananapi-m2-plus.dtsi (props changed) head/sys/gnu/dts/arm/tegra20-colibri-eval-v3.dts (props changed) head/sys/gnu/dts/arm/tegra30-apalis-v1.1-eval.dts (props changed) head/sys/gnu/dts/arm/tegra30-apalis-v1.1.dtsi (props changed) head/sys/gnu/dts/arm64/allwinner/sun50i-a64-pine64-lts.dts (props changed) head/sys/gnu/dts/arm64/allwinner/sun50i-h5-bananapi-m2-plus-v1.2.dts (props changed) head/sys/gnu/dts/arm64/allwinner/sun50i-h5-bananapi-m2-plus.dts (props changed) head/sys/gnu/dts/arm64/allwinner/sun50i-h6-orangepi-one-plus.dts (props changed) head/sys/gnu/dts/arm64/amlogic/meson-g12a-u200.dts (props changed) head/sys/gnu/dts/arm64/amlogic/meson-g12a.dtsi (props changed) head/sys/gnu/dts/arm64/broadcom/bcm2837-rpi-cm3-io3.dts (props changed) head/sys/gnu/dts/arm64/hisilicon/hi3670-hikey970.dts (props changed) head/sys/gnu/dts/arm64/hisilicon/hi3670.dtsi (props changed) head/sys/gnu/dts/arm64/marvell/armada-8040-clearfog-gt-8k.dts (props changed) head/sys/gnu/dts/arm64/mediatek/mt7622-bananapi-bpi-r64.dts (props changed) head/sys/gnu/dts/arm64/qcom/msm8998-mtp.dts (props changed) head/sys/gnu/dts/arm64/qcom/msm8998-mtp.dtsi (props changed) head/sys/gnu/dts/arm64/qcom/msm8998.dtsi (props changed) head/sys/gnu/dts/arm64/qcom/pmi8998.dtsi (props changed) head/sys/gnu/dts/arm64/renesas/r8a774a1.dtsi (props changed) head/sys/gnu/dts/arm64/renesas/r8a77965-m3nulcb-kf.dts (props changed) head/sys/gnu/dts/arm64/renesas/r8a77965-m3nulcb.dts (props changed) head/sys/gnu/dts/arm64/rockchip/px30-evb.dts (props changed) head/sys/gnu/dts/arm64/rockchip/px30.dtsi (props changed) head/sys/gnu/dts/arm64/rockchip/rk3399-roc-pc.dts (props changed) head/sys/gnu/dts/arm64/rockchip/rk3399-rock960.dts (props changed) head/sys/gnu/dts/arm64/rockchip/rk3399-rock960.dtsi (props changed) head/sys/gnu/dts/arm64/rockchip/rk3399-rockpro64.dts (props changed) head/sys/gnu/dts/arm64/synaptics/as370.dtsi (props changed) head/sys/gnu/dts/arm64/ti/k3-am65-mcu.dtsi (props changed) head/sys/gnu/dts/arm64/ti/k3-am65-wakeup.dtsi (props changed) head/sys/gnu/dts/include/dt-bindings/clock/hi3670-clock.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/jz4725b-cgu.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/qcom,camcc-sdm845.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-qcs404.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-sdm660.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/r7s9210-cpg-mssr.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/r8a7744-cpg-mssr.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/r8a774a1-cpg-mssr.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/r8a774c0-cpg-mssr.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/xlnx,zynqmp-clk.h (props changed) head/sys/gnu/dts/include/dt-bindings/gpio/meson-g12a-gpio.h (props changed) head/sys/gnu/dts/include/dt-bindings/mfd/at91-usart.h (props changed) head/sys/gnu/dts/include/dt-bindings/phy/phy-ocelot-serdes.h (props changed) head/sys/gnu/dts/include/dt-bindings/pinctrl/pinctrl-tegra-io-pad.h (props changed) head/sys/gnu/dts/include/dt-bindings/pinctrl/rzn1-pinctrl.h (props changed) head/sys/gnu/dts/include/dt-bindings/power/owl-s900-powergate.h (props changed) head/sys/gnu/dts/include/dt-bindings/power/r8a7744-sysc.h (props changed) head/sys/gnu/dts/include/dt-bindings/power/r8a774a1-sysc.h (props changed) head/sys/gnu/dts/include/dt-bindings/power/r8a774c0-sysc.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/actions,s700-reset.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/actions,s900-reset.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/qcom,sdm845-pdc.h (props changed) Deleted: head/sys/gnu/dts/arm/socfpga_cyclone5_de0_sockit.dts Modified: head/sys/gnu/dts/arm/am335x-bone-common.dtsi head/sys/gnu/dts/arm/am335x-boneblack-common.dtsi head/sys/gnu/dts/arm/am335x-chiliboard.dts head/sys/gnu/dts/arm/am335x-cm-t335.dts head/sys/gnu/dts/arm/am335x-evm.dts head/sys/gnu/dts/arm/am335x-evmsk.dts head/sys/gnu/dts/arm/am335x-igep0033.dtsi head/sys/gnu/dts/arm/am335x-lxm.dts head/sys/gnu/dts/arm/am335x-moxa-uc-8100-me-t.dts head/sys/gnu/dts/arm/am335x-nano.dts head/sys/gnu/dts/arm/am335x-osd3358-sm-red.dts (contents, props changed) head/sys/gnu/dts/arm/am335x-pdu001.dts head/sys/gnu/dts/arm/am335x-pepper.dts head/sys/gnu/dts/arm/am335x-sancloud-bbe.dts (contents, props changed) head/sys/gnu/dts/arm/am335x-shc.dts head/sys/gnu/dts/arm/am3517-evm.dts head/sys/gnu/dts/arm/am3517-som.dtsi head/sys/gnu/dts/arm/am4372.dtsi head/sys/gnu/dts/arm/am437x-cm-t43.dts head/sys/gnu/dts/arm/am437x-gp-evm.dts head/sys/gnu/dts/arm/am437x-idk-evm.dts head/sys/gnu/dts/arm/am437x-sk-evm.dts head/sys/gnu/dts/arm/am43x-epos-evm.dts head/sys/gnu/dts/arm/am571x-idk.dts head/sys/gnu/dts/arm/am572x-idk-common.dtsi head/sys/gnu/dts/arm/am572x-idk.dts head/sys/gnu/dts/arm/am57xx-cl-som-am57x.dts head/sys/gnu/dts/arm/am57xx-idk-common.dtsi head/sys/gnu/dts/arm/arm-realview-eb.dtsi head/sys/gnu/dts/arm/arm-realview-pb1176.dts head/sys/gnu/dts/arm/arm-realview-pb11mp.dts head/sys/gnu/dts/arm/arm-realview-pbx.dtsi head/sys/gnu/dts/arm/armada-388-clearfog.dtsi head/sys/gnu/dts/arm/armada-xp-98dx3236.dtsi head/sys/gnu/dts/arm/armada-xp-98dx3336.dtsi head/sys/gnu/dts/arm/armada-xp-98dx4251.dtsi head/sys/gnu/dts/arm/armada-xp-db-dxbc2.dts head/sys/gnu/dts/arm/armada-xp-db-xc3-24g4xg.dts head/sys/gnu/dts/arm/aspeed-bmc-quanta-q71l.dts head/sys/gnu/dts/arm/aspeed-g4.dtsi head/sys/gnu/dts/arm/aspeed-g5.dtsi head/sys/gnu/dts/arm/at91-dvk_su60_somc.dtsi (contents, props changed) head/sys/gnu/dts/arm/at91-dvk_su60_somc_lcm.dtsi (contents, props changed) head/sys/gnu/dts/arm/at91-nattis-2-natte-2.dts head/sys/gnu/dts/arm/at91-sama5d27_som1_ek.dts head/sys/gnu/dts/arm/at91-sama5d2_ptc_ek.dts head/sys/gnu/dts/arm/at91-sama5d2_xplained.dts head/sys/gnu/dts/arm/at91-sama5d3_xplained.dts head/sys/gnu/dts/arm/at91-sama5d4_xplained.dts head/sys/gnu/dts/arm/at91-tse850-3.dts head/sys/gnu/dts/arm/at91-vinco.dts head/sys/gnu/dts/arm/at91sam9260ek.dts head/sys/gnu/dts/arm/at91sam9261ek.dts head/sys/gnu/dts/arm/at91sam9g20ek_common.dtsi head/sys/gnu/dts/arm/at91sam9g45.dtsi head/sys/gnu/dts/arm/at91sam9x5cm.dtsi head/sys/gnu/dts/arm/bcm-hr2.dtsi head/sys/gnu/dts/arm/bcm-nsp.dtsi head/sys/gnu/dts/arm/bcm2837-rpi-3-b-plus.dts head/sys/gnu/dts/arm/bcm2837-rpi-3-b.dts head/sys/gnu/dts/arm/bcm283x-rpi-lan7515.dtsi head/sys/gnu/dts/arm/bcm47081-tplink-archer-c5-v2.dts head/sys/gnu/dts/arm/bcm4709-asus-rt-ac87u.dts head/sys/gnu/dts/arm/bcm4709-tplink-archer-c9-v1.dts head/sys/gnu/dts/arm/bcm5301x-nand-cs0.dtsi head/sys/gnu/dts/arm/bcm5301x.dtsi head/sys/gnu/dts/arm/bcm958625hr.dts head/sys/gnu/dts/arm/da850-evm.dts head/sys/gnu/dts/arm/da850-lego-ev3.dts head/sys/gnu/dts/arm/dm8148-evm.dts head/sys/gnu/dts/arm/dm8148-t410.dts head/sys/gnu/dts/arm/dove-cubox.dts head/sys/gnu/dts/arm/dove.dtsi head/sys/gnu/dts/arm/dra62x-j5eco-evm.dts head/sys/gnu/dts/arm/dra7-evm.dts head/sys/gnu/dts/arm/dra7.dtsi head/sys/gnu/dts/arm/dra71-evm.dts head/sys/gnu/dts/arm/dra72-evm-revc.dts head/sys/gnu/dts/arm/dra72-evm.dts head/sys/gnu/dts/arm/dra76-evm.dts head/sys/gnu/dts/arm/exynos3250-artik5.dtsi head/sys/gnu/dts/arm/exynos4210-origen.dts head/sys/gnu/dts/arm/exynos4210-trats.dts head/sys/gnu/dts/arm/exynos4210-universal_c210.dts head/sys/gnu/dts/arm/exynos4412-midas.dtsi head/sys/gnu/dts/arm/exynos4412-odroid-common.dtsi head/sys/gnu/dts/arm/exynos5250-arndale.dts head/sys/gnu/dts/arm/exynos5250-pinctrl.dtsi head/sys/gnu/dts/arm/exynos5250-snow-rev5.dts head/sys/gnu/dts/arm/exynos5250.dtsi head/sys/gnu/dts/arm/exynos5410-odroidxu.dts head/sys/gnu/dts/arm/exynos5420-peach-pit.dts head/sys/gnu/dts/arm/exynos5422-odroid-core.dtsi head/sys/gnu/dts/arm/exynos5422-odroidxu3-common.dtsi head/sys/gnu/dts/arm/exynos5422-odroidxu3.dts head/sys/gnu/dts/arm/exynos5800-peach-pi.dts head/sys/gnu/dts/arm/gr-peach-audiocamerashield.dtsi (contents, props changed) head/sys/gnu/dts/arm/hip04.dtsi head/sys/gnu/dts/arm/imx1.dtsi head/sys/gnu/dts/arm/imx23-evk.dts head/sys/gnu/dts/arm/imx23-olinuxino.dts head/sys/gnu/dts/arm/imx23-sansa.dts head/sys/gnu/dts/arm/imx23-stmp378x_devb.dts head/sys/gnu/dts/arm/imx23-xfi3.dts head/sys/gnu/dts/arm/imx23.dtsi head/sys/gnu/dts/arm/imx25.dtsi head/sys/gnu/dts/arm/imx27.dtsi head/sys/gnu/dts/arm/imx28-apf28dev.dts head/sys/gnu/dts/arm/imx28-apx4devkit.dts head/sys/gnu/dts/arm/imx28-cfa10036.dts head/sys/gnu/dts/arm/imx28-duckbill-2-485.dts head/sys/gnu/dts/arm/imx28-duckbill-2-enocean.dts head/sys/gnu/dts/arm/imx28-duckbill-2-spi.dts head/sys/gnu/dts/arm/imx28-duckbill-2.dts head/sys/gnu/dts/arm/imx28-duckbill.dts head/sys/gnu/dts/arm/imx28-evk.dts head/sys/gnu/dts/arm/imx28-m28cu3.dts head/sys/gnu/dts/arm/imx28-m28evk.dts head/sys/gnu/dts/arm/imx28-sps1.dts head/sys/gnu/dts/arm/imx28-ts4600.dts head/sys/gnu/dts/arm/imx28.dtsi head/sys/gnu/dts/arm/imx31.dtsi head/sys/gnu/dts/arm/imx35.dtsi head/sys/gnu/dts/arm/imx50.dtsi head/sys/gnu/dts/arm/imx51-babbage.dts head/sys/gnu/dts/arm/imx51-zii-rdu1.dts head/sys/gnu/dts/arm/imx51-zii-scu2-mezz.dts (contents, props changed) head/sys/gnu/dts/arm/imx51-zii-scu3-esb.dts (contents, props changed) head/sys/gnu/dts/arm/imx51.dtsi head/sys/gnu/dts/arm/imx53-ppd.dts head/sys/gnu/dts/arm/imx53.dtsi head/sys/gnu/dts/arm/imx6dl-colibri-eval-v3.dts head/sys/gnu/dts/arm/imx6dl-icore-mipi.dts (contents, props changed) head/sys/gnu/dts/arm/imx6dl-icore-rqs.dts head/sys/gnu/dts/arm/imx6dl-icore.dts head/sys/gnu/dts/arm/imx6dl-riotboard.dts head/sys/gnu/dts/arm/imx6q-apalis-eval.dts head/sys/gnu/dts/arm/imx6q-apalis-ixora-v1.1.dts head/sys/gnu/dts/arm/imx6q-apalis-ixora.dts head/sys/gnu/dts/arm/imx6q-icore-mipi.dts head/sys/gnu/dts/arm/imx6q-icore-ofcap10.dts head/sys/gnu/dts/arm/imx6q-icore-ofcap12.dts head/sys/gnu/dts/arm/imx6q-icore-rqs.dts head/sys/gnu/dts/arm/imx6q-icore.dts head/sys/gnu/dts/arm/imx6q.dtsi head/sys/gnu/dts/arm/imx6qdl-apalis.dtsi head/sys/gnu/dts/arm/imx6qdl-icore-rqs.dtsi head/sys/gnu/dts/arm/imx6qdl-icore.dtsi head/sys/gnu/dts/arm/imx6qdl-sabreauto.dtsi head/sys/gnu/dts/arm/imx6qdl-wandboard.dtsi head/sys/gnu/dts/arm/imx6qdl-zii-rdu2.dtsi head/sys/gnu/dts/arm/imx6qdl.dtsi head/sys/gnu/dts/arm/imx6sl.dtsi head/sys/gnu/dts/arm/imx6sll.dtsi (contents, props changed) head/sys/gnu/dts/arm/imx6sx-sdb.dtsi head/sys/gnu/dts/arm/imx6sx.dtsi head/sys/gnu/dts/arm/imx6ul-geam.dts head/sys/gnu/dts/arm/imx6ul-isiot-emmc.dts head/sys/gnu/dts/arm/imx6ul-isiot-nand.dts head/sys/gnu/dts/arm/imx6ul-isiot.dtsi head/sys/gnu/dts/arm/imx6ul.dtsi head/sys/gnu/dts/arm/imx6ull-14x14-evk.dts head/sys/gnu/dts/arm/imx6ull-pinfunc.h head/sys/gnu/dts/arm/imx6ull.dtsi head/sys/gnu/dts/arm/imx7d-nitrogen7.dts head/sys/gnu/dts/arm/imx7d-pico.dtsi head/sys/gnu/dts/arm/imx7d-sdb.dts head/sys/gnu/dts/arm/imx7d.dtsi head/sys/gnu/dts/arm/imx7s-warp.dts head/sys/gnu/dts/arm/imx7s.dtsi head/sys/gnu/dts/arm/imx7ulp-pinfunc.h head/sys/gnu/dts/arm/iwg20d-q7-common.dtsi head/sys/gnu/dts/arm/keystone-k2g.dtsi head/sys/gnu/dts/arm/logicpd-som-lv.dtsi head/sys/gnu/dts/arm/logicpd-torpedo-37xx-devkit.dts head/sys/gnu/dts/arm/lpc32xx.dtsi head/sys/gnu/dts/arm/ls1021a-qds.dts head/sys/gnu/dts/arm/ls1021a-twr.dts head/sys/gnu/dts/arm/ls1021a.dtsi head/sys/gnu/dts/arm/meson8.dtsi head/sys/gnu/dts/arm/meson8b-odroidc1.dts head/sys/gnu/dts/arm/meson8b.dtsi head/sys/gnu/dts/arm/mt7623.dtsi head/sys/gnu/dts/arm/omap2.dtsi head/sys/gnu/dts/arm/omap2430.dtsi head/sys/gnu/dts/arm/omap3-beagle-xm.dts head/sys/gnu/dts/arm/omap3-beagle.dts head/sys/gnu/dts/arm/omap3-gta04.dtsi head/sys/gnu/dts/arm/omap3-gta04a3.dts head/sys/gnu/dts/arm/omap3-gta04a4.dts head/sys/gnu/dts/arm/omap3-gta04a5.dts head/sys/gnu/dts/arm/omap3-n9.dts head/sys/gnu/dts/arm/omap5-board-common.dtsi head/sys/gnu/dts/arm/orion5x-linkstation.dtsi head/sys/gnu/dts/arm/owl-s500-cubieboard6.dts head/sys/gnu/dts/arm/owl-s500-guitar-bb-rev-b.dts head/sys/gnu/dts/arm/owl-s500-guitar.dtsi head/sys/gnu/dts/arm/owl-s500.dtsi head/sys/gnu/dts/arm/pxa25x.dtsi head/sys/gnu/dts/arm/pxa27x.dtsi head/sys/gnu/dts/arm/pxa2xx.dtsi head/sys/gnu/dts/arm/qcom-apq8064.dtsi head/sys/gnu/dts/arm/qcom-ipq4019.dtsi head/sys/gnu/dts/arm/qcom-ipq8064-ap148.dts head/sys/gnu/dts/arm/qcom-ipq8064-v1.0.dtsi head/sys/gnu/dts/arm/qcom-ipq8064.dtsi head/sys/gnu/dts/arm/qcom-msm8974-lge-nexus5-hammerhead.dts head/sys/gnu/dts/arm/qcom-msm8974.dtsi head/sys/gnu/dts/arm/r8a7743-iwg20d-q7-dbcm-ca.dts head/sys/gnu/dts/arm/r8a7743-iwg20d-q7.dts head/sys/gnu/dts/arm/r8a77470-iwg23s-sbc.dts head/sys/gnu/dts/arm/r8a77470.dtsi head/sys/gnu/dts/arm/r8a7778-bockw.dts head/sys/gnu/dts/arm/r8a7778.dtsi head/sys/gnu/dts/arm/r8a7779-marzen.dts head/sys/gnu/dts/arm/r8a7779.dtsi head/sys/gnu/dts/arm/r8a7790-stout.dts head/sys/gnu/dts/arm/r8a7790.dtsi head/sys/gnu/dts/arm/r8a7791.dtsi head/sys/gnu/dts/arm/r8a7792.dtsi head/sys/gnu/dts/arm/r8a7793-gose.dts head/sys/gnu/dts/arm/r8a7793.dtsi head/sys/gnu/dts/arm/r8a7794-silk.dts head/sys/gnu/dts/arm/r8a7794.dtsi head/sys/gnu/dts/arm/r9a06g032.dtsi (contents, props changed) head/sys/gnu/dts/arm/rk3036.dtsi head/sys/gnu/dts/arm/rk3188-radxarock.dts head/sys/gnu/dts/arm/rk3188.dtsi head/sys/gnu/dts/arm/rk3288-tinker.dts head/sys/gnu/dts/arm/rk3288-veyron.dtsi head/sys/gnu/dts/arm/s5pv210.dtsi head/sys/gnu/dts/arm/sama5d2.dtsi head/sys/gnu/dts/arm/sama5d4.dtsi head/sys/gnu/dts/arm/socfpga.dtsi head/sys/gnu/dts/arm/socfpga_arria10.dtsi head/sys/gnu/dts/arm/socfpga_cyclone5_socrates.dts head/sys/gnu/dts/arm/socfpga_cyclone5_vining_fpga.dts head/sys/gnu/dts/arm/ste-dbx5x0.dtsi head/sys/gnu/dts/arm/ste-href-family-pinctrl.dtsi head/sys/gnu/dts/arm/ste-href.dtsi head/sys/gnu/dts/arm/ste-hrefprev60.dtsi head/sys/gnu/dts/arm/ste-snowball.dts head/sys/gnu/dts/arm/ste-u300.dts head/sys/gnu/dts/arm/stih410-b2260.dts head/sys/gnu/dts/arm/stihxxx-b2120.dtsi head/sys/gnu/dts/arm/stm32429i-eval.dts head/sys/gnu/dts/arm/stm32f429.dtsi head/sys/gnu/dts/arm/stm32f469-disco.dts head/sys/gnu/dts/arm/stm32f746-disco.dts head/sys/gnu/dts/arm/stm32f769-disco.dts head/sys/gnu/dts/arm/stm32h743.dtsi head/sys/gnu/dts/arm/stm32mp157c-ev1.dts head/sys/gnu/dts/arm/stm32mp157c.dtsi head/sys/gnu/dts/arm/sun5i-reference-design-tablet.dtsi head/sys/gnu/dts/arm/sun5i.dtsi head/sys/gnu/dts/arm/sun7i-a20.dtsi head/sys/gnu/dts/arm/sun8i-a33.dtsi head/sys/gnu/dts/arm/sun8i-a83t-bananapi-m3.dts head/sys/gnu/dts/arm/sun8i-a83t.dtsi head/sys/gnu/dts/arm/sun8i-h3-bananapi-m2-plus.dts head/sys/gnu/dts/arm/sun8i-h3.dtsi head/sys/gnu/dts/arm/sun8i-r40-bananapi-m2-ultra.dts head/sys/gnu/dts/arm/sun8i-r40.dtsi head/sys/gnu/dts/arm/sun8i-reference-design-tablet.dtsi head/sys/gnu/dts/arm/sun8i-v40-bananapi-m2-berry.dts head/sys/gnu/dts/arm/sun9i-a80.dtsi head/sys/gnu/dts/arm/sunxi-h3-h5.dtsi head/sys/gnu/dts/arm/tegra124-apalis-eval.dts head/sys/gnu/dts/arm/tegra124-apalis-v1.2-eval.dts head/sys/gnu/dts/arm/tegra124-apalis-v1.2.dtsi head/sys/gnu/dts/arm/tegra124-apalis.dtsi head/sys/gnu/dts/arm/tegra20-colibri-iris.dts (contents, props changed) head/sys/gnu/dts/arm/tegra20-colibri.dtsi (contents, props changed) head/sys/gnu/dts/arm/tegra20-paz00.dts head/sys/gnu/dts/arm/tegra20.dtsi head/sys/gnu/dts/arm/tegra30-apalis-eval.dts head/sys/gnu/dts/arm/tegra30-apalis.dtsi head/sys/gnu/dts/arm/tegra30-colibri-eval-v3.dts head/sys/gnu/dts/arm/tegra30-colibri.dtsi head/sys/gnu/dts/arm/tegra30.dtsi head/sys/gnu/dts/arm/uniphier-ld4-ref.dts head/sys/gnu/dts/arm/uniphier-ld4.dtsi head/sys/gnu/dts/arm/uniphier-ld6b-ref.dts head/sys/gnu/dts/arm/uniphier-pinctrl.dtsi head/sys/gnu/dts/arm/uniphier-pro4-ace.dts head/sys/gnu/dts/arm/uniphier-pro4-ref.dts head/sys/gnu/dts/arm/uniphier-pro4-sanji.dts head/sys/gnu/dts/arm/uniphier-pro4.dtsi head/sys/gnu/dts/arm/uniphier-pro5.dtsi head/sys/gnu/dts/arm/uniphier-pxs2-gentil.dts head/sys/gnu/dts/arm/uniphier-pxs2-vodka.dts head/sys/gnu/dts/arm/uniphier-pxs2.dtsi head/sys/gnu/dts/arm/uniphier-sld8-ref.dts head/sys/gnu/dts/arm/uniphier-sld8.dtsi head/sys/gnu/dts/arm/versatile-ab.dts head/sys/gnu/dts/arm/vf500.dtsi head/sys/gnu/dts/arm/vf610-twr.dts head/sys/gnu/dts/arm/vf610-zii-cfu1.dts (contents, props changed) head/sys/gnu/dts/arm/vf610-zii-dev-rev-c.dts head/sys/gnu/dts/arm/vf610.dtsi head/sys/gnu/dts/arm/vf610m4-colibri.dts head/sys/gnu/dts/arm/vfxxx.dtsi head/sys/gnu/dts/arm/zynq-zc702.dts head/sys/gnu/dts/arm/zynq-zc770-xm010.dts head/sys/gnu/dts/arm/zynq-zc770-xm013.dts head/sys/gnu/dts/arm64/actions/s700-cubieboard7.dts head/sys/gnu/dts/arm64/actions/s700.dtsi head/sys/gnu/dts/arm64/actions/s900-bubblegum-96.dts head/sys/gnu/dts/arm64/actions/s900.dtsi head/sys/gnu/dts/arm64/allwinner/sun50i-a64-amarula-relic.dts (contents, props changed) head/sys/gnu/dts/arm64/allwinner/sun50i-a64-bananapi-m64.dts head/sys/gnu/dts/arm64/allwinner/sun50i-a64-nanopi-a64.dts head/sys/gnu/dts/arm64/allwinner/sun50i-a64-olinuxino.dts head/sys/gnu/dts/arm64/allwinner/sun50i-a64-orangepi-win.dts head/sys/gnu/dts/arm64/allwinner/sun50i-a64-pine64.dts head/sys/gnu/dts/arm64/allwinner/sun50i-a64-pinebook.dts (contents, props changed) head/sys/gnu/dts/arm64/allwinner/sun50i-a64-sopine-baseboard.dts head/sys/gnu/dts/arm64/allwinner/sun50i-a64-teres-i.dts head/sys/gnu/dts/arm64/allwinner/sun50i-a64.dtsi head/sys/gnu/dts/arm64/allwinner/sun50i-h5.dtsi head/sys/gnu/dts/arm64/allwinner/sun50i-h6.dtsi head/sys/gnu/dts/arm64/altera/socfpga_stratix10.dtsi head/sys/gnu/dts/arm64/altera/socfpga_stratix10_socdk.dts head/sys/gnu/dts/arm64/amd/amd-seattle-soc.dtsi head/sys/gnu/dts/arm64/amlogic/meson-axg-s400.dts head/sys/gnu/dts/arm64/amlogic/meson-axg.dtsi head/sys/gnu/dts/arm64/amlogic/meson-gx.dtsi head/sys/gnu/dts/arm64/amlogic/meson-gxbb.dtsi head/sys/gnu/dts/arm64/amlogic/meson-gxl-s905x-libretech-cc.dts head/sys/gnu/dts/arm64/amlogic/meson-gxl.dtsi head/sys/gnu/dts/arm64/arm/juno-base.dtsi head/sys/gnu/dts/arm64/arm/juno-cs-r1r2.dtsi head/sys/gnu/dts/arm64/arm/juno.dts head/sys/gnu/dts/arm64/broadcom/northstar2/ns2.dtsi head/sys/gnu/dts/arm64/broadcom/stingray/bcm958742-base.dtsi head/sys/gnu/dts/arm64/broadcom/stingray/stingray.dtsi head/sys/gnu/dts/arm64/exynos/exynos5433-tm2-common.dtsi head/sys/gnu/dts/arm64/freescale/fsl-ls1012a.dtsi head/sys/gnu/dts/arm64/freescale/fsl-ls1043a-qds.dts head/sys/gnu/dts/arm64/freescale/fsl-ls1043a-rdb.dts head/sys/gnu/dts/arm64/freescale/fsl-ls1043a.dtsi head/sys/gnu/dts/arm64/freescale/fsl-ls1046a-qds.dts head/sys/gnu/dts/arm64/freescale/fsl-ls1046a-rdb.dts head/sys/gnu/dts/arm64/freescale/fsl-ls1046a.dtsi head/sys/gnu/dts/arm64/freescale/fsl-ls208xa.dtsi head/sys/gnu/dts/arm64/hisilicon/hi6220-coresight.dtsi head/sys/gnu/dts/arm64/hisilicon/hi6220.dtsi head/sys/gnu/dts/arm64/lg/lg1312.dtsi head/sys/gnu/dts/arm64/lg/lg1313.dtsi head/sys/gnu/dts/arm64/marvell/armada-372x.dtsi head/sys/gnu/dts/arm64/marvell/armada-37xx.dtsi head/sys/gnu/dts/arm64/marvell/armada-ap806-dual.dtsi head/sys/gnu/dts/arm64/marvell/armada-ap806-quad.dtsi head/sys/gnu/dts/arm64/marvell/armada-ap806.dtsi head/sys/gnu/dts/arm64/marvell/armada-ap810-ap0-octa-core.dtsi head/sys/gnu/dts/arm64/marvell/armada-common.dtsi head/sys/gnu/dts/arm64/marvell/armada-cp110.dtsi head/sys/gnu/dts/arm64/mediatek/mt2712e.dtsi head/sys/gnu/dts/arm64/mediatek/mt7622-rfb1.dts head/sys/gnu/dts/arm64/mediatek/mt7622.dtsi head/sys/gnu/dts/arm64/nvidia/tegra186.dtsi head/sys/gnu/dts/arm64/nvidia/tegra194.dtsi head/sys/gnu/dts/arm64/nvidia/tegra210-p2180.dtsi head/sys/gnu/dts/arm64/nvidia/tegra210-p2597.dtsi head/sys/gnu/dts/arm64/nvidia/tegra210.dtsi head/sys/gnu/dts/arm64/qcom/apq8016-sbc.dtsi head/sys/gnu/dts/arm64/qcom/apq8096-db820c.dts head/sys/gnu/dts/arm64/qcom/apq8096-db820c.dtsi head/sys/gnu/dts/arm64/qcom/msm8916.dtsi head/sys/gnu/dts/arm64/qcom/msm8996.dtsi head/sys/gnu/dts/arm64/qcom/pm8916.dtsi head/sys/gnu/dts/arm64/qcom/pm8994.dtsi head/sys/gnu/dts/arm64/qcom/pm8998.dtsi (contents, props changed) head/sys/gnu/dts/arm64/qcom/sdm845-mtp.dts head/sys/gnu/dts/arm64/qcom/sdm845.dtsi head/sys/gnu/dts/arm64/renesas/r8a7795-es1-salvator-x.dts head/sys/gnu/dts/arm64/renesas/r8a7795-es1.dtsi head/sys/gnu/dts/arm64/renesas/r8a7795-h3ulcb.dts head/sys/gnu/dts/arm64/renesas/r8a7795-salvator-x.dts head/sys/gnu/dts/arm64/renesas/r8a7795-salvator-xs.dts head/sys/gnu/dts/arm64/renesas/r8a7795.dtsi head/sys/gnu/dts/arm64/renesas/r8a7796-m3ulcb.dts head/sys/gnu/dts/arm64/renesas/r8a7796-salvator-x.dts head/sys/gnu/dts/arm64/renesas/r8a7796.dtsi head/sys/gnu/dts/arm64/renesas/r8a77965-salvator-xs.dts head/sys/gnu/dts/arm64/renesas/r8a77965.dtsi head/sys/gnu/dts/arm64/renesas/r8a77970-v3msk.dts head/sys/gnu/dts/arm64/renesas/r8a77970.dtsi head/sys/gnu/dts/arm64/renesas/r8a77980-condor.dts head/sys/gnu/dts/arm64/renesas/r8a77980-v3hsk.dts head/sys/gnu/dts/arm64/renesas/r8a77980.dtsi head/sys/gnu/dts/arm64/renesas/r8a77990-ebisu.dts head/sys/gnu/dts/arm64/renesas/r8a77990.dtsi head/sys/gnu/dts/arm64/renesas/r8a77995-draak.dts head/sys/gnu/dts/arm64/renesas/r8a77995.dtsi head/sys/gnu/dts/arm64/renesas/salvator-common.dtsi head/sys/gnu/dts/arm64/renesas/ulcb-kf.dtsi head/sys/gnu/dts/arm64/renesas/ulcb.dtsi head/sys/gnu/dts/arm64/rockchip/rk3328-roc-cc.dts head/sys/gnu/dts/arm64/rockchip/rk3328-rock64.dts head/sys/gnu/dts/arm64/rockchip/rk3328.dtsi head/sys/gnu/dts/arm64/rockchip/rk3399-ficus.dts (contents, props changed) head/sys/gnu/dts/arm64/rockchip/rk3399-firefly.dts head/sys/gnu/dts/arm64/rockchip/rk3399-puma-haikou.dts head/sys/gnu/dts/arm64/rockchip/rk3399-sapphire.dtsi head/sys/gnu/dts/arm64/rockchip/rk3399.dtsi head/sys/gnu/dts/arm64/socionext/uniphier-ld11.dtsi head/sys/gnu/dts/arm64/socionext/uniphier-ld20-global.dts head/sys/gnu/dts/arm64/socionext/uniphier-ld20-ref.dts head/sys/gnu/dts/arm64/socionext/uniphier-ld20.dtsi head/sys/gnu/dts/arm64/socionext/uniphier-pxs3-ref.dts head/sys/gnu/dts/arm64/socionext/uniphier-pxs3.dtsi head/sys/gnu/dts/arm64/ti/k3-am65-main.dtsi (contents, props changed) head/sys/gnu/dts/arm64/ti/k3-am65.dtsi (contents, props changed) head/sys/gnu/dts/arm64/ti/k3-am654-base-board.dts (contents, props changed) head/sys/gnu/dts/include/dt-bindings/clock/am3.h head/sys/gnu/dts/include/dt-bindings/clock/am4.h head/sys/gnu/dts/include/dt-bindings/clock/at91.h head/sys/gnu/dts/include/dt-bindings/clock/dra7.h head/sys/gnu/dts/include/dt-bindings/clock/exynos3250.h head/sys/gnu/dts/include/dt-bindings/clock/exynos4.h head/sys/gnu/dts/include/dt-bindings/clock/exynos5250.h head/sys/gnu/dts/include/dt-bindings/clock/exynos5260-clk.h head/sys/gnu/dts/include/dt-bindings/clock/exynos5410.h head/sys/gnu/dts/include/dt-bindings/clock/exynos5420.h head/sys/gnu/dts/include/dt-bindings/clock/exynos5433.h head/sys/gnu/dts/include/dt-bindings/clock/exynos7-clk.h head/sys/gnu/dts/include/dt-bindings/clock/imx6qdl-clock.h head/sys/gnu/dts/include/dt-bindings/clock/imx6sl-clock.h head/sys/gnu/dts/include/dt-bindings/clock/imx6sll-clock.h head/sys/gnu/dts/include/dt-bindings/clock/imx6sx-clock.h head/sys/gnu/dts/include/dt-bindings/clock/imx6ul-clock.h head/sys/gnu/dts/include/dt-bindings/clock/maxim,max77686.h head/sys/gnu/dts/include/dt-bindings/clock/maxim,max77802.h head/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-msm8960.h head/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-msm8996.h head/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-sdm845.h head/sys/gnu/dts/include/dt-bindings/clock/r7s72100-clock.h head/sys/gnu/dts/include/dt-bindings/clock/r8a7743-cpg-mssr.h head/sys/gnu/dts/include/dt-bindings/clock/r8a7745-cpg-mssr.h head/sys/gnu/dts/include/dt-bindings/clock/r8a7790-cpg-mssr.h head/sys/gnu/dts/include/dt-bindings/clock/r8a7791-cpg-mssr.h head/sys/gnu/dts/include/dt-bindings/clock/r8a7792-cpg-mssr.h head/sys/gnu/dts/include/dt-bindings/clock/r8a7793-clock.h head/sys/gnu/dts/include/dt-bindings/clock/r8a7793-cpg-mssr.h head/sys/gnu/dts/include/dt-bindings/clock/r8a7794-clock.h head/sys/gnu/dts/include/dt-bindings/clock/r8a7794-cpg-mssr.h head/sys/gnu/dts/include/dt-bindings/clock/r8a7795-cpg-mssr.h head/sys/gnu/dts/include/dt-bindings/clock/r8a7796-cpg-mssr.h head/sys/gnu/dts/include/dt-bindings/clock/r8a77970-cpg-mssr.h head/sys/gnu/dts/include/dt-bindings/clock/r8a77995-cpg-mssr.h head/sys/gnu/dts/include/dt-bindings/clock/renesas-cpg-mssr.h head/sys/gnu/dts/include/dt-bindings/clock/rk3188-cru-common.h head/sys/gnu/dts/include/dt-bindings/clock/s3c2410.h head/sys/gnu/dts/include/dt-bindings/clock/s3c2412.h head/sys/gnu/dts/include/dt-bindings/clock/s3c2443.h head/sys/gnu/dts/include/dt-bindings/clock/samsung,s2mps11.h head/sys/gnu/dts/include/dt-bindings/clock/samsung,s3c64xx-clock.h head/sys/gnu/dts/include/dt-bindings/clock/sun50i-a64-ccu.h head/sys/gnu/dts/include/dt-bindings/iio/qcom,spmi-vadc.h head/sys/gnu/dts/include/dt-bindings/input/linux-event-codes.h head/sys/gnu/dts/include/dt-bindings/interrupt-controller/arm-gic.h head/sys/gnu/dts/include/dt-bindings/interrupt-controller/irq.h head/sys/gnu/dts/include/dt-bindings/net/mscc-phy-vsc8531.h head/sys/gnu/dts/include/dt-bindings/reset/imx7-reset.h head/sys/gnu/dts/include/dt-bindings/thermal/thermal_exynos.h head/sys/gnu/dts/include/dt-bindings/usb/pd.h Directory Properties: head/sys/gnu/dts/arm/ (props changed) head/sys/gnu/dts/arm/armada-388-helios4.dts (props changed) head/sys/gnu/dts/arm/at91-dvk_som60.dts (props changed) head/sys/gnu/dts/arm/at91-gatwick.dts (props changed) head/sys/gnu/dts/arm/at91-som60.dtsi (props changed) head/sys/gnu/dts/arm/at91-wb45n.dts (props changed) head/sys/gnu/dts/arm/at91-wb45n.dtsi (props changed) head/sys/gnu/dts/arm/at91-wb50n.dts (props changed) head/sys/gnu/dts/arm/at91-wb50n.dtsi (props changed) head/sys/gnu/dts/arm/bcm2835-rpi-cm1-io1.dts (props changed) head/sys/gnu/dts/arm/bcm2835-rpi-cm1.dtsi (props changed) head/sys/gnu/dts/arm/gemini-sl93512r.dts (props changed) head/sys/gnu/dts/arm/imx31-lite.dts (props changed) head/sys/gnu/dts/arm/imx53-kp-ddc.dts (props changed) head/sys/gnu/dts/arm/imx53-kp-hsc.dts (props changed) head/sys/gnu/dts/arm/imx53-kp.dtsi (props changed) head/sys/gnu/dts/arm/imx6sll-evk.dts (props changed) head/sys/gnu/dts/arm/imx6ul-ccimx6ulsbcexpress.dts (props changed) head/sys/gnu/dts/arm/imx6ul-ccimx6ulsom.dtsi (props changed) head/sys/gnu/dts/arm/keystone-k2g-netcp.dtsi (props changed) head/sys/gnu/dts/arm/omap4-l4.dtsi (props changed) head/sys/gnu/dts/arm/r9a06g032-rzn1d400-db.dts (props changed) head/sys/gnu/dts/arm/s5pv210-aries.dtsi (props changed) head/sys/gnu/dts/arm/s5pv210-fascinate4g.dts (props changed) head/sys/gnu/dts/arm/s5pv210-galaxys.dts (props changed) head/sys/gnu/dts/arm/vf610-zii-ssmb-spu3.dts (props changed) head/sys/gnu/dts/arm/zynq-zturn.dts (props changed) head/sys/gnu/dts/arm64/ (props changed) head/sys/gnu/dts/arm64/amlogic/meson-gxl-s805x-p241.dts (props changed) head/sys/gnu/dts/arm64/amlogic/meson-gxl-s905w-p281.dts (props changed) head/sys/gnu/dts/arm64/amlogic/meson-gxl-s905w-tx3-mini.dts (props changed) head/sys/gnu/dts/arm64/broadcom/stingray/bcm958802a802x.dts (props changed) head/sys/gnu/dts/arm64/broadcom/stingray/stingray-board-base.dtsi (props changed) head/sys/gnu/dts/arm64/broadcom/stingray/stingray-pcie.dtsi (props changed) head/sys/gnu/dts/arm64/mediatek/mt6797-x20-dev.dts (props changed) head/sys/gnu/dts/arm64/qcom/pm8005.dtsi (props changed) head/sys/gnu/dts/arm64/rockchip/rk3399-gru-bob.dts (props changed) head/sys/gnu/dts/arm64/rockchip/rk3399-gru-chromebook.dtsi (props changed) head/sys/gnu/dts/arm64/ti/k3-am654.dtsi (props changed) head/sys/gnu/dts/arm64/xilinx/avnet-ultra96-rev1.dts (props changed) head/sys/gnu/dts/include/ (props changed) Modified: head/sys/gnu/dts/arm/am335x-bone-common.dtsi ============================================================================== --- head/sys/gnu/dts/arm/am335x-bone-common.dtsi Fri Jan 11 09:20:18 2019 (r342935) +++ head/sys/gnu/dts/arm/am335x-bone-common.dtsi Fri Jan 11 09:40:34 2019 (r342936) @@ -379,7 +379,7 @@ }; &cpsw_emac0 { - phy_id = <&davinci_mdio>, <0>; + phy-handle = <ðphy0>; phy-mode = "mii"; }; @@ -396,6 +396,10 @@ pinctrl-0 = <&davinci_mdio_default>; pinctrl-1 = <&davinci_mdio_sleep>; status = "okay"; + + ethphy0: ethernet-phy@0 { + reg = <0>; + }; }; &mmc1 { Modified: head/sys/gnu/dts/arm/am335x-boneblack-common.dtsi ============================================================================== --- head/sys/gnu/dts/arm/am335x-boneblack-common.dtsi Fri Jan 11 09:20:18 2019 (r342935) +++ head/sys/gnu/dts/arm/am335x-boneblack-common.dtsi Fri Jan 11 09:40:34 2019 (r342936) @@ -7,6 +7,7 @@ */ #include +#include &ldo3_reg { regulator-min-microvolt = <1800000>; @@ -88,9 +89,11 @@ }; &i2c0 { - tda19988: tda19988 { + tda19988: tda19988@70 { compatible = "nxp,tda998x"; reg = <0x70>; + nxp,calib-gpios = <&gpio1 25 0>; + interrupts-extended = <&gpio1 25 IRQ_TYPE_LEVEL_LOW>; pinctrl-names = "default", "off"; pinctrl-0 = <&nxp_hdmi_bonelt_pins>; Modified: head/sys/gnu/dts/arm/am335x-chiliboard.dts ============================================================================== --- head/sys/gnu/dts/arm/am335x-chiliboard.dts Fri Jan 11 09:20:18 2019 (r342935) +++ head/sys/gnu/dts/arm/am335x-chiliboard.dts Fri Jan 11 09:40:34 2019 (r342936) @@ -140,10 +140,14 @@ pinctrl-0 = <&davinci_mdio_default>; pinctrl-1 = <&davinci_mdio_sleep>; status = "okay"; + + ethphy0: ethernet-phy@0 { + reg = <0>; + }; }; &cpsw_emac0 { - phy_id = <&davinci_mdio>, <0>; + phy-handle = <ðphy0>; phy-mode = "rmii"; }; Modified: head/sys/gnu/dts/arm/am335x-cm-t335.dts ============================================================================== --- head/sys/gnu/dts/arm/am335x-cm-t335.dts Fri Jan 11 09:20:18 2019 (r342935) +++ head/sys/gnu/dts/arm/am335x-cm-t335.dts Fri Jan 11 09:40:34 2019 (r342936) @@ -486,10 +486,14 @@ status = "okay"; pinctrl-0 = <&davinci_mdio_default>; pinctrl-1 = <&davinci_mdio_sleep>; status = "okay"; + + ethphy0: ethernet-phy@0 { + reg = <0>; + }; }; &cpsw_emac0 { - phy_id = <&davinci_mdio>, <0>; + phy-handle = <ðphy0>; phy-mode = "rgmii-txid"; }; Modified: head/sys/gnu/dts/arm/am335x-evm.dts ============================================================================== --- head/sys/gnu/dts/arm/am335x-evm.dts Fri Jan 11 09:20:18 2019 (r342935) +++ head/sys/gnu/dts/arm/am335x-evm.dts Fri Jan 11 09:40:34 2019 (r342936) @@ -713,6 +713,7 @@ pinctrl-0 = <&cpsw_default>; pinctrl-1 = <&cpsw_sleep>; status = "okay"; + slaves = <1>; }; &davinci_mdio { @@ -720,15 +721,14 @@ pinctrl-0 = <&davinci_mdio_default>; pinctrl-1 = <&davinci_mdio_sleep>; status = "okay"; -}; -&cpsw_emac0 { - phy_id = <&davinci_mdio>, <0>; - phy-mode = "rgmii-txid"; + ethphy0: ethernet-phy@0 { + reg = <0>; + }; }; -&cpsw_emac1 { - phy_id = <&davinci_mdio>, <1>; +&cpsw_emac0 { + phy-handle = <ðphy0>; phy-mode = "rgmii-txid"; }; Modified: head/sys/gnu/dts/arm/am335x-evmsk.dts ============================================================================== --- head/sys/gnu/dts/arm/am335x-evmsk.dts Fri Jan 11 09:20:18 2019 (r342935) +++ head/sys/gnu/dts/arm/am335x-evmsk.dts Fri Jan 11 09:40:34 2019 (r342936) @@ -639,16 +639,24 @@ pinctrl-0 = <&davinci_mdio_default>; pinctrl-1 = <&davinci_mdio_sleep>; status = "okay"; + + ethphy0: ethernet-phy@0 { + reg = <0>; + }; + + ethphy1: ethernet-phy@1 { + reg = <1>; + }; }; &cpsw_emac0 { - phy_id = <&davinci_mdio>, <0>; + phy-handle = <ðphy0>; phy-mode = "rgmii-txid"; dual_emac_res_vlan = <1>; }; &cpsw_emac1 { - phy_id = <&davinci_mdio>, <1>; + phy-handle = <ðphy1>; phy-mode = "rgmii-txid"; dual_emac_res_vlan = <2>; }; Modified: head/sys/gnu/dts/arm/am335x-igep0033.dtsi ============================================================================== --- head/sys/gnu/dts/arm/am335x-igep0033.dtsi Fri Jan 11 09:20:18 2019 (r342935) +++ head/sys/gnu/dts/arm/am335x-igep0033.dtsi Fri Jan 11 09:40:34 2019 (r342936) @@ -102,15 +102,24 @@ &davinci_mdio { status = "okay"; + + ethphy0: ethernet-phy@0 { + reg = <0>; + }; + + ethphy1: ethernet-phy@1 { + reg = <1>; + }; }; &cpsw_emac0 { - phy_id = <&davinci_mdio>, <0>; + phy-handle = <ðphy0>; phy-mode = "rmii"; + }; &cpsw_emac1 { - phy_id = <&davinci_mdio>, <1>; + phy-handle = <ðphy1>; phy-mode = "rmii"; }; Modified: head/sys/gnu/dts/arm/am335x-lxm.dts ============================================================================== --- head/sys/gnu/dts/arm/am335x-lxm.dts Fri Jan 11 09:20:18 2019 (r342935) +++ head/sys/gnu/dts/arm/am335x-lxm.dts Fri Jan 11 09:40:34 2019 (r342936) @@ -317,13 +317,13 @@ }; &cpsw_emac0 { - phy_id = <&davinci_mdio>, <5>; + phy-handle = <ðphy0>; phy-mode = "rmii"; dual_emac_res_vlan = <2>; }; &cpsw_emac1 { - phy_id = <&davinci_mdio>, <4>; + phy-handle = <ðphy1>; phy-mode = "rmii"; dual_emac_res_vlan = <3>; }; @@ -345,6 +345,14 @@ pinctrl-0 = <&davinci_mdio_default>; pinctrl-1 = <&davinci_mdio_sleep>; status = "okay"; + + ethphy0: ethernet-phy@5 { + reg = <5>; + }; + + ethphy1: ethernet-phy@4 { + reg = <4>; + }; }; &mmc1 { Copied: head/sys/gnu/dts/arm/am335x-moxa-uc-2100-common.dtsi (from r342930, vendor/device-tree/dist/src/arm/am335x-moxa-uc-2100-common.dtsi) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/gnu/dts/arm/am335x-moxa-uc-2100-common.dtsi Fri Jan 11 09:40:34 2019 (r342936, copy of r342930, vendor/device-tree/dist/src/arm/am335x-moxa-uc-2100-common.dtsi) @@ -0,0 +1,249 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2018 MOXA Inc. - https://www.moxa.com/ + * + * Authors: SZ Lin (林上智) + * Wes Huang (黃淵河) + * Fero JD Zhou (周俊達) + */ + +#include "am33xx.dtsi" + +/ { + vbat: vbat-regulator { + compatible = "regulator-fixed"; + }; + + /* Power supply provides a fixed 3.3V @3A */ + vmmcsd_fixed: vmmcsd-regulator { + compatible = "regulator-fixed"; + regulator-name = "vmmcsd_fixed"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + }; + + buttons: push_button { + compatible = "gpio-keys"; + }; +}; + +&am33xx_pinmux { + pinctrl-names = "default"; + + i2c0_pins: pinmux_i2c0_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x988, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_sda.i2c0_sda */ + AM33XX_IOPAD(0x98c, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_scl.i2c0_scl */ + >; + }; + + push_button_pins: pinmux_push_button { + pinctrl-single,pins = < + AM33XX_IOPAD(0x8e4, PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_hsync.gpio2_23 */ + >; + }; + + uart0_pins: pinmux_uart0_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x970, PIN_INPUT_PULLUP | MUX_MODE0) /* uart0_rxd.uart0_rxd */ + AM33XX_IOPAD(0x974, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */ + >; + }; + + davinci_mdio_default: davinci_mdio_default { + pinctrl-single,pins = < + /* MDIO */ + AM33XX_IOPAD(0x948, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0) /* mdio_data.mdio_data */ + AM33XX_IOPAD(0x94c, PIN_OUTPUT_PULLUP | MUX_MODE0) /* mdio_clk.mdio_clk */ + >; + }; + + mmc1_pins_default: pinmux_mmc1_pins { + pinctrl-single,pins = < + /* eMMC */ + AM33XX_IOPAD(0x800, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad12.mmc1_dat0 */ + AM33XX_IOPAD(0x804, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad13.mmc1_dat1 */ + AM33XX_IOPAD(0x808, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad14.mmc1_dat2 */ + AM33XX_IOPAD(0x80c, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad15.mmc1_dat3 */ + AM33XX_IOPAD(0x810, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad8.mmc1_dat4 */ + AM33XX_IOPAD(0x814, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad9.mmc1_dat5 */ + AM33XX_IOPAD(0x818, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad10.mmc1_dat6 */ + AM33XX_IOPAD(0x81c, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad11.mmc1_dat7 */ + AM33XX_IOPAD(0x884, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn2.mmc1_cmd */ + AM33XX_IOPAD(0x880, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn1.mmc1_clk */ + >; + }; + + spi0_pins: pinmux_spi0 { + pinctrl-single,pins = < + AM33XX_IOPAD(0x950, PIN_INPUT_PULLUP | MUX_MODE0) /* spi0_sclk.spi0_sclk */ + AM33XX_IOPAD(0x95c, PIN_INPUT_PULLUP | MUX_MODE0) /* spi0_cs0.spi0_cs0 */ + AM33XX_IOPAD(0x954, PIN_INPUT_PULLUP | MUX_MODE0) /* spi0_d0.spi0_d0 */ + AM33XX_IOPAD(0x958, PIN_INPUT_PULLUP | MUX_MODE0) /* spi0_d1.spi0_d1 */ + >; + }; +}; + +&uart0 { + /* Console */ + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins>; +}; + +&i2c0 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_pins>; + + status = "okay"; + clock-frequency = <400000>; + + eeprom: eeprom@50 { + compatible = "atmel,24c16"; + pagesize = <16>; + reg = <0x50>; + }; + + rtc_wdt: rtc_wdt@68 { + compatible = "dallas,ds1374"; + reg = <0x68>; + }; +}; + +&usb { + status = "okay"; +}; + +&usb_ctrl_mod { + status = "okay"; +}; + +&usb0_phy { + status = "okay"; +}; + +&usb0 { + status = "okay"; + dr_mode = "host"; +}; + +&cppi41dma { + status = "okay"; +}; + +/* Power */ +&vbat { + regulator-name = "vbat"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; +}; + +&mac { + pinctrl-names = "default"; + pinctrl-0 = <&cpsw_default>; + status = "okay"; +}; + +&davinci_mdio { + pinctrl-names = "default"; + pinctrl-0 = <&davinci_mdio_default>; + status = "okay"; +}; + +&cpsw_emac0 { + status = "okay"; +}; + +&cpsw_emac1 { + status = "okay"; +}; + +&phy_sel { + reg= <0x44e10650 0xf5>; + rmii-clock-ext; +}; + +&sham { + status = "okay"; +}; + +&aes { + status = "okay"; +}; + +&gpio0 { + ti,no-reset-on-init; +}; + +&mmc2 { + pinctrl-names = "default"; + vmmc-supply = <&vmmcsd_fixed>; + bus-width = <8>; + pinctrl-0 = <&mmc1_pins_default>; + ti,non-removable; + status = "okay"; +}; + +&buttons { + pinctrl-names = "default"; + pinctrl-0 = <&push_button_pins>; + #address-cells = <1>; + #size-cells = <0>; + + button@0 { + label = "push_button"; + linux,code = <0x100>; + gpios = <&gpio2 23 GPIO_ACTIVE_LOW>; + }; +}; + +/* SPI Busses */ +&spi0 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&spi0_pins>; + + m25p80@0 { + compatible = "mx25l6405d"; + spi-max-frequency = <40000000>; + + reg = <0>; + spi-cpol; + spi-cpha; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + /* reg : The partition's offset and size within the mtd bank. */ + partitions@0 { + label = "MLO"; + reg = <0x0 0x80000>; + }; + + partitions@1 { + label = "U-Boot"; + reg = <0x80000 0x100000>; + }; + + partitions@2 { + label = "U-Boot Env"; + reg = <0x180000 0x40000>; + }; + }; + }; +}; + +&spi1 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&spi1_pins>; + + tpm_spi_tis@0 { + compatible = "tcg,tpm_tis-spi"; + reg = <0>; + spi-max-frequency = <500000>; + }; +}; Copied: head/sys/gnu/dts/arm/am335x-moxa-uc-2101.dts (from r342930, vendor/device-tree/dist/src/arm/am335x-moxa-uc-2101.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/gnu/dts/arm/am335x-moxa-uc-2101.dts Fri Jan 11 09:40:34 2019 (r342936, copy of r342930, vendor/device-tree/dist/src/arm/am335x-moxa-uc-2101.dts) @@ -0,0 +1,69 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2018 MOXA Inc. - https://www.moxa.com/ + * + * Authors: SZ Lin (林上智) + * Wes Huang (黃淵河) + * Fero JD Zhou (周俊達) + */ + +/dts-v1/; + +#include "am335x-moxa-uc-2100-common.dtsi" + +/ { + model = "Moxa UC-2101"; + compatible = "moxa,uc-2101", "ti,am33xx"; + + leds { + compatible = "gpio-leds"; + led1 { + label = "UC2100:GREEN:USER"; + gpios = <&gpio3 10 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + }; +}; + +&am33xx_pinmux { + pinctrl-names = "default"; + + cpsw_default: cpsw_default { + pinctrl-single,pins = < + /* Slave 1 */ + AM33XX_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE1) /* mii1_crs.rmii1_crs_dv */ + AM33XX_IOPAD(0x910, PIN_INPUT_PULLUP | MUX_MODE1) /* mii1_rxerr.rmii1_rxerr */ + AM33XX_IOPAD(0x914, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_txen.rmii1_txen */ + AM33XX_IOPAD(0x924, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_txd1.rmii1_txd1 */ + AM33XX_IOPAD(0x928, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_txd0.rmii1_txd0 */ + AM33XX_IOPAD(0x93c, PIN_INPUT_PULLUP | MUX_MODE1) /* mii1_rxd1.rmii1_rxd1 */ + AM33XX_IOPAD(0x940, PIN_INPUT_PULLUP | MUX_MODE1) /* mii1_rxd0.rmii1_rxd0 */ + AM33XX_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE0) /* mii1_refclk.rmii1_refclk */ + >; + }; + + spi1_pins: pinmux_spi1 { + pinctrl-single,pins = < + AM33XX_IOPAD(0x964, PIN_INPUT_PULLUP | MUX_MODE4) /* ecap0_in_pwm0_out.spi1_sclk */ + AM33XX_IOPAD(0x978, PIN_INPUT_PULLUP | MUX_MODE4) /* uart1_ctsn.spi1_cs0 */ + AM33XX_IOPAD(0x968, PIN_INPUT_PULLUP | MUX_MODE4) /* uart0_ctsn.spi1_d0 */ + AM33XX_IOPAD(0x96c, PIN_INPUT_PULLUP | MUX_MODE4) /* uart0_rtsn.spi1_d1 */ + >; + }; +}; + +&davinci_mdio { + phy0: ethernet-phy@4 { + reg = <4>; + }; +}; + +&cpsw_emac0 { + status = "okay"; + phy-handle = <&phy0>; + phy-mode = "rmii"; +}; + +&cpsw_emac1 { + status = "disabled"; +}; Modified: head/sys/gnu/dts/arm/am335x-moxa-uc-8100-me-t.dts ============================================================================== --- head/sys/gnu/dts/arm/am335x-moxa-uc-8100-me-t.dts Fri Jan 11 09:20:18 2019 (r342935) +++ head/sys/gnu/dts/arm/am335x-moxa-uc-8100-me-t.dts Fri Jan 11 09:40:34 2019 (r342936) @@ -422,18 +422,26 @@ pinctrl-names = "default"; pinctrl-0 = <&davinci_mdio_default>; status = "okay"; + + ethphy0: ethernet-phy@4 { + reg = <4>; + }; + + ethphy1: ethernet-phy@5 { + reg = <5>; + }; }; &cpsw_emac0 { status = "okay"; - phy_id = <&davinci_mdio>, <4>; + phy-handle = <ðphy0>; phy-mode = "rmii"; dual_emac_res_vlan = <1>; }; &cpsw_emac1 { status = "okay"; - phy_id = <&davinci_mdio>, <5>; + phy-handle = <ðphy1>; phy-mode = "rmii"; dual_emac_res_vlan = <2>; }; Modified: head/sys/gnu/dts/arm/am335x-nano.dts ============================================================================== --- head/sys/gnu/dts/arm/am335x-nano.dts Fri Jan 11 09:20:18 2019 (r342935) +++ head/sys/gnu/dts/arm/am335x-nano.dts Fri Jan 11 09:40:34 2019 (r342936) @@ -380,16 +380,24 @@ &davinci_mdio { status = "okay"; + + ethphy0: ethernet-phy@0 { + reg = <0>; + }; + + ethphy1: ethernet-phy@1 { + reg = <1>; + }; }; &cpsw_emac0 { - phy_id = <&davinci_mdio>, <0>; + phy-handle = <ðphy0>; phy-mode = "mii"; dual_emac_res_vlan = <1>; }; &cpsw_emac1 { - phy_id = <&davinci_mdio>, <1>; + phy-handle = <ðphy1>; phy-mode = "mii"; dual_emac_res_vlan = <2>; }; Modified: head/sys/gnu/dts/arm/am335x-osd3358-sm-red.dts ============================================================================== --- head/sys/gnu/dts/arm/am335x-osd3358-sm-red.dts Fri Jan 11 09:20:18 2019 (r342935) +++ head/sys/gnu/dts/arm/am335x-osd3358-sm-red.dts Fri Jan 11 09:40:34 2019 (r342936) @@ -161,7 +161,7 @@ invensense,key = [4e cc 7e eb f6 1e 35 22 00 34 0d 65 32 e9 94 89];*/ }; - bmp280: pressure@78 { + bmp280: pressure@76 { compatible = "bosch,bmp280"; reg = <0x76>; }; @@ -424,7 +424,7 @@ }; &cpsw_emac0 { - phy_id = <&davinci_mdio>, <4>; + phy-handle = <ðphy0>; phy-mode = "rgmii-txid"; }; @@ -441,6 +441,10 @@ pinctrl-0 = <&davinci_mdio_default>; pinctrl-1 = <&davinci_mdio_sleep>; status = "okay"; + + ethphy0: ethernet-phy@4 { + reg = <4>; + }; }; &mmc1 { Modified: head/sys/gnu/dts/arm/am335x-pdu001.dts ============================================================================== --- head/sys/gnu/dts/arm/am335x-pdu001.dts Fri Jan 11 09:20:18 2019 (r342935) +++ head/sys/gnu/dts/arm/am335x-pdu001.dts Fri Jan 11 09:40:34 2019 (r342936) @@ -373,7 +373,7 @@ ti,pindir-d0-out-d1-in; status = "okay"; - cfaf240320a032t { + display-controller@0 { compatible = "orisetech,otm3225a"; reg = <0>; spi-max-frequency = <1000000>; @@ -533,16 +533,24 @@ pinctrl-names = "default"; pinctrl-0 = <&davinci_mdio_default>; status = "okay"; + + ethphy0: ethernet-phy@0 { + reg = <0>; + }; + + ethphy1: ethernet-phy@1 { + reg = <1>; + }; }; &cpsw_emac0 { - phy_id = <&davinci_mdio>, <0>; + phy-handle = <ðphy0>; phy-mode = "mii"; dual_emac_res_vlan = <1>; }; &cpsw_emac1 { - phy_id = <&davinci_mdio>, <1>; + phy-handle = <ðphy1>; phy-mode = "mii"; dual_emac_res_vlan = <2>; }; Modified: head/sys/gnu/dts/arm/am335x-pepper.dts ============================================================================== --- head/sys/gnu/dts/arm/am335x-pepper.dts Fri Jan 11 09:20:18 2019 (r342935) +++ head/sys/gnu/dts/arm/am335x-pepper.dts Fri Jan 11 09:40:34 2019 (r342936) @@ -265,13 +265,13 @@ /* Ethernet */ &cpsw_emac0 { status = "okay"; - phy_id = <&davinci_mdio>, <0>; + phy-handle = <ðphy0>; phy-mode = "rgmii"; }; &cpsw_emac1 { status = "okay"; - phy_id = <&davinci_mdio>, <1>; + phy-handle = <ðphy1>; phy-mode = "rgmii"; }; @@ -279,6 +279,14 @@ status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&mdio_pins>; + + ethphy0: ethernet-phy@0 { + reg = <0>; + }; + + ethphy1: ethernet-phy@1 { + reg = <1>; + }; }; &mac { Modified: head/sys/gnu/dts/arm/am335x-sancloud-bbe.dts ============================================================================== --- head/sys/gnu/dts/arm/am335x-sancloud-bbe.dts Fri Jan 11 09:20:18 2019 (r342935) +++ head/sys/gnu/dts/arm/am335x-sancloud-bbe.dts Fri Jan 11 09:40:34 2019 (r342936) @@ -103,10 +103,14 @@ pinctrl-0 = <&davinci_mdio_default>; pinctrl-1 = <&davinci_mdio_sleep>; status = "okay"; + + ethphy0: ethernet-phy@0 { + reg = <0>; + }; }; &cpsw_emac0 { - phy_id = <&davinci_mdio>, <0>; + phy-handle = <ðphy0>; phy-mode = "rgmii-txid"; }; Modified: head/sys/gnu/dts/arm/am335x-shc.dts ============================================================================== --- head/sys/gnu/dts/arm/am335x-shc.dts Fri Jan 11 09:20:18 2019 (r342935) +++ head/sys/gnu/dts/arm/am335x-shc.dts Fri Jan 11 09:40:34 2019 (r342936) @@ -206,7 +206,6 @@ status = "okay"; slaves = <1>; cpsw_emac0: slave@4a100200 { - phy_id = <&davinci_mdio>, <0>; phy-mode = "mii"; phy-handle = <ðernetphy0>; }; Copied: head/sys/gnu/dts/arm/am3517-evm-ui.dtsi (from r342930, vendor/device-tree/dist/src/arm/am3517-evm-ui.dtsi) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/gnu/dts/arm/am3517-evm-ui.dtsi Fri Jan 11 09:40:34 2019 (r342936, copy of r342930, vendor/device-tree/dist/src/arm/am3517-evm-ui.dtsi) @@ -0,0 +1,220 @@ +/* + * Copyright (C) 2018 Logic PD, Inc - http://www.logicpd.com/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include + +/ { + codec1 { + compatible = "simple-audio-card"; + simple-audio-card,name = "tlv320aic23-hifi"; + + simple-audio-card,widgets = + "Microphone", "Mic In", + "Line", "Line In", + "Line", "Line Out"; + + simple-audio-card,routing = + "Line Out", "LOUT", + "Line Out", "ROUT", + "LLINEIN", "Line In", + "RLINEIN", "Line In", + "MICIN", "Mic In"; + + simple-audio-card,format = "i2s"; + simple-audio-card,bitclock-master = <&sound_master>; + simple-audio-card,frame-master = <&sound_master>; + + simple-audio-card,cpu { + sound-dai = <&mcbsp1>; + }; + + sound_master: simple-audio-card,codec { + sound-dai = <&tlv320aic23_1>; + system-clock-frequency = <12000000>; + }; + }; + + codec2 { + compatible = "simple-audio-card"; + simple-audio-card,name = "tlv320aic23-hifi"; + + simple-audio-card,widgets = + "Microphone", "Mic In", + "Line", "Line In", + "Line", "Line Out"; + + simple-audio-card,routing = + "Line Out", "LOUT", + "Line Out", "ROUT", + "LLINEIN", "Line In", + "RLINEIN", "Line In", + "MICIN", "Mic In"; + + simple-audio-card,format = "i2s"; + simple-audio-card,bitclock-master = <&sound_master2>; + simple-audio-card,frame-master = <&sound_master2>; + + simple-audio-card,cpu { + sound-dai = <&mcbsp2>; + }; + + sound_master2: simple-audio-card,codec { + sound-dai = <&tlv320aic23_2>; + system-clock-frequency = <12000000>; + }; + }; + + expander-keys { + compatible = "gpio-keys-polled"; + poll-interval = <100>; + + record { + label = "Record"; + /* linux,code = ; */ + gpios = <&tca6416_2 15 GPIO_ACTIVE_LOW>; + }; + + play { + label = "Play"; + linux,code = ; + gpios = <&tca6416_2 14 GPIO_ACTIVE_LOW>; + }; + + Stop { + label = "Stop"; + linux,code = ; + gpios = <&tca6416_2 13 GPIO_ACTIVE_LOW>; + }; + + fwd { + label = "FWD"; + linux,code = ; + gpios = <&tca6416_2 12 GPIO_ACTIVE_LOW>; + }; + + rwd { + label = "RWD"; + linux,code = ; + gpios = <&tca6416_2 11 GPIO_ACTIVE_LOW>; + }; + + shift { + label = "Shift"; + linux,code = ; + gpios = <&tca6416_2 10 GPIO_ACTIVE_LOW>; + }; + + Mode { + label = "Mode"; + linux,code = ; + gpios = <&tca6416_2 9 GPIO_ACTIVE_LOW>; + }; + + Menu { + label = "Menu"; + linux,code = ; + gpios = <&tca6416_2 8 GPIO_ACTIVE_LOW>; + }; + + Up { + label = "Up"; + linux,code = ; + gpios = <&tca6416_2 7 GPIO_ACTIVE_LOW>; + }; + + Down { + label = "Down"; + linux,code = ; + gpios = <&tca6416_2 6 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&i2c2 { + /* Audio codecs */ + tlv320aic23_1: codec@1a { + compatible = "ti,tlv320aic23"; + reg = <0x1a>; + #sound-dai-cells= <0>; + status = "okay"; + }; + + tlv320aic23_2: codec@1b { + compatible = "ti,tlv320aic23"; + reg = <0x1b>; + #sound-dai-cells= <0>; + status = "okay"; + }; +}; + +&i2c3 { + /* Audio codecs */ + tlv320aic23_3: codec@1a { + compatible = "ti,tlv320aic23"; + reg = <0x1a>; + #sound-dai-cells= <0>; + status = "okay"; + }; + + /* GPIO Expanders */ + tca6416_2: gpio@20 { + compatible = "ti,tca6416"; + reg = <0x20>; + gpio-controller; + #gpio-cells = <2>; + vcc-supply = <&vdd_io_reg>; + }; + + tca6416_3: gpio@21 { + compatible = "ti,tca6416"; + reg = <0x21>; + gpio-controller; + #gpio-cells = <2>; + vcc-supply = <&vdd_io_reg>; + }; + + /* TVP5146 Analog Video decoder input */ + tvp5146@5c { + compatible = "ti,tvp5146m2"; + reg = <0x5c>; + }; +}; + +&mcbsp1 { + status = "ok"; + #sound-dai-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&mcbsp1_pins>; +}; + +&mcbsp2 { + status = "ok"; + #sound-dai-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&mcbsp2_pins>; +}; + +&omap3_pmx_core { + mcbsp1_pins: pinmux_mcbsp1_pins { + pinctrl-single,pins = < + OMAP3_CORE1_IOPAD(0x2190, PIN_OUTPUT | MUX_MODE0) /* mcbsp1_dx.mcbsp1_dx */ + OMAP3_CORE1_IOPAD(0x2192, PIN_INPUT | MUX_MODE0) /* mcbsp1_dx.mcbsp1_dr */ + OMAP3_CORE1_IOPAD(0x2196, PIN_INPUT | MUX_MODE0) /* mcbsp_clks.mcbsp1_fsx */ + OMAP3_CORE1_IOPAD(0x2198, PIN_INPUT | MUX_MODE0) /* mcbsp1_clkx.mcbsp1_clkx */ + >; + }; + + mcbsp2_pins: pinmux_mcbsp2_pins { + pinctrl-single,pins = < + OMAP3_CORE1_IOPAD(0x213c, PIN_INPUT | MUX_MODE0) /* mcbsp2_fsx.mcbsp2_fsx */ + OMAP3_CORE1_IOPAD(0x213e, PIN_INPUT | MUX_MODE0) /* mcbsp2_clkx.mcbsp2_clkx */ + OMAP3_CORE1_IOPAD(0x2140, PIN_INPUT | MUX_MODE0) /* mcbsp2_dr.mcbsp2.dr */ + OMAP3_CORE1_IOPAD(0x2142, PIN_OUTPUT | MUX_MODE0) /* mcbsp2_dx.mcbsp2_dx */ + >; + }; +}; Modified: head/sys/gnu/dts/arm/am3517-evm.dts ============================================================================== --- head/sys/gnu/dts/arm/am3517-evm.dts Fri Jan 11 09:20:18 2019 (r342935) +++ head/sys/gnu/dts/arm/am3517-evm.dts Fri Jan 11 09:40:34 2019 (r342936) @@ -9,6 +9,7 @@ #include "am3517.dtsi" #include "am3517-som.dtsi" +#include "am3517-evm-ui.dtsi" #include / { @@ -227,7 +228,7 @@ vmmc-supply = <&vmmc_fixed>; bus-width = <4>; wp-gpios = <&gpio4 30 GPIO_ACTIVE_HIGH>; /* gpio_126 */ - cd-gpios = <&gpio4 31 GPIO_ACTIVE_HIGH>; /* gpio_127 */ + cd-gpios = <&gpio4 31 GPIO_ACTIVE_LOW>; /* gpio_127 */ }; &mmc3 { Modified: head/sys/gnu/dts/arm/am3517-som.dtsi ============================================================================== --- head/sys/gnu/dts/arm/am3517-som.dtsi Fri Jan 11 09:20:18 2019 (r342935) +++ head/sys/gnu/dts/arm/am3517-som.dtsi Fri Jan 11 09:40:34 2019 (r342936) @@ -163,7 +163,7 @@ compatible = "ti,wl1271"; reg = <2>; interrupt-parent = <&gpio6>; - interrupts = <10 IRQ_TYPE_LEVEL_HIGH>; /* gpio_170 */ + interrupts = <10 IRQ_TYPE_EDGE_RISING>; /* gpio_170 */ ref-clock-frequency = <26000000>; tcxo-clock-frequency = <26000000>; }; Modified: head/sys/gnu/dts/arm/am4372.dtsi ============================================================================== --- head/sys/gnu/dts/arm/am4372.dtsi Fri Jan 11 09:20:18 2019 (r342935) +++ head/sys/gnu/dts/arm/am4372.dtsi Fri Jan 11 09:40:34 2019 (r342936) @@ -1101,7 +1101,7 @@ }; }; - qspi: qspi@47900000 { + qspi: spi@47900000 { compatible = "ti,am4372-qspi"; reg = <0x47900000 0x100>, <0x30000000 0x4000000>; Modified: head/sys/gnu/dts/arm/am437x-cm-t43.dts ============================================================================== --- head/sys/gnu/dts/arm/am437x-cm-t43.dts Fri Jan 11 09:20:18 2019 (r342935) +++ head/sys/gnu/dts/arm/am437x-cm-t43.dts Fri Jan 11 09:40:34 2019 (r342936) @@ -339,16 +339,24 @@ pinctrl-names = "default"; pinctrl-0 = <&davinci_mdio_default>; status = "okay"; + + ethphy0: ethernet-phy@0 { + reg = <0>; + }; + + ethphy1: ethernet-phy@1 { + reg = <1>; + }; }; &cpsw_emac0 { - phy_id = <&davinci_mdio>, <0>; + phy-handle = <ðphy0>; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Fri Jan 11 11:32:47 2019 Return-Path: Delivered-To: svn-src-head@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 143D9148B4FB; Fri, 11 Jan 2019 11:32:47 +0000 (UTC) (envelope-from andrew@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 8068094D0A; Fri, 11 Jan 2019 11:32:46 +0000 (UTC) (envelope-from andrew@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 72FEC1B1DD; Fri, 11 Jan 2019 11:32:46 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0BBWkSk011423; Fri, 11 Jan 2019 11:32:46 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0BBWkj2011422; Fri, 11 Jan 2019 11:32:46 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201901111132.x0BBWkj2011422@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 11 Jan 2019 11:32:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342937 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 342937 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8068094D0A 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.961,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2019 11:32:47 -0000 Author: andrew Date: Fri Jan 11 11:32:46 2019 New Revision: 342937 URL: https://svnweb.freebsd.org/changeset/base/342937 Log: Fix the location of td->td_frame at the top of the kernel stack. In cpu_thread_alloc we would allocate space for the trap frame at the top of the kernel stack. This is just below the pcb, however due to a missing cast the pointer arithmetic would use the pcb size, not the trapframe size. As the pcb is larger than the trapframe this is safe, however later in cpu_fork we include the case leading to the two disagreeing on the location. Fix by using the same arithmetic in both locations. Found by: An early KASAN patch Sponsored by: DARPA, AFRL Modified: head/sys/arm64/arm64/vm_machdep.c Modified: head/sys/arm64/arm64/vm_machdep.c ============================================================================== --- head/sys/arm64/arm64/vm_machdep.c Fri Jan 11 09:40:34 2019 (r342936) +++ head/sys/arm64/arm64/vm_machdep.c Fri Jan 11 11:32:46 2019 (r342937) @@ -228,7 +228,7 @@ cpu_thread_alloc(struct thread *td) td->td_pcb = (struct pcb *)(td->td_kstack + td->td_kstack_pages * PAGE_SIZE) - 1; td->td_frame = (struct trapframe *)STACKALIGN( - td->td_pcb - 1); + (struct trapframe *)td->td_pcb - 1); } void From owner-svn-src-head@freebsd.org Fri Jan 11 14:22:00 2019 Return-Path: Delivered-To: svn-src-head@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 C40AE1491F5B; Fri, 11 Jan 2019 14:22:00 +0000 (UTC) (envelope-from rgrimes@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 6A6046DE21; Fri, 11 Jan 2019 14:22:00 +0000 (UTC) (envelope-from rgrimes@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 5ECAA1CEB2; Fri, 11 Jan 2019 14:22:00 +0000 (UTC) (envelope-from rgrimes@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0BEM0Qc001938; Fri, 11 Jan 2019 14:22:00 GMT (envelope-from rgrimes@FreeBSD.org) Received: (from rgrimes@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0BEM0jH001937; Fri, 11 Jan 2019 14:22:00 GMT (envelope-from rgrimes@FreeBSD.org) Message-Id: <201901111422.x0BEM0jH001937@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rgrimes set sender to rgrimes@FreeBSD.org using -f From: "Rodney W. Grimes" Date: Fri, 11 Jan 2019 14:22:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342944 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: rgrimes X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 342944 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6A6046DE21 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.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.984,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2019 14:22:00 -0000 Author: rgrimes Date: Fri Jan 11 14:21:59 2019 New Revision: 342944 URL: https://svnweb.freebsd.org/changeset/base/342944 Log: Fix spelling of identifier Approved by: phk (mentor) MFC after: 3 days Modified: head/usr.sbin/bhyve/bhyve.8 Modified: head/usr.sbin/bhyve/bhyve.8 ============================================================================== --- head/usr.sbin/bhyve/bhyve.8 Fri Jan 11 12:18:11 2019 (r342943) +++ head/usr.sbin/bhyve/bhyve.8 Fri Jan 11 14:21:59 2019 (r342944) @@ -390,7 +390,7 @@ address and a VNC should listen on. The default is to listen on localhost IPv4 address and default VNC port 5900. An IPv6 address must be enclosed in square brackets and may contain an -optional zone identifer. +optional zone identifier. .It Ar width No and Ar height A display resolution, width and height, respectively. If not specified, a default resolution of 1024x768 pixels will be used. From owner-svn-src-head@freebsd.org Fri Jan 11 15:52:11 2019 Return-Path: Delivered-To: svn-src-head@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 5D2621494288; Fri, 11 Jan 2019 15:52:11 +0000 (UTC) (envelope-from lme@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 0A966715BB; Fri, 11 Jan 2019 15:52:11 +0000 (UTC) (envelope-from lme@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 009CE1DD26; Fri, 11 Jan 2019 15:52:11 +0000 (UTC) (envelope-from lme@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0BFqAng049569; Fri, 11 Jan 2019 15:52:10 GMT (envelope-from lme@FreeBSD.org) Received: (from lme@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0BFqAxa049564; Fri, 11 Jan 2019 15:52:10 GMT (envelope-from lme@FreeBSD.org) Message-Id: <201901111552.x0BFqAxa049564@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lme set sender to lme@FreeBSD.org using -f From: Lars Engels Date: Fri, 11 Jan 2019 15:52:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342945 - in head: tools/build/mk usr.sbin/bluetooth usr.sbin/bluetooth/bluetooth-config X-SVN-Group: head X-SVN-Commit-Author: lme X-SVN-Commit-Paths: in head: tools/build/mk usr.sbin/bluetooth usr.sbin/bluetooth/bluetooth-config X-SVN-Commit-Revision: 342945 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0A966715BB 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.97)[-0.966,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2019 15:52:11 -0000 Author: lme (ports committer) Date: Fri Jan 11 15:52:09 2019 New Revision: 342945 URL: https://svnweb.freebsd.org/changeset/base/342945 Log: Add `bluetooth-config` script to simplify setting up bluetooth connections to devices like mice, keyboards, bt-audio, ... This script currently allows scanning for nearby devices, adds one to /etc/bluetooth/hosts, adds an entry to hcsecd's conf and if it is a HID, add an entry to bthidd's configs, as well. Submitted by: erdgeist Approved by: bapt MFC after: 2 weeks Differential Revision: D3778 Reviewers: bapt, emax Added: head/usr.sbin/bluetooth/bluetooth-config/ head/usr.sbin/bluetooth/bluetooth-config/Makefile (contents, props changed) head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.8 (contents, props changed) head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.sh (contents, props changed) Modified: head/tools/build/mk/OptionalObsoleteFiles.inc head/usr.sbin/bluetooth/Makefile Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Fri Jan 11 14:21:59 2019 (r342944) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Fri Jan 11 15:52:09 2019 (r342945) @@ -504,6 +504,7 @@ OLD_FILES+=usr/lib32/libsdp_p.a .endif OLD_FILES+=usr/sbin/ath3kfw OLD_FILES+=usr/sbin/bcmfw +OLD_FILES+=usr/sbin/bluetooth-config OLD_FILES+=usr/sbin/bt3cfw OLD_FILES+=usr/sbin/bthidcontrol OLD_FILES+=usr/sbin/bthidd @@ -580,6 +581,7 @@ OLD_FILES+=usr/share/man/man5/bluetooth.protocols.5.gz OLD_FILES+=usr/share/man/man5/hcsecd.conf.5.gz OLD_FILES+=usr/share/man/man8/ath3kfw.8.gz OLD_FILES+=usr/share/man/man8/bcmfw.8.gz +OLD_FILES+=usr/share/man/man8/bluetooth-config.8.gz OLD_FILES+=usr/share/man/man8/bt3cfw.8.gz OLD_FILES+=usr/share/man/man8/bthidcontrol.8.gz OLD_FILES+=usr/share/man/man8/bthidd.8.gz Modified: head/usr.sbin/bluetooth/Makefile ============================================================================== --- head/usr.sbin/bluetooth/Makefile Fri Jan 11 14:21:59 2019 (r342944) +++ head/usr.sbin/bluetooth/Makefile Fri Jan 11 15:52:09 2019 (r342945) @@ -4,6 +4,7 @@ .include SUBDIR= \ + bluetooth-config \ bt3cfw \ btpand \ hccontrol \ Added: head/usr.sbin/bluetooth/bluetooth-config/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/bluetooth/bluetooth-config/Makefile Fri Jan 11 15:52:09 2019 (r342945) @@ -0,0 +1,6 @@ +# $FreeBSD$ + +SCRIPTS=bluetooth-config.sh +MAN= bluetooth-config.8 + +.include Added: head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.8 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.8 Fri Jan 11 15:52:09 2019 (r342945) @@ -0,0 +1,222 @@ +.\" Copyright (c) 2019 Dirk Engling +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd January 7, 2019 +.Dt BLUETOOTH-CONFIG 8 +.Os +.Sh NAME +.Nm bluetooth-config +.Nd a script to manage config files for the bluetooth sub system +.Sh SYNOPSIS +.Nm +.Ar scan +.Op Fl d Ar device +.Op Fl n Ar node +.Sh DESCRIPTION +The +.Nm +utility is an interactive script to provide a frontend to the complex bluetooth sub system daemons. +.Pp +The following options are available: +.Bl -tag -width indent+ +.It Fl d +Scan for a specific bluetooth device address. +.It Fl n +Limit scan to a specific host controller. Hint: List all netgraph nodes with +.Ql /usr/sbin/ngctl list . +.El +.Pp +.Nm +will help finding and setting up bluetooth controllers, scan for nearby bluetooth devices in +pairing mode, lookup their names, allow mapping to friendly names in +.Pa /etc/bluetooth/hosts , +ask for the paring PIN, instrument +.Xr hcsecd 8 +to securely pair with new devices and, if the device offers HID endpoints such as mice or +keyboards, configure and restart +.Xr bthidd 8 . +.Pp +.Nm +can bring up any interface and daemon necessary for operation and, if a node is provided on +command line, will do so automatically for that interface. +.Sh CAVEATS +.Nm +can not parse entries in +.Xr hcsecd 8 +config file and thus will ask the user to manually modify existing pairing PIN entries. +.Sh FILES +.Bl -tag -width ".Pa /etc/bluetooth/hosts" -compact +.It Pa /etc/bluetooth/hosts +.It Pa sysrc -n bthidd_config +.It Pa sysrc -n hcsecd_config +.El +.Sh EXAMPLES +.Nm +scan -n ubt0 -a 00:26:bb:7a:58:95 +.Bd -ragged -offset indent +This will scan the bluetooth controller ubt0hci for a bluetooth device with the address +00:26:bb:7a:58:95, set up ubt0 if necessary and enter an interactive dialog to pair the +new device. Since in this example a mouse is paired, +.Nm +will interact with +.Xr bthidd 8 , +enabling it if necessary and then write an HID descriptor to its config. +.Ed +.Pp +.Nm +scan +.Bd -ragged -offset indent +This will scan all bluetooth controllers on the systems for bluetooth devices, prompting +to bring up controllers or daemons along the way. +.Ed +.Sh SEE ALSO +.Xr bthidcontrol 8 , +.Xr bthidd 8 , +.Xr bthost 1 , +.Xr hccontrol 8 , +.Xr hcsecd 8 , +.Xr sdpcontrol 8 , +.Xr sysrc 8 +.Sh HISTORY +A +.Nm +utility first appeared in +.Fx 12.1 . +.Sh AUTHORS +.An Dirk Engling Aq Mt erdgeist@erdgeist.org +.Sh THANKS TO +Lars Engels and Warren Block for suggestions, help, and testing. +.\" Copyright (c) 2019 Dirk Engling +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd January 7, 2019 +.Dt BLUETOOTH-CONFIG 8 +.Os +.Sh NAME +.Nm bluetooth-config +.Nd a script to manage config files for the bluetooth sub system +.Sh SYNOPSIS +.Nm +.Ar scan +.Op Fl d Ar device +.Op Fl n Ar node +.Sh DESCRIPTION +The +.Nm +utility is an interactive script to provide a frontend to the complex bluetooth sub system daemons. +.Pp +The following options are available: +.Bl -tag -width indent+ +.It Fl d +Scan for a specific bluetooth device address. +.It Fl n +Limit scan to a specific host controller. Hint: List all netgraph nodes with +.Ql /usr/sbin/ngctl list . +.El +.Pp +.Nm +will help finding and setting up bluetooth controllers, scan for nearby bluetooth devices in +pairing mode, lookup their names, allow mapping to friendly names in +.Pa /etc/bluetooth/hosts , +ask for the paring PIN, instrument +.Xr hcsecd 8 +to securely pair with new devices and, if the device offers HID endpoints such as mice or +keyboards, configure and restart +.Xr bthidd 8 . +.Pp +.Nm +can bring up any interface and daemon necessary for operation and, if a node is provided on +command line, will do so automatically for that interface. +.Sh CAVEATS +.Nm +can not parse entries in +.Xr hcsecd 8 +config file and thus will ask the user to manually modify existing pairing PIN entries. +.Sh FILES +.Bl -tag -width ".Pa /etc/bluetooth/hosts" -compact +.It Pa /etc/bluetooth/hosts +.It Pa sysrc -n bthidd_config +.It Pa sysrc -n hcsecd_config +.El +.Sh EXAMPLES +.Nm +scan -n ubt0 -a 00:26:bb:7a:58:95 +.Bd -ragged -offset indent +This will scan the bluetooth controller ubt0hci for a bluetooth device with the address +00:26:bb:7a:58:95, set up ubt0 if necessary and enter an interactive dialog to pair the +new device. Since in this example a mouse is paired, +.Nm +will interact with +.Xr bthidd 8 , +enabling it if necessary and then write an HID descriptor to its config. +.Ed +.Pp +.Nm +scan +.Bd -ragged -offset indent +This will scan all bluetooth controllers on the systems for bluetooth devices, prompting +to bring up controllers or daemons along the way. +.Ed +.Sh SEE ALSO +.Xr bthidcontrol 8 , +.Xr bthidd 8 , +.Xr bthost 1 , +.Xr hccontrol 8 , +.Xr hcsecd 8 , +.Xr sdpcontrol 8 , +.Xr sysrc 8 +.Sh HISTORY +A +.Nm +utility first appeared in +.Fx 12.1 . +.Sh AUTHORS +.An Dirk Engling Aq Mt erdgeist@erdgeist.org +.Sh THANKS TO +Lars Engels and Warren Block for suggestions, help, and testing. Added: head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.sh Fri Jan 11 15:52:09 2019 (r342945) @@ -0,0 +1,275 @@ +#!/bin/sh +#- +# Copyleft 2019 Dirk Engling +# +# This script is released under the beerware license. +# +# $FreeBSD$ +# + +# define our bail out shortcut +exerr () { echo -e "Error: $*" >&2 ; exit 1; } +print_syntax () { echo -e "Syntax: $0 scan [-d device] [-n node]"; exit 1; } + +# Assuming we are called to do the pair-new-device subcommand first + +main() { +unset node device started bdaddresses retry + +# Only one command at the moment is scan (+ add) +[ "$#" -eq 1 -a "$1" = "scan" ] || print_syntax +shift + +# Get command line options +while getopts :d:n: arg; do + case ${arg} in + d) device="$OPTARG";; + n) node="$OPTARG";; + ?) print_syntax;; + esac +done + +# No use running without super user rights +[ $( id -u ) -eq 0 ] || exerr "$0 must modify files that belong to root. Re-run as root." + +known_nodes=$(/usr/sbin/hccontrol read_node_list 2>/dev/null | \ + /usr/bin/tail -n +2 | /usr/bin/cut -d ' ' -f 1) + +# Check if netgraph knows about any HCI nodes +if ! [ "${known_nodes}" ]; then + ng_nodes=$(/usr/sbin/ngctl list 2>/dev/null | \ + /usr/bin/grep -o "Name: .* Type: ubt" | /usr/bin/cut -d ' ' -f 2) + + [ "${ng_nodes}" ] || exerr "No Bluetooth host controllers found." + + unset found + for n in ${ng_nodes}; do + if [ "${n}" = "${node%hci}" ]; then + # If we found the node but its stack is not set up, do it now + /usr/sbin/service bluetooth start ${node%hci} || exit 1 + found="YES" + fi + done + + # If we have Bluetooth controller nodes without a set up stack, + # ask the user if we shall start it up + if ! [ "${found}" ]; then + printf "No usable Bluetooth host controllers were found.\n" + printf "These host controllers exist in the system:\n %s" " ${ng_nodes}" + read -p "Choose a host controller to set up: [${ng_nodes%% *}]" node + : ${node:="${ng_nodes%% *}"} + /usr/sbin/service bluetooth start ${node} || exit 1 + fi + + # Re-read known nodes + known_nodes=$(/usr/sbin/hccontrol read_node_list 2>/dev/null | \ + /usr/bin/tail -n +2 | /usr/bin/cut -d ' ' -f 1) + # check if we succeeded in bringing it up + [ "${known_nodes}" ] || exerr "Failed to set up Bluetooth stack" +fi + +# if a node was requested on command line, check if it is there +if [ "${node}" ]; then + unset found + for n in ${known_nodes}; do + [ "${n}" = "${node}" ] && found="YES" + [ "${n}" = "${node}hci" ] && node="${node}hci" && found="YES" + done + [ "${found}" ] || exerr "Node ${node} not found" +fi + +[ "${node}" ] && node="-n ${node}" + +while ! [ "${bdaddresses}" ]; do + retry=X${retry} + printf "Scanning for new Bluetooth devices (Attempt %d of 5) ... " ${#retry} + bdaddresses=$( /usr/sbin/hccontrol -N ${node} inquiry 2>/dev/null | \ + /usr/bin/grep -o "BD_ADDR: .*" | /usr/bin/cut -d ' ' -f 2 ) + + # Count entries and, if a device was requested on command line, + # try to find it + unset found count + for bdaddress in ${bdaddresses}; do + count=X${count} + if [ "${bdaddress}" = "${device}" ]; then + found=YES + bdaddresses="${device}" + count=X + break + fi + done + + # If device was requested on command line but is not found, + # or no devices found at all, rescan until retry is exhausted + if ! [ "${found}" -o "${count}" -a -z "${device}" ]; then + printf "failed.\n" + if [ "${#retry}" -eq 5 ]; then + [ "${device}" ] && exerr "Device ${device} not found" + exerr "No new Bluetooth devices found" + fi + unset bdaddresses + sleep 2 + continue + fi + + [ ${#count} -gt 1 ] && plural=s || plural='' + printf "done.\nFound %d new bluetooth device%s (scanning for names):\n" ${#count} ${plural} + + # Looping again for the faster feedback + unset count + for bdaddress in ${bdaddresses}; do + count=X${count} + bdname=$( /usr/bin/bthost -b "${bdaddress}" 2>/dev/null ) + friendlyname=$( /usr/sbin/hccontrol Remote_Name_Request ${bdaddress} 2> /dev/null | \ + /usr/bin/grep -o "Name: .*" | /usr/bin/cut -d ' ' -f 2- ) + + # sdpcontrol should be able to pull vendor and product id via sdp + printf "[%2d] %s\t\"%s\" (%s)\n" ${#count} "${bdaddress}" "${friendlyname}" "${bdname}" + + eval bdaddress_${#count}=\${bdaddress} + eval bdname_${#count}=\${bdname} + eval friendlyname_${#count}=\${friendlyname} + done + + # If a device was pre-selected, do not query the user + [ "${device}" ] && topair=1 || unset topair + + # Even if only one device was found, user may chose 0 to rescan + while ! [ "${topair}" ]; do + if [ ${#count} -eq 1 ]; then + read -p "Select device to pair with [1, or 0 to rescan]: " topair + else + read -p "Select device to pair with [1-${#count}, or 0 to rescan]: " topair + fi + if ! [ "${topair}" -ge 0 -a "${topair}" -le "${#count}" ] 2>/dev/null ; then + printf "Value out of range: %s.\n" {topair} + unset topair + fi + done + + [ "${topair}" -eq "0" ] && unset bdaddresses retry +done + +eval bdaddress=\${bdaddress_${topair}} +eval bdname=\${bdname_${topair}} +eval friendlyname=\${friendlyname_${topair}} + +# Do we need to add an entry to /etc/bluetooth/hosts? +if ! [ "${bdname}" ]; then + printf "\nAdding device ${bdaddress} to /etc/bluetooth/hosts.\n" + + while ! [ "${bdname}" ]; do + read -p "Enter friendly name. [${friendlyname}]: " REPLY + : ${REPLY:="${friendlyname}"} + + if [ "${REPLY}" ]; then + # Remove white space and non-friendly characters + bdname=$( printf "%s" "${REPLY}" | tr -c '[:alnum:]-,.' _ ) + [ "${REPLY}" != "${bdname}" ] && printf "Notice: Using sanitized name \"%s\" in /etc/bluetooth/hosts.\n" "${bdname}" + fi + done + + printf "%s\t%s\n" "${bdaddress}" "${bdname}" >> /etc/bluetooth/hosts +fi + +# If scanning for the name did not succeed, resort to bdname +: ${friendlyname:="${bdname}"} + +# now over to hcsecd + +# Since hcsecd does not allow querying for known devices, we need to +# check for bdaddr entries manually. +# +# Also we cannot really modify the PIN in an existing entry. So we +# need to prompt the user to manually do it and restart this script +if ! /usr/sbin/service hcsecd enabled; then + printf "\nWarning: hcsecd is not enabled.\nThis daemon manages pairing requests.\n" + read -p "Enable hcsecd? [yes]: " REPLY + case "${REPLY}" in no|n|NO|N|No|nO) ;; *) /usr/sbin/sysrc hcsecd_enable="YES";; esac +fi +secd_config=$( /usr/sbin/sysrc -n hcsecd_config ) +secd_entries=$( /usr/bin/grep -Eo "bdaddr[[:space:]]+(${bdaddress}|${bdname})" ${secd_config} | awk '{ print $2; }' ) + +if [ "${secd_entries}" ]; then + printf "\nWarning: An entry for device %s is already present in %s.\n" ${secd_entries} ${secd_config} + printf "To modify pairing information, edit this file and run\n service hcsecd restart\n" + read -p "Continue? [yes]: " REPLY + case "${REPLY}" in no|n|NO|N|No|nO) exit;; esac +else + printf "\nWriting pairing information description block to %s.\n" ${secd_config} + printf "(To get PIN, put device in pairing mode first.)\n" + read -p "Enter PIN [nopin]: " pin + [ "${pin}" ] && pin=\""${pin}"\" || pin="nopin" + + # Write out new hcsecd config block + printf "\ndevice {\n\tbdaddr\t%s;\n\tname\t\"%s\";\n\tkey\tnokey\;\n\tpin\t%s\;\n}\n" \ + "${bdaddress}" "${friendlyname}" "${pin}" >> ${secd_config} + + # ... and make daemon reload config, TODO: hcsecd should provide a reload hook + /usr/sbin/service hcsecd restart + + # TODO: we should check if hcsecd succeeded pairing and revert to an old version + # of hcsecd.conf so we can undo adding the block above and retry with a new PIN + # also, if there's a way to force devices to re-pair, try this +fi + +# now check for specific services to be provided by the device +# first up: HID + +if /usr/sbin/sdpcontrol -a "${bdaddress}" search HID | \ + /usr/bin/grep -q "^Record Handle: "; then + + printf "\nThis device provides human interface device services.\n" + read -p "Set it up? [yes]: " REPLY + case "${REPLY}" in no|n|NO|N|No|nO) ;; + *) + if ! /usr/sbin/service bthidd enabled; then + printf "\nWarning: bthidd is not enabled." + printf "\nThis daemon manages Bluetooth HID devices.\n" + read -p "Enable bthidd? [yes]: " REPLY + case "${REPLY}" in no|n|NO|N|No|nO) ;; *) /usr/sbin/sysrc bthidd_enable="YES";; esac + fi + + # Check if bthidd already knows about this device + bthidd_known=$( /usr/sbin/bthidcontrol -a "${bdaddress}" known | \ + /usr/bin/grep "${bdaddress}" ) + if [ "${bthidd_known}" ]; then + printf "Notice: Device %s already known to bthidd.\n" "${bdaddress}" + else + bthidd_config=$( /usr/sbin/sysrc -n bthidd_config ) + printf "Writing HID descriptor block to %s ... " "${bthidd_config}" + /usr/sbin/bthidcontrol -a "${bdaddress}" query >> "${bthidd_config}" + + # Re-read config to see if we succeeded adding the device + bthidd_known=$( /usr/sbin/bthidcontrol -a "${bdaddress}" known | \ + grep "${bdaddress}" ) + if ! [ "${bthidd_known}" ]; then + printf "failed.\n" + else + printf "success.\nTo re-read its config, bthidd must be restarted.\n" + printf "Warning: If a Bluetooth keyboard is being used, the connection might be lost.\n" + printf "It can be manually restarted later with\n service bthidd restart\n" + read -p "Restart bthidd now? [yes]: " REPLY + case "${REPLY}" in no|n|NO|N|No|nO) ;; *) /usr/sbin/service bthidd restart;; esac + fi + fi + ;; + esac +fi + +} + +# After function definitions, main() can use them +main "$@" + +exit + +# TODO +# * If device is a keyboard, offer a text entry test field and if it does +# not succeed, leave some clues for debugging (i.e. if the node responds +# to pings, maybe switch keyboard on/off, etc) +# * Same if device is a mouse, i.e. hexdump /dev/sysmouse. +# * If device offers DUN profiles, ask the user if an entry in +# /etc/ppp/ppp.conf should be created +# * If OPUSH or SPP is offered, refer to the respective man pages to give +# some clues how to continue From owner-svn-src-head@freebsd.org Fri Jan 11 15:59:25 2019 Return-Path: Delivered-To: svn-src-head@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 C727A1494660; Fri, 11 Jan 2019 15:59:25 +0000 (UTC) (envelope-from ram@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 67FA7719A5; Fri, 11 Jan 2019 15:59:25 +0000 (UTC) (envelope-from ram@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 596751DE66; Fri, 11 Jan 2019 15:59:25 +0000 (UTC) (envelope-from ram@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0BFxPpg049924; Fri, 11 Jan 2019 15:59:25 GMT (envelope-from ram@FreeBSD.org) Received: (from ram@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0BFxOK8049922; Fri, 11 Jan 2019 15:59:24 GMT (envelope-from ram@FreeBSD.org) Message-Id: <201901111559.x0BFxOK8049922@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ram set sender to ram@FreeBSD.org using -f From: Ram Kishore Vegesna Date: Fri, 11 Jan 2019 15:59:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342946 - head/sys/dev/ocs_fc X-SVN-Group: head X-SVN-Commit-Author: ram X-SVN-Commit-Paths: head/sys/dev/ocs_fc X-SVN-Commit-Revision: 342946 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 67FA7719A5 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_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2019 15:59:26 -0000 Author: ram Date: Fri Jan 11 15:59:24 2019 New Revision: 342946 URL: https://svnweb.freebsd.org/changeset/base/342946 Log: Remove accessing remote node and domain objects while processing cam actions. Issue: ocs_fc(4) driver panics. It's induced by setting the port_state sysctl to offline, then online, then offline, then online, and so forth and so on in rapid succession. Reason: While we set the port_state to online fc discovery will start and OS is enumerating the target discs by calling ocs_action(), then set the port state to "offline" which deletes domain/sport/nodes. In ocs_action()->XPT_GET_TRAN_SETTINGS we are accessing the remote node which can be invalid to get the wwpn, wwnn and port. Fix: Removed accessing of remote node and domain in some ocs_action() cases. Populated the required values from ocs_fcport. This removes the dependency of node and domain structures while processing XPT_PATH_INQ and XPT_GET_TRAN_SETTINGS. We will invalidate the target entries after the device lost timeout(30 seconds). Approved by: ken, mav MFC after: 3 weeks Modified: head/sys/dev/ocs_fc/ocs.h head/sys/dev/ocs_fc/ocs_cam.c Modified: head/sys/dev/ocs_fc/ocs.h ============================================================================== --- head/sys/dev/ocs_fc/ocs.h Fri Jan 11 15:52:09 2019 (r342945) +++ head/sys/dev/ocs_fc/ocs.h Fri Jan 11 15:59:24 2019 (r342946) @@ -84,6 +84,7 @@ typedef struct ocs_fcport_s { struct cam_sim *sim; struct cam_path *path; uint32_t role; + uint32_t fc_id; ocs_fc_target_t tgt[OCS_MAX_TARGETS]; int lost_device_time; Modified: head/sys/dev/ocs_fc/ocs_cam.c ============================================================================== --- head/sys/dev/ocs_fc/ocs_cam.c Fri Jan 11 15:52:09 2019 (r342945) +++ head/sys/dev/ocs_fc/ocs_cam.c Fri Jan 11 15:59:24 2019 (r342946) @@ -886,9 +886,11 @@ int32_t ocs_scsi_ini_new_sport(ocs_sport_t *sport) { ocs_t *ocs = sport->ocs; + ocs_fcport *fcp = FCPORT(ocs, 0); - if(!sport->is_vport) { - sport->tgt_data = FCPORT(ocs, 0); + if (!sport->is_vport) { + sport->tgt_data = fcp; + fcp->fc_id = sport->fc_id; } return 0; @@ -911,6 +913,12 @@ ocs_scsi_ini_new_sport(ocs_sport_t *sport) void ocs_scsi_ini_del_sport(ocs_sport_t *sport) { + ocs_t *ocs = sport->ocs; + ocs_fcport *fcp = FCPORT(ocs, 0); + + if (!sport->is_vport) { + fcp->fc_id = 0; + } } void @@ -1984,6 +1992,7 @@ ocs_action(struct cam_sim *sim, union ccb *ccb) { struct ccb_pathinq *cpi = &ccb->cpi; struct ccb_pathinq_settings_fc *fc = &cpi->xport_specific.fc; + ocs_fcport *fcp = FCPORT(ocs, bus); uint64_t wwn = 0; ocs_xport_stats_t value; @@ -2011,9 +2020,7 @@ ocs_action(struct cam_sim *sim, union ccb *ccb) wwn = *((uint64_t *)ocs_scsi_get_property_ptr(ocs, OCS_SCSI_WWNN)); fc->wwnn = be64toh(wwn); - if (ocs->domain && ocs->domain->attached) { - fc->port = ocs->domain->sport->fc_id; - } + fc->port = fcp->fc_id; if (ocs->config_tgt) { cpi->target_sprt = @@ -2059,7 +2066,7 @@ ocs_action(struct cam_sim *sim, union ccb *ccb) struct ccb_trans_settings_fc *fc = &cts->xport_specific.fc; ocs_xport_stats_t value; ocs_fcport *fcp = FCPORT(ocs, bus); - ocs_node_t *fnode = NULL; + ocs_fc_target_t *tgt = NULL; if (ocs->ocs_xport != OCS_XPORT_FC) { ocs_set_ccb_status(ccb, CAM_REQ_INVALID); @@ -2067,13 +2074,19 @@ ocs_action(struct cam_sim *sim, union ccb *ccb) break; } - fnode = ocs_node_get_instance(ocs, fcp->tgt[cts->ccb_h.target_id].node_id); - if (fnode == NULL) { + if (cts->ccb_h.target_id > OCS_MAX_TARGETS) { ocs_set_ccb_status(ccb, CAM_DEV_NOT_THERE); xpt_done(ccb); break; } + tgt = &fcp->tgt[cts->ccb_h.target_id]; + if (tgt->state == OCS_TGT_STATE_NONE) { + ocs_set_ccb_status(ccb, CAM_DEV_NOT_THERE); + xpt_done(ccb); + break; + } + cts->protocol = PROTO_SCSI; cts->protocol_version = SCSI_REV_SPC2; cts->transport = XPORT_FC; @@ -2086,11 +2099,11 @@ ocs_action(struct cam_sim *sim, union ccb *ccb) ocs_xport_status(ocs->xport, OCS_XPORT_LINK_SPEED, &value); fc->bitrate = value.value * 100; - fc->wwpn = ocs_node_get_wwpn(fnode); + fc->wwpn = tgt->wwpn; - fc->wwnn = ocs_node_get_wwnn(fnode); + fc->wwnn = tgt->wwnn; - fc->port = fnode->rnode.fc_id; + fc->port = tgt->port_id; fc->valid = CTS_FC_VALID_SPEED | CTS_FC_VALID_WWPN | From owner-svn-src-head@freebsd.org Fri Jan 11 16:04:38 2019 Return-Path: Delivered-To: svn-src-head@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 567DA149490C; Fri, 11 Jan 2019 16:04:38 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C99D71F09; Fri, 11 Jan 2019 16:04:36 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x0BG4X3r021905; Fri, 11 Jan 2019 08:04:33 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id x0BG4XoU021904; Fri, 11 Jan 2019 08:04:33 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201901111604.x0BG4XoU021904@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r342945 - in head: tools/build/mk usr.sbin/bluetooth usr.sbin/bluetooth/bluetooth-config In-Reply-To: <201901111552.x0BFqAxa049564@repo.freebsd.org> To: Lars Engels Date: Fri, 11 Jan 2019 08:04:33 -0800 (PST) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 6C99D71F09 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.93 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.93)[-0.927,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2019 16:04:38 -0000 > Author: lme (ports committer) > Date: Fri Jan 11 15:52:09 2019 > New Revision: 342945 > URL: https://svnweb.freebsd.org/changeset/base/342945 > > Log: > Add `bluetooth-config` script to simplify setting up bluetooth connections to > devices like mice, keyboards, bt-audio, ... > > This script currently allows scanning for nearby devices, adds one to > /etc/bluetooth/hosts, adds an entry to hcsecd's conf and if it is a HID, add an > entry to bthidd's configs, as well. > > Submitted by: erdgeist > Approved by: bapt > MFC after: 2 weeks > Differential Revision: D3778 > Reviewers: bapt, emax > > Added: > head/usr.sbin/bluetooth/bluetooth-config/ > head/usr.sbin/bluetooth/bluetooth-config/Makefile (contents, props changed) > head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.8 (contents, props changed) > head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.sh (contents, props changed) > Modified: > head/tools/build/mk/OptionalObsoleteFiles.inc > head/usr.sbin/bluetooth/Makefile > > Modified: head/tools/build/mk/OptionalObsoleteFiles.inc > ============================================================================== > --- head/tools/build/mk/OptionalObsoleteFiles.inc Fri Jan 11 14:21:59 2019 (r342944) > +++ head/tools/build/mk/OptionalObsoleteFiles.inc Fri Jan 11 15:52:09 2019 (r342945) > @@ -504,6 +504,7 @@ OLD_FILES+=usr/lib32/libsdp_p.a > .endif > OLD_FILES+=usr/sbin/ath3kfw > OLD_FILES+=usr/sbin/bcmfw > +OLD_FILES+=usr/sbin/bluetooth-config I am confused, or miss understand something. This commit adds these files, but declares them as Obsolete? > OLD_FILES+=usr/sbin/bt3cfw > OLD_FILES+=usr/sbin/bthidcontrol > OLD_FILES+=usr/sbin/bthidd > @@ -580,6 +581,7 @@ OLD_FILES+=usr/share/man/man5/bluetooth.protocols.5.gz > OLD_FILES+=usr/share/man/man5/hcsecd.conf.5.gz > OLD_FILES+=usr/share/man/man8/ath3kfw.8.gz > OLD_FILES+=usr/share/man/man8/bcmfw.8.gz > +OLD_FILES+=usr/share/man/man8/bluetooth-config.8.gz > OLD_FILES+=usr/share/man/man8/bt3cfw.8.gz > OLD_FILES+=usr/share/man/man8/bthidcontrol.8.gz > OLD_FILES+=usr/share/man/man8/bthidd.8.gz > > Modified: head/usr.sbin/bluetooth/Makefile > ============================================================================== > --- head/usr.sbin/bluetooth/Makefile Fri Jan 11 14:21:59 2019 (r342944) > +++ head/usr.sbin/bluetooth/Makefile Fri Jan 11 15:52:09 2019 (r342945) > @@ -4,6 +4,7 @@ > .include > > SUBDIR= \ > + bluetooth-config \ > bt3cfw \ > btpand \ > hccontrol \ > > Added: head/usr.sbin/bluetooth/bluetooth-config/Makefile > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.sbin/bluetooth/bluetooth-config/Makefile Fri Jan 11 15:52:09 2019 (r342945) > @@ -0,0 +1,6 @@ > +# $FreeBSD$ > + > +SCRIPTS=bluetooth-config.sh > +MAN= bluetooth-config.8 > + > +.include > > Added: head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.8 > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.8 Fri Jan 11 15:52:09 2019 (r342945) > @@ -0,0 +1,222 @@ > +.\" Copyright (c) 2019 Dirk Engling > +.\" All rights reserved. > +.\" > +.\" Redistribution and use in source and binary forms, with or without > +.\" modification, are permitted provided that the following conditions > +.\" are met: > +.\" 1. Redistributions of source code must retain the above copyright > +.\" notice, this list of conditions and the following disclaimer. > +.\" 2. Redistributions in binary form must reproduce the above copyright > +.\" notice, this list of conditions and the following disclaimer in the > +.\" documentation and/or other materials provided with the distribution. > +.\" > +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > +.\" SUCH DAMAGE. > +.\" > +.\" $FreeBSD$ > +.\" > +.Dd January 7, 2019 > +.Dt BLUETOOTH-CONFIG 8 > +.Os > +.Sh NAME > +.Nm bluetooth-config > +.Nd a script to manage config files for the bluetooth sub system > +.Sh SYNOPSIS > +.Nm > +.Ar scan > +.Op Fl d Ar device > +.Op Fl n Ar node > +.Sh DESCRIPTION > +The > +.Nm > +utility is an interactive script to provide a frontend to the complex bluetooth sub system daemons. > +.Pp > +The following options are available: > +.Bl -tag -width indent+ > +.It Fl d > +Scan for a specific bluetooth device address. > +.It Fl n > +Limit scan to a specific host controller. Hint: List all netgraph nodes with > +.Ql /usr/sbin/ngctl list . > +.El > +.Pp > +.Nm > +will help finding and setting up bluetooth controllers, scan for nearby bluetooth devices in > +pairing mode, lookup their names, allow mapping to friendly names in > +.Pa /etc/bluetooth/hosts , > +ask for the paring PIN, instrument > +.Xr hcsecd 8 > +to securely pair with new devices and, if the device offers HID endpoints such as mice or > +keyboards, configure and restart > +.Xr bthidd 8 . > +.Pp > +.Nm > +can bring up any interface and daemon necessary for operation and, if a node is provided on > +command line, will do so automatically for that interface. > +.Sh CAVEATS > +.Nm > +can not parse entries in > +.Xr hcsecd 8 > +config file and thus will ask the user to manually modify existing pairing PIN entries. > +.Sh FILES > +.Bl -tag -width ".Pa /etc/bluetooth/hosts" -compact > +.It Pa /etc/bluetooth/hosts > +.It Pa sysrc -n bthidd_config > +.It Pa sysrc -n hcsecd_config > +.El > +.Sh EXAMPLES > +.Nm > +scan -n ubt0 -a 00:26:bb:7a:58:95 > +.Bd -ragged -offset indent > +This will scan the bluetooth controller ubt0hci for a bluetooth device with the address > +00:26:bb:7a:58:95, set up ubt0 if necessary and enter an interactive dialog to pair the > +new device. Since in this example a mouse is paired, > +.Nm > +will interact with > +.Xr bthidd 8 , > +enabling it if necessary and then write an HID descriptor to its config. > +.Ed > +.Pp > +.Nm > +scan > +.Bd -ragged -offset indent > +This will scan all bluetooth controllers on the systems for bluetooth devices, prompting > +to bring up controllers or daemons along the way. > +.Ed > +.Sh SEE ALSO > +.Xr bthidcontrol 8 , > +.Xr bthidd 8 , > +.Xr bthost 1 , > +.Xr hccontrol 8 , > +.Xr hcsecd 8 , > +.Xr sdpcontrol 8 , > +.Xr sysrc 8 > +.Sh HISTORY > +A > +.Nm > +utility first appeared in > +.Fx 12.1 . > +.Sh AUTHORS > +.An Dirk Engling Aq Mt erdgeist@erdgeist.org > +.Sh THANKS TO > +Lars Engels and Warren Block for suggestions, help, and testing. The contents of this file appear twice???? > +.\" Copyright (c) 2019 Dirk Engling > +.\" All rights reserved. > +.\" > +.\" Redistribution and use in source and binary forms, with or without > +.\" modification, are permitted provided that the following conditions > +.\" are met: > +.\" 1. Redistributions of source code must retain the above copyright > +.\" notice, this list of conditions and the following disclaimer. > +.\" 2. Redistributions in binary form must reproduce the above copyright > +.\" notice, this list of conditions and the following disclaimer in the > +.\" documentation and/or other materials provided with the distribution. > +.\" > +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > +.\" SUCH DAMAGE. > +.\" > +.\" $FreeBSD$ > +.\" > +.Dd January 7, 2019 > +.Dt BLUETOOTH-CONFIG 8 > +.Os > +.Sh NAME > +.Nm bluetooth-config > +.Nd a script to manage config files for the bluetooth sub system > +.Sh SYNOPSIS > +.Nm > +.Ar scan > +.Op Fl d Ar device > +.Op Fl n Ar node > +.Sh DESCRIPTION > +The > +.Nm > +utility is an interactive script to provide a frontend to the complex bluetooth sub system daemons. > +.Pp > +The following options are available: > +.Bl -tag -width indent+ > +.It Fl d > +Scan for a specific bluetooth device address. > +.It Fl n > +Limit scan to a specific host controller. Hint: List all netgraph nodes with > +.Ql /usr/sbin/ngctl list . > +.El > +.Pp > +.Nm > +will help finding and setting up bluetooth controllers, scan for nearby bluetooth devices in > +pairing mode, lookup their names, allow mapping to friendly names in > +.Pa /etc/bluetooth/hosts , > +ask for the paring PIN, instrument > +.Xr hcsecd 8 > +to securely pair with new devices and, if the device offers HID endpoints such as mice or > +keyboards, configure and restart > +.Xr bthidd 8 . > +.Pp > +.Nm > +can bring up any interface and daemon necessary for operation and, if a node is provided on > +command line, will do so automatically for that interface. > +.Sh CAVEATS > +.Nm > +can not parse entries in > +.Xr hcsecd 8 > +config file and thus will ask the user to manually modify existing pairing PIN entries. > +.Sh FILES > +.Bl -tag -width ".Pa /etc/bluetooth/hosts" -compact > +.It Pa /etc/bluetooth/hosts > +.It Pa sysrc -n bthidd_config > +.It Pa sysrc -n hcsecd_config > +.El > +.Sh EXAMPLES > +.Nm > +scan -n ubt0 -a 00:26:bb:7a:58:95 > +.Bd -ragged -offset indent > +This will scan the bluetooth controller ubt0hci for a bluetooth device with the address > +00:26:bb:7a:58:95, set up ubt0 if necessary and enter an interactive dialog to pair the > +new device. Since in this example a mouse is paired, > +.Nm > +will interact with > +.Xr bthidd 8 , > +enabling it if necessary and then write an HID descriptor to its config. > +.Ed > +.Pp > +.Nm > +scan > +.Bd -ragged -offset indent > +This will scan all bluetooth controllers on the systems for bluetooth devices, prompting > +to bring up controllers or daemons along the way. > +.Ed > +.Sh SEE ALSO > +.Xr bthidcontrol 8 , > +.Xr bthidd 8 , > +.Xr bthost 1 , > +.Xr hccontrol 8 , > +.Xr hcsecd 8 , > +.Xr sdpcontrol 8 , > +.Xr sysrc 8 > +.Sh HISTORY > +A > +.Nm > +utility first appeared in > +.Fx 12.1 . > +.Sh AUTHORS > +.An Dirk Engling Aq Mt erdgeist@erdgeist.org > +.Sh THANKS TO > +Lars Engels and Warren Block for suggestions, help, and testing. > > Added: head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.sh > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.sh Fri Jan 11 15:52:09 2019 (r342945) > @@ -0,0 +1,275 @@ > +#!/bin/sh > +#- > +# Copyleft 2019 Dirk Engling That implies the GPL, would you be willing to change it to what it appears your actually asserting, a Copyright, please. > +# > +# This script is released under the beerware license. Incomplete and none deterministic license reference, this needs to be corrected in some way, preferable with the text of the beerware license so there is no doubt as to what applies. Thanks, Rod > +# > +# $FreeBSD$ > +# > + > +# define our bail out shortcut > +exerr () { echo -e "Error: $*" >&2 ; exit 1; } > +print_syntax () { echo -e "Syntax: $0 scan [-d device] [-n node]"; exit 1; } > + > +# Assuming we are called to do the pair-new-device subcommand first > + > +main() { > +unset node device started bdaddresses retry > + > +# Only one command at the moment is scan (+ add) > +[ "$#" -eq 1 -a "$1" = "scan" ] || print_syntax > +shift > + > +# Get command line options > +while getopts :d:n: arg; do > + case ${arg} in > + d) device="$OPTARG";; > + n) node="$OPTARG";; > + ?) print_syntax;; > + esac > +done > + > +# No use running without super user rights > +[ $( id -u ) -eq 0 ] || exerr "$0 must modify files that belong to root. Re-run as root." > + > +known_nodes=$(/usr/sbin/hccontrol read_node_list 2>/dev/null | \ > + /usr/bin/tail -n +2 | /usr/bin/cut -d ' ' -f 1) > + > +# Check if netgraph knows about any HCI nodes > +if ! [ "${known_nodes}" ]; then > + ng_nodes=$(/usr/sbin/ngctl list 2>/dev/null | \ > + /usr/bin/grep -o "Name: .* Type: ubt" | /usr/bin/cut -d ' ' -f 2) > + > + [ "${ng_nodes}" ] || exerr "No Bluetooth host controllers found." > + > + unset found > + for n in ${ng_nodes}; do > + if [ "${n}" = "${node%hci}" ]; then > + # If we found the node but its stack is not set up, do it now > + /usr/sbin/service bluetooth start ${node%hci} || exit 1 > + found="YES" > + fi > + done > + > + # If we have Bluetooth controller nodes without a set up stack, > + # ask the user if we shall start it up > + if ! [ "${found}" ]; then > + printf "No usable Bluetooth host controllers were found.\n" > + printf "These host controllers exist in the system:\n %s" " ${ng_nodes}" > + read -p "Choose a host controller to set up: [${ng_nodes%% *}]" node > + : ${node:="${ng_nodes%% *}"} > + /usr/sbin/service bluetooth start ${node} || exit 1 > + fi > + > + # Re-read known nodes > + known_nodes=$(/usr/sbin/hccontrol read_node_list 2>/dev/null | \ > + /usr/bin/tail -n +2 | /usr/bin/cut -d ' ' -f 1) > + # check if we succeeded in bringing it up > + [ "${known_nodes}" ] || exerr "Failed to set up Bluetooth stack" > +fi > + > +# if a node was requested on command line, check if it is there > +if [ "${node}" ]; then > + unset found > + for n in ${known_nodes}; do > + [ "${n}" = "${node}" ] && found="YES" > + [ "${n}" = "${node}hci" ] && node="${node}hci" && found="YES" > + done > + [ "${found}" ] || exerr "Node ${node} not found" > +fi > + > +[ "${node}" ] && node="-n ${node}" > + > +while ! [ "${bdaddresses}" ]; do > + retry=X${retry} > + printf "Scanning for new Bluetooth devices (Attempt %d of 5) ... " ${#retry} > + bdaddresses=$( /usr/sbin/hccontrol -N ${node} inquiry 2>/dev/null | \ > + /usr/bin/grep -o "BD_ADDR: .*" | /usr/bin/cut -d ' ' -f 2 ) > + > + # Count entries and, if a device was requested on command line, > + # try to find it > + unset found count > + for bdaddress in ${bdaddresses}; do > + count=X${count} > + if [ "${bdaddress}" = "${device}" ]; then > + found=YES > + bdaddresses="${device}" > + count=X > + break > + fi > + done > + > + # If device was requested on command line but is not found, > + # or no devices found at all, rescan until retry is exhausted > + if ! [ "${found}" -o "${count}" -a -z "${device}" ]; then > + printf "failed.\n" > + if [ "${#retry}" -eq 5 ]; then > + [ "${device}" ] && exerr "Device ${device} not found" > + exerr "No new Bluetooth devices found" > + fi > + unset bdaddresses > + sleep 2 > + continue > + fi > + > + [ ${#count} -gt 1 ] && plural=s || plural='' > + printf "done.\nFound %d new bluetooth device%s (scanning for names):\n" ${#count} ${plural} > + > + # Looping again for the faster feedback > + unset count > + for bdaddress in ${bdaddresses}; do > + count=X${count} > + bdname=$( /usr/bin/bthost -b "${bdaddress}" 2>/dev/null ) > + friendlyname=$( /usr/sbin/hccontrol Remote_Name_Request ${bdaddress} 2> /dev/null | \ > + /usr/bin/grep -o "Name: .*" | /usr/bin/cut -d ' ' -f 2- ) > + > + # sdpcontrol should be able to pull vendor and product id via sdp > + printf "[%2d] %s\t\"%s\" (%s)\n" ${#count} "${bdaddress}" "${friendlyname}" "${bdname}" > + > + eval bdaddress_${#count}=\${bdaddress} > + eval bdname_${#count}=\${bdname} > + eval friendlyname_${#count}=\${friendlyname} > + done > + > + # If a device was pre-selected, do not query the user > + [ "${device}" ] && topair=1 || unset topair > + > + # Even if only one device was found, user may chose 0 to rescan > + while ! [ "${topair}" ]; do > + if [ ${#count} -eq 1 ]; then > + read -p "Select device to pair with [1, or 0 to rescan]: " topair > + else > + read -p "Select device to pair with [1-${#count}, or 0 to rescan]: " topair > + fi > + if ! [ "${topair}" -ge 0 -a "${topair}" -le "${#count}" ] 2>/dev/null ; then > + printf "Value out of range: %s.\n" {topair} > + unset topair > + fi > + done > + > + [ "${topair}" -eq "0" ] && unset bdaddresses retry > +done > + > +eval bdaddress=\${bdaddress_${topair}} > +eval bdname=\${bdname_${topair}} > +eval friendlyname=\${friendlyname_${topair}} > + > +# Do we need to add an entry to /etc/bluetooth/hosts? > +if ! [ "${bdname}" ]; then > + printf "\nAdding device ${bdaddress} to /etc/bluetooth/hosts.\n" > + > + while ! [ "${bdname}" ]; do > + read -p "Enter friendly name. [${friendlyname}]: " REPLY > + : ${REPLY:="${friendlyname}"} > + > + if [ "${REPLY}" ]; then > + # Remove white space and non-friendly characters > + bdname=$( printf "%s" "${REPLY}" | tr -c '[:alnum:]-,.' _ ) > + [ "${REPLY}" != "${bdname}" ] && printf "Notice: Using sanitized name \"%s\" in /etc/bluetooth/hosts.\n" "${bdname}" > + fi > + done > + > + printf "%s\t%s\n" "${bdaddress}" "${bdname}" >> /etc/bluetooth/hosts > +fi > + > +# If scanning for the name did not succeed, resort to bdname > +: ${friendlyname:="${bdname}"} > + > +# now over to hcsecd > + > +# Since hcsecd does not allow querying for known devices, we need to > +# check for bdaddr entries manually. > +# > +# Also we cannot really modify the PIN in an existing entry. So we > +# need to prompt the user to manually do it and restart this script > +if ! /usr/sbin/service hcsecd enabled; then > + printf "\nWarning: hcsecd is not enabled.\nThis daemon manages pairing requests.\n" > + read -p "Enable hcsecd? [yes]: " REPLY > + case "${REPLY}" in no|n|NO|N|No|nO) ;; *) /usr/sbin/sysrc hcsecd_enable="YES";; esac > +fi > +secd_config=$( /usr/sbin/sysrc -n hcsecd_config ) > +secd_entries=$( /usr/bin/grep -Eo "bdaddr[[:space:]]+(${bdaddress}|${bdname})" ${secd_config} | awk '{ print $2; }' ) > + > +if [ "${secd_entries}" ]; then > + printf "\nWarning: An entry for device %s is already present in %s.\n" ${secd_entries} ${secd_config} > + printf "To modify pairing information, edit this file and run\n service hcsecd restart\n" > + read -p "Continue? [yes]: " REPLY > + case "${REPLY}" in no|n|NO|N|No|nO) exit;; esac > +else > + printf "\nWriting pairing information description block to %s.\n" ${secd_config} > + printf "(To get PIN, put device in pairing mode first.)\n" > + read -p "Enter PIN [nopin]: " pin > + [ "${pin}" ] && pin=\""${pin}"\" || pin="nopin" > + > + # Write out new hcsecd config block > + printf "\ndevice {\n\tbdaddr\t%s;\n\tname\t\"%s\";\n\tkey\tnokey\;\n\tpin\t%s\;\n}\n" \ > + "${bdaddress}" "${friendlyname}" "${pin}" >> ${secd_config} > + > + # ... and make daemon reload config, TODO: hcsecd should provide a reload hook > + /usr/sbin/service hcsecd restart > + > + # TODO: we should check if hcsecd succeeded pairing and revert to an old version > + # of hcsecd.conf so we can undo adding the block above and retry with a new PIN > + # also, if there's a way to force devices to re-pair, try this > +fi > + > +# now check for specific services to be provided by the device > +# first up: HID > + > +if /usr/sbin/sdpcontrol -a "${bdaddress}" search HID | \ > + /usr/bin/grep -q "^Record Handle: "; then > + > + printf "\nThis device provides human interface device services.\n" > + read -p "Set it up? [yes]: " REPLY > + case "${REPLY}" in no|n|NO|N|No|nO) ;; > + *) > + if ! /usr/sbin/service bthidd enabled; then > + printf "\nWarning: bthidd is not enabled." > + printf "\nThis daemon manages Bluetooth HID devices.\n" > + read -p "Enable bthidd? [yes]: " REPLY > + case "${REPLY}" in no|n|NO|N|No|nO) ;; *) /usr/sbin/sysrc bthidd_enable="YES";; esac > + fi > + > + # Check if bthidd already knows about this device > + bthidd_known=$( /usr/sbin/bthidcontrol -a "${bdaddress}" known | \ > + /usr/bin/grep "${bdaddress}" ) > + if [ "${bthidd_known}" ]; then > + printf "Notice: Device %s already known to bthidd.\n" "${bdaddress}" > + else > + bthidd_config=$( /usr/sbin/sysrc -n bthidd_config ) > + printf "Writing HID descriptor block to %s ... " "${bthidd_config}" > + /usr/sbin/bthidcontrol -a "${bdaddress}" query >> "${bthidd_config}" > + > + # Re-read config to see if we succeeded adding the device > + bthidd_known=$( /usr/sbin/bthidcontrol -a "${bdaddress}" known | \ > + grep "${bdaddress}" ) > + if ! [ "${bthidd_known}" ]; then > + printf "failed.\n" > + else > + printf "success.\nTo re-read its config, bthidd must be restarted.\n" > + printf "Warning: If a Bluetooth keyboard is being used, the connection might be lost.\n" > + printf "It can be manually restarted later with\n service bthidd restart\n" > + read -p "Restart bthidd now? [yes]: " REPLY > + case "${REPLY}" in no|n|NO|N|No|nO) ;; *) /usr/sbin/service bthidd restart;; esac > + fi > + fi > + ;; > + esac > +fi > + > +} > + > +# After function definitions, main() can use them > +main "$@" > + > +exit > + > +# TODO > +# * If device is a keyboard, offer a text entry test field and if it does > +# not succeed, leave some clues for debugging (i.e. if the node responds > +# to pings, maybe switch keyboard on/off, etc) > +# * Same if device is a mouse, i.e. hexdump /dev/sysmouse. > +# * If device offers DUN profiles, ask the user if an entry in > +# /etc/ppp/ppp.conf should be created > +# * If OPUSH or SPP is offered, refer to the respective man pages to give > +# some clues how to continue > > The style of this .sh does not match the normal style of such things in base, especially with respect to long lines and indentation. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Fri Jan 11 16:13:59 2019 Return-Path: Delivered-To: svn-src-head@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 9DDBA1494C54; Fri, 11 Jan 2019 16:13:59 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 324CF726D8; Fri, 11 Jan 2019 16:13:59 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id CE2BC1E2F1; Fri, 11 Jan 2019 16:13:58 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lf1-f43.google.com with SMTP id z13so11166301lfe.11; Fri, 11 Jan 2019 08:13:58 -0800 (PST) X-Gm-Message-State: AJcUukfLQ2DvUu7U0LWG5CciDenAJiTG/RApRAXn1efW7LBtpVvm/bjJ FI1fFOcWlbKQyE01j611KpUMMWbFatnj+LuKYjo= X-Google-Smtp-Source: ALg8bN5ZOBBK9rytcGaVUj6d8iVvPH5XEYH8voFfwjJ0skn6sA7M7FN0pT9yfoLuwuR5WyE/tnWTcCBBixWK3547ze4= X-Received: by 2002:a19:d619:: with SMTP id n25mr8014680lfg.91.1547223237197; Fri, 11 Jan 2019 08:13:57 -0800 (PST) MIME-Version: 1.0 References: <201901111552.x0BFqAxa049564@repo.freebsd.org> <201901111604.x0BG4XoU021904@pdx.rh.CN85.dnsmgr.net> In-Reply-To: <201901111604.x0BG4XoU021904@pdx.rh.CN85.dnsmgr.net> From: Kyle Evans Date: Fri, 11 Jan 2019 10:13:03 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r342945 - in head: tools/build/mk usr.sbin/bluetooth usr.sbin/bluetooth/bluetooth-config To: "Rodney W. Grimes" Cc: Lars Engels , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 324CF726D8 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.94 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.94)[-0.937,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2019 16:13:59 -0000 On Fri, Jan 11, 2019 at 10:04 AM Rodney W. Grimes wrote: > > > Author: lme (ports committer) > > Date: Fri Jan 11 15:52:09 2019 > > New Revision: 342945 > > URL: https://svnweb.freebsd.org/changeset/base/342945 > > > > Log: > > Add `bluetooth-config` script to simplify setting up bluetooth connections to > > devices like mice, keyboards, bt-audio, ... > > > > This script currently allows scanning for nearby devices, adds one to > > /etc/bluetooth/hosts, adds an entry to hcsecd's conf and if it is a HID, add an > > entry to bthidd's configs, as well. > > > > Submitted by: erdgeist > > Approved by: bapt > > MFC after: 2 weeks > > Differential Revision: D3778 > > Reviewers: bapt, emax > > > > Added: > > head/usr.sbin/bluetooth/bluetooth-config/ > > head/usr.sbin/bluetooth/bluetooth-config/Makefile (contents, props changed) > > head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.8 (contents, props changed) > > head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.sh (contents, props changed) > > Modified: > > head/tools/build/mk/OptionalObsoleteFiles.inc > > head/usr.sbin/bluetooth/Makefile > > > > Modified: head/tools/build/mk/OptionalObsoleteFiles.inc > > ============================================================================== > > --- head/tools/build/mk/OptionalObsoleteFiles.inc Fri Jan 11 14:21:59 2019 (r342944) > > +++ head/tools/build/mk/OptionalObsoleteFiles.inc Fri Jan 11 15:52:09 2019 (r342945) > > @@ -504,6 +504,7 @@ OLD_FILES+=usr/lib32/libsdp_p.a > > .endif > > OLD_FILES+=usr/sbin/ath3kfw > > OLD_FILES+=usr/sbin/bcmfw > > +OLD_FILES+=usr/sbin/bluetooth-config > > I am confused, or miss understand something. > This commit adds these files, but declares them as Obsolete? > This is correct; it is obsolete when Bluetooth is disabled. From owner-svn-src-head@freebsd.org Fri Jan 11 16:18:24 2019 Return-Path: Delivered-To: svn-src-head@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 C76761494DA6; Fri, 11 Jan 2019 16:18:24 +0000 (UTC) (envelope-from bapt@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 6CE20728FB; Fri, 11 Jan 2019 16:18:24 +0000 (UTC) (envelope-from bapt@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 5E5011E1B2; Fri, 11 Jan 2019 16:18:24 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0BGIOwx060831; Fri, 11 Jan 2019 16:18:24 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0BGIOw1060830; Fri, 11 Jan 2019 16:18:24 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201901111618.x0BGIOw1060830@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 11 Jan 2019 16:18:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342947 - head/usr.sbin/bluetooth/bluetooth-config X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/usr.sbin/bluetooth/bluetooth-config X-SVN-Commit-Revision: 342947 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6CE20728FB 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_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2019 16:18:25 -0000 Author: bapt Date: Fri Jan 11 16:18:23 2019 New Revision: 342947 URL: https://svnweb.freebsd.org/changeset/base/342947 Log: Fix duplication. The patch adding the manpage was probably applied twice, so it resulted in duplication of the manpage Modified: head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.8 Modified: head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.8 ============================================================================== --- head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.8 Fri Jan 11 15:59:24 2019 (r342946) +++ head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.8 Fri Jan 11 16:18:23 2019 (r342947) @@ -109,114 +109,3 @@ utility first appeared in .An Dirk Engling Aq Mt erdgeist@erdgeist.org .Sh THANKS TO Lars Engels and Warren Block for suggestions, help, and testing. -.\" Copyright (c) 2019 Dirk Engling -.\" All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -.\" SUCH DAMAGE. -.\" -.\" $FreeBSD$ -.\" -.Dd January 7, 2019 -.Dt BLUETOOTH-CONFIG 8 -.Os -.Sh NAME -.Nm bluetooth-config -.Nd a script to manage config files for the bluetooth sub system -.Sh SYNOPSIS -.Nm -.Ar scan -.Op Fl d Ar device -.Op Fl n Ar node -.Sh DESCRIPTION -The -.Nm -utility is an interactive script to provide a frontend to the complex bluetooth sub system daemons. -.Pp -The following options are available: -.Bl -tag -width indent+ -.It Fl d -Scan for a specific bluetooth device address. -.It Fl n -Limit scan to a specific host controller. Hint: List all netgraph nodes with -.Ql /usr/sbin/ngctl list . -.El -.Pp -.Nm -will help finding and setting up bluetooth controllers, scan for nearby bluetooth devices in -pairing mode, lookup their names, allow mapping to friendly names in -.Pa /etc/bluetooth/hosts , -ask for the paring PIN, instrument -.Xr hcsecd 8 -to securely pair with new devices and, if the device offers HID endpoints such as mice or -keyboards, configure and restart -.Xr bthidd 8 . -.Pp -.Nm -can bring up any interface and daemon necessary for operation and, if a node is provided on -command line, will do so automatically for that interface. -.Sh CAVEATS -.Nm -can not parse entries in -.Xr hcsecd 8 -config file and thus will ask the user to manually modify existing pairing PIN entries. -.Sh FILES -.Bl -tag -width ".Pa /etc/bluetooth/hosts" -compact -.It Pa /etc/bluetooth/hosts -.It Pa sysrc -n bthidd_config -.It Pa sysrc -n hcsecd_config -.El -.Sh EXAMPLES -.Nm -scan -n ubt0 -a 00:26:bb:7a:58:95 -.Bd -ragged -offset indent -This will scan the bluetooth controller ubt0hci for a bluetooth device with the address -00:26:bb:7a:58:95, set up ubt0 if necessary and enter an interactive dialog to pair the -new device. Since in this example a mouse is paired, -.Nm -will interact with -.Xr bthidd 8 , -enabling it if necessary and then write an HID descriptor to its config. -.Ed -.Pp -.Nm -scan -.Bd -ragged -offset indent -This will scan all bluetooth controllers on the systems for bluetooth devices, prompting -to bring up controllers or daemons along the way. -.Ed -.Sh SEE ALSO -.Xr bthidcontrol 8 , -.Xr bthidd 8 , -.Xr bthost 1 , -.Xr hccontrol 8 , -.Xr hcsecd 8 , -.Xr sdpcontrol 8 , -.Xr sysrc 8 -.Sh HISTORY -A -.Nm -utility first appeared in -.Fx 12.1 . -.Sh AUTHORS -.An Dirk Engling Aq Mt erdgeist@erdgeist.org -.Sh THANKS TO -Lars Engels and Warren Block for suggestions, help, and testing. From owner-svn-src-head@freebsd.org Fri Jan 11 16:48:48 2019 Return-Path: Delivered-To: svn-src-head@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 C12C41495713; Fri, 11 Jan 2019 16:48:48 +0000 (UTC) (envelope-from lars@e.0x20.net) Received: from mail.0x20.net (mail.0x20.net [46.251.251.56]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "0x20.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BE3A73820; Fri, 11 Jan 2019 16:48:47 +0000 (UTC) (envelope-from lars@e.0x20.net) Received: from e.0x20.net (mail.0x20.net [46.251.251.56]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.0x20.net (Postfix) with ESMTPS id 8F904C3549; Fri, 11 Jan 2019 17:47:54 +0100 (CET) Received: (from lars@localhost) by e.0x20.net (8.15.2/8.15.2/Submit) id x0BGlstf058579; Fri, 11 Jan 2019 17:47:54 +0100 (CET) (envelope-from lars) Date: Fri, 11 Jan 2019 17:47:54 +0100 From: Lars Engels To: rgrimes@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r342945 - in head: tools/build/mk usr.sbin/bluetooth usr.sbin/bluetooth/bluetooth-config Message-ID: <20190111164754.GB1267@e.0x20.net> References: <201901111552.x0BFqAxa049564@repo.freebsd.org> <201901111604.x0BG4XoU021904@pdx.rh.CN85.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201901111604.x0BG4XoU021904@pdx.rh.CN85.dnsmgr.net> X-Editor: VIM - Vi IMproved 8.0 User-Agent: Mutt/1.11.1 (2018-12-01) X-Rspamd-Queue-Id: 4BE3A73820 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.94 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.94)[-0.940,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2019 16:48:49 -0000 On Fri, Jan 11, 2019 at 08:04:33AM -0800, Rodney W. Grimes wrote: > > Author: lme (ports committer) > > Date: Fri Jan 11 15:52:09 2019 > > New Revision: 342945 > > URL: https://svnweb.freebsd.org/changeset/base/342945 > > +.Nm > > +utility first appeared in > > +.Fx 12.1 . > > +.Sh AUTHORS > > +.An Dirk Engling Aq Mt erdgeist@erdgeist.org > > +.Sh THANKS TO > > +Lars Engels and Warren Block for suggestions, help, and testing. > > The contents of this file appear twice???? Yes, sorry. My fault. Bapt already fixed this in r342947. > > > > Added: head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.sh > > ============================================================================== > > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > > +++ head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.sh Fri Jan 11 15:52:09 2019 (r342945) > > @@ -0,0 +1,275 @@ > > +#!/bin/sh > > +#- > > +# Copyleft 2019 Dirk Engling > > That implies the GPL, would you be willing to change it to > what it appears your actually asserting, a Copyright, please. I just asked Dirk if I can change this to "Copyright". It was a mistake on his side and he agrees to the change. > > > +# > > +# This script is released under the beerware license. > > Incomplete and none deterministic license reference, > this needs to be corrected in some way, preferable > with the text of the beerware license so there is > no doubt as to what applies. I'll add the Beerware header. > > +# After function definitions, main() can use them > > +main "$@" > > + > > +exit > > + > > +# TODO > > +# * If device is a keyboard, offer a text entry test field and if it does > > +# not succeed, leave some clues for debugging (i.e. if the node responds > > +# to pings, maybe switch keyboard on/off, etc) > > +# * Same if device is a mouse, i.e. hexdump /dev/sysmouse. > > +# * If device offers DUN profiles, ask the user if an entry in > > +# /etc/ppp/ppp.conf should be created > > +# * If OPUSH or SPP is offered, refer to the respective man pages to give > > +# some clues how to continue > > > > > > The style of this .sh does not match the normal style of > such things in base, especially with respect to long lines > and indentation. Do we have a style guide for shell scripts in base? How should indentation look like? Lars From owner-svn-src-head@freebsd.org Fri Jan 11 17:06:04 2019 Return-Path: Delivered-To: svn-src-head@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 67C9E1495FD5; Fri, 11 Jan 2019 17:06:04 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BAF1B7469C; Fri, 11 Jan 2019 17:06:03 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x0BH5xTb022121; Fri, 11 Jan 2019 09:05:59 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id x0BH5xmL022120; Fri, 11 Jan 2019 09:05:59 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201901111705.x0BH5xmL022120@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r342945 - in head: tools/build/mk usr.sbin/bluetooth usr.sbin/bluetooth/bluetooth-config In-Reply-To: To: Kyle Evans Date: Fri, 11 Jan 2019 09:05:59 -0800 (PST) CC: "Rodney W. Grimes" , Lars Engels , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: BAF1B7469C X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2019 17:06:04 -0000 > On Fri, Jan 11, 2019 at 10:04 AM Rodney W. Grimes > wrote: > > > > > Author: lme (ports committer) > > > Date: Fri Jan 11 15:52:09 2019 > > > New Revision: 342945 > > > URL: https://svnweb.freebsd.org/changeset/base/342945 > > > > > > Log: > > > Add `bluetooth-config` script to simplify setting up bluetooth connections to > > > devices like mice, keyboards, bt-audio, ... > > > > > > This script currently allows scanning for nearby devices, adds one to > > > /etc/bluetooth/hosts, adds an entry to hcsecd's conf and if it is a HID, add an > > > entry to bthidd's configs, as well. > > > > > > Submitted by: erdgeist > > > Approved by: bapt > > > MFC after: 2 weeks > > > Differential Revision: D3778 > > > Reviewers: bapt, emax > > > > > > Added: > > > head/usr.sbin/bluetooth/bluetooth-config/ > > > head/usr.sbin/bluetooth/bluetooth-config/Makefile (contents, props changed) > > > head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.8 (contents, props changed) > > > head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.sh (contents, props changed) > > > Modified: > > > head/tools/build/mk/OptionalObsoleteFiles.inc > > > head/usr.sbin/bluetooth/Makefile > > > > > > Modified: head/tools/build/mk/OptionalObsoleteFiles.inc > > > ============================================================================== > > > --- head/tools/build/mk/OptionalObsoleteFiles.inc Fri Jan 11 14:21:59 2019 (r342944) > > > +++ head/tools/build/mk/OptionalObsoleteFiles.inc Fri Jan 11 15:52:09 2019 (r342945) > > > @@ -504,6 +504,7 @@ OLD_FILES+=usr/lib32/libsdp_p.a > > > .endif > > > OLD_FILES+=usr/sbin/ath3kfw > > > OLD_FILES+=usr/sbin/bcmfw > > > +OLD_FILES+=usr/sbin/bluetooth-config > > > > I am confused, or miss understand something. > > This commit adds these files, but declares them as Obsolete? > > > > This is correct; it is obsolete when Bluetooth is disabled. Ah, got caught by not enough context, thanks for the information Kyle. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Fri Jan 11 17:10:36 2019 Return-Path: Delivered-To: svn-src-head@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 76CA2149610E; Fri, 11 Jan 2019 17:10:36 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D167174895; Fri, 11 Jan 2019 17:10:35 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x0BHAXZF022140; Fri, 11 Jan 2019 09:10:33 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id x0BHAXsr022139; Fri, 11 Jan 2019 09:10:33 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201901111710.x0BHAXsr022139@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r342945 - in head: tools/build/mk usr.sbin/bluetooth usr.sbin/bluetooth/bluetooth-config In-Reply-To: <20190111164754.GB1267@e.0x20.net> To: Lars Engels Date: Fri, 11 Jan 2019 09:10:33 -0800 (PST) CC: rgrimes@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: D167174895 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2019 17:10:36 -0000 > On Fri, Jan 11, 2019 at 08:04:33AM -0800, Rodney W. Grimes wrote: > > > Author: lme (ports committer) > > > Date: Fri Jan 11 15:52:09 2019 > > > New Revision: 342945 > > > URL: https://svnweb.freebsd.org/changeset/base/342945 > > > +.Nm > > > +utility first appeared in > > > +.Fx 12.1 . > > > +.Sh AUTHORS > > > +.An Dirk Engling Aq Mt erdgeist@erdgeist.org > > > +.Sh THANKS TO > > > +Lars Engels and Warren Block for suggestions, help, and testing. > > > > The contents of this file appear twice???? > > Yes, sorry. My fault. Bapt already fixed this in r342947. It was in the differential that way too and no one noticed :-( > > > > > Added: head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.sh > > > ============================================================================== > > > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > > > +++ head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.sh Fri Jan 11 15:52:09 2019 (r342945) > > > @@ -0,0 +1,275 @@ > > > +#!/bin/sh > > > +#- > > > +# Copyleft 2019 Dirk Engling > > > > That implies the GPL, would you be willing to change it to > > what it appears your actually asserting, a Copyright, please. > > I just asked Dirk if I can change this to "Copyright". It was a mistake > on his side and he agrees to the change. Great, thanks. > > > > > +# > > > +# This script is released under the beerware license. > > > > Incomplete and none deterministic license reference, > > this needs to be corrected in some way, preferable > > with the text of the beerware license so there is > > no doubt as to what applies. > > I'll add the Beerware header. Again thanks. > > > +# After function definitions, main() can use them > > > +main "$@" > > > + > > > +exit > > > + > > > +# TODO > > > +# * If device is a keyboard, offer a text entry test field and if it does > > > +# not succeed, leave some clues for debugging (i.e. if the node responds > > > +# to pings, maybe switch keyboard on/off, etc) > > > +# * Same if device is a mouse, i.e. hexdump /dev/sysmouse. > > > +# * If device offers DUN profiles, ask the user if an entry in > > > +# /etc/ppp/ppp.conf should be created > > > +# * If OPUSH or SPP is offered, refer to the respective man pages to give > > > +# some clues how to continue > > > > > > > > > > The style of this .sh does not match the normal style of > > such things in base, especially with respect to long lines > > and indentation. > > Do we have a style guide for shell scripts in base? How should > indentation look like? Not that I can locate, but I can state that almost all of the base code uses tab indenting and limited to 80 column widths, independent of c, sh, make, etc. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Fri Jan 11 18:04:23 2019 Return-Path: Delivered-To: svn-src-head@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 16B521497252 for ; Fri, 11 Jan 2019 18:04:23 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x832.google.com (mail-qt1-x832.google.com [IPv6:2607:f8b0:4864:20::832]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A2EB1764BB for ; Fri, 11 Jan 2019 18:04:22 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x832.google.com with SMTP id u47so19786286qtj.6 for ; Fri, 11 Jan 2019 10:04:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=s/KKFa/7Yz7+jcb1fsB5RiVL+yfD3LIGRcv8IKUeK3E=; b=WlTM8s7zs6UOUBTY78USlm9qtd7+8Em9DM3HvA6JrCMP/9RNNWdVYUHS84dvGohnJ8 OlntPW2GkgokrPqIUgZ4FvkCsPHl8+2ALLBv4JV/UXvKr7KxnXvlvEjXcGMnQhamvUKV T9Owgs/OAy/g8sEycGgJNgdgBRlki+BdeXzwfSf7qgOxn7R9AKtWu1TESLohTt4ZC49Z eF7VayJVUB07Tm9tEdwsw5QqL0ufFM1Z8Jcw2Vl1oWiQ1ccNwM/AtyMT2mr3RZ4RYl/p 4KopFRukRoljAuGxsGRsI/ys9Qkdp/4IhC6rAsCldzaOtNPwCr1dqsmLk/27A9NGE68B dB8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=s/KKFa/7Yz7+jcb1fsB5RiVL+yfD3LIGRcv8IKUeK3E=; b=FeFytTKMaabBwI/NH227DVDK9qM4HOESOQuEjCrOf7V7qpQkme3zvkfljFzeuFKyMu 3aMrMW8CAxKLYKk3uabc11suN+DUtU2KRwi9kMELy7HFhT7WyhSs3L+3XTQERaoELJ2m fJeVfHjRzOa2CmmHmmGr0bOx7+4RMHMXmho2wj9EkALFpxOCJWrfFlec0c3otRq2VEJO 2ANxYaizSmS7UJk5AXtnwCMGb9rhdpv0+d1N5tUwR64W6jd/FyDzxqpFg6eW3ukWW7kX TmVSF6ErEaliunzU/cS0lhkYhMLBa8tV+qbbZ6GMa/tLsRI2rkVhjdXb6XalbyX6UCUu 18Ow== X-Gm-Message-State: AJcUukdYL4lIfkowz+RRCforTi/+eVY6dmzpb/yGNBSMtc6bKSkMiE+w 1DagZPYzc9dxNZD0fiyaog0aIiT4y1Hg6n4qggWB9w== X-Google-Smtp-Source: ALg8bN44ehNIZxp7WUw6MLASqmqGtHY8lHDlZ+zP0TL1iAZnY3gmyvJCpyMe9Tyu+w3MfEhibUPALWXvmYYSKWLCCX0= X-Received: by 2002:a0c:f143:: with SMTP id y3mr15113784qvl.21.1547229861995; Fri, 11 Jan 2019 10:04:21 -0800 (PST) MIME-Version: 1.0 References: <20190111164754.GB1267@e.0x20.net> <201901111710.x0BHAXsr022139@pdx.rh.CN85.dnsmgr.net> In-Reply-To: <201901111710.x0BHAXsr022139@pdx.rh.CN85.dnsmgr.net> From: Warner Losh Date: Fri, 11 Jan 2019 11:04:10 -0700 Message-ID: Subject: Re: svn commit: r342945 - in head: tools/build/mk usr.sbin/bluetooth usr.sbin/bluetooth/bluetooth-config To: "Rodney W. Grimes" Cc: Lars Engels , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: A2EB1764BB X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.984,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2019 18:04:23 -0000 On Fri, Jan 11, 2019 at 10:10 AM Rodney W. Grimes < freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > > On Fri, Jan 11, 2019 at 08:04:33AM -0800, Rodney W. Grimes wrote: > > > The style of this .sh does not match the normal style of > > > such things in base, especially with respect to long lines > > > and indentation. > > > > Do we have a style guide for shell scripts in base? How should > > indentation look like? > > Not that I can locate, but I can state that almost all > of the base code uses tab indenting and limited to 80 > column widths, independent of c, sh, make, etc. > We have a style.Makefile, style, style.mdoc and style.lua man pages. Maybe it's time for style.sh, eh? Warner From owner-svn-src-head@freebsd.org Fri Jan 11 18:35:31 2019 Return-Path: Delivered-To: svn-src-head@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 C93521498197; Fri, 11 Jan 2019 18:35:31 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AEA5377988; Fri, 11 Jan 2019 18:35:30 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x0BIZQBK022411; Fri, 11 Jan 2019 10:35:26 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id x0BIZQZI022410; Fri, 11 Jan 2019 10:35:26 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201901111835.x0BIZQZI022410@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r342881 - head/share/skel In-Reply-To: <8065ff94389d86d5c427e5cca14af3a37311fa0e.camel@freebsd.org> To: Ian Lepore Date: Fri, 11 Jan 2019 10:35:26 -0800 (PST) CC: rgrimes@freebsd.org, Edward Napierala , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: AEA5377988 X-Spamd-Bar: ++ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [2.40 / 15.00]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[rgrimes@freebsd.org]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_SPAM_SHORT(0.69)[0.694,0]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[dnsmgr.net]; AUTH_NA(1.00)[]; RCPT_COUNT_FIVE(0.00)[6]; RCVD_COUNT_THREE(0.00)[3]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; MX_GOOD(-0.01)[cached: pdx.rh.CN85.dnsmgr.net]; NEURAL_SPAM_LONG(0.74)[0.740,0]; NEURAL_SPAM_MEDIUM(0.09)[0.086,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(-0.01)[ip: (0.03), ipnet: 69.59.192.0/19(0.01), asn: 13868(-0.02), country: US(-0.08)] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2019 18:35:32 -0000 > On Wed, 2019-01-09 at 10:08 -0800, Rodney W. Grimes wrote: > > > ?r., 9 sty 2019 o 16:41 Rodney W. Grimes > > > napisa?(a): > > > > > > > > > Author: trasz > > > > > Date: Wed Jan 9 11:04:27 2019 > > > > > New Revision: 342881 > > > > > URL: https://svnweb.freebsd.org/changeset/base/342881 > > > > > > > > > > Log: > > > > > Make sh(1) recognize the default $HOME. By default /home > > > > > is a symlink; without this change, when you log in, sh(1) > > > > > won't realize the current directory (eg '/usr/home/test') > > > > > is the same as $HOME ('/home/test'). > > > > > > > > Arguably it shouldnt know any of that. > > > > > > sh(1) needs to know that in order to properly shorten the current > > > directory path (in prompt) to "~" when you're there. > > > > And imho it should not be doing that.... > > that is what leads to all this other un needed cruft. > > > > ~ is a human input shortcut, not a computer output shortcut > > > > > > > > > Or that $Home is ~ either > > > > I hate that if I "cd home" and there is not a directory > > > > where I am at called home it takes me to ~/$home,s > > > > that also has caused a few script debugging to be > > > > a royal Pita having to force ./$variable to stop > > > > home from being treated special. > > > > > > But none of that seems related to the change above, does it? > > > > It is all related as this is outgrowth of trying to make > > the prompt spit out ~ when you are in $HOME. > > > > > All the patch does is: if your current directory is $HOME, but > > > it's spelled differently, run "cd". The only thing that does, in > > > turn, > > > is making sh(1) set the $ENV variable, which it uses to track > > > the current "logical working directory", eg /home/test. It cannot > > > obtain that information otherwise, because getcwd(3) in that > > > directory returns its "physical path", eg /usr/home/test. > > > > It SHOULD spit out the results of getcwd and not some > > logical interpretation of variables. Do any OTHER cd's > > through a symbolic link do such magic? > > > > ALL cd's through a symlink "do such magic". It's the difference between > physical and logical path in bourne shell (and its descendents). > > revolution > mkdir /tmp/ian > revolution > cd /tmp/ian > > revolution > mkdir -p a/b/c > revolution > ln -s a/b/c c > > revolution > cd /tmp/ian/a/b/c; pwd -L; pwd -P > /tmp/ian/a/b/c > /tmp/ian/a/b/c > > revolution > cd /tmp/ian/c; pwd -L; pwd -P > /tmp/ian/c > /tmp/ian/a/b/c > > revolution > cd /tmp/ian/a/b/c; cd ..; pwd -P > /tmp/ian/a/b > > revolution > cd /tmp/ian/c; cd ..; pwd -P > /tmp/ian The whole concept of logical cd/pwd is broken because it only works with cd, if you start to do ls and other commands the consistency of things like .. goes out the window! # cd /tmp # mkdir a # cd a # ln -s /usr/src # ls src # cd src # pwd /tmp/a/src # ls .. bin lib32 local sbin src-bhyve.8 src-structvm include libdata obj share src-maxcpus src-structvmaccessor lib libexec ports src src-maxcpusDS tests # cd .. # ls src # OMG, where did my system go???? :-) -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Fri Jan 11 18:36:20 2019 Return-Path: Delivered-To: svn-src-head@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 092B1149821F; Fri, 11 Jan 2019 18:36:20 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5B1EE77B54; Fri, 11 Jan 2019 18:36:19 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x0BIaGNI022427; Fri, 11 Jan 2019 10:36:16 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id x0BIaGVJ022426; Fri, 11 Jan 2019 10:36:16 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201901111836.x0BIaGVJ022426@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r342945 - in head: tools/build/mk usr.sbin/bluetooth usr.sbin/bluetooth/bluetooth-config In-Reply-To: To: Warner Losh Date: Fri, 11 Jan 2019 10:36:16 -0800 (PST) CC: "Rodney W. Grimes" , Lars Engels , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 5B1EE77B54 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2019 18:36:20 -0000 [ Charset UTF-8 unsupported, converting... ] > On Fri, Jan 11, 2019 at 10:10 AM Rodney W. Grimes < > freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > > > > On Fri, Jan 11, 2019 at 08:04:33AM -0800, Rodney W. Grimes wrote: > > > > The style of this .sh does not match the normal style of > > > > such things in base, especially with respect to long lines > > > > and indentation. > > > > > > Do we have a style guide for shell scripts in base? How should > > > indentation look like? > > > > Not that I can locate, but I can state that almost all > > of the base code uses tab indenting and limited to 80 > > column widths, independent of c, sh, make, etc. > > > > We have a style.Makefile, style, style.mdoc and style.lua man pages. Maybe > it's time for style.sh, eh? Yes please! -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Fri Jan 11 18:41:48 2019 Return-Path: Delivered-To: svn-src-head@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 726B31498567; Fri, 11 Jan 2019 18:41:48 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from shxd.cx (mail.shxd.cx [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F41877FC4; Fri, 11 Jan 2019 18:41:48 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from [74.217.198.10] (port=58055 helo=[10.1.7.18]) by shxd.cx with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1gi1kS-000L2S-33; Fri, 11 Jan 2019 10:41:40 -0800 From: Devin Teske Message-Id: Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: svn commit: r342945 - in head: tools/build/mk usr.sbin/bluetooth usr.sbin/bluetooth/bluetooth-config Date: Fri, 11 Jan 2019 10:41:44 -0800 In-Reply-To: <201901111836.x0BIaGVJ022426@pdx.rh.CN85.dnsmgr.net> Cc: Devin Teske , Warner Losh , Lars Engels , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org To: rgrimes@freebsd.org References: <201901111836.x0BIaGVJ022426@pdx.rh.CN85.dnsmgr.net> X-Mailer: Apple Mail (2.3445.9.1) Sender: devin@shxd.cx X-Rspamd-Queue-Id: 0F41877FC4 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2019 18:41:48 -0000 > On Jan 11, 2019, at 10:36 AM, Rodney W. Grimes = wrote: >=20 > [ Charset UTF-8 unsupported, converting... ] >> On Fri, Jan 11, 2019 at 10:10 AM Rodney W. Grimes < >> freebsd@pdx.rh.cn85.dnsmgr.net> wrote: >>=20 >>>> On Fri, Jan 11, 2019 at 08:04:33AM -0800, Rodney W. Grimes wrote: >>>>> The style of this .sh does not match the normal style of >>>>> such things in base, especially with respect to long lines >>>>> and indentation. >>>>=20 >>>> Do we have a style guide for shell scripts in base? How should >>>> indentation look like? >>>=20 >>> Not that I can locate, but I can state that almost all >>> of the base code uses tab indenting and limited to 80 >>> column widths, independent of c, sh, make, etc. >>>=20 >>=20 >> We have a style.Makefile, style, style.mdoc and style.lua man pages. = Maybe >> it's time for style.sh, eh? >=20 > Yes please! >=20 If we can agree to be professional and collegial, ... I'll start with chapters from the Style section of my book: = https://freebsdfrau.gitbooks.io/serious-shell-programming/content/style/aw= k.html = --=20 Devin= From owner-svn-src-head@freebsd.org Fri Jan 11 19:05:41 2019 Return-Path: Delivered-To: svn-src-head@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 B4AB51498FA8; Fri, 11 Jan 2019 19:05:41 +0000 (UTC) (envelope-from imp@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 57D7580F53; Fri, 11 Jan 2019 19:05:41 +0000 (UTC) (envelope-from imp@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 2D8A21FEB6; Fri, 11 Jan 2019 19:05:41 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0BJ5fSR050051; Fri, 11 Jan 2019 19:05:41 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0BJ5eFW050049; Fri, 11 Jan 2019 19:05:40 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201901111905.x0BJ5eFW050049@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 11 Jan 2019 19:05:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342948 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 342948 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 57D7580F53 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_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2019 19:05:41 -0000 Author: imp Date: Fri Jan 11 19:05:40 2019 New Revision: 342948 URL: https://svnweb.freebsd.org/changeset/base/342948 Log: Add man page for device_delete_children. Submitted by: Jeroen Ruigrok van der Werven Differential Revision: https://reviews.freebsd.org/D18452 Added: head/share/man/man9/device_delete_children.9 (contents, props changed) Modified: head/share/man/man9/Makefile Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Fri Jan 11 16:18:23 2019 (r342947) +++ head/share/man/man9/Makefile Fri Jan 11 19:05:40 2019 (r342948) @@ -90,6 +90,7 @@ MAN= accept_filter.9 \ device_add_child.9 \ DEVICE_ATTACH.9 \ device_delete_child.9 \ + device_delete_children.9 \ DEVICE_DETACH.9 \ device_enable.9 \ device_find_child.9 \ Added: head/share/man/man9/device_delete_children.9 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man9/device_delete_children.9 Fri Jan 11 19:05:40 2019 (r342948) @@ -0,0 +1,58 @@ +.\" -*- nroff -*- +.\" +.\" Copyright (c) 2018 Jeroen Ruigrok van der Werven +.\" +.\" All rights reserved. +.\" +.\" This program is free software. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd September 28, 2018 +.Dt DEVICE_DELETE_CHILDREN 9 +.Os +.Sh NAME +.Nm device_delete_children +.Nd delete all child devices of a given device +.Sh SYNOPSIS +.In sys/param.h +.In sys/bus.h +.Ft int +.Fn device_delete_children "device_t dev" +.Sh DESCRIPTION +The +.Fn device_delete_children +function deletes all child devices of the given device +.Fa dev , +if any, +using the +.Fn device_delete_child +function for each device it finds. +If a child device cannot be deleted, this function will return an error code. +.Sh RETURN VALUES +Zero is returned on success, a non-zero return value indicates failure. +.Sh SEE ALSO +.Xr device_delete_child 9 +.Sh AUTHORS +This manual page was written by +.An Jeroen Ruigrok van der Werven . From owner-svn-src-head@freebsd.org Fri Jan 11 19:12:54 2019 Return-Path: Delivered-To: svn-src-head@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 6845A149930D; Fri, 11 Jan 2019 19:12:54 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D00518146C; Fri, 11 Jan 2019 19:12:53 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x0BJCoSD022578; Fri, 11 Jan 2019 11:12:50 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id x0BJCo3L022577; Fri, 11 Jan 2019 11:12:50 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201901111912.x0BJCo3L022577@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r342948 - head/share/man/man9 In-Reply-To: <201901111905.x0BJ5eFW050049@repo.freebsd.org> To: Warner Losh Date: Fri, 11 Jan 2019 11:12:50 -0800 (PST) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: D00518146C X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.96)[-0.963,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2019 19:12:54 -0000 > Author: imp > Date: Fri Jan 11 19:05:40 2019 > New Revision: 342948 > URL: https://svnweb.freebsd.org/changeset/base/342948 > > Log: > Add man page for device_delete_children. > > Submitted by: Jeroen Ruigrok van der Werven > Differential Revision: https://reviews.freebsd.org/D18452 > > Added: > head/share/man/man9/device_delete_children.9 (contents, props changed) > Modified: > head/share/man/man9/Makefile > > Modified: head/share/man/man9/Makefile > ============================================================================== > --- head/share/man/man9/Makefile Fri Jan 11 16:18:23 2019 (r342947) > +++ head/share/man/man9/Makefile Fri Jan 11 19:05:40 2019 (r342948) > @@ -90,6 +90,7 @@ MAN= accept_filter.9 \ > device_add_child.9 \ > DEVICE_ATTACH.9 \ > device_delete_child.9 \ > + device_delete_children.9 \ > DEVICE_DETACH.9 \ > device_enable.9 \ > device_find_child.9 \ > > Added: head/share/man/man9/device_delete_children.9 > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/share/man/man9/device_delete_children.9 Fri Jan 11 19:05:40 2019 (r342948) > @@ -0,0 +1,58 @@ > +.\" -*- nroff -*- > +.\" > +.\" Copyright (c) 2018 Jeroen Ruigrok van der Werven > +.\" > +.\" All rights reserved. We should be very carefull about white space between a copyright statement and the All Rights reserved clause of that copyright statement (we actual prefer not to have those words) as this leads to Copyrights inserted between the 2 which disjoin the all rights reserved from the copyright that is asserting it. Could you please ask the author if we can strike the All rights reserved, and if not please remove the white space between them. > +.\" > +.\" This program is free software. > +.\" > +.\" Redistribution and use in source and binary forms, with or without > +.\" modification, are permitted provided that the following conditions > +.\" are met: > +.\" 1. Redistributions of source code must retain the above copyright > +.\" notice, this list of conditions and the following disclaimer. > +.\" 2. Redistributions in binary form must reproduce the above copyright > +.\" notice, this list of conditions and the following disclaimer in the > +.\" documentation and/or other materials provided with the distribution. > +.\" > +.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR > +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES > +.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. > +.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, > +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT > +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, > +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY > +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT > +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF > +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > +.\" > +.\" $FreeBSD$ > +.\" > +.Dd September 28, 2018 > +.Dt DEVICE_DELETE_CHILDREN 9 > +.Os > +.Sh NAME > +.Nm device_delete_children > +.Nd delete all child devices of a given device > +.Sh SYNOPSIS > +.In sys/param.h > +.In sys/bus.h > +.Ft int > +.Fn device_delete_children "device_t dev" > +.Sh DESCRIPTION > +The > +.Fn device_delete_children > +function deletes all child devices of the given device > +.Fa dev , > +if any, > +using the > +.Fn device_delete_child > +function for each device it finds. > +If a child device cannot be deleted, this function will return an error code. > +.Sh RETURN VALUES > +Zero is returned on success, a non-zero return value indicates failure. > +.Sh SEE ALSO > +.Xr device_delete_child 9 > +.Sh AUTHORS > +This manual page was written by > +.An Jeroen Ruigrok van der Werven . > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Fri Jan 11 19:14:42 2019 Return-Path: Delivered-To: svn-src-head@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 32DBD14993F9; Fri, 11 Jan 2019 19:14:42 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C832481638; Fri, 11 Jan 2019 19:14:41 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 774DA1F679; Fri, 11 Jan 2019 19:14:41 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lf1-f51.google.com with SMTP id p6so11592135lfc.1; Fri, 11 Jan 2019 11:14:41 -0800 (PST) X-Gm-Message-State: AJcUukf77klVENMRJHKY33D459XVEVQcMdwih0qmwuHdwX8GaETSXcXG ifG9u1RzrYs3ZIjBcDTdwPhBL5ZwvH7XaKrGkeY= X-Google-Smtp-Source: ALg8bN6mFJ/9X4cawWESBNXV46AcVVIkbFy8XN1n6Lkav7ImS8H7lwW8HHXfXD6xgzbK+uxWhYElH41izJoUuiu9Unw= X-Received: by 2002:a19:a40f:: with SMTP id q15mr6383722lfc.4.1547234080049; Fri, 11 Jan 2019 11:14:40 -0800 (PST) MIME-Version: 1.0 References: <201901111905.x0BJ5eFW050049@repo.freebsd.org> <201901111912.x0BJCo3L022577@pdx.rh.CN85.dnsmgr.net> In-Reply-To: <201901111912.x0BJCo3L022577@pdx.rh.CN85.dnsmgr.net> From: Kyle Evans Date: Fri, 11 Jan 2019 13:14:28 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r342948 - head/share/man/man9 To: "Rodney W. Grimes" Cc: Warner Losh , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: C832481638 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2019 19:14:42 -0000 On Fri, Jan 11, 2019 at 1:13 PM Rodney W. Grimes wrote: > > > Author: imp > > Date: Fri Jan 11 19:05:40 2019 > > New Revision: 342948 > > URL: https://svnweb.freebsd.org/changeset/base/342948 > > > > Log: > > Add man page for device_delete_children. > > > > Submitted by: Jeroen Ruigrok van der Werven > > Differential Revision: https://reviews.freebsd.org/D18452 > > > > Added: > > head/share/man/man9/device_delete_children.9 (contents, props changed) > > Modified: > > head/share/man/man9/Makefile > > > > Modified: head/share/man/man9/Makefile > > ============================================================================== > > --- head/share/man/man9/Makefile Fri Jan 11 16:18:23 2019 (r342947) > > +++ head/share/man/man9/Makefile Fri Jan 11 19:05:40 2019 (r342948) > > @@ -90,6 +90,7 @@ MAN= accept_filter.9 \ > > device_add_child.9 \ > > DEVICE_ATTACH.9 \ > > device_delete_child.9 \ > > + device_delete_children.9 \ > > DEVICE_DETACH.9 \ > > device_enable.9 \ > > device_find_child.9 \ > > > > Added: head/share/man/man9/device_delete_children.9 > > ============================================================================== > > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > > +++ head/share/man/man9/device_delete_children.9 Fri Jan 11 19:05:40 2019 (r342948) > > @@ -0,0 +1,58 @@ > > +.\" -*- nroff -*- > > +.\" > > +.\" Copyright (c) 2018 Jeroen Ruigrok van der Werven > > +.\" > > +.\" All rights reserved. > > We should be very carefull about white space between a copyright > statement and the All Rights reserved clause of that copyright > statement (we actual prefer not to have those words) as this > leads to Copyrights inserted between the 2 which disjoin the > all rights reserved from the copyright that is asserting it. > > Could you please ask the author if we can strike the > All rights reserved, and if not please remove the white > space between them. > Perhaps also a SPDX tag for this while we're potentially changing the area? From owner-svn-src-head@freebsd.org Fri Jan 11 19:16:50 2019 Return-Path: Delivered-To: svn-src-head@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 C10CD1499536; Fri, 11 Jan 2019 19:16:50 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1352381856; Fri, 11 Jan 2019 19:16:40 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x0BJGcbB022600; Fri, 11 Jan 2019 11:16:38 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id x0BJGcLG022599; Fri, 11 Jan 2019 11:16:38 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201901111916.x0BJGcLG022599@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r342945 - in head: tools/build/mk usr.sbin/bluetooth usr.sbin/bluetooth/bluetooth-config In-Reply-To: To: Devin Teske Date: Fri, 11 Jan 2019 11:16:38 -0800 (PST) CC: rgrimes@FreeBSD.org, Warner Losh , Lars Engels , src-committers , svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Reply-To: rgrimes@FreeBSD.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 1352381856 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2019 19:16:50 -0000 > > On Jan 11, 2019, at 10:36 AM, Rodney W. Grimes wrote: > > > >> On Fri, Jan 11, 2019 at 10:10 AM Rodney W. Grimes < > >> freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > >> > >>>> On Fri, Jan 11, 2019 at 08:04:33AM -0800, Rodney W. Grimes wrote: > >>>>> The style of this .sh does not match the normal style of > >>>>> such things in base, especially with respect to long lines > >>>>> and indentation. > >>>> > >>>> Do we have a style guide for shell scripts in base? How should > >>>> indentation look like? > >>> > >>> Not that I can locate, but I can state that almost all > >>> of the base code uses tab indenting and limited to 80 > >>> column widths, independent of c, sh, make, etc. > >>> > >> > >> We have a style.Makefile, style, style.mdoc and style.lua man pages. Maybe > >> it's time for style.sh, eh? > > > > Yes please! > > > > If we can agree to be professional and collegial, ... > > I'll start with chapters from the Style section of my book: > https://freebsdfrau.gitbooks.io/serious-shell-programming/content/style/awk.html > If you can mdoc that and take what applies to /bin/sh. Might be easier to start with one of the other style.foo pages though. And we don't want to go to far and put all of our sh code out of conformance. For one variable being $foo or ${foo} is varied greatly, IMHO the rule should be that the file just be consistent through out, and that one or the other is the prefered style, but either is acceptable. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Fri Jan 11 19:25:03 2019 Return-Path: Delivered-To: svn-src-head@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 A32A0149A0FD; Fri, 11 Jan 2019 19:25:03 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DFD0B82687; Fri, 11 Jan 2019 19:25:02 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x0BJP0je022635; Fri, 11 Jan 2019 11:25:00 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id x0BJP0Ac022634; Fri, 11 Jan 2019 11:25:00 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201901111925.x0BJP0Ac022634@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r342948 - head/share/man/man9 In-Reply-To: To: Kyle Evans Date: Fri, 11 Jan 2019 11:25:00 -0800 (PST) CC: "Rodney W. Grimes" , Warner Losh , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: DFD0B82687 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.96)[-0.963,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2019 19:25:04 -0000 > On Fri, Jan 11, 2019 at 1:13 PM Rodney W. Grimes > wrote: > > > > > Author: imp > > > Date: Fri Jan 11 19:05:40 2019 > > > New Revision: 342948 > > > URL: https://svnweb.freebsd.org/changeset/base/342948 > > > > > > Log: > > > Add man page for device_delete_children. > > > > > > Submitted by: Jeroen Ruigrok van der Werven > > > Differential Revision: https://reviews.freebsd.org/D18452 > > > > > > Added: > > > head/share/man/man9/device_delete_children.9 (contents, props changed) > > > Modified: > > > head/share/man/man9/Makefile > > > > > > Modified: head/share/man/man9/Makefile > > > ============================================================================== > > > --- head/share/man/man9/Makefile Fri Jan 11 16:18:23 2019 (r342947) > > > +++ head/share/man/man9/Makefile Fri Jan 11 19:05:40 2019 (r342948) > > > @@ -90,6 +90,7 @@ MAN= accept_filter.9 \ > > > device_add_child.9 \ > > > DEVICE_ATTACH.9 \ > > > device_delete_child.9 \ > > > + device_delete_children.9 \ > > > DEVICE_DETACH.9 \ > > > device_enable.9 \ > > > device_find_child.9 \ > > > > > > Added: head/share/man/man9/device_delete_children.9 > > > ============================================================================== > > > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > > > +++ head/share/man/man9/device_delete_children.9 Fri Jan 11 19:05:40 2019 (r342948) > > > @@ -0,0 +1,58 @@ > > > +.\" -*- nroff -*- > > > +.\" > > > +.\" Copyright (c) 2018 Jeroen Ruigrok van der Werven > > > +.\" > > > +.\" All rights reserved. > > > > We should be very carefull about white space between a copyright > > statement and the All Rights reserved clause of that copyright > > statement (we actual prefer not to have those words) as this > > leads to Copyrights inserted between the 2 which disjoin the > > all rights reserved from the copyright that is asserting it. > > > > Could you please ask the author if we can strike the > > All rights reserved, and if not please remove the white > > space between them. > > > > Perhaps also a SPDX tag for this while we're potentially changing the area? I wont express an opionion on that, but when you mentioned this I went back and looked at the commit, and right below the above is an additional line: +.\ This program is free software I am not sure if that even makes since, it is not a program, it is a manual page, and I am also not sure on how that affects the following BSD 2 clause. I normally associated those words with the GPL. Which leads me to wonder, did this file have a GPL on it and it got "removed" but left a tiny residual behind? I also find many instances of this in our tree, so this may come from a copy and paste. IMHO that line should also die. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Fri Jan 11 19:38:28 2019 Return-Path: Delivered-To: svn-src-head@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 BA5A4149A884 for ; Fri, 11 Jan 2019 19:38:28 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1.eu.mailhop.org (outbound1.eu.mailhop.org [52.28.251.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1BC2182F70 for ; Fri, 11 Jan 2019 19:38:27 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1547235498; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=ADv+cfPuDWu6JFwvqdiDkV9cfy+slbYVR7ZGfasjUCoHPisfIZwCuZ09D7AIIxANCNr7itF1/L3L7 7f0W1ZC4A3pb26vbFDAOswLn7ThoB9nulz3gch228iLeXM1SAz2WP/z4JjR+LqvAqOnuAx7Mulsv3D bL5ooEhcuY2nqj6MDZBKfALKA6BynOmIELesY9A6fz0nwEDNXb5t2fikL/FJ7QEnu8b1B7pOhD3xn9 Jn3RecjThT6vU4kcOJD3qKQJHkYaSPx/aR5mOvJV8OTvZBRPqAZfxvmWoeba9IwKl+qTPMFQGWbPgr 5ET8+a1ClJnNc/q80uAHs3DwA0saJVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=Si8pjOCWrUeiqnae4cOLEIaX4eqU+u5Zs/LhtPERRhE=; b=d2KQ4J9wfNYTk57Ycme7XuFMD5OFNLGoHDLlGkDNYyMTlvy3pAs69zt6Eh9FMNYjuEJmDRxWSa24c SU2pVDeTQKTv8Tp++D2pVH6/I6VgmVtK1hZ5fIWjpog4Szu+oj4jqOyZFfWWFYx0GmrrWD7KVXwvXO C72mEjfPBXiRgRsUshQ+iWAXoc5AJWnBnGmefSBPZqGvYU2uO368SVhcBTYf5oBfV2DXTqcwPgMlzf x4+GQKGs6zHr2WIgujEPEy31KmAKUS+GIUMFaqt5wwsBT649e6va2peK0s5x2nh8GMkGc+SIpfWjy8 lC5azJHsEbmv328L+RaqcGVoAPL7DIw== ARC-Authentication-Results: i=1; outbound3.eu.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=Si8pjOCWrUeiqnae4cOLEIaX4eqU+u5Zs/LhtPERRhE=; b=J7fs3X+GJdZD1LMYkpJnu+tyBy13ynkp+NUYr2CnGmvCjBmMT8DX4K6EcKPtTzvhR2KmDx3to+gEl 5B5IdgTd2BPinytb6IVB1/BpQT+xoNiM5O0zfZ41AJYvZ5UZV/Q7m6Y2/C1mg8mll6D1KKLZTlgIzo MljELMyCI9UOA0m5bw4ccUYXFcHNZW3ANTwWN/ihYwqzoa0RE1GRUyTZIqXGLR6qDeczFybeFwn8HT npG4l41p8OD5/BuVmSkIp9s2tf+C9M2lw6HXfq9wTIuwJXQcibdljrrYVIh/g2+ROKIX5BeCY0ZTAM wbpsSBKmUX9ugZjRipV3y/VwpZk+LuQ== X-MHO-RoutePath: aGlwcGll X-MHO-User: 7062b2b9-15d8-11e9-8a28-a1efd8da9a94 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound3.eu.mailhop.org (Halon) with ESMTPSA id 7062b2b9-15d8-11e9-8a28-a1efd8da9a94; Fri, 11 Jan 2019 19:38:16 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x0BJcE28062480; Fri, 11 Jan 2019 12:38:14 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: Subject: Re: svn commit: r342881 - head/share/skel From: Ian Lepore To: rgrimes@freebsd.org Cc: Edward Napierala , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Fri, 11 Jan 2019 12:38:14 -0700 In-Reply-To: <201901111835.x0BIZQZI022410@pdx.rh.CN85.dnsmgr.net> References: <201901111835.x0BIZQZI022410@pdx.rh.CN85.dnsmgr.net> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 1BC2182F70 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-7.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-1.00)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2019 19:38:29 -0000 On Fri, 2019-01-11 at 10:35 -0800, Rodney W. Grimes wrote: > > On Wed, 2019-01-09 at 10:08 -0800, Rodney W. Grimes wrote: > > > > ?r., 9 sty 2019 o 16:41 Rodney W. Grimes > > > > napisa?(a): > > > > > > > > > > > Author: trasz > > > > > > Date: Wed Jan 9 11:04:27 2019 > > > > > > New Revision: 342881 > > > > > > URL: https://svnweb.freebsd.org/changeset/base/342881 > > > > > > > > > > > > Log: > > > > > > Make sh(1) recognize the default $HOME. By default /home > > > > > > is a symlink; without this change, when you log in, sh(1) > > > > > > won't realize the current directory (eg '/usr/home/test') > > > > > > is the same as $HOME ('/home/test'). > > > > > > > > > > Arguably it shouldnt know any of that. > > > > > > > > sh(1) needs to know that in order to properly shorten the > > > > current > > > > directory path (in prompt) to "~" when you're there. > > > > > > And imho it should not be doing that.... > > > that is what leads to all this other un needed cruft. > > > > > > ~ is a human input shortcut, not a computer output shortcut > > > > > > > > > > > > Or that $Home is ~ either > > > > > I hate that if I "cd home" and there is not a directory > > > > > where I am at called home it takes me to ~/$home,s > > > > > that also has caused a few script debugging to be > > > > > a royal Pita having to force ./$variable to stop > > > > > home from being treated special. > > > > > > > > But none of that seems related to the change above, does it? > > > > > > It is all related as this is outgrowth of trying to make > > > the prompt spit out ~ when you are in $HOME. > > > > > > > All the patch does is: if your current directory is $HOME, but > > > > it's spelled differently, run "cd". The only thing that does, > > > > in > > > > turn, > > > > is making sh(1) set the $ENV variable, which it uses to track > > > > the current "logical working directory", eg /home/test. It > > > > cannot > > > > obtain that information otherwise, because getcwd(3) in that > > > > directory returns its "physical path", eg /usr/home/test. > > > > > > It SHOULD spit out the results of getcwd and not some > > > logical interpretation of variables. Do any OTHER cd's > > > through a symbolic link do such magic? > > > > > > > ALL cd's through a symlink "do such magic". It's the difference > > between > > physical and logical path in bourne shell (and its descendents). > > > > revolution > mkdir /tmp/ian > > revolution > cd /tmp/ian > > > > revolution > mkdir -p a/b/c > > revolution > ln -s a/b/c c > > > > revolution > cd /tmp/ian/a/b/c; pwd -L; pwd -P > > /tmp/ian/a/b/c > > /tmp/ian/a/b/c > > > > revolution > cd /tmp/ian/c; pwd -L; pwd -P > > /tmp/ian/c > > /tmp/ian/a/b/c > > > > revolution > cd /tmp/ian/a/b/c; cd ..; pwd -P > > /tmp/ian/a/b > > > > revolution > cd /tmp/ian/c; cd ..; pwd -P > > /tmp/ian > > The whole concept of logical cd/pwd is broken > because it only works with cd, if you start > to do ls and other commands the consistency > of things like .. goes out the window! > > What you seem to be implying is some kind of bug is what I consider to be one of the strongest features of logical vs. physical paths in bourne shell. Those of us who use it understand its behavior and work with it instead of complaining about it. People who believe otherwise tend to use other shells, I suspect. Everybody wins. -- Ian From owner-svn-src-head@freebsd.org Fri Jan 11 19:53:36 2019 Return-Path: Delivered-To: svn-src-head@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 0831D149B0F7; Fri, 11 Jan 2019 19:53:36 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 37F2583F99; Fri, 11 Jan 2019 19:53:35 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id i2rvgetrl8uQmi2rwg4L8F; Fri, 11 Jan 2019 12:53:28 -0700 X-Authority-Analysis: v=2.3 cv=XKpOtjpE c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=IkcTkHD0fZMA:10 a=3JhidrIBZZsA:10 a=6I5d2MoRAAAA:8 a=iKhvJSA4AAAA:8 a=YxBL1-UpAAAA:8 a=xTbO7UhYVR1jueeSt2gA:9 a=QEXdDO2ut3YA:10 a=IjZwj45LgO3ly-622nXo:22 a=odh9cflL3HIXMm4fY7Wr:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from android-68f84e02b5988183.esitwifi.local (S0106788a207e2972.gv.shawcable.net [70.66.154.233]) by spqr.komquats.com (Postfix) with ESMTPSA id 08450C81; Fri, 11 Jan 2019 11:53:28 -0800 (PST) Date: Fri, 11 Jan 2019 11:53:04 -0800 User-Agent: K-9 Mail for Android In-Reply-To: References: <201901111835.x0BIZQZI022410@pdx.rh.CN85.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: svn commit: r342881 - head/share/skel To: Ian Lepore ,rgrimes@freebsd.org CC: Edward Napierala , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Cy Schubert Message-ID: <287FC341-A997-48FF-B600-61B3EF23D471@cschubert.com> X-CMAE-Envelope: MS4wfMRDn9WrXqwtxyKyLHR2mxekYNQcJWv1wLhZczyrxiTKSyXmcfR9PZcNnI88C3n9uz0JuaE0Wt0gQ338rLZDw1MlaXDCUKCt4CjQLwREtIOEQsceC1fn pYMIDSagIa1RUA2YSpnpqIdPrpkirCB399FGd4kvLIzMT2VZVgora8wI/bKrISjw4/+kL9ZEIc0/AXRUZcQ+dtcE4+oj+jKN+BQQQ62wpPSyR/Ig75kzkSnX MTECPUzdLGcGGQzWgjT+936zeZorl9GH/Ae8CeL7PSaq3MS+H2+UQzTlhsJyo0W4UdG8XJyE0zwlzjQgu2rnWZf2fkWzRPLdj2WYygW4pRGLCStJX6fZ9sHc ho/c3UQt X-Rspamd-Queue-Id: 37F2583F99 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.992,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2019 19:53:36 -0000 On January 11, 2019 11:38:14 AM PST, Ian Lepore wrote: >On Fri, 2019-01-11 at 10:35 -0800, Rodney W=2E Grimes wrote: >> > On Wed, 2019-01-09 at 10:08 -0800, Rodney W=2E Grimes wrote: >> > > > ?r=2E, 9 sty 2019 o 16:41 Rodney W=2E Grimes >> > > > napisa?(a): >> > > > >=20 >> > > > > > Author: trasz >> > > > > > Date: Wed Jan 9 11:04:27 2019 >> > > > > > New Revision: 342881 >> > > > > > URL: https://svnweb=2Efreebsd=2Eorg/changeset/base/342881 >> > > > > >=20 >> > > > > > Log: >> > > > > > Make sh(1) recognize the default $HOME=2E By default /home >> > > > > > is a symlink; without this change, when you log in, sh(1) >> > > > > > won't realize the current directory (eg '/usr/home/test') >> > > > > > is the same as $HOME ('/home/test')=2E >> > > > >=20 >> > > > > Arguably it shouldnt know any of that=2E >> > > >=20 >> > > > sh(1) needs to know that in order to properly shorten the >> > > > current >> > > > directory path (in prompt) to "~" when you're there=2E >> > >=20 >> > > And imho it should not be doing that=2E=2E=2E=2E >> > > that is what leads to all this other un needed cruft=2E >> > >=20 >> > > ~ is a human input shortcut, not a computer output shortcut >> > >=20 >> > > >=20 >> > > > > Or that $Home is ~ either >> > > > > I hate that if I "cd home" and there is not a directory >> > > > > where I am at called home it takes me to ~/$home,s >> > > > > that also has caused a few script debugging to be >> > > > > a royal Pita having to force =2E/$variable to stop >> > > > > home from being treated special=2E >> > > >=20 >> > > > But none of that seems related to the change above, does it? >> > >=20 >> > > It is all related as this is outgrowth of trying to make >> > > the prompt spit out ~ when you are in $HOME=2E >> > >=20 >> > > > All the patch does is: if your current directory is $HOME, but >> > > > it's spelled differently, run "cd"=2E The only thing that does, >> > > > in >> > > > turn, >> > > > is making sh(1) set the $ENV variable, which it uses to track >> > > > the current "logical working directory", eg /home/test=2E It >> > > > cannot >> > > > obtain that information otherwise, because getcwd(3) in that >> > > > directory returns its "physical path", eg /usr/home/test=2E >> > >=20 >> > > It SHOULD spit out the results of getcwd and not some >> > > logical interpretation of variables=2E Do any OTHER cd's >> > > through a symbolic link do such magic? >> > >=20 >> >=20 >> > ALL cd's through a symlink "do such magic"=2E It's the difference >> > between >> > physical and logical path in bourne shell (and its descendents)=2E >> >=20 >> > revolution > mkdir /tmp/ian >> > revolution > cd /tmp/ian >> >=20 >> > revolution > mkdir -p a/b/c >> > revolution > ln -s a/b/c c >> >=20 >> > revolution > cd /tmp/ian/a/b/c; pwd -L; pwd -P >> > /tmp/ian/a/b/c >> > /tmp/ian/a/b/c >> >=20 >> > revolution > cd /tmp/ian/c; pwd -L; pwd -P >> > /tmp/ian/c >> > /tmp/ian/a/b/c >> >=20 >> > revolution > cd /tmp/ian/a/b/c; cd =2E=2E; pwd -P >> > /tmp/ian/a/b >> >=20 >> > revolution > cd /tmp/ian/c; cd =2E=2E; pwd -P >> > /tmp/ian >>=20 >> The whole concept of logical cd/pwd is broken >> because it only works with cd, if you start >> to do ls and other commands the consistency >> of things like =2E=2E goes out the window! >>=20 >>=20 > >What you seem to be implying is some kind of bug is what I consider to >be one of the strongest features of logical vs=2E physical paths in >bourne shell=2E Those of us who use it understand its behavior and work >with it instead of complaining about it=2E People who believe otherwise >tend to use other shells, I suspect=2E Everybody wins=2E > >-- Ian Not just our Bourne shell IIRC Solaris and others as well=2E One should compare this with the folks maintaining ksh93 at att/ast on git= hub=2E=20 --=20 Pardon the typos, small keyboard in use=2E Cheers, Cy Schubert FreeBSD UNIX: Web: http://www=2EFreeBSD=2Eorg The need of the many outweighs the greed of the few=2E From owner-svn-src-head@freebsd.org Fri Jan 11 20:12:55 2019 Return-Path: Delivered-To: svn-src-head@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 2FEBE149B9E4; Fri, 11 Jan 2019 20:12:55 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from shxd.cx (mail.shxd.cx [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C72EC84CF7; Fri, 11 Jan 2019 20:12:54 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from [74.217.198.10] (port=60700 helo=[10.1.7.18]) by shxd.cx with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1gi3Aj-000MlQ-0c; Fri, 11 Jan 2019 12:12:53 -0800 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: svn commit: r342945 - in head: tools/build/mk usr.sbin/bluetooth usr.sbin/bluetooth/bluetooth-config From: Devin Teske In-Reply-To: <201901111916.x0BJGcLG022599@pdx.rh.CN85.dnsmgr.net> Date: Fri, 11 Jan 2019 12:12:51 -0800 Cc: Devin Teske , Warner Losh , Lars Engels , src-committers , svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Content-Transfer-Encoding: quoted-printable Message-Id: <12293ACC-4C9C-4BFB-A04B-85D43AFA0837@FreeBSD.org> References: <201901111916.x0BJGcLG022599@pdx.rh.CN85.dnsmgr.net> To: rgrimes@FreeBSD.org X-Mailer: Apple Mail (2.3445.9.1) Sender: devin@shxd.cx X-Rspamd-Queue-Id: C72EC84CF7 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.988,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2019 20:12:55 -0000 > On Jan 11, 2019, at 11:16 AM, Rodney W. Grimes = wrote: >=20 >>> On Jan 11, 2019, at 10:36 AM, Rodney W. Grimes = wrote: >>>=20 >>>> On Fri, Jan 11, 2019 at 10:10 AM Rodney W. Grimes < >>>> freebsd@pdx.rh.cn85.dnsmgr.net> wrote: >>>>=20 >>>>>> On Fri, Jan 11, 2019 at 08:04:33AM -0800, Rodney W. Grimes wrote: >>>>>>> The style of this .sh does not match the normal style of >>>>>>> such things in base, especially with respect to long lines >>>>>>> and indentation. >>>>>>=20 >>>>>> Do we have a style guide for shell scripts in base? How should >>>>>> indentation look like? >>>>>=20 >>>>> Not that I can locate, but I can state that almost all >>>>> of the base code uses tab indenting and limited to 80 >>>>> column widths, independent of c, sh, make, etc. >>>>>=20 >>>>=20 >>>> We have a style.Makefile, style, style.mdoc and style.lua man = pages. Maybe >>>> it's time for style.sh, eh? >>>=20 >>> Yes please! >>>=20 >>=20 >> If we can agree to be professional and collegial, ... >>=20 >> I'll start with chapters from the Style section of my book: >> = https://freebsdfrau.gitbooks.io/serious-shell-programming/content/style/aw= k.html >> = >=20 > If you can mdoc that and Surely. > take what applies to /bin/sh. >=20 It *exclusively* applies to /bin/sh (as does my entire book). > Might be easier to start with one of the other style.foo pages though. I already did. Started with style(9), going back to mdoc would be easy. > And we don't want to go to far and put all of our sh code > out of conformance. The Style entry in my book is based on my FreeBSD sh code. > For one variable being $foo or ${foo} > is varied greatly, IMHO the rule should be that the file just > be consistent through out, and that one or the other is the > prefered style, but either is acceptable. >=20 I talked about this at BSDCan in June. $foo is preferred (there *is* a difference) and, as you say, if a file is consistently ${foo} then it is fine. --=20 Devin= From owner-svn-src-head@freebsd.org Fri Jan 11 20:36:28 2019 Return-Path: Delivered-To: svn-src-head@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 7FD90149C87B for ; Fri, 11 Jan 2019 20:36:28 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x833.google.com (mail-qt1-x833.google.com [IPv6:2607:f8b0:4864:20::833]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A2F978672B for ; Fri, 11 Jan 2019 20:36:27 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x833.google.com with SMTP id p17so20293402qtl.5 for ; Fri, 11 Jan 2019 12:36:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Qkf8eK4USkEPmovMXHLVCTtRw+TGrnEX8zbXn6oFcxM=; b=cxn4cKsWovjGGIebk+N93ZRzmig10wzKkzWXNqSfUY9Ck8AZRqtMJf1Y2ueabr58M1 cTB6guruLKMlO7xIpS0fHywNt4GXBaCwX3wPsajYslENDj9eMU/edlEFSk2WBKcaqX/6 FW+oxqmeIGhtXNGIqTMes3m8Qn4x/NUNj3qDUVDlTBZEg23ulMX54RB4DMQmknMHKUtm hXW5xR23/oKyWUZwT1fqHZQjbZGI/Xxm4CQ/71lXu71nOGMWP8ZS7IosopzGNknRMDRw /wslovG383OwC+PKMAVRRqA6waDhleNj5WWEgpWKMjdPuziptbPOAmsRyQpX5m3t9JLa Rg6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Qkf8eK4USkEPmovMXHLVCTtRw+TGrnEX8zbXn6oFcxM=; b=RXYhvlqxGBB2ZYUttuYkgLixpJVtNgY1JCcRh+jgegThPsj/vywWC7/nTwx24wKtMn 9GVfKiTzw76D1CAuSGgNVlYus8s3huqNBu5CA+wfSBLvnEEIZ3UOZt0sMCGI8mC4NcwZ fO8tM0NcfxMU++aP1Tlyuc4m0mIHF4r6Ix0z28Xl4APtxLuk+QEFBPWvk3FpQzyA5cce Fd5xCs3jctrcXdV1HMVfhUAvAlIoUOzvvY9dUNMMXQZGsZpJKmFAacNQ5l68QxdWNfQ+ HeeiUNrag1Ju0aC841ztpljlO8/Hfwr6Y9z4elLp62fMYS/fABo0o4LqkuYRVLX92UlV 3haQ== X-Gm-Message-State: AJcUukdjUmit6yvNmIaMihIKGLhtxxvg7OrjePycH4rOStcby/IJ5fmJ /T1CyN+xfXMIM0s9Jl4pgJeCyaMpYm1g+UzpzE4MCA== X-Google-Smtp-Source: ALg8bN4MCtbDAvG74HmPrDxWL1gpgk0wx0cpHvt9lHY0zShP5AKfyfHL7053KTADzoUlYgBQ0o62up1Jrqqye3rSjxk= X-Received: by 2002:a0c:bd15:: with SMTP id m21mr15343185qvg.57.1547238986999; Fri, 11 Jan 2019 12:36:26 -0800 (PST) MIME-Version: 1.0 References: <201901111916.x0BJGcLG022599@pdx.rh.CN85.dnsmgr.net> <12293ACC-4C9C-4BFB-A04B-85D43AFA0837@FreeBSD.org> In-Reply-To: <12293ACC-4C9C-4BFB-A04B-85D43AFA0837@FreeBSD.org> From: Warner Losh Date: Fri, 11 Jan 2019 13:36:15 -0700 Message-ID: Subject: Re: svn commit: r342945 - in head: tools/build/mk usr.sbin/bluetooth usr.sbin/bluetooth/bluetooth-config To: Devin Teske Cc: "Rodney W. Grimes" , Lars Engels , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: A2F978672B X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.986,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2019 20:36:28 -0000 On Fri, Jan 11, 2019, 1:12 PM Devin Teske > > > On Jan 11, 2019, at 11:16 AM, Rodney W. Grimes < > freebsd@pdx.rh.CN85.dnsmgr.net> wrote: > > > >>> On Jan 11, 2019, at 10:36 AM, Rodney W. Grimes < > freebsd@pdx.rh.CN85.dnsmgr.net> wrote: > >>> > >>>> On Fri, Jan 11, 2019 at 10:10 AM Rodney W. Grimes < > >>>> freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > >>>> > >>>>>> On Fri, Jan 11, 2019 at 08:04:33AM -0800, Rodney W. Grimes wrote: > >>>>>>> The style of this .sh does not match the normal style of > >>>>>>> such things in base, especially with respect to long lines > >>>>>>> and indentation. > >>>>>> > >>>>>> Do we have a style guide for shell scripts in base? How should > >>>>>> indentation look like? > >>>>> > >>>>> Not that I can locate, but I can state that almost all > >>>>> of the base code uses tab indenting and limited to 80 > >>>>> column widths, independent of c, sh, make, etc. > >>>>> > >>>> > >>>> We have a style.Makefile, style, style.mdoc and style.lua man pages. > Maybe > >>>> it's time for style.sh, eh? > >>> > >>> Yes please! > >>> > >> > >> If we can agree to be professional and collegial, ... > >> > >> I'll start with chapters from the Style section of my book: > >> > https://freebsdfrau.gitbooks.io/serious-shell-programming/content/style/awk.html > >> < > https://freebsdfrau.gitbooks.io/serious-shell-programming/content/style/awk.html > > > > > > If you can mdoc that and > > Surely. > > > > take what applies to /bin/sh. > > > > It *exclusively* applies to /bin/sh (as does my entire book). > > > > Might be easier to start with one of the other style.foo pages though. > > I already did. Started with style(9), going back to mdoc would be easy. > > > > And we don't want to go to far and put all of our sh code > > out of conformance. > > The Style entry in my book is based on my FreeBSD sh code. > > > > > For one variable being $foo or ${foo} > > is varied greatly, IMHO the rule should be that the file just > > be consistent through out, and that one or the other is the > > prefered style, but either is acceptable. > > > > I talked about this at BSDCan in June. $foo is preferred (there > *is* a difference) and, as you say, if a file is consistently ${foo} > then it is fine. > I prefer {} because $foo:bar doesn't work while ${foo}:bar does. Warner > From owner-svn-src-head@freebsd.org Fri Jan 11 20:43:21 2019 Return-Path: Delivered-To: svn-src-head@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 94307149CB58; Fri, 11 Jan 2019 20:43:21 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg1-x534.google.com (mail-pg1-x534.google.com [IPv6:2607:f8b0:4864:20::534]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0C11C86CA2; Fri, 11 Jan 2019 20:43:21 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg1-x534.google.com with SMTP id z11so6797703pgu.0; Fri, 11 Jan 2019 12:43:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=4aMjBSydWSBYdCEhjNlsZ2zdZ4DDsrn468C/IB/fT0c=; b=pE2VBTRSh0S88T+uRriac+bD42bjkX9+wakf/FnfbBnJGPIOr7eBdSDhEnRwnxON6/ 7L9x6vJ8CWyDN/Ljf+W9Eo5SReM83nKGqoCTOtykZxBYnclCH0OcOoNT6Er15HXK/yPP NzpdVSb2EIFnSrChnDAPEwhDhY+ZKqUsWUlqJl57F1Nv7KX0FWpVz45NHiYMlE7zu+Dh tEiFlJ/qHbWzfQj5nlaTXMFxBwgRok9jFpBmPmr2MaWsQ+OYelwTAyhMH0ejwpoK3ysA 5Yyx6gYapke/KF7m8r6MdHJbw4j24S2r0nMOaKZgVYnr/FL6omfrDzC9b5FK/OhxEUW0 CEZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=4aMjBSydWSBYdCEhjNlsZ2zdZ4DDsrn468C/IB/fT0c=; b=Ms3O+QNd8mRFg5++t5sxcHbFYXVqLGW/NnVdORKZosY+Ms2mAyLXVG+pT74tuiAxLf EdSBajGTZy4zTwP1h7HO2bsPInTE+5o6Vw1ZrFHt8RKqYpDIphyjIKw56k83t7do9OKU 0DGwxYbyxmAhEKcBie2AsvMoNI0O+h0CTxNJmJzzf3TtCM9MXT2G23IzEjnsyF5snZza tOgxv4RrYSC0INGmRcdAVJO+uIjBL1ohqfcQfXRKxRRZjyIIGrlokNMEHeROIoc5NXUx ylv7Nj0Y6aIuB5IjZmfHErYYOQKYsoCundHI+kbhKoXSBe8qhxfaFImvkxTwMqndwt85 uhDw== X-Gm-Message-State: AJcUukcCeXh2yktf+8a/xVak9CVHx1wE1+4/E5rzzn/ktndDmE8hvrhw o6LQ6CFpB+dS183Vjw7MpmC0atg5 X-Google-Smtp-Source: ALg8bN7Yo+/5hv0MSz7W7qFxlO2xYkOptAAcbWlU/urjMJOvLr4sd3kn46LNbO3nXyL19tdmD5J7UA== X-Received: by 2002:a63:4b60:: with SMTP id k32mr14571363pgl.186.1547239399500; Fri, 11 Jan 2019 12:43:19 -0800 (PST) Received: from [192.168.20.7] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id w136sm115175887pfd.169.2019.01.11.12.43.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 Jan 2019 12:43:18 -0800 (PST) From: Enji Cooper Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_E6985077-2E66-4277-A5D8-8CE0BD948935"; protocol="application/pgp-signature"; micalg=pgp-sha256 Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: svn commit: r342945 - in head: tools/build/mk usr.sbin/bluetooth usr.sbin/bluetooth/bluetooth-config Date: Fri, 11 Jan 2019 12:43:17 -0800 In-Reply-To: Cc: "Rodney W. Grimes" , Lars Engels , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org To: Kyle Evans References: <201901111552.x0BFqAxa049564@repo.freebsd.org> <201901111604.x0BG4XoU021904@pdx.rh.CN85.dnsmgr.net> X-Mailer: Apple Mail (2.3445.9.1) X-Rspamd-Queue-Id: 0C11C86CA2 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.991,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2019 20:43:21 -0000 --Apple-Mail=_E6985077-2E66-4277-A5D8-8CE0BD948935 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 11, 2019, at 8:13 AM, Kyle Evans wrote: =E2=80=A6 >>> Modified: head/tools/build/mk/OptionalObsoleteFiles.inc >>> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >>> --- head/tools/build/mk/OptionalObsoleteFiles.inc Fri Jan 11 = 14:21:59 2019 (r342944) >>> +++ head/tools/build/mk/OptionalObsoleteFiles.inc Fri Jan 11 = 15:52:09 2019 (r342945) >>> @@ -504,6 +504,7 @@ OLD_FILES+=3Dusr/lib32/libsdp_p.a >>> .endif >>> OLD_FILES+=3Dusr/sbin/ath3kfw >>> OLD_FILES+=3Dusr/sbin/bcmfw >>> +OLD_FILES+=3Dusr/sbin/bluetooth-config >>=20 >> I am confused, or miss understand something. >> This commit adds these files, but declares them as Obsolete? >>=20 >=20 > This is correct; it is obsolete when Bluetooth is disabled. Hi Rodney, Clarifying on kevans@=E2=80=99s point a tad, this is how one = specifies optional components in the base system. If you set = MK_BLUETOOTH =3D=3D no in /etc/src.conf, etc, it will remove = /usr/sbin/bluetooth-config with =E2=80=9Cmake delete-old=E2=80=9D after = this commit. This is useful when setting these options for the first = time after installing FreeBSD on a system where the default option is = for the feature to be installed. I suspect pkg-base will make this obsolete in time. Hope this helps, -Enji --Apple-Mail=_E6985077-2E66-4277-A5D8-8CE0BD948935 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEtvtxN6kOllEF3nmX5JFNMZeDGN4FAlw4/+UACgkQ5JFNMZeD GN7iAw/7B4EUKoxxUQSVGuBfNdAE3tHoDdU0e1teNSqU2HAVlmzNS6v7bbfbXIdc FmJf7s9gBxm85O2emf3WWtYGVVolqlfiVWR4aFsmyGpmIyCIjueL9iKXW5arBKdd bGGPlwuArPfpK9151M1FUarPqYXguN29BXmJ+aeLrkhI3rKBpXZq+lndAxzsfuMu 4jcO+NnImbLsU8JfjIDYiEvr5ThbEPeB1FWCTUWjVZrZx4MGBO3ZOQEX6G3KWkpg K2GkV/DaIVvSNODGgixAbjLEwXUaZJtLxLWNWLgbjnqqP7MDCvJ9csF1ChS6x3hc OwJWMvIBpHd+8ssIkOpA3/RzxT6OnAjd3Glhc73PBYhIckmVKvm2GuFiJMSQR1bM a6qttw2lb/dBGKQaZq0ZlHSbm6XEjS8exX03UEHpeQTpkH6cdmUOPUEUIehGuZfH 9LoxNfmSjGCY/7ktrE0fkqQwcsvZfR0Adjp2zhnx4nLJkszw6J697J2HhIoic/LF 6fMGTQDMpozerMAg0WynTzAfXFqmKvwbUTTkK/gR4qJlZIAFIEoAE+2MYexq/eiE 8qJ3/4HTFyKlcw8qYRl1Huozuyni2tTTYWtO9SUPxGYzc2uVQQwhMeInop34cLuM XBydPD5srEpGZkQMM2CyKEKqrimxaOz3DI4rFHyHgJVgR8f5XrY= =5qvD -----END PGP SIGNATURE----- --Apple-Mail=_E6985077-2E66-4277-A5D8-8CE0BD948935-- From owner-svn-src-head@freebsd.org Fri Jan 11 20:46:55 2019 Return-Path: Delivered-To: svn-src-head@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 60FFC149CD78; Fri, 11 Jan 2019 20:46:55 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CB14586F8E; Fri, 11 Jan 2019 20:46:54 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pl1-x62c.google.com with SMTP id gn14so7254665plb.10; Fri, 11 Jan 2019 12:46:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=ZD0A5YeFtdiNtFC7L3WLWCN65FjpW4BqnddFKrKExi8=; b=Jrfwq3MKEZdb7fGYgSy8lUkLIJidACmVy8kMS5iU7qio2MnSq4IBJkKf2avg+TKFty 80BlQuWhubfHqV0Yldn5KHoucSHuWKDk9xWCfaXgKPe7ST33afnWkyxcw7F7o2H/e9KN 4zIOrtrqPHbH8y2sfm4JGoFCCZpUdATPXZhIwd/11I8OUo5VlSSCrOL2E7M8nAyAU8vq CW/CLeXPiAgk4X3SfTEUBGd3pg7qba5t/Co4cVWJjDu+7yiJF8UH7wyfEMUiR+sJJ/Mf kOqqHxE3S/qJIOcJMRI0U3eXKbWwNiuyLJTcZb/n/EA7lT3Xi19Q2LP0bR+uRs1kCu79 thXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=ZD0A5YeFtdiNtFC7L3WLWCN65FjpW4BqnddFKrKExi8=; b=FpjW7CIqswTdtz4645wcvDr/Pq9IFYjVP0TZJCdXRhoa/9kK1igRd0umS+uOmWmJ5I pQADKKU27cnXcF2d1ZZ9f0iNa8FMrxb9ZjID+WEycpGDY6/gB8WybaipiUtUW31/Hgkb XKpkV8Pm8ez0j8Y+pJFsQdcqD4/LHWkXQ7BKDb01bo5lYcBltB8xDOfw7zuAw+GbLEDZ kL+N7NgrjFnc7J9RUtU0EoHBwR1v6Lg1ol2F2J7tDP4SucIixqaQ1k+evIfuexW8+KQ6 lYRv6kvvuqKSCZ+8vfEo5+WXbdn9SEzN6tvYzyGaXtjbLdNBIRBkbjDbWC5SYoOtK0av Af+A== X-Gm-Message-State: AJcUukdnK+kJzZRxUG3GSZ5TF8Yhn7k8sXlTYBHMYCpwfgFIUqgHdeoU lD76fBFNMtDCqEpW9acRfV6nhnoC X-Google-Smtp-Source: ALg8bN7L6nGG8XoHih+Tifz3a4yMAn+S75nIKiKXIAtN46dstORw/1BQvhzwrrzFqa/19NSIFYZh5Q== X-Received: by 2002:a17:902:4222:: with SMTP id g31mr16006706pld.240.1547239613647; Fri, 11 Jan 2019 12:46:53 -0800 (PST) Received: from [192.168.20.7] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id w3sm114709104pge.8.2019.01.11.12.46.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 Jan 2019 12:46:52 -0800 (PST) From: Enji Cooper Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_6DA1DEC4-7607-4775-BCA4-C579CAA90936"; protocol="application/pgp-signature"; micalg=pgp-sha256 Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: svn commit: r342945 - in head: tools/build/mk usr.sbin/bluetooth usr.sbin/bluetooth/bluetooth-config Date: Fri, 11 Jan 2019 12:46:51 -0800 In-Reply-To: Cc: Devin Teske , "Rodney W. Grimes" , Lars Engels , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org To: Warner Losh References: <201901111916.x0BJGcLG022599@pdx.rh.CN85.dnsmgr.net> <12293ACC-4C9C-4BFB-A04B-85D43AFA0837@FreeBSD.org> X-Mailer: Apple Mail (2.3445.9.1) X-Rspamd-Queue-Id: CB14586F8E X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.992,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2019 20:46:55 -0000 --Apple-Mail=_6DA1DEC4-7607-4775-BCA4-C579CAA90936 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Jan 11, 2019, at 12:36 PM, Warner Losh wrote: ... > I talked about this at BSDCan in June. $foo is preferred (there > *is* a difference) and, as you say, if a file is consistently ${foo} > then it is fine. >=20 > I prefer {} because $foo:bar doesn't work while ${foo}:bar does. I think the form Warner brings up makes more sense to sh(1) newcomers = who might not know the intricacies of the grammar. Similar rules apply = to perl and other languages as well when it comes to variable expansion = and such. Thank you, -Enji --Apple-Mail=_6DA1DEC4-7607-4775-BCA4-C579CAA90936 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEtvtxN6kOllEF3nmX5JFNMZeDGN4FAlw5ALsACgkQ5JFNMZeD GN5JOg//Z+/0qucIu0GLKF6UCqQRJVVIyt/qvds4kgFnvAWSG21xjy40GJafyhT0 dXci2U0EP8vgM08UZvDbBAepE2Lm2ZwJl5zjK0NMIw/+ZP/UDoFZ9TJKTtbO8B+j Y/CAcwxmDSPCDrf0JzR/jvrn+TrTQE7crmI2kcV4uOSKjRJpHAW7ocFvYgsB5V9L KWTziFYbQP66T+eySKPPiAKaiFbfXVlqhByp1ydEsVpxNADcOROljpHvn6E10r0a OIHknIVjMVW8InYT75TaM1ZkA2YLS8ifm1/xwMXPNWVluQp1cZ5PrWNoDxUQ92HP 37hHn/x9cA9sLJkzcr20WWlREy+wYn3cCE0Wfleq3u1BGc3Meb6BdhHkXrS1YVj+ pxAGxSmO8Tw6VdpRgMvyqS8NCC5ArsS0w6QaxL711YwyPWdZmCnn0F6EuSDaQJb1 j4w4MOrUdxh82RlMJmBV6Og3tHt4AGl6bQir8YZRES51BD8nwJ+hgu6xgK/0OhjE IslwQzj3aRLS9glCmzpR8adnGG7pdi9RsBJoe94iKOMKMJQy/Al9O7+bLOoo1KKn bUh72qO0lR8biyxxadA10pmRUd0ROEuJl4UCvGrrt2Ix3XzX403Q4zh8uUSbkVMe wvR375j1MF+BT9AkdYKgrXNFkmAanCsrObnvVyodstEe4rOiy7A= =scDU -----END PGP SIGNATURE----- --Apple-Mail=_6DA1DEC4-7607-4775-BCA4-C579CAA90936-- From owner-svn-src-head@freebsd.org Fri Jan 11 21:04:45 2019 Return-Path: Delivered-To: svn-src-head@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 D6D86149D753; Fri, 11 Jan 2019 21:04:45 +0000 (UTC) (envelope-from lars@e.0x20.net) Received: from mail.0x20.net (mail.0x20.net [46.251.251.56]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "0x20.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6980A87FF3; Fri, 11 Jan 2019 21:04:45 +0000 (UTC) (envelope-from lars@e.0x20.net) Received: from e.0x20.net (mail.0x20.net [46.251.251.56]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.0x20.net (Postfix) with ESMTPS id 7CD3A98917; Fri, 11 Jan 2019 22:03:56 +0100 (CET) Received: (from lars@localhost) by e.0x20.net (8.15.2/8.15.2/Submit) id x0BL3usZ057521; Fri, 11 Jan 2019 22:03:56 +0100 (CET) (envelope-from lars) Date: Fri, 11 Jan 2019 22:03:56 +0100 From: Lars Engels To: rgrimes@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r342945 - in head: tools/build/mk usr.sbin/bluetooth usr.sbin/bluetooth/bluetooth-config Message-ID: <20190111210356.GA1267@e.0x20.net> References: <201901111552.x0BFqAxa049564@repo.freebsd.org> <201901111604.x0BG4XoU021904@pdx.rh.CN85.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201901111604.x0BG4XoU021904@pdx.rh.CN85.dnsmgr.net> X-Editor: VIM - Vi IMproved 8.0 User-Agent: Mutt/1.11.1 (2018-12-01) X-Rspamd-Queue-Id: 6980A87FF3 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.987,0]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2019 21:04:46 -0000 On Fri, Jan 11, 2019 at 08:04:33AM -0800, Rodney W. Grimes wrote: > The style of this .sh does not match the normal style of > such things in base, especially with respect to long lines > and indentation. In addition to adding the license header and changing copyleft -> copyright I changed the indentation to tabs and wrapped around most lines at 80 chars: http://bsd-geek.de/FreeBSD/bluetooth-config.sh IMHO the original version was easier to read, but I will adhere to standards. :) From owner-svn-src-head@freebsd.org Fri Jan 11 21:07:05 2019 Return-Path: Delivered-To: svn-src-head@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 136C9149D892; Fri, 11 Jan 2019 21:07:05 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 87855881B9; Fri, 11 Jan 2019 21:07:04 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x0BL6wUq023064; Fri, 11 Jan 2019 13:06:58 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id x0BL6wAd023063; Fri, 11 Jan 2019 13:06:58 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201901112106.x0BL6wAd023063@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r342945 - in head: tools/build/mk usr.sbin/bluetooth usr.sbin/bluetooth/bluetooth-config In-Reply-To: To: Enji Cooper Date: Fri, 11 Jan 2019 13:06:58 -0800 (PST) CC: Warner Losh , Devin Teske , "Rodney W. Grimes" , Lars Engels , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 87855881B9 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.981,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2019 21:07:05 -0000 > > > On Jan 11, 2019, at 12:36 PM, Warner Losh wrote: > > ... > > > I talked about this at BSDCan in June. $foo is preferred (there > > *is* a difference) and, as you say, if a file is consistently ${foo} > > then it is fine. > > > > I prefer {} because $foo:bar doesn't work while ${foo}:bar does. Actually I think $foo:bar works... But what does not work is when you want to glue foo to something without intervening special characters. # foo=FOO # echo $foobar # echo ${foo}bar FOObar # echo $foo:bar FOO:bar > > I think the form Warner brings up makes more sense to sh(1) newcomers who might not know the intricacies of the grammar. Similar rules apply to perl and other languages as well when it comes to variable expansion and such. > Thank you, > -Enji I personally do prefer the ${foo} form as iirc it always works and you dont have to remeber the special rules, where as the other form does not always work and you end up using the {} form to fix when it does not, this leading to files with mixed form, which, imho, is ok, but messy. It also makes it easy to search and sed for variables and not get things you didnt want due to common root names in variables. I can easily explicity find variable ${foo} very easy and not have to stop at all the ${foobar} variables. I do understand that for many people the {} are unneeded noise characters. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Fri Jan 11 21:11:33 2019 Return-Path: Delivered-To: svn-src-head@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 9CEFB149DB36; Fri, 11 Jan 2019 21:11:33 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F106886FB; Fri, 11 Jan 2019 21:11:32 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x0BLBQik023097; Fri, 11 Jan 2019 13:11:26 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id x0BLBQFl023096; Fri, 11 Jan 2019 13:11:26 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201901112111.x0BLBQFl023096@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r342945 - in head: tools/build/mk usr.sbin/bluetooth usr.sbin/bluetooth/bluetooth-config In-Reply-To: <20190111210356.GA1267@e.0x20.net> To: Lars Engels Date: Fri, 11 Jan 2019 13:11:26 -0800 (PST) CC: rgrimes@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 0F106886FB X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.981,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2019 21:11:33 -0000 > On Fri, Jan 11, 2019 at 08:04:33AM -0800, Rodney W. Grimes wrote: > > The style of this .sh does not match the normal style of > > such things in base, especially with respect to long lines > > and indentation. > > In addition to adding the license header and changing copyleft -> > copyright I changed the indentation to tabs and wrapped around most > lines at 80 chars: Looks like the copyright has gone missing??? Is it just the printf's that are now > 80? > > http://bsd-geek.de/FreeBSD/bluetooth-config.sh > > IMHO the original version was easier to read, but I will adhere to > standards. :) > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Fri Jan 11 21:16:31 2019 Return-Path: Delivered-To: svn-src-head@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 C4FE8149DDD0; Fri, 11 Jan 2019 21:16:31 +0000 (UTC) (envelope-from lars@e.0x20.net) Received: from mail.0x20.net (mail.0x20.net [46.251.251.56]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "0x20.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 64B1A889C5; Fri, 11 Jan 2019 21:16:31 +0000 (UTC) (envelope-from lars@e.0x20.net) Received: from e.0x20.net (mail.0x20.net [46.251.251.56]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.0x20.net (Postfix) with ESMTPS id 40FED99703; Fri, 11 Jan 2019 22:15:43 +0100 (CET) Received: (from lars@localhost) by e.0x20.net (8.15.2/8.15.2/Submit) id x0BLFhhU004122; Fri, 11 Jan 2019 22:15:43 +0100 (CET) (envelope-from lars) Date: Fri, 11 Jan 2019 22:15:43 +0100 From: Lars Engels To: rgrimes@freebsd.org Cc: Lars Engels , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r342945 - in head: tools/build/mk usr.sbin/bluetooth usr.sbin/bluetooth/bluetooth-config Message-ID: <20190111211543.GC1267@e.0x20.net> References: <20190111210356.GA1267@e.0x20.net> <201901112111.x0BLBQFl023096@pdx.rh.CN85.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201901112111.x0BLBQFl023096@pdx.rh.CN85.dnsmgr.net> X-Editor: VIM - Vi IMproved 8.0 User-Agent: Mutt/1.11.1 (2018-12-01) X-Rspamd-Queue-Id: 64B1A889C5 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.987,0]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2019 21:16:31 -0000 On Fri, Jan 11, 2019 at 01:11:26PM -0800, Rodney W. Grimes wrote: > > On Fri, Jan 11, 2019 at 08:04:33AM -0800, Rodney W. Grimes wrote: > > > The style of this .sh does not match the normal style of > > > such things in base, especially with respect to long lines > > > and indentation. > > > > In addition to adding the license header and changing copyleft -> > > copyright I changed the indentation to tabs and wrapped around most > > lines at 80 chars: > > Looks like the copyright has gone missing??? Yes, I removed it after skimming through the other Beerware licensed files and the all only had the license, no copyright. > > Is it just the printf's that are now > 80? That's right. From owner-svn-src-head@freebsd.org Fri Jan 11 22:28:19 2019 Return-Path: Delivered-To: svn-src-head@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 98FF2149FEC9; Fri, 11 Jan 2019 22:28:19 +0000 (UTC) (envelope-from ngie@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 3E21F8B1E7; Fri, 11 Jan 2019 22:28:19 +0000 (UTC) (envelope-from ngie@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 30AB52220E; Fri, 11 Jan 2019 22:28:19 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0BMSJJ8058023; Fri, 11 Jan 2019 22:28:19 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0BMSJtG058022; Fri, 11 Jan 2019 22:28:19 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201901112228.x0BMSJtG058022@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Fri, 11 Jan 2019 22:28:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342952 - head/usr.bin/getconf X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/usr.bin/getconf X-SVN-Commit-Revision: 342952 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3E21F8B1E7 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.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2019 22:28:19 -0000 Author: ngie Date: Fri Jan 11 22:28:18 2019 New Revision: 342952 URL: https://svnweb.freebsd.org/changeset/base/342952 Log: Add Linux compatibility support for `SC_NPROCESSORS_{CONF,ONLN}` as `_SC_NPROCESSORS_{CONF,ONLN}` The goal of this change is to make it easier to use getconf to query the number of available processors. Sadly it's unclear per POSIX, which form (with a preceding _ or lacking it) is correct. I will bring this up on the Austin Group list so this point is clarified for implementors that might rely on this getconf variable in future POSIX spec versions. This is something I noticed when trying to import GoogleTest to FreeBSD as one of the CI scripts uses this variable on Linux. MFC after: 2 weeks Approved by: emaste (mentor) Differential Revision: https://reviews.freebsd.org/D18640 Modified: head/usr.bin/getconf/sysconf.gperf Modified: head/usr.bin/getconf/sysconf.gperf ============================================================================== --- head/usr.bin/getconf/sysconf.gperf Fri Jan 11 22:18:48 2019 (r342951) +++ head/usr.bin/getconf/sysconf.gperf Fri Jan 11 22:28:18 2019 (r342952) @@ -63,6 +63,8 @@ SYMLOOP_MAX, _SC_SYMLOOP_MAX TIMER_MAX, _SC_TIMER_MAX TTY_NAME_MAX, _SC_TTY_NAME_MAX TZNAME_MAX, _SC_TZNAME_MAX +_NPROCESSORS_CONF, _SC_NPROCESSORS_CONF +_NPROCESSORS_ONLN, _SC_NPROCESSORS_ONLN _POSIX2_CHAR_TERM, _SC_2_CHAR_TERM _POSIX2_C_BIND, _SC_2_C_BIND _POSIX2_C_DEV, _SC_2_C_DEV From owner-svn-src-head@freebsd.org Sat Jan 12 04:44:26 2019 Return-Path: Delivered-To: svn-src-head@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 BFCDB1484B7E; Sat, 12 Jan 2019 04:44:26 +0000 (UTC) (envelope-from np@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 6404D6F3D9; Sat, 12 Jan 2019 04:44:26 +0000 (UTC) (envelope-from np@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 581732646D; Sat, 12 Jan 2019 04:44:26 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0C4iQD0055269; Sat, 12 Jan 2019 04:44:26 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0C4iQdC055268; Sat, 12 Jan 2019 04:44:26 GMT (envelope-from np@FreeBSD.org) Message-Id: <201901120444.x0C4iQdC055268@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sat, 12 Jan 2019 04:44:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342954 - head/sys/dev/cxgbe X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: head/sys/dev/cxgbe X-SVN-Commit-Revision: 342954 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6404D6F3D9 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.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jan 2019 04:44:26 -0000 Author: np Date: Sat Jan 12 04:44:25 2019 New Revision: 342954 URL: https://svnweb.freebsd.org/changeset/base/342954 Log: cxgbe(4): Move some INTx specific code to a more appropriate place. Modified: head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Sat Jan 12 00:39:42 2019 (r342953) +++ head/sys/dev/cxgbe/t4_sge.c Sat Jan 12 04:44:25 2019 (r342954) @@ -1379,6 +1379,9 @@ t4_intr_all(void *arg) MPASS(sc->intr_count == 1); + if (sc->intr_type == INTR_INTX) + t4_write_reg(sc, MYPF_REG(A_PCIE_PF_CLI), 0); + t4_intr_err(arg); t4_intr_evt(fwq); } @@ -1392,7 +1395,6 @@ t4_intr_err(void *arg) { struct adapter *sc = arg; - t4_write_reg(sc, MYPF_REG(A_PCIE_PF_CLI), 0); t4_slow_intr_handler(sc); } From owner-svn-src-head@freebsd.org Sat Jan 12 11:15:01 2019 Return-Path: Delivered-To: svn-src-head@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 6D25A148F0FC; Sat, 12 Jan 2019 11:15:01 +0000 (UTC) (envelope-from hselasky@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 0CBE482F42; Sat, 12 Jan 2019 11:15:01 +0000 (UTC) (envelope-from hselasky@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 02B91273E; Sat, 12 Jan 2019 11:15:01 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0CBF0Yr058142; Sat, 12 Jan 2019 11:15:00 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0CBF0Uf058138; Sat, 12 Jan 2019 11:15:00 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201901121115.x0CBF0Uf058138@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sat, 12 Jan 2019 11:15:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342961 - in head/sys/dev: sound/usb usb usb/quirk X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys/dev: sound/usb usb usb/quirk X-SVN-Commit-Revision: 342961 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0CBE482F42 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)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jan 2019 11:15:01 -0000 Author: hselasky Date: Sat Jan 12 11:14:59 2019 New Revision: 342961 URL: https://svnweb.freebsd.org/changeset/base/342961 Log: snd_uaudio: Add quirks for Edirol UA-25EX in advanced driver mode. Extend the vendor class USB audio quirk to cover devices without the USB audio control descriptor. PR: 234794 MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/sound/usb/uaudio.c head/sys/dev/sound/usb/uaudioreg.h head/sys/dev/usb/quirk/usb_quirk.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/sound/usb/uaudio.c ============================================================================== --- head/sys/dev/sound/usb/uaudio.c Sat Jan 12 08:30:13 2019 (r342960) +++ head/sys/dev/sound/usb/uaudio.c Sat Jan 12 11:14:59 2019 (r342961) @@ -1745,7 +1745,7 @@ uaudio_chan_fill_info_sub(struct uaudio_softc *sc, str continue; } - if ((acdp != NULL) && + if ((acdp != NULL || sc->sc_uq_au_vendor_class != 0) && (desc->bDescriptorType == UDESC_CS_INTERFACE) && (desc->bDescriptorSubtype == AS_GENERAL) && (asid.v1 == NULL)) { @@ -1761,7 +1761,7 @@ uaudio_chan_fill_info_sub(struct uaudio_softc *sc, str } } } - if ((acdp != NULL) && + if ((acdp != NULL || sc->sc_uq_au_vendor_class != 0) && (desc->bDescriptorType == UDESC_CS_INTERFACE) && (desc->bDescriptorSubtype == FORMAT_TYPE) && (asf1d.v1 == NULL)) { @@ -1800,7 +1800,7 @@ uaudio_chan_fill_info_sub(struct uaudio_softc *sc, str continue; } } - if ((acdp != NULL) && + if ((acdp != NULL || sc->sc_uq_au_vendor_class != 0) && (desc->bDescriptorType == UDESC_CS_ENDPOINT) && (desc->bDescriptorSubtype == AS_GENERAL) && (sed.v1 == NULL)) { Modified: head/sys/dev/sound/usb/uaudioreg.h ============================================================================== --- head/sys/dev/sound/usb/uaudioreg.h Sat Jan 12 08:30:13 2019 (r342960) +++ head/sys/dev/sound/usb/uaudioreg.h Sat Jan 12 11:14:59 2019 (r342961) @@ -36,7 +36,7 @@ #ifndef _UAUDIOREG_H_ #define _UAUDIOREG_H_ -#define UAUDIO_VERSION 0x0100 +#define UAUDIO_VERSION_10 0x0100 #define UAUDIO_VERSION_20 0x0200 #define UAUDIO_VERSION_30 0x0300 Modified: head/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- head/sys/dev/usb/quirk/usb_quirk.c Sat Jan 12 08:30:13 2019 (r342960) +++ head/sys/dev/usb/quirk/usb_quirk.c Sat Jan 12 11:14:59 2019 (r342961) @@ -529,6 +529,7 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRK USB_QUIRK(MAUDIO, FASTTRACKULTRA8R, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS), USB_QUIRK(CMEDIA, CM6206, 0x0000, 0xffff, UQ_AU_SET_SPDIF_CM6206), USB_QUIRK(PLOYTEC, SPL_CRIMSON_1, 0x0000, 0xffff, UQ_CFG_INDEX_1), + USB_QUIRK(ROLAND, UA25EX_AD, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS), /* * Quirks for manufacturers which USB devices does not respond Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Sat Jan 12 08:30:13 2019 (r342960) +++ head/sys/dev/usb/usbdevs Sat Jan 12 11:14:59 2019 (r342961) @@ -3998,6 +3998,8 @@ product ROLAND SD20 0x0027 SD-20 MIDI Synth product ROLAND SD80 0x0029 SD-80 MIDI Synth product ROLAND UA700 0x002b UA-700 Audio I/F product ROLAND PCR300 0x0033 EDIROL PCR-300 MIDI I/F +product ROLAND UA25EX_AD 0x00e6 EDIROL UA-25EX (Advanced Driver) +product ROLAND UA25EX_CC 0x00e7 EDIROL UA-25EX (Class Compliant) /* Rockfire products */ product ROCKFIRE GAMEPAD 0x2033 gamepad 203USB From owner-svn-src-head@freebsd.org Sat Jan 12 11:21:31 2019 Return-Path: Delivered-To: svn-src-head@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 3F3CE148F219; Sat, 12 Jan 2019 11:21:31 +0000 (UTC) (envelope-from andrew@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 D9C52832E8; Sat, 12 Jan 2019 11:21:30 +0000 (UTC) (envelope-from andrew@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 CD7B028A6; Sat, 12 Jan 2019 11:21:30 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0CBLURe059381; Sat, 12 Jan 2019 11:21:30 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0CBLSiv058912; Sat, 12 Jan 2019 11:21:28 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201901121121.x0CBLSiv058912@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 12 Jan 2019 11:21:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342962 - in head: sys/amd64/conf sys/arm64/conf sys/conf sys/kern sys/sys tests/sys/kern X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head: sys/amd64/conf sys/arm64/conf sys/conf sys/kern sys/sys tests/sys/kern X-SVN-Commit-Revision: 342962 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D9C52832E8 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.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jan 2019 11:21:31 -0000 Author: andrew Date: Sat Jan 12 11:21:28 2019 New Revision: 342962 URL: https://svnweb.freebsd.org/changeset/base/342962 Log: Add support for the Clang Coverage Sanitizer in the kernel (KCOV). When building with KCOV enabled the compiler will insert function calls to probes allowing us to trace the execution of the kernel from userspace. These probes are on function entry (trace-pc) and on comparison operations (trace-cmp). Userspace can enable the use of these probes on a single kernel thread with an ioctl interface. It can allocate space for the probe with KIOSETBUFSIZE, then mmap the allocated buffer and enable tracing with KIOENABLE, with the trace mode being passed in as the int argument. When complete KIODISABLE is used to disable tracing. The first item in the buffer is the number of trace event that have happened. Userspace can write 0 to this to reset the tracing, and is expected to do so on first use. The format of the buffer depends on the trace mode. When in PC tracing just the return address of the probe is stored. Under comparison tracing the comparison type, the two arguments, and the return address are traced. The former method uses on entry per trace event, while the later uses 4. As such they are incompatible so only a single mode may be enabled. KCOV is expected to help fuzzing the kernel, and while in development has already found a number of issues. It is required for the syzkaller system call fuzzer [1]. Other kernel fuzzers could also make use of it, either with the current interface, or by extending it with new modes. A man page is currently being worked on and is expected to be committed soon, however having the code in the kernel now is useful for other developers to use. [1] https://github.com/google/syzkaller Submitted by: Mitchell Horne (Earlier version) Reviewed by: kib Testing by: tuexen Sponsored by: DARPA, AFRL Sponsored by: The FreeBSD Foundation (Mitchell Horne) Differential Revision: https://reviews.freebsd.org/D14599 Added: head/sys/kern/kern_kcov.c (contents, props changed) head/sys/sys/kcov.h (contents, props changed) head/tests/sys/kern/kcov.c (contents, props changed) Modified: head/sys/amd64/conf/GENERIC head/sys/arm64/conf/GENERIC head/sys/conf/files head/sys/conf/kern.pre.mk head/sys/conf/options head/sys/kern/kern_thread.c head/sys/sys/proc.h head/tests/sys/kern/Makefile Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Sat Jan 12 11:14:59 2019 (r342961) +++ head/sys/amd64/conf/GENERIC Sat Jan 12 11:21:28 2019 (r342962) @@ -102,6 +102,7 @@ options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) options VERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default # Warning: KUBSAN can result in a kernel too large for loader to load #options KUBSAN # Kernel Undefined Behavior Sanitizer +#options KCOV # Kernel Coverage Sanitizer # Kernel dump features. options EKCD # Support for encrypted kernel dumps Modified: head/sys/arm64/conf/GENERIC ============================================================================== --- head/sys/arm64/conf/GENERIC Sat Jan 12 11:14:59 2019 (r342961) +++ head/sys/arm64/conf/GENERIC Sat Jan 12 11:21:28 2019 (r342962) @@ -94,6 +94,7 @@ options USB_DEBUG # enable debug msgs options VERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default # Warning: KUBSAN can result in a kernel too large for loader to load #options KUBSAN # Kernel Undefined Behavior Sanitizer +#options KCOV # Kernel Coverage Sanitizer # Kernel dump features. options EKCD # Support for encrypted kernel dumps Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sat Jan 12 11:14:59 2019 (r342961) +++ head/sys/conf/files Sat Jan 12 11:21:28 2019 (r342962) @@ -3807,6 +3807,8 @@ kern/kern_hhook.c standard kern/kern_idle.c standard kern/kern_intr.c standard kern/kern_jail.c standard +kern/kern_kcov.c optional kcov \ + compile-with "${NORMAL_C} -fno-sanitize-coverage=trace-pc,trace-cmp" kern/kern_khelp.c standard kern/kern_kthread.c standard kern/kern_ktr.c optional ktr Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Sat Jan 12 11:14:59 2019 (r342961) +++ head/sys/conf/kern.pre.mk Sat Jan 12 11:21:28 2019 (r342962) @@ -117,6 +117,12 @@ KUBSAN_ENABLED!= grep KUBSAN opt_global.h || true ; ec .if !empty(KUBSAN_ENABLED) SAN_CFLAGS+= -fsanitize=undefined .endif + +KCOV_ENABLED!= grep KCOV opt_kcov.h || true ; echo +.if !empty(KCOV_ENABLED) +SAN_CFLAGS+= -fsanitize-coverage=trace-pc,trace-cmp +.endif + CFLAGS+= ${SAN_CFLAGS} # Put configuration-specific C flags last (except for ${PROF}) so that they Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Sat Jan 12 11:14:59 2019 (r342961) +++ head/sys/conf/options Sat Jan 12 11:21:28 2019 (r342962) @@ -57,6 +57,7 @@ DDB_CTF opt_ddb.h DDB_NUMSYM opt_ddb.h FULL_BUF_TRACKING opt_global.h GDB +KCOV opt_kcov.h KDB opt_global.h KDB_TRACE opt_kdb.h KDB_UNATTENDED opt_kdb.h Added: head/sys/kern/kern_kcov.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/kern/kern_kcov.c Sat Jan 12 11:21:28 2019 (r342962) @@ -0,0 +1,676 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (C) 2018 The FreeBSD Foundation. All rights reserved. + * Copyright (C) 2018, 2019 Andrew Turner + * + * This software was developed by Mitchell Horne under sponsorship of + * the FreeBSD Foundation. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237 + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include + +MALLOC_DEFINE(M_KCOV_INFO, "kcovinfo", "KCOV info type"); + +#define KCOV_ELEMENT_SIZE sizeof(uint64_t) + +/* + * To know what the code can safely perform at any point in time we use a + * state machine. In the normal case the state transitions are: + * + * OPEN -> READY -> RUNNING -> DYING + * | | ^ | ^ ^ + * | | +--------+ | | + * | +-------------------+ | + * +-----------------------------+ + * + * The states are: + * OPEN: The kcov fd has been opened, but no buffer is available to store + * coverage data. + * READY: The buffer to store coverage data has been allocated. Userspace + * can set this by using ioctl(fd, KIOSETBUFSIZE, entries);. When + * this has been set the buffer can be written to by the kernel, + * and mmaped by userspace. + * RUNNING: The coverage probes are able to store coverage data in the buffer. + * This is entered with ioctl(fd, KIOENABLE, mode);. The READY state + * can be exited by ioctl(fd, KIODISABLE); or exiting the thread to + * return to the READY state to allow tracing to be reused, or by + * closing the kcov fd to enter the DYING state. + * DYING: The fd has been closed. All states can enter into this state when + * userspace closes the kcov fd. + * + * We need to be careful when moving into and out of the RUNNING state. As + * an interrupt may happen while this is happening the ordering of memory + * operations is important so struct kcov_info is valid for the tracing + * functions. + * + * When moving into the RUNNING state prior stores to struct kcov_info need + * to be observed before the state is set. This allows for interrupts that + * may call into one of the coverage functions to fire at any point while + * being enabled and see a consistent struct kcov_info. + * + * When moving out of the RUNNING state any later stores to struct kcov_info + * need to be observed after the state is set. As with entering this is to + * present a consistent struct kcov_info to interrupts. + */ +typedef enum { + KCOV_STATE_INVALID, + KCOV_STATE_OPEN, /* The device is open, but with no buffer */ + KCOV_STATE_READY, /* The buffer has been allocated */ + KCOV_STATE_RUNNING, /* Recording trace data */ + KCOV_STATE_DYING, /* The fd was closed */ +} kcov_state_t; + +/* + * (l) Set while holding the kcov_lock mutex and not in the RUNNING state. + * (o) Only set once while in the OPEN state. Cleaned up while in the DYING + * state, and with no thread associated with the struct kcov_info. + * (s) Set atomically to enter or exit the RUNNING state, non-atomically + * otherwise. See above for a description of the other constraints while + * moving into or out of the RUNNING state. + */ +struct kcov_info { + struct thread *thread; /* (l) */ + vm_object_t bufobj; /* (o) */ + vm_offset_t kvaddr; /* (o) */ + size_t entries; /* (o) */ + size_t bufsize; /* (o) */ + kcov_state_t state; /* (s) */ + int mode; /* (l) */ + bool mmap; +}; + +/* Prototypes */ +static d_open_t kcov_open; +static d_close_t kcov_close; +static d_mmap_single_t kcov_mmap_single; +static d_ioctl_t kcov_ioctl; + +void __sanitizer_cov_trace_pc(void); +void __sanitizer_cov_trace_cmp1(uint8_t, uint8_t); +void __sanitizer_cov_trace_cmp2(uint16_t, uint16_t); +void __sanitizer_cov_trace_cmp4(uint32_t, uint32_t); +void __sanitizer_cov_trace_cmp8(uint64_t, uint64_t); +void __sanitizer_cov_trace_const_cmp1(uint8_t, uint8_t); +void __sanitizer_cov_trace_const_cmp2(uint16_t, uint16_t); +void __sanitizer_cov_trace_const_cmp4(uint32_t, uint32_t); +void __sanitizer_cov_trace_const_cmp8(uint64_t, uint64_t); +void __sanitizer_cov_trace_switch(uint64_t, uint64_t *); + +static int kcov_alloc(struct kcov_info *info, size_t entries); +static void kcov_init(const void *unused); + +static struct cdevsw kcov_cdevsw = { + .d_version = D_VERSION, + .d_open = kcov_open, + .d_close = kcov_close, + .d_mmap_single = kcov_mmap_single, + .d_ioctl = kcov_ioctl, + .d_name = "kcov", +}; + +SYSCTL_NODE(_kern, OID_AUTO, kcov, CTLFLAG_RW, 0, "Kernel coverage"); + +static u_int kcov_max_entries = KCOV_MAXENTRIES; +SYSCTL_UINT(_kern_kcov, OID_AUTO, max_entries, CTLFLAG_RW, + &kcov_max_entries, 0, + "Maximum number of entries in the kcov buffer"); + +static struct mtx kcov_lock; + +static struct kcov_info * +get_kinfo(struct thread *td) +{ + struct kcov_info *info; + + /* We might have a NULL thread when releasing the secondary CPUs */ + if (td == NULL) + return (NULL); + + /* + * We are in an interrupt, stop tracing as it is not explicitly + * part of a syscall. + */ + if (td->td_intr_nesting_level > 0 || td->td_intr_frame != NULL) + return (NULL); + + /* + * If info is NULL or the state is not running we are not tracing. + */ + info = td->td_kcov_info; + if (info == NULL || + atomic_load_acq_int(&info->state) != KCOV_STATE_RUNNING) + return (NULL); + + return (info); +} + +/* + * Main entry point. A call to this function will be inserted + * at every edge, and if coverage is enabled for the thread + * this function will add the PC to the buffer. + */ +void +__sanitizer_cov_trace_pc(void) +{ + struct thread *td; + struct kcov_info *info; + uint64_t *buf, index; + + /* + * To guarantee curthread is properly set, we exit early + * until the driver has been initialized + */ + if (cold) + return; + + td = curthread; + info = get_kinfo(td); + if (info == NULL) + return; + + /* + * Check we are in the PC-trace mode. + */ + if (info->mode != KCOV_MODE_TRACE_PC) + return; + + KASSERT(info->kvaddr != 0, + ("__sanitizer_cov_trace_pc: NULL buf while running")); + + buf = (uint64_t *)info->kvaddr; + + /* The first entry of the buffer holds the index */ + index = buf[0]; + if (index + 2 > info->entries) + return; + + buf[index + 1] = (uint64_t)__builtin_return_address(0); + buf[0] = index + 1; +} + +static bool +trace_cmp(uint64_t type, uint64_t arg1, uint64_t arg2, uint64_t ret) +{ + struct thread *td; + struct kcov_info *info; + uint64_t *buf, index; + + /* + * To guarantee curthread is properly set, we exit early + * until the driver has been initialized + */ + if (cold) + return (false); + + td = curthread; + info = get_kinfo(td); + if (info == NULL) + return (false); + + /* + * Check we are in the comparison-trace mode. + */ + if (info->mode != KCOV_MODE_TRACE_CMP) + return (false); + + KASSERT(info->kvaddr != 0, + ("__sanitizer_cov_trace_pc: NULL buf while running")); + + buf = (uint64_t *)info->kvaddr; + + /* The first entry of the buffer holds the index */ + index = buf[0]; + + /* Check we have space to store all elements */ + if (index * 4 + 4 + 1 > info->entries) + return (false); + + buf[index * 4 + 1] = type; + buf[index * 4 + 2] = arg1; + buf[index * 4 + 3] = arg2; + buf[index * 4 + 4] = ret; + buf[0] = index + 1; + + return (true); +} + +void +__sanitizer_cov_trace_cmp1(uint8_t arg1, uint8_t arg2) +{ + + trace_cmp(KCOV_CMP_SIZE(0), arg1, arg2, + (uint64_t)__builtin_return_address(0)); +} + +void +__sanitizer_cov_trace_cmp2(uint16_t arg1, uint16_t arg2) +{ + + trace_cmp(KCOV_CMP_SIZE(1), arg1, arg2, + (uint64_t)__builtin_return_address(0)); +} + +void +__sanitizer_cov_trace_cmp4(uint32_t arg1, uint32_t arg2) +{ + + trace_cmp(KCOV_CMP_SIZE(2), arg1, arg2, + (uint64_t)__builtin_return_address(0)); +} + +void +__sanitizer_cov_trace_cmp8(uint64_t arg1, uint64_t arg2) +{ + + trace_cmp(KCOV_CMP_SIZE(3), arg1, arg2, + (uint64_t)__builtin_return_address(0)); +} + +void +__sanitizer_cov_trace_const_cmp1(uint8_t arg1, uint8_t arg2) +{ + + trace_cmp(KCOV_CMP_SIZE(0) | KCOV_CMP_CONST, arg1, arg2, + (uint64_t)__builtin_return_address(0)); +} + +void +__sanitizer_cov_trace_const_cmp2(uint16_t arg1, uint16_t arg2) +{ + + trace_cmp(KCOV_CMP_SIZE(1) | KCOV_CMP_CONST, arg1, arg2, + (uint64_t)__builtin_return_address(0)); +} + +void +__sanitizer_cov_trace_const_cmp4(uint32_t arg1, uint32_t arg2) +{ + + trace_cmp(KCOV_CMP_SIZE(2) | KCOV_CMP_CONST, arg1, arg2, + (uint64_t)__builtin_return_address(0)); +} + +void +__sanitizer_cov_trace_const_cmp8(uint64_t arg1, uint64_t arg2) +{ + + trace_cmp(KCOV_CMP_SIZE(3) | KCOV_CMP_CONST, arg1, arg2, + (uint64_t)__builtin_return_address(0)); +} + +/* + * val is the switch operand + * cases[0] is the number of case constants + * cases[1] is the size of val in bits + * cases[2..n] are the case constants + */ +void +__sanitizer_cov_trace_switch(uint64_t val, uint64_t *cases) +{ + uint64_t i, count, ret, type; + + count = cases[0]; + ret = (uint64_t)__builtin_return_address(0); + + switch (cases[1]) { + case 8: + type = KCOV_CMP_SIZE(0); + break; + case 16: + type = KCOV_CMP_SIZE(1); + break; + case 32: + type = KCOV_CMP_SIZE(2); + break; + case 64: + type = KCOV_CMP_SIZE(3); + break; + default: + return; + } + + val |= KCOV_CMP_CONST; + + for (i = 0; i < count; i++) + if (!trace_cmp(type, val, cases[i + 2], ret)) + return; +} + +/* + * The fd is being closed, cleanup everything we can. + */ +static void +kcov_mmap_cleanup(void *arg) +{ + struct kcov_info *info = arg; + struct thread *thread; + + mtx_lock_spin(&kcov_lock); + /* + * Move to KCOV_STATE_DYING to stop adding new entries. + * + * If the thread is running we need to wait until thread exit to + * clean up as it may currently be adding a new entry. If this is + * the case being in KCOV_STATE_DYING will signal that the buffer + * needs to be cleaned up. + */ + atomic_store_int(&info->state, KCOV_STATE_DYING); + atomic_thread_fence_seq_cst(); + thread = info->thread; + mtx_unlock_spin(&kcov_lock); + + if (thread != NULL) + return; + + /* + * We can safely clean up the info struct as it is in the + * KCOV_STATE_DYING state with no thread associated. + * + * The KCOV_STATE_DYING stops new threads from using it. + * The lack of a thread means nothing is currently using the buffers. + */ + + if (info->kvaddr != 0) { + pmap_qremove(info->kvaddr, info->bufsize / PAGE_SIZE); + kva_free(info->kvaddr, info->bufsize); + } + if (info->bufobj != NULL && !info->mmap) + vm_object_deallocate(info->bufobj); + free(info, M_KCOV_INFO); +} + +static int +kcov_open(struct cdev *dev, int oflags, int devtype, struct thread *td) +{ + struct kcov_info *info; + int error; + + info = malloc(sizeof(struct kcov_info), M_KCOV_INFO, M_ZERO | M_WAITOK); + info->state = KCOV_STATE_OPEN; + info->thread = NULL; + info->mode = -1; + info->mmap = false; + + if ((error = devfs_set_cdevpriv(info, kcov_mmap_cleanup)) != 0) + kcov_mmap_cleanup(info); + + return (error); +} + +static int +kcov_close(struct cdev *dev, int fflag, int devtype, struct thread *td) +{ + struct kcov_info *info; + int error; + + if ((error = devfs_get_cdevpriv((void **)&info)) != 0) + return (error); + + KASSERT(info != NULL, ("kcov_close with no kcov_info structure")); + + /* Trying to close, but haven't disabled */ + if (info->state == KCOV_STATE_RUNNING) + return (EBUSY); + + return (0); +} + +static int +kcov_mmap_single(struct cdev *dev, vm_ooffset_t *offset, vm_size_t size, + struct vm_object **object, int nprot) +{ + struct kcov_info *info; + int error; + + if ((nprot & (PROT_EXEC | PROT_READ | PROT_WRITE)) != + (PROT_READ | PROT_WRITE)) + return (EINVAL); + + if ((error = devfs_get_cdevpriv((void **)&info)) != 0) + return (error); + + if (info->kvaddr == 0 || size / KCOV_ELEMENT_SIZE != info->entries || + info->mmap != false) + return (EINVAL); + + info->mmap = true; + *offset = 0; + *object = info->bufobj; + return (0); +} + +static int +kcov_alloc(struct kcov_info *info, size_t entries) +{ + size_t n, pages; + vm_page_t *m; + + KASSERT(info->kvaddr == 0, ("kcov_alloc: Already have a buffer")); + KASSERT(info->state == KCOV_STATE_OPEN, + ("kcov_alloc: Not in open state (%x)", info->state)); + + if (entries < 2 || entries > kcov_max_entries) + return (EINVAL); + + /* Align to page size so mmap can't access other kernel memory */ + info->bufsize = roundup2(entries * KCOV_ELEMENT_SIZE, PAGE_SIZE); + pages = info->bufsize / PAGE_SIZE; + + if ((info->kvaddr = kva_alloc(info->bufsize)) == 0) + return (ENOMEM); + + info->bufobj = vm_pager_allocate(OBJT_PHYS, 0, info->bufsize, + PROT_READ | PROT_WRITE, 0, curthread->td_ucred); + + m = malloc(sizeof(*m) * pages, M_TEMP, M_WAITOK); + VM_OBJECT_WLOCK(info->bufobj); + for (n = 0; n < pages; n++) { + m[n] = vm_page_grab(info->bufobj, n, + VM_ALLOC_NOBUSY | VM_ALLOC_ZERO | VM_ALLOC_WIRED); + m[n]->valid = VM_PAGE_BITS_ALL; + } + VM_OBJECT_WUNLOCK(info->bufobj); + pmap_qenter(info->kvaddr, m, pages); + free(m, M_TEMP); + + info->entries = entries; + + return (0); +} + +static int +kcov_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag __unused, + struct thread *td) +{ + struct kcov_info *info; + int mode, error; + + if ((error = devfs_get_cdevpriv((void **)&info)) != 0) + return (error); + + if (cmd == KIOSETBUFSIZE) { + /* + * Set the size of the coverage buffer. Should be called + * before enabling coverage collection for that thread. + */ + if (info->state != KCOV_STATE_OPEN) { + return (EBUSY); + } + error = kcov_alloc(info, *(u_int *)data); + if (error == 0) + info->state = KCOV_STATE_READY; + return (error); + } + + mtx_lock_spin(&kcov_lock); + switch (cmd) { + case KIOENABLE: + if (info->state != KCOV_STATE_READY) { + error = EBUSY; + break; + } + if (td->td_kcov_info != NULL) { + error = EINVAL; + break; + } + mode = *(int *)data; + if (mode != KCOV_MODE_TRACE_PC && mode != KCOV_MODE_TRACE_CMP) { + error = EINVAL; + break; + } + KASSERT(info->thread == NULL, + ("Enabling kcov when already enabled")); + info->thread = td; + info->mode = mode; + /* + * Ensure the mode has been set before starting coverage + * tracing. + */ + atomic_store_rel_int(&info->state, KCOV_STATE_RUNNING); + td->td_kcov_info = info; + break; + case KIODISABLE: + /* Only the currently enabled thread may disable itself */ + if (info->state != KCOV_STATE_RUNNING || + info != td->td_kcov_info) { + error = EINVAL; + break; + } + td->td_kcov_info = NULL; + atomic_store_int(&info->state, KCOV_STATE_READY); + /* + * Ensure we have exited the READY state before clearing the + * rest of the info struct. + */ + atomic_thread_fence_rel(); + info->mode = -1; + info->thread = NULL; + break; + default: + error = EINVAL; + break; + } + mtx_unlock_spin(&kcov_lock); + + return (error); +} + +static void +kcov_thread_dtor(void *arg __unused, struct thread *td) +{ + struct kcov_info *info; + + info = td->td_kcov_info; + if (info == NULL) + return; + + mtx_lock_spin(&kcov_lock); + td->td_kcov_info = NULL; + if (info->state != KCOV_STATE_DYING) { + /* + * The kcov file is still open. Mark it as unused and + * wait for it to be closed before cleaning up. + */ + atomic_store_int(&info->state, KCOV_STATE_READY); + atomic_thread_fence_seq_cst(); + /* This info struct is unused */ + info->thread = NULL; + mtx_unlock_spin(&kcov_lock); + return; + } + mtx_unlock_spin(&kcov_lock); + + /* + * We can safely clean up the info struct as it is in the + * KCOV_STATE_DYING state where the info struct is associated with + * the current thread that's about to exit. + * + * The KCOV_STATE_DYING stops new threads from using it. + * It also stops the current thread from trying to use the info struct. + */ + + if (info->kvaddr != 0) { + pmap_qremove(info->kvaddr, info->bufsize / PAGE_SIZE); + kva_free(info->kvaddr, info->bufsize); + } + if (info->bufobj != NULL && !info->mmap) + vm_object_deallocate(info->bufobj); + free(info, M_KCOV_INFO); +} + +static void +kcov_init(const void *unused) +{ + struct make_dev_args args; + struct cdev *dev; + + mtx_init(&kcov_lock, "kcov lock", NULL, MTX_SPIN); + + make_dev_args_init(&args); + args.mda_devsw = &kcov_cdevsw; + args.mda_uid = UID_ROOT; + args.mda_gid = GID_WHEEL; + args.mda_mode = 0600; + if (make_dev_s(&args, &dev, "kcov") != 0) { + printf("%s", "Failed to create kcov device"); + return; + } + + EVENTHANDLER_REGISTER(thread_dtor, kcov_thread_dtor, NULL, + EVENTHANDLER_PRI_ANY); +} + +SYSINIT(kcovdev, SI_SUB_DEVFS, SI_ORDER_ANY, kcov_init, NULL); Modified: head/sys/kern/kern_thread.c ============================================================================== --- head/sys/kern/kern_thread.c Sat Jan 12 11:14:59 2019 (r342961) +++ head/sys/kern/kern_thread.c Sat Jan 12 11:21:28 2019 (r342962) @@ -82,9 +82,9 @@ _Static_assert(offsetof(struct thread, td_flags) == 0x "struct thread KBI td_flags"); _Static_assert(offsetof(struct thread, td_pflags) == 0x104, "struct thread KBI td_pflags"); -_Static_assert(offsetof(struct thread, td_frame) == 0x470, +_Static_assert(offsetof(struct thread, td_frame) == 0x478, "struct thread KBI td_frame"); -_Static_assert(offsetof(struct thread, td_emuldata) == 0x528, +_Static_assert(offsetof(struct thread, td_emuldata) == 0x530, "struct thread KBI td_emuldata"); _Static_assert(offsetof(struct proc, p_flag) == 0xb0, "struct proc KBI p_flag"); Added: head/sys/sys/kcov.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/sys/kcov.h Sat Jan 12 11:21:28 2019 (r342962) @@ -0,0 +1,59 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (C) 2018 The FreeBSD Foundation. All rights reserved. + * Copyright (C) 2018, 2019 Andrew Turner. + * + * This software was developed by Mitchell Horne under sponsorship of + * the FreeBSD Foundation. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237 + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _SYS_KCOV_H_ +#define _SYS_KCOV_H_ + +#include + +#define KCOV_MAXENTRIES (1 << 24) /* 16M */ +#define KCOV_ENTRY_SIZE 8 + +#define KCOV_MODE_TRACE_PC 0 +#define KCOV_MODE_TRACE_CMP 1 + +/* KCOV ioctls */ +#define KIOENABLE _IOWINT('c', 2) /* Enable coverage recording */ +#define KIODISABLE _IO('c', 3) /* Disable coverage recording */ +#define KIOSETBUFSIZE _IOWINT('c', 4) /* Set the buffer size */ + +#define KCOV_CMP_CONST (1 << 0) +#define KCOV_CMP_SIZE(x) ((x) << 1) +#define KCOV_CMP_MASK (3 << 1) +#define KCOV_CMP_GET_SIZE(x) (((x) >> 1) & 3) + +#endif /* _SYS_KCOV_H_ */ Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Sat Jan 12 11:14:59 2019 (r342961) +++ head/sys/sys/proc.h Sat Jan 12 11:21:28 2019 (r342962) @@ -175,6 +175,7 @@ struct filecaps; struct filemon; struct kaioinfo; struct kaudit_record; +struct kcov_info; struct kdtrace_proc; struct kdtrace_thread; struct mqueue_notifier; @@ -300,6 +301,7 @@ struct thread { sbintime_t td_sleeptimo; /* (t) Sleep timeout. */ int td_rtcgen; /* (s) rtc_generation of abs. sleep */ size_t td_vslock_sz; /* (k) amount of vslock-ed space */ + struct kcov_info *td_kcov_info; /* (*) Kernel code coverage data */ #define td_endzero td_sigmask /* Copied during fork1() or create_thread(). */ Modified: head/tests/sys/kern/Makefile ============================================================================== --- head/tests/sys/kern/Makefile Sat Jan 12 11:14:59 2019 (r342961) +++ head/tests/sys/kern/Makefile Sat Jan 12 11:21:28 2019 (r342962) @@ -5,6 +5,7 @@ TESTSRC= ${SRCTOP}/contrib/netbsd-tests/kernel TESTSDIR= ${TESTSBASE}/sys/kern +ATF_TESTS_C+= kcov ATF_TESTS_C+= kern_copyin ATF_TESTS_C+= kern_descrip_test ATF_TESTS_C+= ptrace_test @@ -32,6 +33,7 @@ LIBADD.sys_getrandom+= c LIBADD.sys_getrandom+= pthread LIBADD.ptrace_test+= pthread LIBADD.unix_seqpacket_test+= pthread +LIBADD.kcov+= pthread NETBSD_ATF_TESTS_C+= lockf_test NETBSD_ATF_TESTS_C+= mqueue_test Added: head/tests/sys/kern/kcov.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/kern/kcov.c Sat Jan 12 11:21:28 2019 (r342962) @@ -0,0 +1,401 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2018, 2019 Andrew Turner + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237 + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include + +#include +#include +#include + +#include + +static const char *modes[] = { + "PC tracing", + "comparison tracing", +}; + +static int +open_kcov(void) +{ + int fd; + + fd = open("/dev/kcov", O_RDWR); + if (fd == -1) + atf_tc_skip("Failed to open /dev/kcov"); + + return (fd); +} + +ATF_TC_WITHOUT_HEAD(kcov_bufsize); +ATF_TC_BODY(kcov_bufsize, tc) +{ + int fd; + + fd = open_kcov(); + + ATF_CHECK(ioctl(fd, KIOSETBUFSIZE, 0) == -1); + ATF_CHECK(ioctl(fd, KIOSETBUFSIZE, 1) == -1); + ATF_CHECK(ioctl(fd, KIOSETBUFSIZE, 2) == 0); + ATF_CHECK(ioctl(fd, KIOSETBUFSIZE, 2) == -1); + + close(fd); +} + +ATF_TC_WITHOUT_HEAD(kcov_mmap); +ATF_TC_BODY(kcov_mmap, tc) +{ + void *data; + int fd; + + fd = open_kcov(); + + ATF_CHECK(mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, + fd, 0) == MAP_FAILED); + + ATF_REQUIRE(ioctl(fd, KIOSETBUFSIZE, + 2 * PAGE_SIZE / sizeof(uint64_t)) == 0); + + ATF_CHECK(mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, + fd, 0) == MAP_FAILED); + ATF_CHECK(mmap(NULL, 3 * PAGE_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, + fd, 0) == MAP_FAILED); + ATF_REQUIRE((data = mmap(NULL, 2 * PAGE_SIZE, PROT_READ | PROT_WRITE, + MAP_SHARED, fd, 0)) != MAP_FAILED); + ATF_CHECK(mmap(NULL, 2 * PAGE_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, + fd, 0) == MAP_FAILED); + + munmap(data, 2 * PAGE_SIZE); + + close(fd); +} + +/* This shouldn't panic */ +ATF_TC_WITHOUT_HEAD(kcov_mmap_no_munmap); +ATF_TC_BODY(kcov_mmap_no_munmap, tc) +{ + int fd; + + fd = open_kcov(); + + ATF_REQUIRE(ioctl(fd, KIOSETBUFSIZE, PAGE_SIZE / sizeof(uint64_t)) ==0); + + ATF_CHECK(mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, + fd, 0) != MAP_FAILED); + + close(fd); +} + +ATF_TC_WITHOUT_HEAD(kcov_mmap_no_munmap_no_close); +ATF_TC_BODY(kcov_mmap_no_munmap_no_close, tc) +{ + int fd; + + fd = open_kcov(); + + ATF_REQUIRE(ioctl(fd, KIOSETBUFSIZE, PAGE_SIZE / sizeof(uint64_t)) ==0); + + ATF_CHECK(mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, + fd, 0) != MAP_FAILED); +} + +static sem_t sem1, sem2; + +static void * +kcov_mmap_enable_thread(void *data) +{ + int fd; + + fd = open_kcov(); + *(int *)data = fd; + + ATF_REQUIRE(ioctl(fd, KIOSETBUFSIZE, PAGE_SIZE / sizeof(uint64_t)) ==0); + ATF_CHECK(mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, + fd, 0) != MAP_FAILED); + ATF_CHECK(ioctl(fd, KIOENABLE, KCOV_MODE_TRACE_PC) == 0); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Sat Jan 12 11:50:40 2019 Return-Path: Delivered-To: svn-src-head@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 6A9F5148FF0B; Sat, 12 Jan 2019 11:50:40 +0000 (UTC) (envelope-from andrew@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 07A5D84420; Sat, 12 Jan 2019 11:50:40 +0000 (UTC) (envelope-from andrew@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 E45DB2C76; Sat, 12 Jan 2019 11:50:39 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0CBod2Y077137; Sat, 12 Jan 2019 11:50:39 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0CBodrm077136; Sat, 12 Jan 2019 11:50:39 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201901121150.x0CBodrm077136@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 12 Jan 2019 11:50:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342963 - head/tests/sys/kern X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/tests/sys/kern X-SVN-Commit-Revision: 342963 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 07A5D84420 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)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jan 2019 11:50:40 -0000 Author: andrew Date: Sat Jan 12 11:50:39 2019 New Revision: 342963 URL: https://svnweb.freebsd.org/changeset/base/342963 Log: Temporarily disable the kcov tests. Not all architectures have atomic_store_64 and atomic_store_64. Sponsored by: DARPA, AFRL Modified: head/tests/sys/kern/Makefile Modified: head/tests/sys/kern/Makefile ============================================================================== --- head/tests/sys/kern/Makefile Sat Jan 12 11:21:28 2019 (r342962) +++ head/tests/sys/kern/Makefile Sat Jan 12 11:50:39 2019 (r342963) @@ -5,7 +5,7 @@ TESTSRC= ${SRCTOP}/contrib/netbsd-tests/kernel TESTSDIR= ${TESTSBASE}/sys/kern -ATF_TESTS_C+= kcov +#ATF_TESTS_C+= kcov ATF_TESTS_C+= kern_copyin ATF_TESTS_C+= kern_descrip_test ATF_TESTS_C+= ptrace_test From owner-svn-src-head@freebsd.org Sat Jan 12 12:35:03 2019 Return-Path: Delivered-To: svn-src-head@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 2A3C214916DF; Sat, 12 Jan 2019 12:35:03 +0000 (UTC) (envelope-from nyan@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 BD28385A01; Sat, 12 Jan 2019 12:35:02 +0000 (UTC) (envelope-from nyan@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 B1EDE34D2; Sat, 12 Jan 2019 12:35:02 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0CCZ2O8000378; Sat, 12 Jan 2019 12:35:02 GMT (envelope-from nyan@FreeBSD.org) Received: (from nyan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0CCZ2wh000377; Sat, 12 Jan 2019 12:35:02 GMT (envelope-from nyan@FreeBSD.org) Message-Id: <201901121235.x0CCZ2wh000377@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nyan set sender to nyan@FreeBSD.org using -f From: Takahashi Yoshihiro Date: Sat, 12 Jan 2019 12:35:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342964 - head/usr.bin/bc X-SVN-Group: head X-SVN-Commit-Author: nyan X-SVN-Commit-Paths: head/usr.bin/bc X-SVN-Commit-Revision: 342964 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BD28385A01 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.973,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jan 2019 12:35:03 -0000 Author: nyan Date: Sat Jan 12 12:35:02 2019 New Revision: 342964 URL: https://svnweb.freebsd.org/changeset/base/342964 Log: Sync with OpenBSD. bc.y: Rev 1.50 - write parse errors to stderr, prompted by Martijn Dekker - we're only interactive if stdout en stderr are a tty as well as stdin PR: 234430 Obtained from: OpenBSD MFC after: 1 week Modified: head/usr.bin/bc/bc.y Modified: head/usr.bin/bc/bc.y ============================================================================== --- head/usr.bin/bc/bc.y Sat Jan 12 11:50:39 2019 (r342963) +++ head/usr.bin/bc/bc.y Sat Jan 12 12:35:02 2019 (r342964) @@ -996,7 +996,7 @@ yyerror(const char *s) putchar('\\'); putchar(*p); } - fputs("]pc\n", stdout); + fputs("]ec\n", stdout); free(str); } @@ -1173,7 +1173,8 @@ main(int argc, char *argv[]) argc -= optind; argv += optind; - interactive = isatty(STDIN_FILENO); + interactive = isatty(STDIN_FILENO) && isatty(STDOUT_FILENO) && + isatty(STDERR_FILENO); for (i = 0; i < argc; i++) sargv[sargc++] = argv[i]; From owner-svn-src-head@freebsd.org Sat Jan 12 12:57:33 2019 Return-Path: Delivered-To: svn-src-head@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 4976614921FF; Sat, 12 Jan 2019 12:57:33 +0000 (UTC) (envelope-from nyan@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 E4B11865B5; Sat, 12 Jan 2019 12:57:32 +0000 (UTC) (envelope-from nyan@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 D608F39FE; Sat, 12 Jan 2019 12:57:32 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0CCvW7g011196; Sat, 12 Jan 2019 12:57:32 GMT (envelope-from nyan@FreeBSD.org) Received: (from nyan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0CCvWQ0011195; Sat, 12 Jan 2019 12:57:32 GMT (envelope-from nyan@FreeBSD.org) Message-Id: <201901121257.x0CCvWQ0011195@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nyan set sender to nyan@FreeBSD.org using -f From: Takahashi Yoshihiro Date: Sat, 12 Jan 2019 12:57:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342965 - head/usr.bin/ruptime X-SVN-Group: head X-SVN-Commit-Author: nyan X-SVN-Commit-Paths: head/usr.bin/ruptime X-SVN-Commit-Revision: 342965 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E4B11865B5 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)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jan 2019 12:57:33 -0000 Author: nyan Date: Sat Jan 12 12:57:32 2019 New Revision: 342965 URL: https://svnweb.freebsd.org/changeset/base/342965 Log: Fix indentation in ruptime command output for hosts in the "down" state. PR: 234239 MFC after: 1 week Modified: head/usr.bin/ruptime/ruptime.c Modified: head/usr.bin/ruptime/ruptime.c ============================================================================== --- head/usr.bin/ruptime/ruptime.c Sat Jan 12 12:35:02 2019 (r342964) +++ head/usr.bin/ruptime/ruptime.c Sat Jan 12 12:57:32 2019 (r342965) @@ -264,7 +264,7 @@ ruptime(const char *host, int aflg, int (*cmp)(const v hsp = &hs[i]; wd = &hsp->hs_wd; if (ISDOWN(hsp)) { - (void)printf("%-*.*s%s\n", + (void)printf("%-*.*s %s\n", hostnamewidth, hostnamewidth, wd->wd_hostname, interval(now - hsp->hs_wd.wd_recvtime, "down")); continue; From owner-svn-src-head@freebsd.org Sat Jan 12 14:57:13 2019 Return-Path: Delivered-To: svn-src-head@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 825F414949BF; Sat, 12 Jan 2019 14:57:13 +0000 (UTC) (envelope-from avos@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 04EDA89C06; Sat, 12 Jan 2019 14:57:13 +0000 (UTC) (envelope-from avos@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 E5E2F4EEF; Sat, 12 Jan 2019 14:57:12 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0CEvC1J073548; Sat, 12 Jan 2019 14:57:12 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0CEvCIb073546; Sat, 12 Jan 2019 14:57:12 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201901121457.x0CEvCIb073546@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Sat, 12 Jan 2019 14:57:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342966 - head/sys/net80211 X-SVN-Group: head X-SVN-Commit-Author: avos X-SVN-Commit-Paths: head/sys/net80211 X-SVN-Commit-Revision: 342966 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 04EDA89C06 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_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jan 2019 14:57:13 -0000 Author: avos Date: Sat Jan 12 14:57:12 2019 New Revision: 342966 URL: https://svnweb.freebsd.org/changeset/base/342966 Log: net80211: fix possible panic for some drivers after r342211 Check if rate control structures were allocated before trying to access them in various places; this was possible before on allocation failure (unlikely), but was revealed after r342211 where allocation was deferred. In case if driver uses wlan_amrr(4) and it is loaded it is possible to reproduce the panic via sysctl net.wlan..rate_stats (for wlan0 the number will be 0). Tested with: RTL8188EE, AP mode + RTL8188CUS, STA mode. MFC after: 3 days Modified: head/sys/net80211/ieee80211_amrr.c head/sys/net80211/ieee80211_rssadapt.c Modified: head/sys/net80211/ieee80211_amrr.c ============================================================================== --- head/sys/net80211/ieee80211_amrr.c Sat Jan 12 12:57:32 2019 (r342965) +++ head/sys/net80211/ieee80211_amrr.c Sat Jan 12 14:57:12 2019 (r342966) @@ -104,6 +104,9 @@ amrr_setinterval(const struct ieee80211vap *vap, int m struct ieee80211_amrr *amrr = vap->iv_rs; int t; + if (!amrr) + return; + if (msecs < 100) msecs = 100; t = msecs_to_ticks(msecs); @@ -166,6 +169,12 @@ amrr_node_init(struct ieee80211_node *ni) struct ieee80211_amrr_node *amn; uint8_t rate; + if (!amrr) { + if_printf(vap->iv_ifp, "ratectl structure was not allocated, " + "per-node structure allocation skipped\n"); + return; + } + if (ni->ni_rctls == NULL) { ni->ni_rctls = amn = IEEE80211_MALLOC(sizeof(struct ieee80211_amrr_node), M_80211_RATECTL, IEEE80211_M_NOWAIT | IEEE80211_M_ZERO); @@ -327,10 +336,19 @@ static int amrr_rate(struct ieee80211_node *ni, void *arg __unused, uint32_t iarg __unused) { struct ieee80211_amrr_node *amn = ni->ni_rctls; - struct ieee80211_amrr *amrr = amn->amn_amrr; + struct ieee80211_amrr *amrr; const struct ieee80211_rateset *rs = NULL; int rix; + /* XXX should return -1 here, but drivers may not expect this... */ + if (!amn) + { + ni->ni_txrate = ni->ni_rates.rs_rates[0]; + return 0; + } + + amrr = amn->amn_amrr; + /* 11n or not? Pick the right rateset */ if (amrr_node_is_11n(ni)) { /* XXX ew */ @@ -369,6 +387,9 @@ amrr_tx_complete(const struct ieee80211_node *ni, struct ieee80211_amrr_node *amn = ni->ni_rctls; int retries; + if (!amn) + return; + retries = 0; if (status->flags & IEEE80211_RATECTL_STATUS_LONG_RETRY) retries = status->long_retries; @@ -386,6 +407,9 @@ amrr_tx_update_cb(void *arg, struct ieee80211_node *ni struct ieee80211_amrr_node *amn = ni->ni_rctls; int txcnt, success, retrycnt; + if (!amn) + return; + txcnt = stats->nframes; success = stats->nsuccess; retrycnt = 0; @@ -420,9 +444,12 @@ amrr_sysctl_interval(SYSCTL_HANDLER_ARGS) { struct ieee80211vap *vap = arg1; struct ieee80211_amrr *amrr = vap->iv_rs; - int msecs = ticks_to_msecs(amrr->amrr_interval); - int error; + int msecs, error; + if (!amrr) + return ENOMEM; + + msecs = ticks_to_msecs(amrr->amrr_interval); error = sysctl_handle_int(oidp, &msecs, 0, req); if (error || !req->newptr) return error; @@ -436,6 +463,9 @@ amrr_sysctlattach(struct ieee80211vap *vap, { struct ieee80211_amrr *amrr = vap->iv_rs; + if (!amrr) + return; + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "amrr_rate_interval", CTLTYPE_INT | CTLFLAG_RW, vap, 0, amrr_sysctl_interval, "I", "amrr operation interval (ms)"); @@ -456,6 +486,9 @@ amrr_node_stats(struct ieee80211_node *ni, struct sbuf struct ieee80211_rateset *rs; /* XXX TODO: check locking? */ + + if (!amn) + return; /* XXX TODO: this should be a method */ if (amrr_node_is_11n(ni)) { Modified: head/sys/net80211/ieee80211_rssadapt.c ============================================================================== --- head/sys/net80211/ieee80211_rssadapt.c Sat Jan 12 12:57:32 2019 (r342965) +++ head/sys/net80211/ieee80211_rssadapt.c Sat Jan 12 14:57:12 2019 (r342966) @@ -119,6 +119,9 @@ rssadapt_setinterval(const struct ieee80211vap *vap, i struct ieee80211_rssadapt *rs = vap->iv_rs; int t; + if (!rs) + return; + if (msecs < 100) msecs = 100; t = msecs_to_ticks(msecs); @@ -177,6 +180,12 @@ rssadapt_node_init(struct ieee80211_node *ni) struct ieee80211_rssadapt *rsa = vap->iv_rs; const struct ieee80211_rateset *rs = &ni->ni_rates; + if (!rsa) { + if_printf(vap->iv_ifp, "ratectl structure was not allocated, " + "per-node structure allocation skipped\n"); + return; + } + if (ni->ni_rctls == NULL) { ni->ni_rctls = ra = IEEE80211_MALLOC(sizeof(struct ieee80211_rssadapt_node), @@ -231,10 +240,18 @@ rssadapt_rate(struct ieee80211_node *ni, void *arg __u { struct ieee80211_rssadapt_node *ra = ni->ni_rctls; u_int pktlen = iarg; - const struct ieee80211_rateset *rs = &ra->ra_rates; + const struct ieee80211_rateset *rs; uint16_t (*thrs)[IEEE80211_RATE_SIZE]; int rix, rssi; + /* XXX should return -1 here, but drivers may not expect this... */ + if (!ra) + { + ni->ni_txrate = ni->ni_rates.rs_rates[0]; + return 0; + } + + rs = &ra->ra_rates; if ((ticks - ra->ra_ticks) > ra->ra_rs->interval) { rssadapt_updatestats(ra); ra->ra_ticks = ticks; @@ -320,6 +337,9 @@ rssadapt_tx_complete(const struct ieee80211_node *ni, struct ieee80211_rssadapt_node *ra = ni->ni_rctls; int pktlen, rssi; + if (!ra) + return; + if ((status->flags & (IEEE80211_RATECTL_STATUS_PKTLEN|IEEE80211_RATECTL_STATUS_RSSI)) != (IEEE80211_RATECTL_STATUS_PKTLEN|IEEE80211_RATECTL_STATUS_RSSI)) @@ -344,9 +364,12 @@ rssadapt_sysctl_interval(SYSCTL_HANDLER_ARGS) { struct ieee80211vap *vap = arg1; struct ieee80211_rssadapt *rs = vap->iv_rs; - int msecs = ticks_to_msecs(rs->interval); - int error; + int msecs, error; + if (!rs) + return ENOMEM; + + msecs = ticks_to_msecs(rs->interval); error = sysctl_handle_int(oidp, &msecs, 0, req); if (error || !req->newptr) return error; From owner-svn-src-head@freebsd.org Sat Jan 12 17:10:05 2019 Return-Path: Delivered-To: svn-src-head@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 651F81497DF1 for ; Sat, 12 Jan 2019 17:10:05 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x835.google.com (mail-qt1-x835.google.com [IPv6:2607:f8b0:4864:20::835]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 006378E322 for ; Sat, 12 Jan 2019 17:10:05 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x835.google.com with SMTP id u47so22294523qtj.6 for ; Sat, 12 Jan 2019 09:10:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=pYYYCl5yyRd3R59FEHWeXrdMpA0GQbsug+aqkax67HQ=; b=dYyqDeJ6ahr8FciBi/GzlTR8+96/SAuKIPJx4ek0b5T++ctxwjoU196/eVM8RmSugO CA6SsuqcaDFpLJyfniBVEjqJK8pD/xL8nsGm/bvzWwEYkxb4E1PezsbkRQiU+IalaVTK 99TxkQe2JO1E1cHLOw02SqKTjG8g4gHyvBXzebQF+hgKwXcv9jeqv+jH5foCvnoo3XYd nTWsDE+WWRDZmtgWfjnXpEUPkZ0OPpmMjnehc3laVavmAsDehcKUJkXLvN/MFzuuypMm k3U4xC8sH3aD0aAuiKx8ZOWFQDlcqppNUqjQaWG/CoNKp6g1WyIVn3YmGwUuY/8Umo8u yn6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=pYYYCl5yyRd3R59FEHWeXrdMpA0GQbsug+aqkax67HQ=; b=bERARxR6zks2XF0ZOMVYtpmQEbrVtK9rCi8YM5MxGnU2ulHmonsz1WPW79944CXuHM req7vHuc7l8zE+r+8Sloa919Vs8c+l+nzxsyH7OcT7EV/3NU02zT+W+0eV4HsZTFKlxe bNo+R7nT60OCAIc6z7m1yxYzA8pTXEgAM7Y1uuDQRE8MWwfp9JYGXuKbeiu0J6qewDfd svBuGjYQgcxMqrkvBiPOLKOdtC4zeoxpOcLa5f5SJo1TLYTuOmrshHUAPwPVV7rBR9vf IkyBPXTjkqfrtZMejW72oi6zuV5FAQzs+SmbxPpE9dLGCnLVvIeuSliK/AdA2G51x7l7 icgA== X-Gm-Message-State: AJcUukdMlLvZsaPE06QbSBMSkK8hrTDMWR9oKn6jgAyp/isLWdWH1H41 O27osoVrKIEnilRct6PeL0v/imFDh4WRNpXXNJLvICkm X-Google-Smtp-Source: ALg8bN7u14HQABHAtmLdk3pLYu07MyGUVj9m6cvX1EYMcJW0FCszMXXD7Su5DfG8zUQ8DDHjapSbXkWSj/4IKvjKNUU= X-Received: by 2002:a0c:9c89:: with SMTP id i9mr18015168qvf.153.1547313004539; Sat, 12 Jan 2019 09:10:04 -0800 (PST) MIME-Version: 1.0 References: <201901121150.x0CBodrm077136@repo.freebsd.org> In-Reply-To: <201901121150.x0CBodrm077136@repo.freebsd.org> From: Warner Losh Date: Sat, 12 Jan 2019 10:09:52 -0700 Message-ID: Subject: Re: svn commit: r342963 - head/tests/sys/kern To: Andrew Turner Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 006378E322 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.85 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.85)[-0.850,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jan 2019 17:10:05 -0000 On Sat, Jan 12, 2019, 4:50 AM Andrew Turner Author: andrew > Date: Sat Jan 12 11:50:39 2019 > New Revision: 342963 > URL: https://svnweb.freebsd.org/changeset/base/342963 > > Log: > Temporarily disable the kcov tests. Not all architectures have > atomic_store_64 and atomic_store_64. > What is the difference between these two things? Warner Sponsored by: DARPA, AFRL > > Modified: > head/tests/sys/kern/Makefile > > Modified: head/tests/sys/kern/Makefile > > ============================================================================== > --- head/tests/sys/kern/Makefile Sat Jan 12 11:21:28 2019 > (r342962) > +++ head/tests/sys/kern/Makefile Sat Jan 12 11:50:39 2019 > (r342963) > @@ -5,7 +5,7 @@ TESTSRC= ${SRCTOP}/contrib/netbsd-tests/kernel > > TESTSDIR= ${TESTSBASE}/sys/kern > > -ATF_TESTS_C+= kcov > +#ATF_TESTS_C+= kcov > ATF_TESTS_C+= kern_copyin > ATF_TESTS_C+= kern_descrip_test > ATF_TESTS_C+= ptrace_test > > From owner-svn-src-head@freebsd.org Sat Jan 12 17:15:29 2019 Return-Path: Delivered-To: svn-src-head@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 18EDD14981D8; Sat, 12 Jan 2019 17:15:29 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:470:7a58:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A5BF98E870; Sat, 12 Jan 2019 17:15:28 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:470:7a58::1c5a:28c:1f7c:8c54] (unknown [IPv6:2001:470:7a58:0:1c5a:28c:1f7c:8c54]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id DDD3BBD22; Sat, 12 Jan 2019 18:15:26 +0100 (CET) From: Dimitry Andric Message-Id: <5741FE79-19CD-4287-BD1A-60D92BD4711D@FreeBSD.org> Content-Type: multipart/signed; boundary="Apple-Mail=_D5FC1F16-6A8D-4B38-BF03-1E2BA19E7419"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\)) Subject: Re: svn commit: r342963 - head/tests/sys/kern Date: Sat, 12 Jan 2019 18:15:26 +0100 In-Reply-To: Cc: Andrew Turner , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org To: Warner Losh References: <201901121150.x0CBodrm077136@repo.freebsd.org> X-Mailer: Apple Mail (2.3445.102.3) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jan 2019 17:15:29 -0000 --Apple-Mail=_D5FC1F16-6A8D-4B38-BF03-1E2BA19E7419 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On 12 Jan 2019, at 18:09, Warner Losh wrote: > > On Sat, Jan 12, 2019, 4:50 AM Andrew Turner Author: andrew > Date: Sat Jan 12 11:50:39 2019 > New Revision: 342963 > URL: https://svnweb.freebsd.org/changeset/base/342963 > > Log: > Temporarily disable the kcov tests. Not all architectures have > atomic_store_64 and atomic_store_64. > > What is the difference between these two things? I think Andrew meant "atomic_load_64 and atomic_store_64". :-) -Dimitry --Apple-Mail=_D5FC1F16-6A8D-4B38-BF03-1E2BA19E7419 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCXDogrgAKCRCwXqMKLiCW o955AJ9pLF0+5YEN0BIlm/KrIiPIozSgngCfRl+n181cfpJsX6fSd4ExBxYyv+E= =SuHh -----END PGP SIGNATURE----- --Apple-Mail=_D5FC1F16-6A8D-4B38-BF03-1E2BA19E7419-- From owner-svn-src-head@freebsd.org Sat Jan 12 17:51:50 2019 Return-Path: Delivered-To: svn-src-head@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 BB31314996FA for ; Sat, 12 Jan 2019 17:51:50 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FD3C8FD6D for ; Sat, 12 Jan 2019 17:51:50 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x834.google.com with SMTP id u47so22370315qtj.6 for ; Sat, 12 Jan 2019 09:51:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=t/VGdtHE7TYXq2GJ7HoHDEZN+uBV30Hn97yplXngReU=; b=BY6Mw4r64W64zBEV13gAKv7yNj4Me9y7nd/JQScyFPGdKJNpFUs7yV1QKebzEg+Scp 8b67Q8FGAr/AFnAmi5xQzbfIRoltEFRgCaqix499oB9Ou1XCvjv2WrSLYhmcpSk3oyd/ IaeBtEltkzyueoDKnmaisE7xEPObfwmSBHq4uXcOWFjPU5h4ruFeOS4GyzxSdZc4uQg1 uKwDqQKN4viCuKXVkJg3IjX2KrpbfCQPSv5ZjyfKL3VCX7mCI3G/u4Vel/bt3Fs381jz yL6tdsXN11HEy4PtqIWF62uyoXGd6sxPADeb0BiEEQ1mdxkiJ8neS6RrtniqAeYPv75F mwiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=t/VGdtHE7TYXq2GJ7HoHDEZN+uBV30Hn97yplXngReU=; b=OTi25T2h0tn3gP7SiCGPbeg33n1dr7gj+JthSDjpVFQO5+DiMzZrS0233sAJAOvG1U FSimTin583xcP3bIrZ/fYs08/6JtaTmi/mfruSefvBT3b/3Ez4hpPUz2dN6ZKi79fPDy REu3OBoVPApXnlBfEMJtnpZTkHJvnQ9vSaimsBmI+QzoYLALOiH4L+wToqz+qi3+Y+SI jOaxVqjdusOMpDbYmqsXAuZyCSjP6WHDSryVlcfE889qJD3KI76vccEU02UwlqdgwcCs xRBUNRVnOFaBapuEKEhnKS+uPpWE/sV2+it6ycLz7BHdmFkmumzVOvcdvP31fR6vnvbD wqSg== X-Gm-Message-State: AJcUukcZH8YkgQousIeJgX2wd16NQY4Nc4n6Bp3cJX2cDhZAg80pGjaz V264lY7jn6tj6+/9xwIcCvVtzR2mj4LnCOpRUmUDpJxJ X-Google-Smtp-Source: ALg8bN4WM/O/8eYwU9oC/Df7zreYSSQ0o+T2i6Zm1lP9qZpj/h5+jqEmHKpRB/y4reEPlUd0pY416JzF0U8KMXBc9oY= X-Received: by 2002:ac8:668c:: with SMTP id d12mr17609606qtp.242.1547315509509; Sat, 12 Jan 2019 09:51:49 -0800 (PST) MIME-Version: 1.0 References: <201901121150.x0CBodrm077136@repo.freebsd.org> <5741FE79-19CD-4287-BD1A-60D92BD4711D@FreeBSD.org> In-Reply-To: <5741FE79-19CD-4287-BD1A-60D92BD4711D@FreeBSD.org> From: Warner Losh Date: Sat, 12 Jan 2019 10:51:38 -0700 Message-ID: Subject: Re: svn commit: r342963 - head/tests/sys/kern To: Dimitry Andric Cc: Andrew Turner , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 4FD3C8FD6D X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.84 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.84)[-0.841,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jan 2019 17:51:51 -0000 On Sat, Jan 12, 2019 at 10:15 AM Dimitry Andric wrote: > On 12 Jan 2019, at 18:09, Warner Losh wrote: > > > > On Sat, Jan 12, 2019, 4:50 AM Andrew Turner > Author: andrew > > Date: Sat Jan 12 11:50:39 2019 > > New Revision: 342963 > > URL: https://svnweb.freebsd.org/changeset/base/342963 > > > > Log: > > Temporarily disable the kcov tests. Not all architectures have > > atomic_store_64 and atomic_store_64. > > > > What is the difference between these two things? > > I think Andrew meant "atomic_load_64 and atomic_store_64". :-) > I think so too... was just having a little fun :) Warner From owner-svn-src-head@freebsd.org Sat Jan 12 17:52:53 2019 Return-Path: Delivered-To: svn-src-head@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 D4E82149977D; Sat, 12 Jan 2019 17:52:53 +0000 (UTC) (envelope-from allanjude@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 787AA8FF49; Sat, 12 Jan 2019 17:52:53 +0000 (UTC) (envelope-from allanjude@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 B33A96D83; Sat, 12 Jan 2019 17:52:52 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0CHqqkH068797; Sat, 12 Jan 2019 17:52:52 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0CHqqwR068796; Sat, 12 Jan 2019 17:52:52 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201901121752.x0CHqqwR068796@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Sat, 12 Jan 2019 17:52:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342971 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 342971 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 787AA8FF49 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.943,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jan 2019 17:52:54 -0000 Author: allanjude Date: Sat Jan 12 17:52:52 2019 New Revision: 342971 URL: https://svnweb.freebsd.org/changeset/base/342971 Log: Add missing documentation for dev.acpi_ibm.0.mic_led added in r335304 PR: 229074 X-MFC-With: 335304 Submitted by: Ali Abdallah Modified: head/share/man/man4/acpi_ibm.4 Modified: head/share/man/man4/acpi_ibm.4 ============================================================================== --- head/share/man/man4/acpi_ibm.4 Sat Jan 12 17:00:54 2019 (r342970) +++ head/share/man/man4/acpi_ibm.4 Sat Jan 12 17:52:52 2019 (r342971) @@ -273,6 +273,9 @@ Current brightness level of the display. Speaker volume. .It Va dev.acpi_ibm.0.mute Indicates, whether the speakers are muted or not. +.It Va dev.acpi_ibm.0.mic_mute +Indicates, whether the microphone led (present on some model) is on or not. +Note that this does not mean that the microphone input is muted. .It Va dev.acpi_ibm.0.thinklight Indicates, whether the ThinkLight keyboard light is activated or not. .It Va dev.acpi_ibm.0.bluetooth @@ -437,6 +440,17 @@ case ${NOTIFY} in MESSAGE="volume unmuted" fi ;; + 0x1b) + LEVEL=`sysctl -n dev.acpi_ibm.0.mic_led` + if [ $LEVEL -eq 0 ]; then + sysctl dev.acpi_ibm.0.mic_led=1 + mixer rec 0 + fi + if [ $LEVEL -eq 1 ]; then + sysctl dev.acpi_ibm.0.mic_led=0 + mixer rec 30 + fi + ;; *) ;; esac From owner-svn-src-head@freebsd.org Sat Jan 12 17:56:24 2019 Return-Path: Delivered-To: svn-src-head@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 53D4C149993B; Sat, 12 Jan 2019 17:56:24 +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 E861268153; Sat, 12 Jan 2019 17:56:23 +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 C13B86D86; Sat, 12 Jan 2019 17:56:23 +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 x0CHuNa5069041; Sat, 12 Jan 2019 17:56:23 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0CHuNaH069040; Sat, 12 Jan 2019 17:56:23 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201901121756.x0CHuNaH069040@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sat, 12 Jan 2019 17:56:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342972 - head/lib/libsqlite3 X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/lib/libsqlite3 X-SVN-Commit-Revision: 342972 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E861268153 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.94)[-0.943,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)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jan 2019 17:56:24 -0000 Author: cy Date: Sat Jan 12 17:56:23 2019 New Revision: 342972 URL: https://svnweb.freebsd.org/changeset/base/342972 Log: Disable FTS3, FTS4, and RTREE in bundled and private sqlite3. Suggested by: delphij@ Reviewed by: delphij@ (for secteam@) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D18786 Modified: head/lib/libsqlite3/Makefile Modified: head/lib/libsqlite3/Makefile ============================================================================== --- head/lib/libsqlite3/Makefile Sat Jan 12 17:52:52 2019 (r342971) +++ head/lib/libsqlite3/Makefile Sat Jan 12 17:56:23 2019 (r342972) @@ -33,9 +33,6 @@ CFLAGS+= -I${SQLITE} \ -DHAVE_STRERROR_R=1 \ -DHAVE_POSIX_FALLOCATE=1 \ -D_REENTRANT=1 \ - -DSQLITE_THREADSAFE=1 \ - -DSQLITE_ENABLE_FTS3 \ - -DSQLITE_ENABLE_FTS4 \ - -DSQLITE_ENABLE_RTREE + -DSQLITE_THREADSAFE=1 .include From owner-svn-src-head@freebsd.org Sat Jan 12 19:10:22 2019 Return-Path: Delivered-To: svn-src-head@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 2EEF0149B67A; Sat, 12 Jan 2019 19:10:22 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 921286BC2F; Sat, 12 Jan 2019 19:10:21 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg1-x536.google.com with SMTP id d72so7703390pga.9; Sat, 12 Jan 2019 11:10:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=qt5kZUSrAv9w3WxKDPeYMAeO4nMB0tTfKppnts+NIdQ=; b=KG5I1Qa5B8Hf5CAdtT2zphHZy1l3sckpNf64Ft/uQfyOMNFua/ztJ9yuxKqjNXTim+ Id5tBZMT5BLEXncD1ryIYhqiDWHlFxJ2eygnqJom53OdCmQmJTSFIP7a6Jop71g6niYm XpFkF80YV14BXtLw10u25nzMSN/zGxb/xUpwf1lkutA7xrwlmXY2i93M2kTx/XZ7ono4 QxFu1ADAk99FFu0ubkBIf7v0zM2WJzMaz88KVASMIkuo2LKgrxEgjpg+xdPak4gkes/6 h1m9p5XkLqcImIKqcud3J1l4DsiZ+CxShqqRzMvI8xahCXdAdqWOE34x/XKlE049GslO hcHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=qt5kZUSrAv9w3WxKDPeYMAeO4nMB0tTfKppnts+NIdQ=; b=EIjmk1w5WChKvV2c4XLQLwX5vKAvLxJ3V4L+zLktdqzxmhwjqDhY3B4sRnWjEweagP FT+KHiE0ITMg1+eFQEfP196Z41MmBo5foEqYmPo12PzKzv9UDt2qff5ADVekYv9+Gbr4 zL87PK6HCPIRISLMRGwRjXED5RMYdZlD5DBamTDUirIk4xElxwm9FFzGWJ9DEGL78SCG tbEVyEPwPaAJhWiDxaiW8NSOTd9cb5JjSf5WBO2UUDCsxtiDTYk8L36PEYQmLfLJ1iT8 EAHT8OgpLomrxftChQtjVn72/rLH02C9sKrRZMNEsAKHgrc0TMpncRRhVlInki0qowID XAxw== X-Gm-Message-State: AJcUuke74AbDHgU1hTW6qxaMJ6Vz+9fpuIExrjgWTd7fP5Sokg9+mQha C3GvheKC7P2572ZskAAN4Fl2TJ6v X-Google-Smtp-Source: ALg8bN5WzNG1SyOGadJyU/pVqH9S4Ib4BQR1rx5Nb3dtKfDIvWPz4vpakN637/iua0LmArFSQ+n8jA== X-Received: by 2002:a62:7652:: with SMTP id r79mr20098594pfc.241.1547320220121; Sat, 12 Jan 2019 11:10:20 -0800 (PST) Received: from [192.168.20.7] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id f13sm115080041pfa.132.2019.01.12.11.10.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 Jan 2019 11:10:18 -0800 (PST) From: Enji Cooper Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_BFDE7519-4213-4598-BE51-090E4B1EAB21"; protocol="application/pgp-signature"; micalg=pgp-sha256 Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: svn commit: r342963 - head/tests/sys/kern Date: Sat, 12 Jan 2019 11:10:18 -0800 In-Reply-To: <201901121150.x0CBodrm077136@repo.freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org To: Andrew Turner References: <201901121150.x0CBodrm077136@repo.freebsd.org> X-Mailer: Apple Mail (2.3445.9.1) X-Rspamd-Queue-Id: 921286BC2F X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jan 2019 19:10:22 -0000 --Apple-Mail=_BFDE7519-4213-4598-BE51-090E4B1EAB21 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Jan 12, 2019, at 3:50 AM, Andrew Turner wrote: >=20 > Author: andrew > Date: Sat Jan 12 11:50:39 2019 > New Revision: 342963 > URL: https://svnweb.freebsd.org/changeset/base/342963 >=20 > Log: > Temporarily disable the kcov tests. Not all architectures have > atomic_store_64 and atomic_store_64. >=20 > Sponsored by: DARPA, AFRL Hi Andrew, Would it make more sense to conditionally enable the tests on = some architectures instead of disabling it on all architectures? Thanks! -Enji --Apple-Mail=_BFDE7519-4213-4598-BE51-090E4B1EAB21 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEtvtxN6kOllEF3nmX5JFNMZeDGN4FAlw6O5oACgkQ5JFNMZeD GN4pIhAAogqPzXz/niUXlfWoEPDvZYgJahDCgNFEaKi1xgZ7nc58YJWdmGAs4wZn KBy++7RZV5zor9xmJi+t8KD4c9oBdtygXI8gyOTZiQ8KsicYhMi96ZYkL1prX0YR YompQL6auv5Jdc9dP211UKo2gIBjev1jTNYlpFmOSsTmWqOz+73PGyFyIDg8cqhm j0sugcmahC1R3+C8vo+bv4tlaXinD3da43j4w1kTRcEj8rxZKGH0c0x1yXhvGRfz Lb4ofgFYEdEQWcPzWO3U6cUou61V+LK8xQ6+foAEkFgzu87Qx+p5USE8Lzl+gW99 ShvMHi86U+8ANw18aX8XMqRXGQ062R68wqxuQ8mXK4ikgX0JEMcxJjVPaU+YmpCH k2kqTKP5vD5HLr1Sl9LvZXbDhfv3HF5zm+AWybWxh8s2OFNxdE9pzL1B6CTfmskM VSB4e9qHtzVQaVUJFju7cP5gsH8z08ts/XWIjAoGG6A89FiMp21F0w23eEEctSFt MgZ94W0jKFa9DBSd6VaYFa+MuG2BArzzwFse2FzWikkWZBPW0kFbRkFcAsv2/eUl kksQtpA1/tAg9KV33n3eshTudpbGhnME3KuA3ptcf66fShID2ZgiKXHUhSRHCajb 0pm0tWyL1axsxPFMX4BFg0Jn7IoagZQpmQQzdLMq7fQc7LT0oco= =FZVc -----END PGP SIGNATURE----- --Apple-Mail=_BFDE7519-4213-4598-BE51-090E4B1EAB21-- From owner-svn-src-head@freebsd.org Sat Jan 12 20:13:53 2019 Return-Path: Delivered-To: svn-src-head@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 9BBAB149D569; Sat, 12 Jan 2019 20:13:53 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 46AF66E15F; Sat, 12 Jan 2019 20:13:51 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id iPf7gON2bMRX3iPf9gUkgi; Sat, 12 Jan 2019 13:13:48 -0700 X-Authority-Analysis: v=2.3 cv=TL87tGta c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=3JhidrIBZZsA:10 a=6I5d2MoRAAAA:8 a=nZOtpAppAAAA:20 a=pGLkceISAAAA:8 a=YxBL1-UpAAAA:8 a=BFii3V9eBqks62mI_OUA:9 a=q50BNmZ2_2ARdoOy:21 a=hiHaWYxBGi1EvSpd:21 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 9F7993425; Sat, 12 Jan 2019 12:13:48 -0800 (PST) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id x0CKDivC064207; Sat, 12 Jan 2019 12:13:44 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id x0CKDhjA064204; Sat, 12 Jan 2019 12:13:43 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201901122013.x0CKDhjA064204@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Andrew Turner cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r342962 - in head: sys/amd64/conf sys/arm64/conf sys/conf sys/kern sys/sys tests/sys/kern In-Reply-To: Message from Andrew Turner of "Sat, 12 Jan 2019 11:21:28 +0000." <201901121121.x0CBLSiv058912@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 12 Jan 2019 12:13:43 -0800 X-CMAE-Envelope: MS4wfB8s+Vo/U8CGkxnIOhtr2bo0dlIMpwGSpYJ3aoG6C7tmlQUvgOz7+pikUKVnySiv7eOhZvuyEGowPNtA0G2rwqOKArmphQq8KCJuOka9CXj6VoErn1DQ VYYb0CYzMew+G7240bwRcvxEMc70FW87+74CgRgVIEhg75//N8tbzEfD5sefLBalxtoVahSoYdlRvNtXINA/i09HLyXzka2MzfHsOzHXbmYlmVq6fQWQ2MvN 6RFRwyHIoHECAJA798nStoQ04A4Os5w1lJxlSQT6rbLagUGj8rwkXx2Em79SfOhi X-Rspamd-Queue-Id: 46AF66E15F X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-4.32 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; RECEIVED_SPAMHAUS_PBL(0.00)[17.125.67.70.zen.spamhaus.org : 127.0.0.11]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; MV_CASE(0.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; TO_DN_SOME(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; IP_SCORE(-1.78)[ip: (-4.63), ipnet: 64.59.128.0/20(-2.34), asn: 6327(-1.85), country: CA(-0.09)]; MX_GOOD(-0.01)[spqr.komquats.com]; NEURAL_HAM_SHORT(-0.82)[-0.824,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; RCVD_TLS_LAST(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[9.134.59.64.list.dnswl.org : 127.0.5.1] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jan 2019 20:13:54 -0000 In message <201901121121.x0CBLSiv058912@repo.freebsd.org>, Andrew Turner writes : > Author: andrew > Date: Sat Jan 12 11:21:28 2019 > New Revision: 342962 > URL: https://svnweb.freebsd.org/changeset/base/342962 > > Log: > Add support for the Clang Coverage Sanitizer in the kernel (KCOV). > > When building with KCOV enabled the compiler will insert function calls > to probes allowing us to trace the execution of the kernel from userspace. > These probes are on function entry (trace-pc) and on comparison operations > (trace-cmp). > > Userspace can enable the use of these probes on a single kernel thread with > an ioctl interface. It can allocate space for the probe with KIOSETBUFSIZE, > then mmap the allocated buffer and enable tracing with KIOENABLE, with the > trace mode being passed in as the int argument. When complete KIODISABLE > is used to disable tracing. > > The first item in the buffer is the number of trace event that have > happened. Userspace can write 0 to this to reset the tracing, and is > expected to do so on first use. > > The format of the buffer depends on the trace mode. When in PC tracing just > the return address of the probe is stored. Under comparison tracing the > comparison type, the two arguments, and the return address are traced. The > former method uses on entry per trace event, while the later uses 4. As > such they are incompatible so only a single mode may be enabled. > > KCOV is expected to help fuzzing the kernel, and while in development has > already found a number of issues. It is required for the syzkaller system > call fuzzer [1]. Other kernel fuzzers could also make use of it, either > with the current interface, or by extending it with new modes. > > A man page is currently being worked on and is expected to be committed > soon, however having the code in the kernel now is useful for other > developers to use. > > [1] https://github.com/google/syzkaller > > Submitted by: Mitchell Horne (Earlier version) > Reviewed by: kib > Testing by: tuexen > Sponsored by: DARPA, AFRL > Sponsored by: The FreeBSD Foundation (Mitchell Horne) > Differential Revision: https://reviews.freebsd.org/D14599 > > Added: > head/sys/kern/kern_kcov.c (contents, props changed) > head/sys/sys/kcov.h (contents, props changed) > head/tests/sys/kern/kcov.c (contents, props changed) > Modified: > head/sys/amd64/conf/GENERIC > head/sys/arm64/conf/GENERIC > head/sys/conf/files > head/sys/conf/kern.pre.mk > head/sys/conf/options > head/sys/kern/kern_thread.c > head/sys/sys/proc.h > head/tests/sys/kern/Makefile > [...] > Modified: head/sys/sys/proc.h > ============================================================================= > = > --- head/sys/sys/proc.h Sat Jan 12 11:14:59 2019 (r342961) > +++ head/sys/sys/proc.h Sat Jan 12 11:21:28 2019 (r342962) > @@ -175,6 +175,7 @@ struct filecaps; > struct filemon; > struct kaioinfo; > struct kaudit_record; > +struct kcov_info; > struct kdtrace_proc; > struct kdtrace_thread; > struct mqueue_notifier; > @@ -300,6 +301,7 @@ struct thread { > sbintime_t td_sleeptimo; /* (t) Sleep timeout. */ > int td_rtcgen; /* (s) rtc_generation of abs. sleep */ > size_t td_vslock_sz; /* (k) amount of vslock-ed space */ > + struct kcov_info *td_kcov_info; /* (*) Kernel code coverage data */ > #define td_endzero td_sigmask > > /* Copied during fork1() or create_thread(). */ > This breaks 32-bit builds (see jenkins email to recent committers from this morning). Inserting this here and calculating offsets for 64-bit platforms without taking into consideration 32-bit is the reason why. Maybe we should consider deorbit of 32-bit platforms sooner than later. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Sat Jan 12 20:16:43 2019 Return-Path: Delivered-To: svn-src-head@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 BF05E149D78F for ; Sat, 12 Jan 2019 20:16:42 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x830.google.com (mail-qt1-x830.google.com [IPv6:2607:f8b0:4864:20::830]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6300C6E418 for ; Sat, 12 Jan 2019 20:16:42 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x830.google.com with SMTP id k12so22608233qtf.7 for ; Sat, 12 Jan 2019 12:16:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=OSNMuMB83ZDeCAA5jt56+HhGovQJy4WsFspdYsF96uQ=; b=wsTKg5juOMhcMb5uqV64S4xkgqqMxEu64yDxzxAcDSJuPdv1usgx8ID5v5RrNJ9ijY Bw5vmz6V85XAFQQqAh3ovguk9gy4tQqFA3p+3qAnZiq3hyqmWRpDrfu7E3jUiQDxJ9J6 iZrI3yS5GU6L9yTXnjxgpyCfzIpqOf0OMY0Tigvts447t3dAzc06FblLrh8N+D0NrXE/ zWiZMh7zwrVI2RuD/nuPo0Nznn6+k92NrRp6dH8PjmikZX4HJVuXZiJHS2ul1rID/lpW 3l/hzcteVggjCo/EYPKOBrth22GtoPj+I/7eOVggpJC2HWT4JiYHAThvyjQOABDbAsNl Nldg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=OSNMuMB83ZDeCAA5jt56+HhGovQJy4WsFspdYsF96uQ=; b=as9Ad5A3IF84fZzGyuQwXmyGI18zSotrSFqNi33+NG9bw6TAdTW7L8+DhhcsoqCfyh iPBklE9vmu2w58tmOb86ZCWMGhUBfEPMNvpzmqjJoKcz4efUuDYXgbV+AcrI2EY/zHrz p7Ertv+D197MOcB16PxkQi915qWfeg7sDXyHaZ4bcGvSD6eGSXGyXXgc1/doBhlh/h2z HjlJudF7bFHz89H6W4aXIzds36BO6/Pw8bm7mhF6Dle6Vx6hWWRYHQ7Q/GIXq8t9Me+9 VE9soSe8lg1HSt0dVFs9CEv2Z8NildXX8EH/afYC2yPuEOUE/8tpScvOuMN6e0RquSKN y2xA== X-Gm-Message-State: AJcUukeV9ejD+LDn6vgA+/ibY7ZTUXmNwSRSDlRL/V+7YuI+fFWjKbIW fUnkBeYA2KDfH+hn+DqAeWzL4PJV/z7glOskYNIf0Q== X-Google-Smtp-Source: ALg8bN5CjeCdAe1fkL78e8oS1ZNTvAZYgfB24a8h28G2NzUgG8sXgAtFWjAnznZl0MUpxaFEIDHqepzB1pk7YkVjsfs= X-Received: by 2002:ac8:668c:: with SMTP id d12mr17924015qtp.242.1547324201717; Sat, 12 Jan 2019 12:16:41 -0800 (PST) MIME-Version: 1.0 References: <201901121121.x0CBLSiv058912@repo.freebsd.org> <201901122013.x0CKDhjA064204@slippy.cwsent.com> In-Reply-To: <201901122013.x0CKDhjA064204@slippy.cwsent.com> From: Warner Losh Date: Sat, 12 Jan 2019 13:16:30 -0700 Message-ID: Subject: Re: svn commit: r342962 - in head: sys/amd64/conf sys/arm64/conf sys/conf sys/kern sys/sys tests/sys/kern To: Cy Schubert Cc: Andrew Turner , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 6300C6E418 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.980,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jan 2019 20:16:43 -0000 On Sat, Jan 12, 2019 at 1:14 PM Cy Schubert wrote: > In message <201901121121.x0CBLSiv058912@repo.freebsd.org>, Andrew > Turner writes > : > > Author: andrew > > Date: Sat Jan 12 11:21:28 2019 > > New Revision: 342962 > > URL: https://svnweb.freebsd.org/changeset/base/342962 > > > > Log: > > Add support for the Clang Coverage Sanitizer in the kernel (KCOV). > > > > When building with KCOV enabled the compiler will insert function calls > > to probes allowing us to trace the execution of the kernel from > userspace. > > These probes are on function entry (trace-pc) and on comparison > operations > > (trace-cmp). > > > > Userspace can enable the use of these probes on a single kernel thread > with > > an ioctl interface. It can allocate space for the probe with > KIOSETBUFSIZE, > > then mmap the allocated buffer and enable tracing with KIOENABLE, with > the > > trace mode being passed in as the int argument. When complete > KIODISABLE > > is used to disable tracing. > > > > The first item in the buffer is the number of trace event that have > > happened. Userspace can write 0 to this to reset the tracing, and is > > expected to do so on first use. > > > > The format of the buffer depends on the trace mode. When in PC tracing > just > > the return address of the probe is stored. Under comparison tracing the > > comparison type, the two arguments, and the return address are traced. > The > > former method uses on entry per trace event, while the later uses 4. As > > such they are incompatible so only a single mode may be enabled. > > > > KCOV is expected to help fuzzing the kernel, and while in development > has > > already found a number of issues. It is required for the syzkaller > system > > call fuzzer [1]. Other kernel fuzzers could also make use of it, either > > with the current interface, or by extending it with new modes. > > > > A man page is currently being worked on and is expected to be committed > > soon, however having the code in the kernel now is useful for other > > developers to use. > > > > [1] https://github.com/google/syzkaller > > > > Submitted by: Mitchell Horne (Earlier > version) > > Reviewed by: kib > > Testing by: tuexen > > Sponsored by: DARPA, AFRL > > Sponsored by: The FreeBSD Foundation (Mitchell Horne) > > Differential Revision: https://reviews.freebsd.org/D14599 > > > > Added: > > head/sys/kern/kern_kcov.c (contents, props changed) > > head/sys/sys/kcov.h (contents, props changed) > > head/tests/sys/kern/kcov.c (contents, props changed) > > Modified: > > head/sys/amd64/conf/GENERIC > > head/sys/arm64/conf/GENERIC > > head/sys/conf/files > > head/sys/conf/kern.pre.mk > > head/sys/conf/options > > head/sys/kern/kern_thread.c > > head/sys/sys/proc.h > > head/tests/sys/kern/Makefile > > > [...] > > Modified: head/sys/sys/proc.h > > > ============================================================================= > > = > > --- head/sys/sys/proc.h Sat Jan 12 11:14:59 2019 (r342961) > > +++ head/sys/sys/proc.h Sat Jan 12 11:21:28 2019 (r342962) > > @@ -175,6 +175,7 @@ struct filecaps; > > struct filemon; > > struct kaioinfo; > > struct kaudit_record; > > +struct kcov_info; > > struct kdtrace_proc; > > struct kdtrace_thread; > > struct mqueue_notifier; > > @@ -300,6 +301,7 @@ struct thread { > > sbintime_t td_sleeptimo; /* (t) Sleep timeout. */ > > int td_rtcgen; /* (s) rtc_generation of abs. > sleep */ > > size_t td_vslock_sz; /* (k) amount of vslock-ed space */ > > + struct kcov_info *td_kcov_info; /* (*) Kernel code coverage data */ > > #define td_endzero td_sigmask > > > > /* Copied during fork1() or create_thread(). */ > > > > This breaks 32-bit builds (see jenkins email to recent committers from > this morning). > > Inserting this here and calculating offsets for 64-bit platforms > without taking into consideration 32-bit is the reason why. Maybe we > should consider deorbit of 32-bit platforms sooner than later. > I have the missing mips 64-bit stuff for mips32. i386 already has the 64-bit ops, I believe. Arm has them. Just powerpc 32-bit will be left w/o them. Warner From owner-svn-src-head@freebsd.org Sat Jan 12 20:17:40 2019 Return-Path: Delivered-To: svn-src-head@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 E7403149D856 for ; Sat, 12 Jan 2019 20:17:39 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x82a.google.com (mail-qt1-x82a.google.com [IPv6:2607:f8b0:4864:20::82a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 836496E5AE for ; Sat, 12 Jan 2019 20:17:39 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x82a.google.com with SMTP id v11so22634634qtc.2 for ; Sat, 12 Jan 2019 12:17:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=gRTNbHhu31/MLdNI+9UhrHbgovHZHhkax8IkjtsGtFA=; b=v8lCFqtXIGPY480w1ZsDRjo/knjx/dAcIrhZjXp2ZbxNfIAxFQsPIcUwfogFIUbKpw WEvm/PdrUNQmh7ibVO2Mo6cY617s3onAnqnNJBqdSC8MtIyKXoaixhx9nsN51g+mbCDC arB2yrynUqDK2BrqL8x/zbVNOxb4wpSf7HqzwvCXmKFG9Fr2pt/4Gg/7ElNTGOjf12FD Ch4okDHus33H9T8mwV9RU9ZwAggXbOljGwyNTtMMY5QWnCSG6S3uNI2yqMwylmjPKXCU KvVar8nuJpS23nTAQ5NfWw92uqs5h1eXEuQeA8E5/uS9d2CMIzIn51gxo680irNO/ZEK M3LA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=gRTNbHhu31/MLdNI+9UhrHbgovHZHhkax8IkjtsGtFA=; b=KIaaqUfvuXYwGNhBTfmqFjNNRBj6jF1M9VnNHCGJwr5pT8ZVn9JC6wGgOj9wWv0Zxd V+/Ha4Yj31kQ4qU9QZ8Qlyr9t+dhxQlJz205kOiNVZR8WQ01luhHbPlZVhg4T+MsaFHs w9A0jHvmX2sjflBEyqS0xHdGyy/P3sWQX/c5Zyi0h9rLikzwpuk6+MGB1wZFop8s+o8n OEJAgMqK+i+TlhB3LYR6dYBFzC/AjdVUFLC5k9J5OMfehwzmI3L0Ph+GfGsAawMdLMHv CTmda+9kwj0oKHxAwSFT9pA7lW36sn8AK3HXbYDbyt1ieodKdfpAE4isV27/lHGi/TBq BuxA== X-Gm-Message-State: AJcUukdiukhSsx8P+p9ZhdPZBZXp+iB4ovMh3tqoZX4Lh7A0OmcfERvk 5GrcCktw2OuOZDUyPf/Bdih4j6sc4TneUKlSNazqEA== X-Google-Smtp-Source: ALg8bN7GM4/QK0wQtECFILHH24uqr7Wewod2HJnW4RkYig1GN01d+/r84XvL+X21ozrqp110LeTMxYCkyJqvdKm7Yao= X-Received: by 2002:a0c:f143:: with SMTP id y3mr18940129qvl.21.1547324258862; Sat, 12 Jan 2019 12:17:38 -0800 (PST) MIME-Version: 1.0 References: <201901121150.x0CBodrm077136@repo.freebsd.org> In-Reply-To: From: Warner Losh Date: Sat, 12 Jan 2019 13:17:28 -0700 Message-ID: Subject: Re: svn commit: r342963 - head/tests/sys/kern To: Enji Cooper Cc: Andrew Turner , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 836496E5AE X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.980,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jan 2019 20:17:40 -0000 On Sat, Jan 12, 2019 at 12:10 PM Enji Cooper wrote: > > > > On Jan 12, 2019, at 3:50 AM, Andrew Turner wrote: > > > > Author: andrew > > Date: Sat Jan 12 11:50:39 2019 > > New Revision: 342963 > > URL: https://svnweb.freebsd.org/changeset/base/342963 > > > > Log: > > Temporarily disable the kcov tests. Not all architectures have > > atomic_store_64 and atomic_store_64. > > > > Sponsored by: DARPA, AFRL > > Hi Andrew, > Would it make more sense to conditionally enable the tests on some > architectures instead of disabling it on all architectures? > No. Let's stop doing that. Either the architectures provide the 64-bit stuff, or they will remain broken and removed. Warner From owner-svn-src-head@freebsd.org Sat Jan 12 20:40:44 2019 Return-Path: Delivered-To: svn-src-head@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 37F93149E16F; Sat, 12 Jan 2019 20:40:44 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE02D6F0B9; Sat, 12 Jan 2019 20:40:42 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x0CKeVnu027665; Sat, 12 Jan 2019 12:40:31 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id x0CKeVYC027664; Sat, 12 Jan 2019 12:40:31 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201901122040.x0CKeVYC027664@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r342963 - head/tests/sys/kern In-Reply-To: To: Warner Losh Date: Sat, 12 Jan 2019 12:40:31 -0800 (PST) CC: Enji Cooper , Andrew Turner , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: BE02D6F0B9 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.959,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jan 2019 20:40:44 -0000 [ Charset UTF-8 unsupported, converting... ] > On Sat, Jan 12, 2019 at 12:10 PM Enji Cooper wrote: > > > > > > > > On Jan 12, 2019, at 3:50 AM, Andrew Turner wrote: > > > > > > Author: andrew > > > Date: Sat Jan 12 11:50:39 2019 > > > New Revision: 342963 > > > URL: https://svnweb.freebsd.org/changeset/base/342963 > > > > > > Log: > > > Temporarily disable the kcov tests. Not all architectures have > > > atomic_store_64 and atomic_store_64. > > > > > > Sponsored by: DARPA, AFRL > > > > Hi Andrew, > > Would it make more sense to conditionally enable the tests on some > > architectures instead of disabling it on all architectures? > > > > No. Let's stop doing that. Either the architectures provide the 64-bit > stuff, or they will remain broken and removed. That makes a counter incentive for people to just break 32 bit archs with no reason to bother fixing them. This is a bad idea. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Sat Jan 12 20:41:58 2019 Return-Path: Delivered-To: svn-src-head@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 62296149E344; Sat, 12 Jan 2019 20:41:58 +0000 (UTC) (envelope-from andrew@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 030966F4B7; Sat, 12 Jan 2019 20:41:58 +0000 (UTC) (envelope-from andrew@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 D9F6189DC; Sat, 12 Jan 2019 20:41:57 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0CKfv1B057393; Sat, 12 Jan 2019 20:41:57 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0CKfvUi057392; Sat, 12 Jan 2019 20:41:57 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201901122041.x0CKfvUi057392@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 12 Jan 2019 20:41:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342973 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 342973 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 030966F4B7 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.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jan 2019 20:41:58 -0000 Author: andrew Date: Sat Jan 12 20:41:57 2019 New Revision: 342973 URL: https://svnweb.freebsd.org/changeset/base/342973 Log: Fix the check for the offset of td_frame and td_emuldata in struct thread. Pointy hat: andrew Sponsored by: DARPA, AFRL Modified: head/sys/kern/kern_thread.c Modified: head/sys/kern/kern_thread.c ============================================================================== --- head/sys/kern/kern_thread.c Sat Jan 12 17:56:23 2019 (r342972) +++ head/sys/kern/kern_thread.c Sat Jan 12 20:41:57 2019 (r342973) @@ -102,9 +102,9 @@ _Static_assert(offsetof(struct thread, td_flags) == 0x "struct thread KBI td_flags"); _Static_assert(offsetof(struct thread, td_pflags) == 0xa0, "struct thread KBI td_pflags"); -_Static_assert(offsetof(struct thread, td_frame) == 0x2e8, +_Static_assert(offsetof(struct thread, td_frame) == 0x2ec, "struct thread KBI td_frame"); -_Static_assert(offsetof(struct thread, td_emuldata) == 0x334, +_Static_assert(offsetof(struct thread, td_emuldata) == 0x338, "struct thread KBI td_emuldata"); _Static_assert(offsetof(struct proc, p_flag) == 0x68, "struct proc KBI p_flag"); From owner-svn-src-head@freebsd.org Sat Jan 12 21:02:59 2019 Return-Path: Delivered-To: svn-src-head@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 01BB0149EE04; Sat, 12 Jan 2019 21:02:59 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io1-f53.google.com (mail-io1-f53.google.com [209.85.166.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8AF146FFE9; Sat, 12 Jan 2019 21:02:58 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io1-f53.google.com with SMTP id b23so14861894ios.10; Sat, 12 Jan 2019 13:02:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=J7DX5OHFzlAbCnKrD3T1JVpOUGNvCEXqPpfUeQQpLeI=; b=P2hS2ry30Li0lkAVQ4t9hAD+X/9okllkfdFSz8M+PSB0rry7UaAo/mNKQ0zKuohEel e7R6rd4NsjB2K+2EKZFJ7jILBRWObbi7cvT5UI1jPEFpolUY5HcqivnMkERSPwb9nKhM AkynkaqEiYK+BunOlv6bWXeI/KapJkX3CY4hwbTA9AsxAwqwIFVPHBvX5gEFICxjZMkd AiyGzlx1e72RSfuhhczavRIytGccVBlkqb0QhdVLap9ZxSgyDCtMUGvtKl4rTaccujkj szvrmgtuaTWPCIoi0bNYXNb9bAX6/SlRnn4bbmlfmIiirYXYxjsz8DhA2cmtBgaD9+NX JSsA== X-Gm-Message-State: AJcUukedEKPQGesfFC3FLfSTEgBGPQCW4Y9gI/fQdqdnDGybQKMgGv4L I6VMTt1rsEW2gyFvwa4pzF6Q39/P X-Google-Smtp-Source: ALg8bN6y7qvw5WBavxUIj8U9D477NzZAkbRfZVGQMT1LAw2XCPFDqz9pRi26KHLlICOaxdQitaB52w== X-Received: by 2002:a6b:6b02:: with SMTP id g2mr12264112ioc.18.1547326528827; Sat, 12 Jan 2019 12:55:28 -0800 (PST) Received: from mail-it1-f170.google.com (mail-it1-f170.google.com. [209.85.166.170]) by smtp.gmail.com with ESMTPSA id e5sm35985533ios.50.2019.01.12.12.55.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 Jan 2019 12:55:28 -0800 (PST) Received: by mail-it1-f170.google.com with SMTP id x124so4948145itd.1; Sat, 12 Jan 2019 12:55:28 -0800 (PST) X-Received: by 2002:a02:a791:: with SMTP id e17mr14870685jaj.104.1547326528532; Sat, 12 Jan 2019 12:55:28 -0800 (PST) MIME-Version: 1.0 References: <201901122041.x0CKfvUi057392@repo.freebsd.org> In-Reply-To: <201901122041.x0CKfvUi057392@repo.freebsd.org> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Sat, 12 Jan 2019 12:55:17 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r342973 - head/sys/kern To: Andrew Turner Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 8AF146FFE9 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; TAGGED_FROM(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jan 2019 21:02:59 -0000 Maybe bump FreeBSD_version in sys/param.h since these seem to be asserting KBI and have now been changed. Best, Conrad On Sat, Jan 12, 2019 at 12:42 PM Andrew Turner wrote: > > Author: andrew > Date: Sat Jan 12 20:41:57 2019 > New Revision: 342973 > URL: https://svnweb.freebsd.org/changeset/base/342973 > > Log: > Fix the check for the offset of td_frame and td_emuldata in struct thread. > > Pointy hat: andrew > Sponsored by: DARPA, AFRL > > Modified: > head/sys/kern/kern_thread.c > > Modified: head/sys/kern/kern_thread.c > ============================================================================== > --- head/sys/kern/kern_thread.c Sat Jan 12 17:56:23 2019 (r342972) > +++ head/sys/kern/kern_thread.c Sat Jan 12 20:41:57 2019 (r342973) > @@ -102,9 +102,9 @@ _Static_assert(offsetof(struct thread, td_flags) == 0x > "struct thread KBI td_flags"); > _Static_assert(offsetof(struct thread, td_pflags) == 0xa0, > "struct thread KBI td_pflags"); > -_Static_assert(offsetof(struct thread, td_frame) == 0x2e8, > +_Static_assert(offsetof(struct thread, td_frame) == 0x2ec, > "struct thread KBI td_frame"); > -_Static_assert(offsetof(struct thread, td_emuldata) == 0x334, > +_Static_assert(offsetof(struct thread, td_emuldata) == 0x338, > "struct thread KBI td_emuldata"); > _Static_assert(offsetof(struct proc, p_flag) == 0x68, > "struct proc KBI p_flag"); > From owner-svn-src-head@freebsd.org Sat Jan 12 21:16:25 2019 Return-Path: Delivered-To: svn-src-head@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 9A8DC149F283; Sat, 12 Jan 2019 21:16:25 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 62F23705AF; Sat, 12 Jan 2019 21:16:24 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id iQdZgnDyi8uQmiQdbg7lUs; Sat, 12 Jan 2019 14:16:16 -0700 X-Authority-Analysis: v=2.3 cv=XKpOtjpE c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=3JhidrIBZZsA:10 a=xfDLHkLGAAAA:8 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=nZOtpAppAAAA:20 a=pGLkceISAAAA:8 a=X3ymU5L2OvmAqO30WCsA:9 a=8ggiLcEKfvqqnCg9:21 a=QBO0JS655PKlosYE:21 a=CjuIK1q_8ugA:10 a=UJ0tAi3fqDAA:10 a=IfaqVvZgccqrtc8gcwf2:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 722C33568; Sat, 12 Jan 2019 13:16:17 -0800 (PST) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id x0CLGDrt003720; Sat, 12 Jan 2019 13:16:13 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id x0CLGDrl003717; Sat, 12 Jan 2019 13:16:13 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201901122116.x0CLGDrl003717@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Warner Losh cc: Cy Schubert , Andrew Turner , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r342962 - in head: sys/amd64/conf sys/arm64/conf sys/conf sys/kern sys/sys tests/sys/kern In-Reply-To: Message from Warner Losh of "Sat, 12 Jan 2019 13:16:30 -0700." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 12 Jan 2019 13:16:13 -0800 X-CMAE-Envelope: MS4wfCfuI1bnJdO8jDD6H2ufvKvycwDTWiwhMlzeGINYxOxi5E/rnntU2/8CPEZF3ulnfjaP47KtE5uA5hMOrU4csMNcToU6XEU6dAMf0cKsI+XmbjT9ox+0 NK8IlBdno8k7lJybCXJ8+OC9H8JjDbKiAHuJKe9G6h+tpxeWIjEnYyvctpI660vfiriVy2mJn19RZxY78XTVtHP6sqMKaADEKRIZ12v2OYWGLo37aG85kvMt pPbkmpcyE2l0sT6H9Xx3t+8CTI3mgbMcbzvGRNlnKnl9peI+2WNniz9B7ZVaJTgcimHYV4UCaxSEPjN2Opu+Cg== X-Rspamd-Queue-Id: 62F23705AF X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-4.55 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; IP_SCORE(-2.03)[ip: (-5.87), ipnet: 64.59.128.0/20(-2.33), asn: 6327(-1.84), country: CA(-0.09)]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCPT_COUNT_FIVE(0.00)[6]; REPLYTO_EQ_FROM(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: spqr.komquats.com]; NEURAL_HAM_SHORT(-0.82)[-0.817,0]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_SPF_NA(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[17.125.67.70.zen.spamhaus.org : 127.0.0.11]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[13.134.59.64.list.dnswl.org : 127.0.5.1] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jan 2019 21:16:25 -0000 In message , Warner Losh writes: > --000000000000656f96057f487d65 > Content-Type: text/plain; charset="UTF-8" > > On Sat, Jan 12, 2019 at 1:14 PM Cy Schubert > wrote: > > > In message <201901121121.x0CBLSiv058912@repo.freebsd.org>, Andrew > > Turner writes > > : > > > Author: andrew > > > Date: Sat Jan 12 11:21:28 2019 > > > New Revision: 342962 > > > URL: https://svnweb.freebsd.org/changeset/base/342962 > > > > > > Log: > > > Add support for the Clang Coverage Sanitizer in the kernel (KCOV). > > > > > > When building with KCOV enabled the compiler will insert function calls > > > to probes allowing us to trace the execution of the kernel from > > userspace. > > > These probes are on function entry (trace-pc) and on comparison > > operations > > > (trace-cmp). > > > > > > Userspace can enable the use of these probes on a single kernel thread > > with > > > an ioctl interface. It can allocate space for the probe with > > KIOSETBUFSIZE, > > > then mmap the allocated buffer and enable tracing with KIOENABLE, with > > the > > > trace mode being passed in as the int argument. When complete > > KIODISABLE > > > is used to disable tracing. > > > > > > The first item in the buffer is the number of trace event that have > > > happened. Userspace can write 0 to this to reset the tracing, and is > > > expected to do so on first use. > > > > > > The format of the buffer depends on the trace mode. When in PC tracing > > just > > > the return address of the probe is stored. Under comparison tracing the > > > comparison type, the two arguments, and the return address are traced. > > The > > > former method uses on entry per trace event, while the later uses 4. As > > > such they are incompatible so only a single mode may be enabled. > > > > > > KCOV is expected to help fuzzing the kernel, and while in development > > has > > > already found a number of issues. It is required for the syzkaller > > system > > > call fuzzer [1]. Other kernel fuzzers could also make use of it, either > > > with the current interface, or by extending it with new modes. > > > > > > A man page is currently being worked on and is expected to be committed > > > soon, however having the code in the kernel now is useful for other > > > developers to use. > > > > > > [1] https://github.com/google/syzkaller > > > > > > Submitted by: Mitchell Horne (Earlier > > version) > > > Reviewed by: kib > > > Testing by: tuexen > > > Sponsored by: DARPA, AFRL > > > Sponsored by: The FreeBSD Foundation (Mitchell Horne) > > > Differential Revision: https://reviews.freebsd.org/D14599 > > > > > > Added: > > > head/sys/kern/kern_kcov.c (contents, props changed) > > > head/sys/sys/kcov.h (contents, props changed) > > > head/tests/sys/kern/kcov.c (contents, props changed) > > > Modified: > > > head/sys/amd64/conf/GENERIC > > > head/sys/arm64/conf/GENERIC > > > head/sys/conf/files > > > head/sys/conf/kern.pre.mk > > > head/sys/conf/options > > > head/sys/kern/kern_thread.c > > > head/sys/sys/proc.h > > > head/tests/sys/kern/Makefile > > > > > [...] > > > Modified: head/sys/sys/proc.h > > > > > =========================================================================== > == > > > = > > > --- head/sys/sys/proc.h Sat Jan 12 11:14:59 2019 (r342961) > > > +++ head/sys/sys/proc.h Sat Jan 12 11:21:28 2019 (r342962) > > > @@ -175,6 +175,7 @@ struct filecaps; > > > struct filemon; > > > struct kaioinfo; > > > struct kaudit_record; > > > +struct kcov_info; > > > struct kdtrace_proc; > > > struct kdtrace_thread; > > > struct mqueue_notifier; > > > @@ -300,6 +301,7 @@ struct thread { > > > sbintime_t td_sleeptimo; /* (t) Sleep timeout. */ > > > int td_rtcgen; /* (s) rtc_generation of abs. > > sleep */ > > > size_t td_vslock_sz; /* (k) amount of vslock-ed space */ > > > + struct kcov_info *td_kcov_info; /* (*) Kernel code coverage data */ > > > #define td_endzero td_sigmask > > > > > > /* Copied during fork1() or create_thread(). */ > > > > > > > This breaks 32-bit builds (see jenkins email to recent committers from > > this morning). > > > > Inserting this here and calculating offsets for 64-bit platforms > > without taking into consideration 32-bit is the reason why. Maybe we > > should consider deorbit of 32-bit platforms sooner than later. > > > > I have the missing mips 64-bit stuff for mips32. i386 already has the > 64-bit ops, I believe. Arm has them. Just powerpc 32-bit will be left w/o > them. The problem here is the KASSERTs in kern_thead.c assert due to the 32-bit offsets whereby 64-bit builds ok. Check the latest jenkins error email for i386. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Sat Jan 12 21:29:55 2019 Return-Path: Delivered-To: svn-src-head@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 9163C149F8C7; Sat, 12 Jan 2019 21:29:55 +0000 (UTC) (envelope-from jhibbits@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 31CB370EB0; Sat, 12 Jan 2019 21:29:55 +0000 (UTC) (envelope-from jhibbits@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 2013790D7; Sat, 12 Jan 2019 21:29:55 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0CLTtjw080495; Sat, 12 Jan 2019 21:29:55 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0CLTs3L080492; Sat, 12 Jan 2019 21:29:54 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201901122129.x0CLTs3L080492@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sat, 12 Jan 2019 21:29:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342974 - in head: gnu/lib/csu lib/csu/powerpc lib/csu/powerpc64 X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: in head: gnu/lib/csu lib/csu/powerpc lib/csu/powerpc64 X-SVN-Commit-Revision: 342974 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 31CB370EB0 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)[-0.999,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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jan 2019 21:29:55 -0000 Author: jhibbits Date: Sat Jan 12 21:29:54 2019 New Revision: 342974 URL: https://svnweb.freebsd.org/changeset/base/342974 Log: Create crtsavres.o for powerpc builds Summary: GCC expects to link in a crtsavres.o on powerpc platforms. On powerpc64 this is an empty file, but on powerpc and powerpcspe this does contain some save/restore functions, which may not actually be necessary for newer modern GCC and clang. This appeases the in-tree gcc, though, and is needed in order to switch to the BSD CRTRBEGIN. PR: 233751 Reviewed By: andrew Differential Revision: https://reviews.freebsd.org/D18826 Added: head/lib/csu/powerpc/crtsavres.S (contents, props changed) Modified: head/gnu/lib/csu/Makefile head/lib/csu/powerpc/Makefile head/lib/csu/powerpc64/Makefile Modified: head/gnu/lib/csu/Makefile ============================================================================== --- head/gnu/lib/csu/Makefile Sat Jan 12 20:41:57 2019 (r342973) +++ head/gnu/lib/csu/Makefile Sat Jan 12 21:29:54 2019 (r342974) @@ -28,10 +28,6 @@ CRTS_CFLAGS= -DCRTSTUFFS_O -DSHARED ${PICFLAG} CFLAGS+= -DTARGET_ARM_EABI .endif -.if ${MACHINE_CPUARCH} == "powerpc" -TGTOBJS= crtsavres.o -SRCS+= crtsavres.asm -.endif .if ${MACHINE_CPUARCH} == "sparc64" TGTOBJS= crtfastmath.o SRCS+= crtfastmath.c Modified: head/lib/csu/powerpc/Makefile ============================================================================== --- head/lib/csu/powerpc/Makefile Sat Jan 12 20:41:57 2019 (r342973) +++ head/lib/csu/powerpc/Makefile Sat Jan 12 21:29:54 2019 (r342974) @@ -2,7 +2,7 @@ .PATH: ${.CURDIR:H}/common -SRCS= crt1.c crti.S crtn.S +SRCS= crt1.c crti.S crtn.S crtsavres.S OBJS= ${SRCS:N*.h:R:S/$/.o/g} OBJS+= Scrt1.o gcrt1.o CFLAGS+= -I${.CURDIR:H}/common \ Added: head/lib/csu/powerpc/crtsavres.S ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/csu/powerpc/crtsavres.S Sat Jan 12 21:29:54 2019 (r342974) @@ -0,0 +1,191 @@ +/*- + * SPDX-License-Identifier: BSD-1-Clause + * + * Copyright 2019 Justin Hibbits + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +.text + +/* + * The PowerPC ABI spec requires the following save/restore functions to be + * provided: + * + * _savefpr_N + * _restfpr_N + * _restfpr_N_x + * _savegpr_N + * _restgpr_N + * _restgpr_N_x + * + * With N ranging from 14 to 31, to save the nonvolatile registers. + */ + +#define _CRTENTRY(name) \ + .text; \ + .globl name; \ + .type name,@function; \ + name: + +#define SAVEFPR(r) _CRTENTRY(__CONCAT(_savefpr_,r)) \ + stfd r,(-256 + r * 8)(11) + +SAVEFPR(14) +SAVEFPR(15) +SAVEFPR(16) +SAVEFPR(17) +SAVEFPR(18) +SAVEFPR(19) +SAVEFPR(20) +SAVEFPR(21) +SAVEFPR(22) +SAVEFPR(23) +SAVEFPR(24) +SAVEFPR(25) +SAVEFPR(26) +SAVEFPR(27) +SAVEFPR(28) +SAVEFPR(29) +SAVEFPR(30) +SAVEFPR(31) + blr + +#define RESTFPR(r) _CRTENTRY(__CONCAT(_restfpr_,r)) \ + lfd r,(-256 + r * 8)(11) + +RESTFPR(14) +RESTFPR(15) +RESTFPR(16) +RESTFPR(17) +RESTFPR(18) +RESTFPR(19) +RESTFPR(20) +RESTFPR(21) +RESTFPR(22) +RESTFPR(23) +RESTFPR(24) +RESTFPR(25) +RESTFPR(26) +RESTFPR(27) +RESTFPR(28) +RESTFPR(29) +RESTFPR(30) +RESTFPR(31) + blr + +#define SAVEGPR(r) _CRTENTRY(__CONCAT(_savegpr_,r)) \ + stfd r,(-128 + r*4)(11) + +SAVEGPR(14) +SAVEGPR(15) +SAVEGPR(16) +SAVEGPR(17) +SAVEGPR(18) +SAVEGPR(19) +SAVEGPR(20) +SAVEGPR(21) +SAVEGPR(22) +SAVEGPR(23) +SAVEGPR(24) +SAVEGPR(25) +SAVEGPR(26) +SAVEGPR(27) +SAVEGPR(28) +SAVEGPR(29) +SAVEGPR(30) +SAVEGPR(31) + blr + +#define RESTGPR(r) _CRTENTRY(__CONCAT(_restgpr_,r)) \ + lwz r,(-128 + r*4)(11) + +RESTGPR(14) +RESTGPR(15) +RESTGPR(16) +RESTGPR(17) +RESTGPR(18) +RESTGPR(19) +RESTGPR(20) +RESTGPR(21) +RESTGPR(22) +RESTGPR(23) +RESTGPR(24) +RESTGPR(25) +RESTGPR(26) +RESTGPR(27) +RESTGPR(28) +RESTGPR(29) +RESTGPR(30) +RESTGPR(31) + blr + +#define RESTFPR_X(r) _CRTENTRY(__CONCAT(__CONCAT(_restfpr_,r),_x)) \ + lfd r,(-256 + r * 8)(11) + +RESTFPR_X(14) +RESTFPR_X(15) +RESTFPR_X(16) +RESTFPR_X(17) +RESTFPR_X(18) +RESTFPR_X(19) +RESTFPR_X(20) +RESTFPR_X(21) +RESTFPR_X(22) +RESTFPR_X(23) +RESTFPR_X(24) +RESTFPR_X(25) +RESTFPR_X(26) +RESTFPR_X(27) +RESTFPR_X(28) +RESTFPR_X(29) +RESTFPR_X(30) +RESTFPR_X(31) + lwz 0,4(11) + mtlr 0 + mr 1,11 + blr + +#define RESTGPR_X(r) _CRTENTRY(__CONCAT(__CONCAT(_restgpr_,r),_x)) \ + lwz r,(-128 + r*4)(11) + +RESTGPR_X(14) +RESTGPR_X(15) +RESTGPR_X(16) +RESTGPR_X(17) +RESTGPR_X(18) +RESTGPR_X(19) +RESTGPR_X(20) +RESTGPR_X(21) +RESTGPR_X(22) +RESTGPR_X(23) +RESTGPR_X(24) +RESTGPR_X(25) +RESTGPR_X(26) +RESTGPR_X(27) +RESTGPR_X(28) +RESTGPR_X(29) +RESTGPR_X(30) +RESTGPR_X(31) + lwz 0,4(11) + mtlr 0 + mr 1,11 + blr Modified: head/lib/csu/powerpc64/Makefile ============================================================================== --- head/lib/csu/powerpc64/Makefile Sat Jan 12 20:41:57 2019 (r342973) +++ head/lib/csu/powerpc64/Makefile Sat Jan 12 21:29:54 2019 (r342974) @@ -4,7 +4,7 @@ SRCS= crt1.c crti.S crtn.S OBJS= ${SRCS:N*.h:R:S/$/.o/g} -OBJS+= Scrt1.o gcrt1.o +OBJS+= crtsavres.o Scrt1.o gcrt1.o CFLAGS+= -I${.CURDIR:H}/common \ -I${SRCTOP}/lib/libc/include \ -mlongcall -DCRT_IRELOC_SUPPRESS @@ -18,7 +18,7 @@ FILESDIR= ${LIBDIR} .undef LIBRARIES_ONLY CLEANFILES= ${OBJS} -CLEANFILES+= crt1.s gcrt1.s Scrt1.s +CLEANFILES+= crt1.s crtsavres.s gcrt1.s Scrt1.s # See the comment in lib/csu/common/crtbrand.c for the reason crt1.c is not # directly compiled to .o files. @@ -26,6 +26,10 @@ CLEANFILES+= crt1.s gcrt1.s Scrt1.s crt1.s: crt1.c ${CC} ${CFLAGS} -S -o ${.TARGET} ${.CURDIR}/crt1.c sed ${SED_FIX_NOTE} ${.TARGET} + +# On powerpc64 crtsavres is an empty file +crtsavres.s: + touch ${.TARGET} crt1.o: crt1.s ${CC} ${CFLAGS:N-g} ${ACFLAGS} -c -o ${.TARGET} crt1.s From owner-svn-src-head@freebsd.org Sat Jan 12 21:34:38 2019 Return-Path: Delivered-To: svn-src-head@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 5CBFB149FB4D; Sat, 12 Jan 2019 21:34:38 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 12ACB712D2; Sat, 12 Jan 2019 21:34:36 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id iQvJgnKY08uQmiQvLg7oJ2; Sat, 12 Jan 2019 14:34:35 -0700 X-Authority-Analysis: v=2.3 cv=XKpOtjpE c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=3JhidrIBZZsA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=R8jUgqxHKWk3uC_z9wsA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id AD80435CE; Sat, 12 Jan 2019 13:34:37 -0800 (PST) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id x0CLYXHe003919; Sat, 12 Jan 2019 13:34:33 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id x0CLYXDa003916; Sat, 12 Jan 2019 13:34:33 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201901122134.x0CLYXDa003916@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Andrew Turner cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r342973 - head/sys/kern In-Reply-To: Message from Andrew Turner of "Sat, 12 Jan 2019 20:41:57 +0000." <201901122041.x0CKfvUi057392@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 12 Jan 2019 13:34:33 -0800 X-CMAE-Envelope: MS4wfIw/jAOxblk8YI4BKklnKqxzlTj6xEBSul6Q4Bt5v5uEYfK9iPONgg1VapSXwPM7tU2bIpLMtAnso41/wRuV4kBIKp4VMo+2TdzWxOzq/j+wQIl4KL1s eW+x0sDSPPVttav96+nARnquJlXUZXw//Ai74kR93FDduk7p37HLpyFSobs2STpfWqAzu2CIMS+Vpgrj9Ylfpwxa4pJ2Udd3PsLBVz0GE9kVS+h8aOFfpzh7 2y9fp+j+7yAfLlQW7bNwCcS/rIBTq8Mk32JFuwRM0NZO3h9CwmWP4y8xWGgXAsIJ X-Rspamd-Queue-Id: 12ACB712D2 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-4.25 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; RECEIVED_SPAMHAUS_PBL(0.00)[17.125.67.70.zen.spamhaus.org : 127.0.0.11]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_MATCH_ENVRCPT_ALL(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; IP_SCORE(-1.75)[ip: (-4.53), ipnet: 64.59.128.0/20(-2.32), asn: 6327(-1.80), country: CA(-0.09)]; MX_GOOD(-0.01)[cached: spqr.komquats.com]; NEURAL_HAM_SHORT(-0.79)[-0.793,0]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; RCVD_TLS_LAST(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[9.134.59.64.list.dnswl.org : 127.0.5.1] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jan 2019 21:34:38 -0000 In message <201901122041.x0CKfvUi057392@repo.freebsd.org>, Andrew Turner writes : > Author: andrew > Date: Sat Jan 12 20:41:57 2019 > New Revision: 342973 > URL: https://svnweb.freebsd.org/changeset/base/342973 > > Log: > Fix the check for the offset of td_frame and td_emuldata in struct thread. > > Pointy hat: andrew > Sponsored by: DARPA, AFRL > > Modified: > head/sys/kern/kern_thread.c > > Modified: head/sys/kern/kern_thread.c > ============================================================================= > = > --- head/sys/kern/kern_thread.c Sat Jan 12 17:56:23 2019 (r34297 > 2) > +++ head/sys/kern/kern_thread.c Sat Jan 12 20:41:57 2019 (r34297 > 3) > @@ -102,9 +102,9 @@ _Static_assert(offsetof(struct thread, td_flags) == 0x > "struct thread KBI td_flags"); > _Static_assert(offsetof(struct thread, td_pflags) == 0xa0, > "struct thread KBI td_pflags"); > -_Static_assert(offsetof(struct thread, td_frame) == 0x2e8, > +_Static_assert(offsetof(struct thread, td_frame) == 0x2ec, > "struct thread KBI td_frame"); > -_Static_assert(offsetof(struct thread, td_emuldata) == 0x334, > +_Static_assert(offsetof(struct thread, td_emuldata) == 0x338, > "struct thread KBI td_emuldata"); > _Static_assert(offsetof(struct proc, p_flag) == 0x68, > "struct proc KBI p_flag"); > Thank you Andrew. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Sat Jan 12 22:05:45 2019 Return-Path: Delivered-To: svn-src-head@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 C3CAF14A040E; Sat, 12 Jan 2019 22:05:44 +0000 (UTC) (envelope-from jhibbits@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 703A771E09; Sat, 12 Jan 2019 22:05:44 +0000 (UTC) (envelope-from jhibbits@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 460E89786; Sat, 12 Jan 2019 22:05:44 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0CM5iNp001250; Sat, 12 Jan 2019 22:05:44 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0CM5gig001242; Sat, 12 Jan 2019 22:05:42 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201901122205.x0CM5gig001242@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sat, 12 Jan 2019 22:05:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342975 - in head/sys/powerpc: include powermac powernv powerpc ps3 pseries X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: in head/sys/powerpc: include powermac powernv powerpc ps3 pseries X-SVN-Commit-Revision: 342975 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 703A771E09 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)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jan 2019 22:05:45 -0000 Author: jhibbits Date: Sat Jan 12 22:05:42 2019 New Revision: 342975 URL: https://svnweb.freebsd.org/changeset/base/342975 Log: powerpc: Add opaque 'private data' to interrupt vectors The XICS and XIVE need extra data beyond irq and vector. Rather than performing a separate search, it's better for the general interrupt facility to hold a private pointer, since the search already must be done anyway at that level. Modified: head/sys/powerpc/include/openpicvar.h head/sys/powerpc/powermac/cpcht.c head/sys/powerpc/powermac/hrowpic.c head/sys/powerpc/powernv/opal_pci.c head/sys/powerpc/powerpc/intr_machdep.c head/sys/powerpc/powerpc/openpic.c head/sys/powerpc/powerpc/pic_if.m head/sys/powerpc/ps3/ps3pic.c head/sys/powerpc/pseries/xics.c Modified: head/sys/powerpc/include/openpicvar.h ============================================================================== --- head/sys/powerpc/include/openpicvar.h Sat Jan 12 21:29:54 2019 (r342974) +++ head/sys/powerpc/include/openpicvar.h Sat Jan 12 22:05:42 2019 (r342975) @@ -75,14 +75,14 @@ int openpic_common_attach(device_t, uint32_t); /* * PIC interface. */ -void openpic_bind(device_t dev, u_int irq, cpuset_t cpumask); +void openpic_bind(device_t dev, u_int irq, cpuset_t cpumask, void **); void openpic_config(device_t, u_int, enum intr_trigger, enum intr_polarity); void openpic_dispatch(device_t, struct trapframe *); -void openpic_enable(device_t, u_int, u_int); -void openpic_eoi(device_t, u_int); +void openpic_enable(device_t, u_int, u_int, void **); +void openpic_eoi(device_t, u_int, void *); void openpic_ipi(device_t, u_int); -void openpic_mask(device_t, u_int); -void openpic_unmask(device_t, u_int); +void openpic_mask(device_t, u_int, void *); +void openpic_unmask(device_t, u_int, void *); int openpic_suspend(device_t dev); int openpic_resume(device_t dev); Modified: head/sys/powerpc/powermac/cpcht.c ============================================================================== --- head/sys/powerpc/powermac/cpcht.c Sat Jan 12 21:29:54 2019 (r342974) +++ head/sys/powerpc/powermac/cpcht.c Sat Jan 12 22:05:42 2019 (r342975) @@ -512,9 +512,10 @@ static int openpic_cpcht_probe(device_t); static int openpic_cpcht_attach(device_t); static void openpic_cpcht_config(device_t, u_int irq, enum intr_trigger trig, enum intr_polarity pol); -static void openpic_cpcht_enable(device_t, u_int irq, u_int vector); -static void openpic_cpcht_unmask(device_t, u_int irq); -static void openpic_cpcht_eoi(device_t, u_int irq); +static void openpic_cpcht_enable(device_t, u_int irq, u_int vector, + void **priv); +static void openpic_cpcht_unmask(device_t, u_int irq, void *priv); +static void openpic_cpcht_eoi(device_t, u_int irq, void *priv); static device_method_t openpic_cpcht_methods[] = { /* Device interface */ @@ -649,12 +650,12 @@ openpic_cpcht_config(device_t dev, u_int irq, enum int } static void -openpic_cpcht_enable(device_t dev, u_int irq, u_int vec) +openpic_cpcht_enable(device_t dev, u_int irq, u_int vec, void **priv) { struct openpic_cpcht_softc *sc; uint32_t ht_irq; - openpic_enable(dev, irq, vec); + openpic_enable(dev, irq, vec, priv); sc = device_get_softc(dev); @@ -674,16 +675,16 @@ openpic_cpcht_enable(device_t dev, u_int irq, u_int ve mtx_unlock_spin(&sc->sc_ht_mtx); } - openpic_cpcht_eoi(dev, irq); + openpic_cpcht_eoi(dev, irq, *priv); } static void -openpic_cpcht_unmask(device_t dev, u_int irq) +openpic_cpcht_unmask(device_t dev, u_int irq, void *priv) { struct openpic_cpcht_softc *sc; uint32_t ht_irq; - openpic_unmask(dev, irq); + openpic_unmask(dev, irq, priv); sc = device_get_softc(dev); @@ -703,11 +704,11 @@ openpic_cpcht_unmask(device_t dev, u_int irq) mtx_unlock_spin(&sc->sc_ht_mtx); } - openpic_cpcht_eoi(dev, irq); + openpic_cpcht_eoi(dev, irq, priv); } static void -openpic_cpcht_eoi(device_t dev, u_int irq) +openpic_cpcht_eoi(device_t dev, u_int irq, void *priv) { struct openpic_cpcht_softc *sc; uint32_t off, mask; @@ -737,5 +738,5 @@ openpic_cpcht_eoi(device_t dev, u_int irq) } } - openpic_eoi(dev, irq); + openpic_eoi(dev, irq, priv); } Modified: head/sys/powerpc/powermac/hrowpic.c ============================================================================== --- head/sys/powerpc/powermac/hrowpic.c Sat Jan 12 21:29:54 2019 (r342974) +++ head/sys/powerpc/powermac/hrowpic.c Sat Jan 12 22:05:42 2019 (r342975) @@ -66,11 +66,11 @@ static int hrowpic_probe(device_t); static int hrowpic_attach(device_t); static void hrowpic_dispatch(device_t, struct trapframe *); -static void hrowpic_enable(device_t, u_int, u_int); -static void hrowpic_eoi(device_t, u_int); +static void hrowpic_enable(device_t, u_int, u_int, void **); +static void hrowpic_eoi(device_t, u_int, void *); static void hrowpic_ipi(device_t, u_int); -static void hrowpic_mask(device_t, u_int); -static void hrowpic_unmask(device_t, u_int); +static void hrowpic_mask(device_t, u_int, void *); +static void hrowpic_unmask(device_t, u_int, void *); static device_method_t hrowpic_methods[] = { /* Device interface */ @@ -237,7 +237,7 @@ hrowpic_dispatch(device_t dev, struct trapframe *tf) } static void -hrowpic_enable(device_t dev, u_int irq, u_int vector) +hrowpic_enable(device_t dev, u_int irq, u_int vector, void **priv __unused) { struct hrowpic_softc *sc; @@ -247,7 +247,7 @@ hrowpic_enable(device_t dev, u_int irq, u_int vector) } static void -hrowpic_eoi(device_t dev, u_int irq) +hrowpic_eoi(device_t dev, u_int irq, void *priv __unused) { struct hrowpic_softc *sc; int bank; @@ -264,7 +264,7 @@ hrowpic_ipi(device_t dev, u_int irq) } static void -hrowpic_mask(device_t dev, u_int irq) +hrowpic_mask(device_t dev, u_int irq, void *priv __unused) { struct hrowpic_softc *sc; @@ -273,7 +273,7 @@ hrowpic_mask(device_t dev, u_int irq) } static void -hrowpic_unmask(device_t dev, u_int irq) +hrowpic_unmask(device_t dev, u_int irq, void *priv __unused) { struct hrowpic_softc *sc; Modified: head/sys/powerpc/powernv/opal_pci.c ============================================================================== --- head/sys/powerpc/powernv/opal_pci.c Sat Jan 12 21:29:54 2019 (r342974) +++ head/sys/powerpc/powernv/opal_pci.c Sat Jan 12 22:05:42 2019 (r342975) @@ -93,8 +93,8 @@ static int opalpci_route_interrupt(device_t bus, devic /* * MSI PIC interface. */ -static void opalpic_pic_enable(device_t dev, u_int irq, u_int vector); -static void opalpic_pic_eoi(device_t dev, u_int irq); +static void opalpic_pic_enable(device_t dev, u_int irq, u_int vector, void **); +static void opalpic_pic_eoi(device_t dev, u_int irq, void *); /* Bus interface */ static bus_dma_tag_t opalpci_get_dma_tag(device_t dev, device_t child); @@ -675,22 +675,22 @@ opalpci_map_msi(device_t dev, device_t child, int irq, } static void -opalpic_pic_enable(device_t dev, u_int irq, u_int vector) +opalpic_pic_enable(device_t dev, u_int irq, u_int vector, void **priv) { struct opalpci_softc *sc = device_get_softc(dev); - PIC_ENABLE(root_pic, irq, vector); - opal_call(OPAL_PCI_MSI_EOI, sc->phb_id, irq); + PIC_ENABLE(root_pic, irq, vector, priv); + opal_call(OPAL_PCI_MSI_EOI, sc->phb_id, irq, priv); } -static void opalpic_pic_eoi(device_t dev, u_int irq) +static void opalpic_pic_eoi(device_t dev, u_int irq, void *priv) { struct opalpci_softc *sc; sc = device_get_softc(dev); opal_call(OPAL_PCI_MSI_EOI, sc->phb_id, irq); - PIC_EOI(root_pic, irq); + PIC_EOI(root_pic, irq, priv); } static bus_dma_tag_t Modified: head/sys/powerpc/powerpc/intr_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/intr_machdep.c Sat Jan 12 21:29:54 2019 (r342974) +++ head/sys/powerpc/powerpc/intr_machdep.c Sat Jan 12 22:05:42 2019 (r342975) @@ -96,6 +96,7 @@ static MALLOC_DEFINE(M_INTR, "intr", "interrupt handle struct powerpc_intr { struct intr_event *event; long *cntp; + void *priv; /* PIC-private data */ u_int irq; device_t pic; u_int intline; @@ -158,7 +159,7 @@ smp_intr_init(void *dummy __unused) for (vector = 0; vector < nvectors; vector++) { i = powerpc_intrs[vector]; if (i != NULL && i->event != NULL && i->pic == root_pic) - PIC_BIND(i->pic, i->intline, i->cpu); + PIC_BIND(i->pic, i->intline, i->cpu, &i->priv); } } SYSINIT(smp_intr_init, SI_SUB_SMP, SI_ORDER_ANY, smp_intr_init, NULL); @@ -281,7 +282,7 @@ powerpc_intr_eoi(void *arg) { struct powerpc_intr *i = arg; - PIC_EOI(i->pic, i->intline); + PIC_EOI(i->pic, i->intline, i->priv); } static void @@ -289,8 +290,8 @@ powerpc_intr_pre_ithread(void *arg) { struct powerpc_intr *i = arg; - PIC_MASK(i->pic, i->intline); - PIC_EOI(i->pic, i->intline); + PIC_MASK(i->pic, i->intline, i->priv); + PIC_EOI(i->pic, i->intline, i->priv); } static void @@ -298,7 +299,7 @@ powerpc_intr_post_ithread(void *arg) { struct powerpc_intr *i = arg; - PIC_UNMASK(i->pic, i->intline); + PIC_UNMASK(i->pic, i->intline, i->priv); } static int @@ -313,7 +314,7 @@ powerpc_assign_intr_cpu(void *arg, int cpu) CPU_SETOF(cpu, &i->cpu); if (!cold && i->pic != NULL && i->pic == root_pic) - PIC_BIND(i->pic, i->intline, i->cpu); + PIC_BIND(i->pic, i->intline, i->cpu, &i->priv); return (0); #else @@ -465,7 +466,7 @@ powerpc_enable_intr(void) PIC_CONFIG(i->pic, i->intline, i->trig, i->pol); if (i->event != NULL) - PIC_ENABLE(i->pic, i->intline, vector); + PIC_ENABLE(i->pic, i->intline, vector, &i->priv); } return (0); @@ -512,10 +513,11 @@ powerpc_setup_intr(const char *name, u_int irq, driver PIC_CONFIG(i->pic, i->intline, i->trig, i->pol); if (i->pic == root_pic) - PIC_BIND(i->pic, i->intline, i->cpu); + PIC_BIND(i->pic, i->intline, i->cpu, &i->priv); if (enable) - PIC_ENABLE(i->pic, i->intline, i->vector); + PIC_ENABLE(i->pic, i->intline, i->vector, + &i->priv); } } return (error); @@ -602,7 +604,7 @@ powerpc_dispatch_intr(u_int vector, struct trapframe * * This prevents races in IPI handling. */ if (i->ipi) - PIC_EOI(i->pic, i->intline); + PIC_EOI(i->pic, i->intline, i->priv); if (intr_event_handle(ie, tf) != 0) { goto stray; @@ -619,7 +621,7 @@ stray: } } if (i != NULL) - PIC_MASK(i->pic, i->intline); + PIC_MASK(i->pic, i->intline, i->priv); } void @@ -631,7 +633,7 @@ powerpc_intr_mask(u_int irq) if (i == NULL || i->pic == NULL) return; - PIC_MASK(i->pic, i->intline); + PIC_MASK(i->pic, i->intline, i->priv); } void @@ -643,5 +645,5 @@ powerpc_intr_unmask(u_int irq) if (i == NULL || i->pic == NULL) return; - PIC_UNMASK(i->pic, i->intline); + PIC_UNMASK(i->pic, i->intline, i->priv); } Modified: head/sys/powerpc/powerpc/openpic.c ============================================================================== --- head/sys/powerpc/powerpc/openpic.c Sat Jan 12 21:29:54 2019 (r342974) +++ head/sys/powerpc/powerpc/openpic.c Sat Jan 12 22:05:42 2019 (r342975) @@ -233,7 +233,7 @@ openpic_common_attach(device_t dev, uint32_t node) */ void -openpic_bind(device_t dev, u_int irq, cpuset_t cpumask) +openpic_bind(device_t dev, u_int irq, cpuset_t cpumask, void **priv __unused) { struct openpic_softc *sc; @@ -302,7 +302,7 @@ openpic_dispatch(device_t dev, struct trapframe *tf) } void -openpic_enable(device_t dev, u_int irq, u_int vector) +openpic_enable(device_t dev, u_int irq, u_int vector, void **priv __unused) { struct openpic_softc *sc; uint32_t x; @@ -322,7 +322,7 @@ openpic_enable(device_t dev, u_int irq, u_int vector) } void -openpic_eoi(device_t dev, u_int irq __unused) +openpic_eoi(device_t dev, u_int irq __unused, void *priv __unused) { struct openpic_softc *sc; u_int cpuid; @@ -348,7 +348,7 @@ openpic_ipi(device_t dev, u_int cpu) } void -openpic_mask(device_t dev, u_int irq) +openpic_mask(device_t dev, u_int irq, void *priv __unused) { struct openpic_softc *sc; uint32_t x; @@ -366,7 +366,7 @@ openpic_mask(device_t dev, u_int irq) } void -openpic_unmask(device_t dev, u_int irq) +openpic_unmask(device_t dev, u_int irq, void *priv __unused) { struct openpic_softc *sc; uint32_t x; Modified: head/sys/powerpc/powerpc/pic_if.m ============================================================================== --- head/sys/powerpc/powerpc/pic_if.m Sat Jan 12 21:29:54 2019 (r342974) +++ head/sys/powerpc/powerpc/pic_if.m Sat Jan 12 22:05:42 2019 (r342975) @@ -48,6 +48,7 @@ METHOD void bind { device_t dev; u_int irq; cpuset_t cpumask; + void **priv; }; METHOD void translate_code { @@ -74,11 +75,13 @@ METHOD void enable { device_t dev; u_int irq; u_int vector; + void **priv; }; METHOD void eoi { device_t dev; u_int irq; + void *priv; }; METHOD void ipi { @@ -89,10 +92,12 @@ METHOD void ipi { METHOD void mask { device_t dev; u_int irq; + void *priv; }; METHOD void unmask { device_t dev; u_int irq; + void *priv; }; Modified: head/sys/powerpc/ps3/ps3pic.c ============================================================================== --- head/sys/powerpc/ps3/ps3pic.c Sat Jan 12 21:29:54 2019 (r342974) +++ head/sys/powerpc/ps3/ps3pic.c Sat Jan 12 22:05:42 2019 (r342975) @@ -51,11 +51,11 @@ static int ps3pic_probe(device_t); static int ps3pic_attach(device_t); static void ps3pic_dispatch(device_t, struct trapframe *); -static void ps3pic_enable(device_t, u_int, u_int); -static void ps3pic_eoi(device_t, u_int); +static void ps3pic_enable(device_t, u_int, u_int, void **); +static void ps3pic_eoi(device_t, u_int, void *); static void ps3pic_ipi(device_t, u_int); -static void ps3pic_mask(device_t, u_int); -static void ps3pic_unmask(device_t, u_int); +static void ps3pic_mask(device_t, u_int, void *); +static void ps3pic_unmask(device_t, u_int, void *); struct ps3pic_softc { volatile uint64_t *bitmap_thread0; @@ -183,18 +183,18 @@ ps3pic_dispatch(device_t dev, struct trapframe *tf) } static void -ps3pic_enable(device_t dev, u_int irq, u_int vector) +ps3pic_enable(device_t dev, u_int irq, u_int vector, void **priv) { struct ps3pic_softc *sc; sc = device_get_softc(dev); sc->sc_vector[irq] = vector; - ps3pic_unmask(dev, irq); + ps3pic_unmask(dev, irq, priv); } static void -ps3pic_eoi(device_t dev, u_int irq) +ps3pic_eoi(device_t dev, u_int irq, void *priv) { uint64_t ppe; int thread; @@ -215,7 +215,7 @@ ps3pic_ipi(device_t dev, u_int cpu) } static void -ps3pic_mask(device_t dev, u_int irq) +ps3pic_mask(device_t dev, u_int irq, void *priv) { struct ps3pic_softc *sc; uint64_t ppe; @@ -235,7 +235,7 @@ ps3pic_mask(device_t dev, u_int irq) } static void -ps3pic_unmask(device_t dev, u_int irq) +ps3pic_unmask(device_t dev, u_int irq, void *priv) { struct ps3pic_softc *sc; uint64_t ppe; Modified: head/sys/powerpc/pseries/xics.c ============================================================================== --- head/sys/powerpc/pseries/xics.c Sat Jan 12 21:29:54 2019 (r342974) +++ head/sys/powerpc/pseries/xics.c Sat Jan 12 22:05:42 2019 (r342975) @@ -69,13 +69,13 @@ static int xicp_attach(device_t); static int xics_probe(device_t); static int xics_attach(device_t); -static void xicp_bind(device_t dev, u_int irq, cpuset_t cpumask); +static void xicp_bind(device_t dev, u_int irq, cpuset_t cpumask, void **priv); static void xicp_dispatch(device_t, struct trapframe *); -static void xicp_enable(device_t, u_int, u_int); -static void xicp_eoi(device_t, u_int); +static void xicp_enable(device_t, u_int, u_int, void **priv); +static void xicp_eoi(device_t, u_int, void *priv); static void xicp_ipi(device_t, u_int); -static void xicp_mask(device_t, u_int); -static void xicp_unmask(device_t, u_int); +static void xicp_mask(device_t, u_int, void *priv); +static void xicp_unmask(device_t, u_int, void *priv); #ifdef POWERNV void xicp_smp_cpu_startup(void); @@ -106,6 +106,12 @@ static device_method_t xics_methods[] = { DEVMETHOD_END }; +struct xicp_intvec { + int irq; + int vector; + int cpu; +}; + struct xicp_softc { struct mtx sc_mtx; struct resource *mem[MAXCPU]; @@ -118,11 +124,7 @@ struct xicp_softc { int ibm_set_xive; /* XXX: inefficient -- hash table? tree? */ - struct { - int irq; - int vector; - int cpu; - } intvecs[256]; + struct xicp_intvec intvecs[256]; int nintvecs; bool xics_emu; }; @@ -297,9 +299,10 @@ xics_attach(device_t dev) */ static void -xicp_bind(device_t dev, u_int irq, cpuset_t cpumask) +xicp_bind(device_t dev, u_int irq, cpuset_t cpumask, void **priv) { struct xicp_softc *sc = device_get_softc(dev); + struct xicp_intvec *iv; cell_t status, cpu; int ncpus, i, error; @@ -307,6 +310,11 @@ xicp_bind(device_t dev, u_int irq, cpuset_t cpumask) if (irq == MAX_XICP_IRQS) return; + if (*priv == NULL) + *priv = &sc->intvecs[sc->nintvecs++]; + + iv = *priv; + /* * This doesn't appear to actually support affinity groups, so pick a * random CPU. @@ -326,16 +334,8 @@ xicp_bind(device_t dev, u_int irq, cpuset_t cpumask) } cpu = pcpu_find(cpu)->pc_hwref; + iv->cpu = cpu; - /* XXX: super inefficient */ - for (i = 0; i < sc->nintvecs; i++) { - if (sc->intvecs[i].irq == irq) { - sc->intvecs[i].cpu = cpu; - break; - } - } - KASSERT(i < sc->nintvecs, ("Binding non-configured interrupt")); - if (rtas_exists()) error = rtas_call_method(sc->ibm_set_xive, 3, 1, irq, cpu, XICP_PRIORITY, &status); @@ -412,26 +412,30 @@ xicp_dispatch(device_t dev, struct trapframe *tf) } static void -xicp_enable(device_t dev, u_int irq, u_int vector) +xicp_enable(device_t dev, u_int irq, u_int vector, void **priv) { struct xicp_softc *sc; + struct xicp_intvec *intr; cell_t status, cpu; sc = device_get_softc(dev); - KASSERT(sc->nintvecs + 1 < nitems(sc->intvecs), - ("Too many XICP interrupts")); - /* Bind to this CPU to start: distrib. ID is last entry in gserver# */ cpu = PCPU_GET(hwref); - mtx_lock(&sc->sc_mtx); - sc->intvecs[sc->nintvecs].irq = irq; - sc->intvecs[sc->nintvecs].vector = vector; - sc->intvecs[sc->nintvecs].cpu = cpu; + if (*priv == NULL) { + KASSERT(sc->nintvecs + 1 < nitems(sc->intvecs), + ("Too many XICP interrupts")); + mtx_lock(&sc->sc_mtx); + *priv = &sc->intvecs[sc->nintvecs++]; + mtx_unlock(&sc->sc_mtx); + } + intr = *priv; + + intr->irq = irq; + intr->vector = vector; + intr->cpu = cpu; mb(); - sc->nintvecs++; - mtx_unlock(&sc->sc_mtx); /* IPIs are also enabled */ if (irq == MAX_XICP_IRQS) @@ -440,7 +444,7 @@ xicp_enable(device_t dev, u_int irq, u_int vector) if (rtas_exists()) { rtas_call_method(sc->ibm_set_xive, 3, 1, irq, cpu, XICP_PRIORITY, &status); - xicp_unmask(dev, irq); + xicp_unmask(dev, irq, intr); #ifdef POWERNV } else { status = opal_call(OPAL_SET_XIVE, irq, cpu << 2, XICP_PRIORITY); @@ -454,7 +458,7 @@ xicp_enable(device_t dev, u_int irq, u_int vector) } static void -xicp_eoi(device_t dev, u_int irq) +xicp_eoi(device_t dev, u_int irq, void *priv) { #ifdef POWERNV struct xicp_softc *sc; @@ -500,7 +504,7 @@ xicp_ipi(device_t dev, u_int cpu) } static void -xicp_mask(device_t dev, u_int irq) +xicp_mask(device_t dev, u_int irq, void *priv) { struct xicp_softc *sc = device_get_softc(dev); cell_t status; @@ -512,21 +516,16 @@ xicp_mask(device_t dev, u_int irq) rtas_call_method(sc->ibm_int_off, 1, 1, irq, &status); #ifdef POWERNV } else { - int i; + struct xicp_intvec *ivec = priv; - for (i = 0; i < sc->nintvecs; i++) { - if (sc->intvecs[i].irq == irq) { - break; - } - } - KASSERT(i < sc->nintvecs, ("Masking unconfigured interrupt")); - opal_call(OPAL_SET_XIVE, irq, sc->intvecs[i].cpu << 2, 0xff); + KASSERT(ivec != NULL, ("Masking unconfigured interrupt")); + opal_call(OPAL_SET_XIVE, irq, ivec->cpu << 2, 0xff); #endif } } static void -xicp_unmask(device_t dev, u_int irq) +xicp_unmask(device_t dev, u_int irq, void *priv) { struct xicp_softc *sc = device_get_softc(dev); cell_t status; @@ -538,16 +537,10 @@ xicp_unmask(device_t dev, u_int irq) rtas_call_method(sc->ibm_int_on, 1, 1, irq, &status); #ifdef POWERNV } else { - int i; + struct xicp_intvec *ivec = priv; - for (i = 0; i < sc->nintvecs; i++) { - if (sc->intvecs[i].irq == irq) { - break; - } - } - KASSERT(i < sc->nintvecs, ("Unmasking unconfigured interrupt")); - opal_call(OPAL_SET_XIVE, irq, sc->intvecs[i].cpu << 2, - XICP_PRIORITY); + KASSERT(ivec != NULL, ("Unmasking unconfigured interrupt")); + opal_call(OPAL_SET_XIVE, irq, ivec->cpu << 2, XICP_PRIORITY); #endif } } From owner-svn-src-head@freebsd.org Sat Jan 12 22:10:32 2019 Return-Path: Delivered-To: svn-src-head@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 90A2C14A0883; Sat, 12 Jan 2019 22:10:32 +0000 (UTC) (envelope-from jhibbits@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 38088722B6; Sat, 12 Jan 2019 22:10:32 +0000 (UTC) (envelope-from jhibbits@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 27B9A978A; Sat, 12 Jan 2019 22:10:32 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0CMAWu4001536; Sat, 12 Jan 2019 22:10:32 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0CMAVDI001535; Sat, 12 Jan 2019 22:10:31 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201901122210.x0CMAVDI001535@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sat, 12 Jan 2019 22:10:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342976 - head/sys/powerpc/pseries X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/pseries X-SVN-Commit-Revision: 342976 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 38088722B6 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.969,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jan 2019 22:10:32 -0000 Author: jhibbits Date: Sat Jan 12 22:10:31 2019 New Revision: 342976 URL: https://svnweb.freebsd.org/changeset/base/342976 Log: powerpc/pseries: Cache the IPI vector to avoid the common static lookup The IPI vector is static, and happens to be the most common interrupt by far on some systems. Rather than searching for the interrupt every time, cache the index. This appears to yield a small performance boost, of about 8% reduction in buildworld times, on my POWER9 system, when paired with r342975. Modified: head/sys/powerpc/pseries/xics.c Modified: head/sys/powerpc/pseries/xics.c ============================================================================== --- head/sys/powerpc/pseries/xics.c Sat Jan 12 22:05:42 2019 (r342975) +++ head/sys/powerpc/pseries/xics.c Sat Jan 12 22:10:31 2019 (r342976) @@ -126,6 +126,7 @@ struct xicp_softc { /* XXX: inefficient -- hash table? tree? */ struct xicp_intvec intvecs[256]; int nintvecs; + int ipi_vec; bool xics_emu; }; @@ -398,15 +399,17 @@ xicp_dispatch(device_t dev, struct trapframe *tf) else phyp_hcall(H_IPI, (uint64_t)(PCPU_GET(hwref)), 0xff); - } + i = sc->ipi_vec; + } else { - /* XXX: super inefficient */ - for (i = 0; i < sc->nintvecs; i++) { - if (sc->intvecs[i].irq == xirr) - break; + /* XXX: super inefficient */ + for (i = 0; i < sc->nintvecs; i++) { + if (sc->intvecs[i].irq == xirr) + break; + } + KASSERT(i < sc->nintvecs, ("Unmapped XIRR")); } - KASSERT(i < sc->nintvecs, ("Unmapped XIRR")); powerpc_dispatch_intr(sc->intvecs[i].vector, tf); } } @@ -437,9 +440,11 @@ xicp_enable(device_t dev, u_int irq, u_int vector, voi intr->cpu = cpu; mb(); - /* IPIs are also enabled */ - if (irq == MAX_XICP_IRQS) + /* IPIs are also enabled. Stash off the vector index */ + if (irq == MAX_XICP_IRQS) { + sc->ipi_vec = intr - sc->intvecs; return; + } if (rtas_exists()) { rtas_call_method(sc->ibm_set_xive, 3, 1, irq, cpu, From owner-svn-src-head@freebsd.org Sat Jan 12 22:36:35 2019 Return-Path: Delivered-To: svn-src-head@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 C895714A0F6E; Sat, 12 Jan 2019 22:36:34 +0000 (UTC) (envelope-from cem@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 DCA7572C5B; Sat, 12 Jan 2019 22:36:33 +0000 (UTC) (envelope-from cem@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 A8FF39C85; Sat, 12 Jan 2019 22:36:33 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0CMaXgP017120; Sat, 12 Jan 2019 22:36:33 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0CMaXsK017117; Sat, 12 Jan 2019 22:36:33 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201901122236.x0CMaXsK017117@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Sat, 12 Jan 2019 22:36:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342977 - in head/sys/dev: amdsmn amdtemp X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head/sys/dev: amdsmn amdtemp X-SVN-Commit-Revision: 342977 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DCA7572C5B 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)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jan 2019 22:36:35 -0000 Author: cem Date: Sat Jan 12 22:36:33 2019 New Revision: 342977 URL: https://svnweb.freebsd.org/changeset/base/342977 Log: amdtemp(4): Add support for Family 15h, Model >=60h Family 15h is a bit of an oddball. Early models used the same temperature register and spec (mostly[1]) as earlier CPU families. Model 60h-6Fh and 70-7Fh use something more like Family 17h's Service Management Network, communicating with it in a similar fashion. To support them, add support for their version of SMU indirection to amdsmn(4) and use it in amdtemp(4) on these models. While here, clarify some of the deviceid macros in amdtemp(4) that were added with arbitrary, incorrect family numbers, and remove ones that were not used. Additionally, clarify intent and condition of heterogenous multi-socket system detection. [1]: 15h adds the "adjust range by -49°C if a certain condition is met," which previous families did not have. Reported by: D. C. PR: 234657 Tested by: D. C. Modified: head/sys/dev/amdsmn/amdsmn.c head/sys/dev/amdtemp/amdtemp.c Modified: head/sys/dev/amdsmn/amdsmn.c ============================================================================== --- head/sys/dev/amdsmn/amdsmn.c Sat Jan 12 22:10:31 2019 (r342976) +++ head/sys/dev/amdsmn/amdsmn.c Sat Jan 12 22:36:33 2019 (r342977) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2017 Conrad Meyer + * Copyright (c) 2017-2019 Conrad Meyer * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,7 +25,7 @@ */ /* - * Driver for the AMD Family 17h CPU System Management Network. + * Driver for the AMD Family 15h and 17h CPU System Management Network. */ #include @@ -51,24 +51,45 @@ __FBSDID("$FreeBSD$"); #include -#define SMN_ADDR_REG 0x60 -#define SMN_DATA_REG 0x64 +#define F15H_SMN_ADDR_REG 0xb8 +#define F15H_SMN_DATA_REG 0xbc +#define F17H_SMN_ADDR_REG 0x60 +#define F17H_SMN_DATA_REG 0x64 +#define PCI_DEVICE_ID_AMD_15H_M60H_ROOT 0x1576 #define PCI_DEVICE_ID_AMD_17H_ROOT 0x1450 -#define PCI_DEVICE_ID_AMD_17H_ROOT_DF_F3 0x1463 #define PCI_DEVICE_ID_AMD_17H_M10H_ROOT 0x15d0 -#define PCI_DEVICE_ID_AMD_17H_M10H_ROOT_DF_F3 0x15eb +struct pciid; struct amdsmn_softc { struct mtx smn_lock; + const struct pciid *smn_pciid; }; -static struct pciid { +static const struct pciid { uint16_t amdsmn_vendorid; uint16_t amdsmn_deviceid; + uint8_t amdsmn_addr_reg; + uint8_t amdsmn_data_reg; } amdsmn_ids[] = { - { CPU_VENDOR_AMD, PCI_DEVICE_ID_AMD_17H_ROOT }, - { CPU_VENDOR_AMD, PCI_DEVICE_ID_AMD_17H_M10H_ROOT }, + { + .amdsmn_vendorid = CPU_VENDOR_AMD, + .amdsmn_deviceid = PCI_DEVICE_ID_AMD_15H_M60H_ROOT, + .amdsmn_addr_reg = F15H_SMN_ADDR_REG, + .amdsmn_data_reg = F15H_SMN_DATA_REG, + }, + { + .amdsmn_vendorid = CPU_VENDOR_AMD, + .amdsmn_deviceid = PCI_DEVICE_ID_AMD_17H_ROOT, + .amdsmn_addr_reg = F17H_SMN_ADDR_REG, + .amdsmn_data_reg = F17H_SMN_DATA_REG, + }, + { + .amdsmn_vendorid = CPU_VENDOR_AMD, + .amdsmn_deviceid = PCI_DEVICE_ID_AMD_17H_M10H_ROOT, + .amdsmn_addr_reg = F17H_SMN_ADDR_REG, + .amdsmn_data_reg = F17H_SMN_DATA_REG, + }, }; /* @@ -101,7 +122,7 @@ MODULE_PNP_INFO("U16:vendor;U16:device", pci, amdsmn, nitems(amdsmn_ids)); static bool -amdsmn_match(device_t parent) +amdsmn_match(device_t parent, const struct pciid **pciid_out) { uint16_t vendor, device; size_t i; @@ -109,10 +130,14 @@ amdsmn_match(device_t parent) vendor = pci_get_vendor(parent); device = pci_get_device(parent); - for (i = 0; i < nitems(amdsmn_ids); i++) + for (i = 0; i < nitems(amdsmn_ids); i++) { if (vendor == amdsmn_ids[i].amdsmn_vendorid && - device == amdsmn_ids[i].amdsmn_deviceid) + device == amdsmn_ids[i].amdsmn_deviceid) { + if (pciid_out != NULL) + *pciid_out = &amdsmn_ids[i]; return (true); + } + } return (false); } @@ -124,7 +149,7 @@ amdsmn_identify(driver_t *driver, device_t parent) /* Make sure we're not being doubly invoked. */ if (device_find_child(parent, "amdsmn", -1) != NULL) return; - if (!amdsmn_match(parent)) + if (!amdsmn_match(parent, NULL)) return; child = device_add_child(parent, "amdsmn", -1); @@ -136,21 +161,25 @@ static int amdsmn_probe(device_t dev) { uint32_t family; + char buf[64]; if (resource_disabled("amdsmn", 0)) return (ENXIO); - if (!amdsmn_match(device_get_parent(dev))) + if (!amdsmn_match(device_get_parent(dev), NULL)) return (ENXIO); family = CPUID_TO_FAMILY(cpu_id); switch (family) { + case 0x15: case 0x17: break; default: return (ENXIO); } - device_set_desc(dev, "AMD Family 17h System Management Network"); + snprintf(buf, sizeof(buf), "AMD Family %xh System Management Network", + family); + device_set_desc_copy(dev, buf); return (BUS_PROBE_GENERIC); } @@ -160,6 +189,9 @@ amdsmn_attach(device_t dev) { struct amdsmn_softc *sc = device_get_softc(dev); + if (!amdsmn_match(device_get_parent(dev), &sc->smn_pciid)) + return (ENXIO); + mtx_init(&sc->smn_lock, "SMN mtx", "SMN", MTX_DEF); return (0); } @@ -182,8 +214,8 @@ amdsmn_read(device_t dev, uint32_t addr, uint32_t *val parent = device_get_parent(dev); mtx_lock(&sc->smn_lock); - pci_write_config(parent, SMN_ADDR_REG, addr, 4); - *value = pci_read_config(parent, SMN_DATA_REG, 4); + pci_write_config(parent, sc->smn_pciid->amdsmn_addr_reg, addr, 4); + *value = pci_read_config(parent, sc->smn_pciid->amdsmn_data_reg, 4); mtx_unlock(&sc->smn_lock); return (0); @@ -198,8 +230,8 @@ amdsmn_write(device_t dev, uint32_t addr, uint32_t val parent = device_get_parent(dev); mtx_lock(&sc->smn_lock); - pci_write_config(parent, SMN_ADDR_REG, addr, 4); - pci_write_config(parent, SMN_DATA_REG, value, 4); + pci_write_config(parent, sc->smn_pciid->amdsmn_addr_reg, addr, 4); + pci_write_config(parent, sc->smn_pciid->amdsmn_data_reg, value, 4); mtx_unlock(&sc->smn_lock); return (0); Modified: head/sys/dev/amdtemp/amdtemp.c ============================================================================== --- head/sys/dev/amdtemp/amdtemp.c Sat Jan 12 22:10:31 2019 (r342976) +++ head/sys/dev/amdtemp/amdtemp.c Sat Jan 12 22:36:33 2019 (r342977) @@ -5,6 +5,8 @@ * Copyright (c) 2009 Norikatsu Shigemura * Copyright (c) 2009-2012 Jung-uk Kim * All rights reserved. + * Copyright (c) 2017-2019 Conrad Meyer + * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -76,44 +78,67 @@ struct amdtemp_softc { device_t sc_smn; }; +/* + * N.B. The numbers in macro names below are significant and represent CPU + * family and model numbers. Do not make up fictitious family or model numbers + * when adding support for new devices. + */ #define VENDORID_AMD 0x1022 #define DEVICEID_AMD_MISC0F 0x1103 #define DEVICEID_AMD_MISC10 0x1203 #define DEVICEID_AMD_MISC11 0x1303 -#define DEVICEID_AMD_MISC12 0x1403 #define DEVICEID_AMD_MISC14 0x1703 #define DEVICEID_AMD_MISC15 0x1603 +#define DEVICEID_AMD_MISC15_M10H 0x1403 +#define DEVICEID_AMD_MISC15_M30H 0x141d +#define DEVICEID_AMD_MISC15_M60H_ROOT 0x1576 #define DEVICEID_AMD_MISC16 0x1533 #define DEVICEID_AMD_MISC16_M30H 0x1583 -#define DEVICEID_AMD_MISC17 0x141d #define DEVICEID_AMD_HOSTB17H_ROOT 0x1450 -#define DEVICEID_AMD_HOSTB17H_DF_F3 0x1463 #define DEVICEID_AMD_HOSTB17H_M10H_ROOT 0x15d0 -#define DEVICEID_AMD_HOSTB17H_M10H_DF_F3 0x15eb -static struct amdtemp_product { +static const struct amdtemp_product { uint16_t amdtemp_vendorid; uint16_t amdtemp_deviceid; + /* + * 0xFC register is only valid on the D18F3 PCI device; SMN temp + * drivers do not attach to that device. + */ + bool amdtemp_has_cpuid; } amdtemp_products[] = { - { VENDORID_AMD, DEVICEID_AMD_MISC0F }, - { VENDORID_AMD, DEVICEID_AMD_MISC10 }, - { VENDORID_AMD, DEVICEID_AMD_MISC11 }, - { VENDORID_AMD, DEVICEID_AMD_MISC12 }, - { VENDORID_AMD, DEVICEID_AMD_MISC14 }, - { VENDORID_AMD, DEVICEID_AMD_MISC15 }, - { VENDORID_AMD, DEVICEID_AMD_MISC16 }, - { VENDORID_AMD, DEVICEID_AMD_MISC16_M30H }, - { VENDORID_AMD, DEVICEID_AMD_MISC17 }, - { VENDORID_AMD, DEVICEID_AMD_HOSTB17H_ROOT }, - { VENDORID_AMD, DEVICEID_AMD_HOSTB17H_M10H_ROOT }, + { VENDORID_AMD, DEVICEID_AMD_MISC0F, true }, + { VENDORID_AMD, DEVICEID_AMD_MISC10, true }, + { VENDORID_AMD, DEVICEID_AMD_MISC11, true }, + { VENDORID_AMD, DEVICEID_AMD_MISC14, true }, + { VENDORID_AMD, DEVICEID_AMD_MISC15, true }, + { VENDORID_AMD, DEVICEID_AMD_MISC15_M10H, true }, + { VENDORID_AMD, DEVICEID_AMD_MISC15_M30H, true }, + { VENDORID_AMD, DEVICEID_AMD_MISC15_M60H_ROOT, false }, + { VENDORID_AMD, DEVICEID_AMD_MISC16, true }, + { VENDORID_AMD, DEVICEID_AMD_MISC16_M30H, true }, + { VENDORID_AMD, DEVICEID_AMD_HOSTB17H_ROOT, false }, + { VENDORID_AMD, DEVICEID_AMD_HOSTB17H_M10H_ROOT, false }, }; /* - * Reported Temperature Control Register + * Reported Temperature Control Register, family 0Fh-15h (some models), 16h. */ #define AMDTEMP_REPTMP_CTRL 0xa4 +#define AMDTEMP_REPTMP10H_CURTMP_MASK 0x7ff +#define AMDTEMP_REPTMP10H_CURTMP_SHIFT 21 +#define AMDTEMP_REPTMP10H_TJSEL_MASK 0x3 +#define AMDTEMP_REPTMP10H_TJSEL_SHIFT 16 + /* + * Reported Temperature, Family 15h, M60+ + * + * Same register bit definitions as other Family 15h CPUs, but access is + * indirect via SMN, like Family 17h. + */ +#define AMDTEMP_15H_M60H_REPTMP_CTRL 0xd8200ca4 + +/* * Reported Temperature, Family 17h * * According to AMD OSRR for 17H, section 4.2.1, bits 31-21 of this register @@ -123,9 +148,13 @@ static struct amdtemp_product { */ #define AMDTEMP_17H_CUR_TMP 0x59800 #define AMDTEMP_17H_CUR_TMP_RANGE_SEL (1 << 19) -#define AMDTEMP_17H_CUR_TMP_RANGE_OFF 490 /* + * AMD temperature range adjustment, in deciKelvins (i.e., 49.0 Celsius). + */ +#define AMDTEMP_CURTMP_RANGE_ADJUST 490 + +/* * Thermaltrip Status Register (Family 0Fh only) */ #define AMDTEMP_THERMTP_STAT 0xe4 @@ -151,9 +180,9 @@ static int amdtemp_probe(device_t dev); static int amdtemp_attach(device_t dev); static void amdtemp_intrhook(void *arg); static int amdtemp_detach(device_t dev); -static int amdtemp_match(device_t dev); static int32_t amdtemp_gettemp0f(device_t dev, amdsensor_t sensor); static int32_t amdtemp_gettemp(device_t dev, amdsensor_t sensor); +static int32_t amdtemp_gettemp15hm60h(device_t dev, amdsensor_t sensor); static int32_t amdtemp_gettemp17h(device_t dev, amdsensor_t sensor); static int amdtemp_sysctl(SYSCTL_HANDLER_ARGS); @@ -180,8 +209,8 @@ MODULE_DEPEND(amdtemp, amdsmn, 1, 1, 1); MODULE_PNP_INFO("U16:vendor;U16:device", pci, amdtemp, amdtemp_products, nitems(amdtemp_products)); -static int -amdtemp_match(device_t dev) +static bool +amdtemp_match(device_t dev, const struct amdtemp_product **product_out) { int i; uint16_t vendor, devid; @@ -191,11 +220,13 @@ amdtemp_match(device_t dev) for (i = 0; i < nitems(amdtemp_products); i++) { if (vendor == amdtemp_products[i].amdtemp_vendorid && - devid == amdtemp_products[i].amdtemp_deviceid) - return (1); + devid == amdtemp_products[i].amdtemp_deviceid) { + if (product_out != NULL) + *product_out = &amdtemp_products[i]; + return (true); + } } - - return (0); + return (false); } static void @@ -207,7 +238,7 @@ amdtemp_identify(driver_t *driver, device_t parent) if (device_find_child(parent, "amdtemp", -1) != NULL) return; - if (amdtemp_match(parent)) { + if (amdtemp_match(parent, NULL)) { child = device_add_child(parent, "amdtemp", -1); if (child == NULL) device_printf(parent, "add amdtemp child failed\n"); @@ -221,7 +252,7 @@ amdtemp_probe(device_t dev) if (resource_disabled("amdtemp", 0)) return (ENXIO); - if (!amdtemp_match(device_get_parent(dev))) + if (!amdtemp_match(device_get_parent(dev), NULL)) return (ENXIO); family = CPUID_TO_FAMILY(cpu_id); @@ -254,23 +285,42 @@ amdtemp_attach(device_t dev) { char tn[32]; u_int regs[4]; - struct amdtemp_softc *sc = device_get_softc(dev); + const struct amdtemp_product *product; + struct amdtemp_softc *sc; struct sysctl_ctx_list *sysctlctx; struct sysctl_oid *sysctlnode; uint32_t cpuid, family, model; u_int bid; int erratum319, unit; + bool needsmn; + sc = device_get_softc(dev); erratum319 = 0; + needsmn = false; - /* - * CPUID Register is available from Revision F. - */ + if (!amdtemp_match(device_get_parent(dev), &product)) + return (ENXIO); + cpuid = cpu_id; family = CPUID_TO_FAMILY(cpuid); model = CPUID_TO_MODEL(cpuid); - if ((family != 0x0f || model >= 0x40) && family != 0x17) { - cpuid = pci_read_config(dev, AMDTEMP_CPUID, 4); + + /* + * This checks for the byzantine condition of running a heterogenous + * revision multi-socket system where the attach thread is potentially + * probing a remote socket's PCI device. + * + * Currently, such scenarios are unsupported on models using the SMN + * (because on those models, amdtemp(4) attaches to a different PCI + * device than the one that contains AMDTEMP_CPUID). + * + * The ancient 0x0F family of devices only supports this register from + * models 40h+. + */ + if (product->amdtemp_has_cpuid && (family > 0x0f || + (family == 0x0f && model >= 0x40))) { + cpuid = pci_read_config(device_get_parent(dev), AMDTEMP_CPUID, + 4); family = CPUID_TO_FAMILY(cpuid); model = CPUID_TO_MODEL(cpuid); } @@ -364,16 +414,30 @@ amdtemp_attach(device_t dev) case 0x14: case 0x15: case 0x16: + sc->sc_ntemps = 1; /* - * There is only one sensor per package. + * Some later (60h+) models of family 15h use a similar SMN + * network as family 17h. (However, the register index differs + * from 17h and the decoding matches other 10h-15h models, + * which differ from 17h.) */ - sc->sc_ntemps = 1; - - sc->sc_gettemp = amdtemp_gettemp; + if (family == 0x15 && model >= 0x60) { + sc->sc_gettemp = amdtemp_gettemp15hm60h; + needsmn = true; + } else + sc->sc_gettemp = amdtemp_gettemp; break; case 0x17: sc->sc_ntemps = 1; sc->sc_gettemp = amdtemp_gettemp17h; + needsmn = true; + break; + default: + device_printf(dev, "Bogus family 0x%x\n", family); + return (ENXIO); + } + + if (needsmn) { sc->sc_smn = device_find_child( device_get_parent(dev), "amdsmn", -1); if (sc->sc_smn == NULL) { @@ -381,7 +445,6 @@ amdtemp_attach(device_t dev) device_printf(dev, "No SMN device found\n"); return (ENXIO); } - break; } /* Find number of cores per package. */ @@ -585,6 +648,29 @@ amdtemp_gettemp0f(device_t dev, amdsensor_t sensor) return (temp); } +static uint32_t +amdtemp_decode_fam10h_to_16h(int32_t sc_offset, uint32_t val) +{ + uint32_t temp; + + /* Convert raw register subfield units (0.125C) to units of 0.1C. */ + temp = ((val >> AMDTEMP_REPTMP10H_CURTMP_SHIFT) & + AMDTEMP_REPTMP10H_CURTMP_MASK) * 5 / 4; + + /* + * On Family 15h and higher, if CurTmpTjSel is 11b, the range is + * adjusted down by 49.0 degrees Celsius. (This adjustment is not + * documented in BKDGs prior to family 15h model 00h.) + */ + if (CPUID_TO_FAMILY(cpu_id) >= 0x15 && + ((val >> AMDTEMP_REPTMP10H_TJSEL_SHIFT) & + AMDTEMP_REPTMP10H_TJSEL_MASK) == 0x3) + temp -= AMDTEMP_CURTMP_RANGE_ADJUST; + + temp += AMDTEMP_ZERO_C_TO_K + sc_offset * 10; + return (temp); +} + static int32_t amdtemp_gettemp(device_t dev, amdsensor_t sensor) { @@ -592,10 +678,19 @@ amdtemp_gettemp(device_t dev, amdsensor_t sensor) uint32_t temp; temp = pci_read_config(dev, AMDTEMP_REPTMP_CTRL, 4); - temp = ((temp >> 21) & 0x7ff) * 5 / 4; - temp += AMDTEMP_ZERO_C_TO_K + sc->sc_offset * 10; + return (amdtemp_decode_fam10h_to_16h(sc->sc_offset, temp)); +} - return (temp); +static int32_t +amdtemp_gettemp15hm60h(device_t dev, amdsensor_t sensor) +{ + struct amdtemp_softc *sc = device_get_softc(dev); + uint32_t val; + int error; + + error = amdsmn_read(sc->sc_smn, AMDTEMP_15H_M60H_REPTMP_CTRL, &val); + KASSERT(error == 0, ("amdsmn_read")); + return (amdtemp_decode_fam10h_to_16h(sc->sc_offset, val)); } static int32_t @@ -610,7 +705,7 @@ amdtemp_gettemp17h(device_t dev, amdsensor_t sensor) temp = ((val >> 21) & 0x7ff) * 5 / 4; if ((val & AMDTEMP_17H_CUR_TMP_RANGE_SEL) != 0) - temp -= AMDTEMP_17H_CUR_TMP_RANGE_OFF; + temp -= AMDTEMP_CURTMP_RANGE_ADJUST; temp += AMDTEMP_ZERO_C_TO_K + sc->sc_offset * 10; return (temp);